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
16 changes: 15 additions & 1 deletion src/renderer/components/Clusters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<Action @click="unfoldAll(slotProps.close)">Show All Clusters</Action>
</li>
<li v-else><Action @click="foldAll(slotProps.close)">Collapse All Clusters</Action></li>
<li><Action @click="startAll">Start all</Action></li>
<li><Action @click="stopAll">Stop all</Action></li>
</ul>
</template>
</Dropdown>
Expand Down Expand Up @@ -145,7 +147,19 @@ export default {
this.clustersToRender.forEach(cluster => {
this.updateCluster({ id: cluster.id, folded })
})
}
},
startAll() {
const services = Object.values(this.$store.state.Services.items)
services.forEach(service => {
this.$store.dispatch('Connections/createConnection', service)
})
},
stopAll() {
const services = Object.values(this.$store.state.Services.items)
services.forEach(service => {
this.$store.dispatch('Connections/deleteConnection', service)
})
},
}
}
</script>
Expand Down
12 changes: 12 additions & 0 deletions src/renderer/components/Clusters/ClusterItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<li><Action :to="createServicePath">Add a Resource</Action></li>
<li><Action :to="editPath">Edit</Action></li>
<li><Action @click="exportCluster">Export</Action></li>
<li><Action @click="startAll">Start all</Action></li>
<li><Action @click="stopAll">Stop all</Action></li>
<li><Action @click="handleFold">Collapse</Action></li>
<li><Action theme="danger" @click="handleDelete">Delete</Action></li>
</ul>
Expand Down Expand Up @@ -130,6 +132,16 @@ export default {
}
}
}
},
startAll() {
this.services.forEach(service => {
this.$store.dispatch('Connections/createConnection', service)
})
},
stopAll() {
this.services.forEach(service => {
this.$store.dispatch('Connections/deleteConnection', service)
})
}
}
}
Expand Down