Skip to content
Merged
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 @@ -128,5 +128,6 @@
"New Container Name...": "New Container Name...",
"Network name...": "Network name...",
"Select a network...": "Select a network...",
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first."
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first.",
"updateAll": "Update All"
}