mirror of
https://github.com/louislam/dockge.git
synced 2025-02-21 02:55:56 +00:00
Add update all button
This commit is contained in:
parent
d451e06e84
commit
ada2a3ca8b
3 changed files with 21 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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 -->
|
||||
|
@ -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>
|
||||
|
@ -417,7 +434,7 @@ export default {
|
|||
}
|
||||
|
||||
.search-input {
|
||||
max-width: 15em;
|
||||
max-width: 10em;
|
||||
}
|
||||
|
||||
.stack-item {
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue