1
0
mirror of https://github.com/louislam/dockge.git synced 2025-07-04 16:30:09 +02:00

Fix the hostname for the current agent

This commit is contained in:
Louis Lam
2023-12-30 19:31:10 +08:00
parent cc02eee50c
commit b8cff4cc51

@ -274,7 +274,12 @@ export default defineComponent({
}, },
methods: { methods: {
parsePort(port) { 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() { remove() {
delete this.jsonObject.services[this.name]; delete this.jsonObject.services[this.name];