summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleClientView.vue
diff options
context:
space:
mode:
authorUdo Walter2019-02-23 09:35:27 +0100
committerUdo Walter2019-02-23 09:35:27 +0100
commit461549c117c9760392debae54bb8c7a1ed66b807 (patch)
treea45beb1d249d364a83bf8d1685d9bc7fda7d5915 /webapp/src/components/GroupModuleClientView.vue
parent[Account] Add password change functionality (diff)
downloadbas-461549c117c9760392debae54bb8c7a1ed66b807.tar.gz
bas-461549c117c9760392debae54bb8c7a1ed66b807.tar.xz
bas-461549c117c9760392debae54bb8c7a1ed66b807.zip
[groups] add iprange functionality to groups; add refresh button
Diffstat (limited to 'webapp/src/components/GroupModuleClientView.vue')
-rw-r--r--webapp/src/components/GroupModuleClientView.vue32
1 files changed, 19 insertions, 13 deletions
diff --git a/webapp/src/components/GroupModuleClientView.vue b/webapp/src/components/GroupModuleClientView.vue
index bc7ea10..b78b2ed 100644
--- a/webapp/src/components/GroupModuleClientView.vue
+++ b/webapp/src/components/GroupModuleClientView.vue
@@ -27,7 +27,7 @@
<v-card>
<v-card-text>
<v-layout wrap>
- <v-flex lg4 md6 xs12 order-lg1 order-xs2>
+ <v-flex lg4 sm6 xs12 order-lg1 order-xs2>
<v-layout column>
<v-flex>
<v-text-field v-if="editMode" prepend-icon="label" class="info-input" :label="$t('name')" color="primary" v-model="info.name"></v-text-field>
@@ -42,13 +42,14 @@
v-if="editMode"
class="info-input"
:items="$store.state.groups.groupList"
- v-model="groupIds"
+ v-model="groups"
:menu-props="{ offsetY: '' }"
:label="$t('groups')"
color="primary"
multiple
item-value="id"
item-text="name"
+ return-object
small-chips
deletable-chips
>
@@ -74,7 +75,7 @@
</v-flex>
</v-layout>
</v-flex>
- <v-flex lg4 md6 xs12 order-lg2 order-xs3>
+ <v-flex lg4 sm6 xs12 order-lg2 order-xs3>
<v-textarea prepend-icon="description" v-if="editMode" rows="1" auto-grow class="info-input" :label="$t('description')" color="primary" v-model="info.description"></v-textarea>
<div v-else class="info-input">
<div class="body-2 info-heading"><v-icon>description</v-icon><span>{{ $t('description') }}</span></div>
@@ -96,21 +97,21 @@
</v-flex>
</v-layout>
<v-layout wrap>
- <v-flex lg4 md6 xs12>
+ <v-flex lg4 sm6 xs12>
<v-text-field prepend-icon="language" v-if="editMode" class="info-input" :label="$t('ip')" color="primary" v-model="info.ip"></v-text-field>
<div v-else class="info-input">
<div class="body-2 info-heading"><v-icon>language</v-icon><span>{{ $t('ip') }}</span></div>
<div class="info-text">{{ client.ip || '-' }}</div>
</div>
</v-flex>
- <v-flex lg4 md6 xs12>
+ <v-flex lg4 sm6 xs12>
<v-text-field prepend-icon="memory" v-if="editMode" class="info-input" :label="$t('mac')" color="primary" v-model="info.mac"></v-text-field>
<div v-else class="info-input">
<div class="body-2 info-heading"><v-icon>memory</v-icon><span>{{ $t('mac') }}</span></div>
<div class="info-text">{{ client.mac || '-' }}</div>
</div>
</v-flex>
- <v-flex lg4 md6 xs12>
+ <v-flex lg4 sm6 xs12>
<v-text-field prepend-icon="fingerprint" v-if="editMode" class="info-input" :label="$t('uuid')" color="primary" v-model="info.uuid"></v-text-field>
<div v-else class="info-input">
<div class="body-2 info-heading"><v-icon>fingerprint</v-icon><span>{{ $t('uuid') }}</span></div>
@@ -138,7 +139,7 @@ export default {
mac: '',
uuid: ''
},
- groupIds: []
+ groups: []
}
},
computed: {
@@ -156,9 +157,6 @@ export default {
}
},
methods: {
- removeGroup (id) {
- this.groupIds.splice(this.groupIds.indexOf(id), 1)
- },
editInfo () {
this.editMode = true
this.info.name = this.client.name
@@ -167,7 +165,7 @@ export default {
this.info.ip = this.client.ip
this.info.mac = this.client.mac
this.info.uuid = this.client.uuid
- this.groupIds = this.client.groups ? this.client.groups.map(x => x.id) : []
+ this.groups = this.client.groups || []
},
cancelEdit () {
this.editMode = false
@@ -181,7 +179,7 @@ export default {
this.$store.dispatch('groups/saveClient', {
id: this.client.id,
data: this.info,
- groupIds: this.groupIds,
+ groups: this.groups,
tabIndex: this.tabIndex,
callback: this.updateUrl
})
@@ -205,17 +203,25 @@ export default {
.info-buttons {
margin: 0;
}
+
.info-input {
- margin: 20px;
+ padding: 20px;
+}
+
+.info-input >>> input, .info-input >>> textarea {
+ font-family: 'Roboto Mono';
}
+
.info-heading {
display: flex;
align-items: center;
margin-bottom: 10px;
}
+
.info-heading > span {
margin-left: 10px;
}
+
.info-text {
margin-left: 34px;
font-family: 'Roboto Mono';