summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleClientView.vue
diff options
context:
space:
mode:
authorUdo Walter2018-09-18 11:14:02 +0200
committerUdo Walter2018-09-18 11:14:02 +0200
commit7810e897d9f215c8c282aa88e041ee398b1acb35 (patch)
tree9737b81ab4aa3beb6d73bf7316c0dd03d63d7fd3 /webapp/src/components/GroupModuleClientView.vue
parent[configurator] add ipxe configurator (diff)
downloadbas-7810e897d9f215c8c282aa88e041ee398b1acb35.tar.gz
bas-7810e897d9f215c8c282aa88e041ee398b1acb35.tar.xz
bas-7810e897d9f215c8c282aa88e041ee398b1acb35.zip
[groups] add ability to set a config for groups and clients
Diffstat (limited to 'webapp/src/components/GroupModuleClientView.vue')
-rw-r--r--webapp/src/components/GroupModuleClientView.vue19
1 files changed, 19 insertions, 0 deletions
diff --git a/webapp/src/components/GroupModuleClientView.vue b/webapp/src/components/GroupModuleClientView.vue
index 31548b4..4ebdf73 100644
--- a/webapp/src/components/GroupModuleClientView.vue
+++ b/webapp/src/components/GroupModuleClientView.vue
@@ -3,6 +3,7 @@
"en": {
"name": "Name",
"description": "Description",
+ "config": "iPXE Config",
"groups": "Groups",
"ip": "IP Address",
"mac": "MAC Address",
@@ -11,6 +12,7 @@
"de": {
"name": "Name",
"description": "Beschreibung",
+ "config": "iPXE Konfiguration",
"groups": "Gruppen",
"ip": "IP Adresse",
"mac": "MAC Adresse",
@@ -63,6 +65,13 @@
</div>
</div>
</v-flex>
+ <v-flex>
+ <v-select v-if="editMode" class="info-input" prepend-icon="list" item-text="name" item-value="id" offset-y :label="$t('config')" color="primary" v-model="info.configId" :items="configList"></v-select>
+ <div v-else class="info-input">
+ <div class="body-2 info-heading"><v-icon>list</v-icon><span>{{ $t('config') }}</span></div>
+ <div class="info-text">{{ configName || '-' }}</div>
+ </div>
+ </v-flex>
</v-layout>
</v-flex>
<v-flex lg4 md6 xs12 order-lg2 order-xs3>
@@ -124,6 +133,7 @@ export default {
info: {
name: '',
description: '',
+ configId: null,
ip: '',
mac: '',
uuid: ''
@@ -131,6 +141,14 @@ export default {
groupIds: []
}
},
+ computed: {
+ configList () {
+ return this.$store.state.groups.configList
+ },
+ configName () {
+ return this.$store.state.groups.configNames[this.client.configId]
+ }
+ },
watch: {
client (newValue, oldValue) {
if (!newValue.id) this.editInfo()
@@ -145,6 +163,7 @@ export default {
this.editMode = true
this.info.name = this.client.name
this.info.description = this.client.description
+ this.info.configId = this.client.configId
this.groupIds = this.client.groups ? this.client.groups.map(x => x.id) : []
},
cancelEdit () {