Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/agent-socket-handlers/docker-socket-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.update(socket);
callbackResult({
ok: true,
msg: "Updated",
msg: `Updated ${stackName}`,
msgi18n: true,
}, callback);
server.sendStackList();
Expand Down
19 changes: 18 additions & 1 deletion frontend/src/components/StackList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
<input v-model="searchText" class="form-control search-input" autocomplete="off" />
</form>
</div>
<div class="update-all-wrapper">
<button class="btn btn-primary" :disabled="processing || Object.keys(sortedStackList).length === 0" @click="updateAll">
<font-awesome-icon icon="fa-cloud-arrow-down me-1" />
{{ $t("updateAll") }}
</button>
</div>
</div>

<!-- TODO -->
Expand Down Expand Up @@ -346,6 +352,17 @@ export default {

this.cancelSelectMode();
},
updateAll() {
console.log("updateAll");
console.log(this.sortedStackList);
for (let stack of this.sortedStackList) {
console.log(stack);
this.$root.emitAgent(stack.endpoint, "updateStack", stack.name, (res) => {
this.processing = false;
this.$root.toastRes(res);
});
}
},
},
};
</script>
Expand Down Expand Up @@ -417,7 +434,7 @@ export default {
}

.search-input {
max-width: 15em;
max-width: 10em;
}

.stack-item {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,6 @@
"ConsoleNotEnabledMSG1": "Console is a powerful tool that allows you to execute any commands such as <code>docker</code>, <code>rm</code> within the Dockge's container in this Web UI.",
"ConsoleNotEnabledMSG2": "It might be dangerous since this Dockge container is connecting to the host's Docker daemon. Also Dockge could be possibly taken down by commands like <code>rm -rf</code>" ,
"ConsoleNotEnabledMSG3": "If you understand the risk, you can enable it by setting <code>DOCKGE_ENABLE_CONSOLE=true</code> in the environment variables.",
"confirmLeaveStack": "You are currently editing a stack. Are you sure you want to leave?"
"confirmLeaveStack": "You are currently editing a stack. Are you sure you want to leave?",
"updateAll": "Update All"
}
Loading