[Serverless Search] Fix language icons (#166739)

## Summary

This fixes language icons for language clients dropdown.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Sander Philipse 2023-09-19 17:56:42 +02:00 committed by GitHub
parent 100e5fc85d
commit bda30ddfd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -56,7 +56,7 @@ export const LanguageClientPanel: React.FC<SelectClientProps> = ({
<EuiFlexItem grow={false}>
<EuiImage
alt=""
src={src || `${assetBasePath}${language.iconType}`}
src={src || `${assetBasePath}/${language.iconType}`}
height={euiTheme.size.xl}
width={euiTheme.size.xl}
/>

View file

@ -83,7 +83,7 @@ export const APIGettingStarted = () => {
ingestPipeline: indexPipelineParameters.name,
url: cloudContext.elasticsearchUrl || DEFAULT_URL,
};
const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/client_libraries/`);
const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/client_libraries`);
const [selectedLanguage, setSelectedLanguage] = useState<LanguageDefinition>(curlDefinition);
return (

View file

@ -30,8 +30,8 @@ import { useKibanaServices } from '../hooks/use_kibana';
export const ConnectorsOverview = () => {
const { http } = useKibanaServices();
const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/`);
const connectorsPath = assetBasePath + 'connectors.svg';
const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets`);
const connectorsPath = assetBasePath + '/connectors.svg';
const { data } = useQuery({
queryKey: ['fetchConnectors'],

View file

@ -57,7 +57,7 @@ export const ElasticsearchOverview = () => {
const elasticsearchURL = useMemo(() => {
return cloud?.elasticsearchUrl ?? ELASTICSEARCH_URL_PLACEHOLDER;
}, [cloud]);
const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/`);
const assetBasePath = http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets`);
const codeSnippetArguments: LanguageDefinitionSnippetArguments = {
url: elasticsearchURL,
apiKey: clientApiKey,