From 8f142af12e9ff8c65925e46248bf30886d5bcb79 Mon Sep 17 00:00:00 2001 From: stroskler Date: Thu, 1 Feb 2024 22:12:02 +0000 Subject: [PATCH] feat(containerTerminal): add friendly name adding the `friendlyname` option to the running and paused container --- frontend/src/mixins/socket.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/mixins/socket.ts b/frontend/src/mixins/socket.ts index abb95e0e..f5573dd6 100644 --- a/frontend/src/mixins/socket.ts +++ b/frontend/src/mixins/socket.ts @@ -131,10 +131,15 @@ export default defineComponent({ methods: { endpointDisplayFunction(endpoint : string) { - if (endpoint) { - return endpoint; - } else { - return this.$t("currentEndpoint"); + for (const [k, v] of Object.entries(this.$data.agentList)) { + if (endpoint) { + if (endpoint === v["endpoint"] && v["friendlyname"] !== "") { + return v["friendlyname"]; + } + if (endpoint === v["endpoint"] && v["friendlyname"] === "" ) { + return endpoint; + } + } } },