Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an update all funtion #576

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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 @@ -180,7 +180,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
await stack.update(socket);
callbackResult({
ok: true,
msg: "Updated"
msg: `Updated: ${stackName}`
}, callback);
server.sendStackList();
} catch (e) {
Expand Down
18 changes: 17 additions & 1 deletion frontend/src/components/StackList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</button>

<div class="placeholder"></div>

<div class="search-wrapper">
<a v-if="searchText == ''" class="search-icon">
<font-awesome-icon icon="search" />
Expand All @@ -19,6 +20,12 @@
<input v-model="searchText" class="form-control search-input" autocomplete="off" />
</form>
</div>
<div class="update-all-wrapper">
<button class="btn btn-primary" @click="updateAll">
<font-awesome-icon icon="fa-cloud-arrow-down me-1" />
{{ $t("updateAll") }}
</button>
</div>
</div>

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

this.cancelSelectMode();
},

updateAll() {
for (let stack of Object.values(this.$root.completeStackList)) {
this.$root.emitAgent(stack.endpoint, "updateStack", stack.name, (res) => {
this.processing = false;
this.$root.toastRes(res);
});
}
}
},
};
</script>
Expand Down Expand Up @@ -417,7 +433,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 @@ -112,5 +112,6 @@
"agentRemovedSuccessfully": "Agent removed successfully.",
"removeAgent": "Remove Agent",
"removeAgentMsg": "Are you sure you want to remove this agent?",
"LongSyntaxNotSupported": "Long syntax is not supported here. Please use the YAML editor."
"LongSyntaxNotSupported": "Long syntax is not supported here. Please use the YAML editor.",
"updateAll": "Update All"
}
Loading