From b8cff4cc5113e5602934ba2f44f23be668f6e4cc Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 30 Dec 2023 19:31:10 +0800 Subject: [PATCH] Fix the hostname for the current agent --- frontend/src/components/Container.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Container.vue b/frontend/src/components/Container.vue index 8741d14..e7effd4 100644 --- a/frontend/src/components/Container.vue +++ b/frontend/src/components/Container.vue @@ -274,7 +274,12 @@ export default defineComponent({ }, methods: { parsePort(port) { - return parseDockerPort(port, this.stack.primaryHostname); + if (this.stack.endpoint) { + return parseDockerPort(port, this.stack.endpoint.hostname); + } else { + let hostname = this.$root.info.primaryHostname || location.hostname; + return parseDockerPort(port, hostname); + } }, remove() { delete this.jsonObject.services[this.name];