mirror of
https://github.com/louislam/dockge.git
synced 2026-05-22 06:22:17 +00:00
WIP
This commit is contained in:
@@ -93,8 +93,9 @@
|
||||
<div class="mt-3">
|
||||
<label for="name" class="form-label">{{ $t("dockgeAgent") }}</label>
|
||||
<select v-model="stack.endpoint" class="form-select">
|
||||
<option value="">{{ $t("currentEndpoint") }}</option>
|
||||
<option value="rs-debian:5001">rs-debian:5001</option>
|
||||
<option v-for="(agent, endpoint) in $root.agentList" :key="endpoint" :value="endpoint" :disabled="$root.agentStatusList[endpoint] != 'online'">
|
||||
({{ $root.agentStatusList[endpoint] }}) {{ (endpoint) ? endpoint : $t("currentEndpoint") }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -375,9 +376,16 @@ export default {
|
||||
},
|
||||
|
||||
endpoint() {
|
||||
return this.$route.params.endpoint || "";
|
||||
}
|
||||
return this.stack.endpoint || this.$route.params.endpoint || "";
|
||||
},
|
||||
|
||||
url() {
|
||||
if (this.stack.endpoint) {
|
||||
return `/compose/${this.stack.name}/${this.stack.endpoint}`;
|
||||
} else {
|
||||
return `/compose/${this.stack.name}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
"stack.composeYAML": {
|
||||
@@ -556,7 +564,7 @@ export default {
|
||||
|
||||
if (res.ok) {
|
||||
this.isEditMode = false;
|
||||
this.$router.push("/compose/" + this.stack.name);
|
||||
this.$router.push(this.url);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -570,7 +578,7 @@ export default {
|
||||
|
||||
if (res.ok) {
|
||||
this.isEditMode = false;
|
||||
this.$router.push("/compose/" + this.stack.name);
|
||||
this.$router.push(this.url);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Terminal class="terminal" :rows="20" mode="mainTerminal" name="console"></Terminal>
|
||||
<Terminal class="terminal" :rows="20" mode="mainTerminal" name="console" :endpoint="endpoint"></Terminal>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@@ -32,6 +32,11 @@ export default {
|
||||
allowedCommandList,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
endpoint() {
|
||||
return this.$route.params.endpoint || "";
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
return this.$route.params.stackName;
|
||||
},
|
||||
endpoint() {
|
||||
// TODO
|
||||
return this.$route.params.endpoint || "";
|
||||
},
|
||||
shell() {
|
||||
return this.$route.params.type;
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
return this.$route.params.serviceName;
|
||||
},
|
||||
terminalName() {
|
||||
return getContainerExecTerminalName(this.stackName, this.serviceName, 0);
|
||||
return getContainerExecTerminalName(this.endpoint, this.stackName, this.serviceName, 0);
|
||||
},
|
||||
sh() {
|
||||
let endpoint = this.$route.params.endpoint;
|
||||
|
||||
Reference in New Issue
Block a user