From b5ada5ef1185fbd0a2849f393bb16673b601195f Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 21 Apr 2023 08:50:15 -0700 Subject: [PATCH] Add type field to services from api --- src/utils/config/service-helpers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 6fc497af0..d4d48a13f 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -32,6 +32,7 @@ export async function servicesFromConfig() { services: servicesGroup[Object.keys(servicesGroup)[0]].map((entries) => ({ name: Object.keys(entries)[0], ...entries[Object.keys(entries)[0]], + type: 'service' })), })); @@ -82,6 +83,7 @@ export async function servicesFromDocker() { constructedService = { container: container.Names[0].replace(/^\//, ""), server: serverName, + type: 'service' }; } shvl.set(constructedService, label.replace("homepage.", ""), container.Labels[label]); @@ -183,6 +185,7 @@ export async function servicesFromKubernetes() { icon: ingress.metadata.annotations[`${ANNOTATION_BASE}/icon`] || '', description: ingress.metadata.annotations[`${ANNOTATION_BASE}/description`] || '', external: false, + type: 'service' }; if (ingress.metadata.annotations[`${ANNOTATION_BASE}/external`]) { constructedService.external = String(ingress.metadata.annotations[`${ANNOTATION_BASE}/external`]).toLowerCase() === "true"