From 5a8b27d01672d1dd0eb92eeb2429f36e2745409a Mon Sep 17 00:00:00 2001 From: Debsmita Santra Date: Fri, 2 Feb 2024 11:53:17 +0530 Subject: [PATCH] feat(topology): added default runtime icon to topology nodes (#1157) --- plugins/topology/src/data-transforms/data-transformer.ts | 2 +- plugins/topology/src/imgs/logos/defaulthub.svg | 1 + plugins/topology/src/utils/icons.ts | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 plugins/topology/src/imgs/logos/defaulthub.svg diff --git a/plugins/topology/src/data-transforms/data-transformer.ts b/plugins/topology/src/data-transforms/data-transformer.ts index dfca13f626..3bb91afed0 100644 --- a/plugins/topology/src/data-transforms/data-transformer.ts +++ b/plugins/topology/src/data-transforms/data-transformer.ts @@ -48,7 +48,7 @@ export const getBaseTopologyDataModel = (resources: K8sResponseData): Model => { resource, item, TYPE_WORKLOAD, - '', + 'icon-default', getUrlForResource(resources, resource), { podsData: getPodsDataForResource(resource, resources), diff --git a/plugins/topology/src/imgs/logos/defaulthub.svg b/plugins/topology/src/imgs/logos/defaulthub.svg new file mode 100644 index 0000000000..4522b61262 --- /dev/null +++ b/plugins/topology/src/imgs/logos/defaulthub.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/plugins/topology/src/utils/icons.ts b/plugins/topology/src/utils/icons.ts index 3bba6c3c51..0f924a13b1 100644 --- a/plugins/topology/src/utils/icons.ts +++ b/plugins/topology/src/utils/icons.ts @@ -1,3 +1,4 @@ +import defaultImg from '../imgs/logos/defaulthub.svg'; import djangoImg from '../imgs/logos/django.svg'; import dotnetImg from '../imgs/logos/dotnet.svg'; import drupalImg from '../imgs/logos/drupal.svg'; @@ -48,7 +49,8 @@ const logos = new Map() .set('icon-rh-openjdk', openjdkImg) .set('icon-ruby', rubyImg) .set('icon-spring', springImg) - .set('icon-spring-boot', springBootImg); + .set('icon-spring-boot', springBootImg) + .set('icon-default', defaultImg); export const getImageForIconClass = (iconClass: string): string => { return logos.get(iconClass);