summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleDialog.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/GroupModuleDialog.vue')
-rw-r--r--webapp/src/components/GroupModuleDialog.vue25
1 files changed, 23 insertions, 2 deletions
diff --git a/webapp/src/components/GroupModuleDialog.vue b/webapp/src/components/GroupModuleDialog.vue
index e9bb65d..41b98b5 100644
--- a/webapp/src/components/GroupModuleDialog.vue
+++ b/webapp/src/components/GroupModuleDialog.vue
@@ -45,7 +45,8 @@
"name": "Name",
"description": "Description",
"ip": "IP Address",
- "wake": "Wake up"
+ "wake": "Wake up",
+ "deleteInBackends": "Select the backends, where the clients will get deleted:"
},
"de": {
"title": {
@@ -92,7 +93,8 @@
"name": "Name",
"description": "Beschreibung",
"ip": "IP Adresse",
- "wake": "Aufwecken"
+ "wake": "Aufwecken",
+ "deleteInBackends": "Wähle die Backends, aus denen die Clients gelöscht werden:"
}
}
</i18n>
@@ -138,6 +140,19 @@
>
<div slot-scope="{ item }">[{{ item.id }}] {{ item.name }}</div>
</RecycleScroller>
+ <div v-if="action === 'delete' && dialog.info.type === 'client'">
+ <div class="select-backends">{{ $t('deleteInBackends') }}</div>
+ <template v-for="backend in backends">
+ <v-checkbox
+ :label="backend.name"
+ v-model="backend.selected"
+ :key="backend.id"
+ :value="backend.selected"
+ color="primary"
+ hide-details
+ ></v-checkbox>
+ </template>
+ </div>
</div>
</v-card-text>
@@ -183,6 +198,7 @@ export default {
},
computed: {
...mapState('groups', ['dialog', 'tabChain']),
+ ...mapState('backends', ['backends']),
headers () {
const lastColumn = this.dialog.info.type === 'client' ? 'ip' : 'description'
return [
@@ -227,6 +243,7 @@ export default {
if (this.dialog.info.action === 'select') this.selected = this.dialog.info.selected
else this.selected = []
if (this.$refs.cardtext) this.$nextTick(() => this.$refs.cardtext.dispatchEvent(new Event('scroll')))
+ if (this.dialog.info.type === 'client') this.$store.dispatch('backends/loadData')
}
}
}
@@ -262,6 +279,7 @@ export default {
})
}
if (this.action === 'add') data.selected = this.selected
+ if (this.action === 'delete') data.backends = this.backends
this.$store.dispatch('groups/' + actionMap[this.action][this.dialog.info.type], data)
this.setDialog({ show: false })
},
@@ -297,4 +315,7 @@ export default {
.selected-list {
padding: 30px;
}
+.select-backends {
+ margin-top: 20px;
+}
</style>