summaryrefslogtreecommitdiffstats
path: root/webapp/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components')
-rw-r--r--webapp/src/components/DataTable.vue2
-rw-r--r--webapp/src/components/GroupModule.vue17
-rw-r--r--webapp/src/components/GroupModuleClientView.vue6
-rw-r--r--webapp/src/components/GroupModuleGroupView.vue8
4 files changed, 20 insertions, 13 deletions
diff --git a/webapp/src/components/DataTable.vue b/webapp/src/components/DataTable.vue
index facf2aa..27d8d77 100644
--- a/webapp/src/components/DataTable.vue
+++ b/webapp/src/components/DataTable.vue
@@ -147,7 +147,7 @@
<v-icon style="cursor: pointer" :color="item.selected ? 'primary' : ''">{{ selectedIconMap[item.selected] }}</v-icon>
</div>
<div v-for="header in headers" :key="header.key" :style="{ width: header.width }" :class="{ 'auto-width': header.width === undefined }">
- <span style="user-select: text" v-if="$scopedSlots[header.key] === undefined" @dblclick.stop>{{ item.data[header.key] }}</span>
+ <span style="user-select: text" v-if="$scopedSlots[header.key] === undefined">{{ item.data[header.key] }}</span>
<slot v-else :name="header.key" :item="item.data" />
</div>
</div>
diff --git a/webapp/src/components/GroupModule.vue b/webapp/src/components/GroupModule.vue
index 4630824..f351a6b 100644
--- a/webapp/src/components/GroupModule.vue
+++ b/webapp/src/components/GroupModule.vue
@@ -93,18 +93,17 @@ export default {
}
},
created () {
- if (this.tabChain.length === 0) {
+ this.$store.dispatch('groups/loadLists')
+ if (this.$route.params.id > 0 || this.$route.params.id === 'create') {
this.$store.dispatch('groups/loadGroup', { id: 0, tabIndex: 0 })
- this.$store.dispatch('groups/loadConfigs')
- this.$store.dispatch('groups/loadLists')
+ this.loadItem(this.$route.name, this.$route.params.id)
} else {
- this.reload()
+ const tabType = this.tabChain.length ? this.tabChain[this.activeTab].tabType : 'group'
+ const id = this.tabChain.length ? this.tabChain[this.activeTab].id : 0
+ this.$router.replace({ name: 'GroupModule.' + tabType, params: { id, noReload: true } })
+ if (this.tabChain.length) this.reload()
+ else this.$store.dispatch('groups/loadGroup', { id: 0, tabIndex: 0 })
}
- if (this.$route.params.id !== '0') this.loadItem(this.$route.name, this.$route.params.id)
- this.$router.replace({
- name: 'GroupModule.' + this.tabChain[this.activeTab].tabType,
- params: { id: this.tabChain[this.activeTab].id, noReload: true }
- })
},
beforeRouteUpdate (to, from, next) {
if (!to.params.noReload) {
diff --git a/webapp/src/components/GroupModuleClientView.vue b/webapp/src/components/GroupModuleClientView.vue
index e0c2f8d..cc648f4 100644
--- a/webapp/src/components/GroupModuleClientView.vue
+++ b/webapp/src/components/GroupModuleClientView.vue
@@ -48,7 +48,7 @@
<div v-else class="chip-container non-selectable">
<v-tooltip v-for="group in firstGroups" :key="group.id" top open-delay="800">
<template #activator="{ on }">
- <v-chip v-on="on" small label style="width: calc(50% - 8px)">
+ <v-chip v-on="on" small label style="width: calc(50% - 8px)" @click="openGroup(group)">
<span class="chip-text">{{ group.name || group.id }}</span>
</v-chip>
</template>
@@ -234,6 +234,9 @@ export default {
name: 'GroupModule.client',
params: { id, noReload: true }
})
+ },
+ openGroup (group) {
+ this.$store.dispatch('groups/loadGroup', { id: group.id, name: group.name, tabIndex: this.tabIndex, asParent: true, switchTab: true })
}
},
created () {
@@ -256,6 +259,7 @@ export default {
.chip-container >>> .v-chip__content {
width: 100%;
+ cursor: pointer;
}
.chip-text {
diff --git a/webapp/src/components/GroupModuleGroupView.vue b/webapp/src/components/GroupModuleGroupView.vue
index df2dec6..634b49b 100644
--- a/webapp/src/components/GroupModuleGroupView.vue
+++ b/webapp/src/components/GroupModuleGroupView.vue
@@ -60,7 +60,7 @@
<div v-else class="chip-container non-selectable">
<v-tooltip v-for="parent in firstParents" :key="parent.id" top open-delay="800">
<template #activator="{ on }">
- <v-chip v-on="on" small label style="width: calc(50% - 8px)">
+ <v-chip v-on="on" small label style="width: calc(50% - 8px)" @click="openParent(parent)">
<span class="chip-text">{{ parent.name || parent.id }}</span>
</v-chip>
</template>
@@ -231,7 +231,7 @@ export default {
...mapMutations('groups', ['setDialog']),
setShowAll (value) {
this.$store.commit('groups/setShowAll', { index: this.tabIndex, value })
- this.$store.dispatch('groups/loadGroup', { id: this.group.id, tabIndex: this.tabIndex, reload: true })
+ this.$store.dispatch('groups/loadGroup', { id: this.group.id, tabIndex: this.tabIndex })
},
removeIprange (index) {
this.ipranges.splice(index, 1)
@@ -275,6 +275,9 @@ export default {
name: 'GroupModule.group',
params: { id, noReload: true }
})
+ },
+ openParent (parent) {
+ this.$store.dispatch('groups/loadGroup', { id: parent.id, name: parent.name, tabIndex: this.tabIndex, asParent: true, switchTab: true })
}
},
created () {
@@ -317,6 +320,7 @@ export default {
.chip-container >>> .v-chip__content {
width: 100%;
+ cursor: pointer;
}
.chip-text {