Commit 5aec5b23 authored by Janis Streib's avatar Janis Streib 🦉
Browse files

ADD: display bcds of OUs (closes #277)

parent a472d561
Pipeline #152323 passed with stages
in 9 minutes and 13 seconds
......@@ -7,7 +7,8 @@ export default {
{ name: 'org.unit.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' }, old: { do_subtree: true } },
{ name: 'cntl.mgr2ou.list', join: { 1: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr.list', join: { 2: 'api_fkey_cntl_mgr2ou_mgr' } },
{ name: 'dns.fqdn2ou.list', join: { 1: 'api_fkey_dns_fqdn2ou_ou' } }
{ name: 'dns.fqdn2ou.list', join: { 1: 'api_fkey_dns_fqdn2ou_ou' } },
{ name: 'nd.bcd.list', join: { 1: 'api_fkey_nd_bcd_ou' } }
]
return TransactionService.execute(config, ta)
},
......@@ -16,7 +17,8 @@ export default {
{ name: 'org.unit.list', old: { do_subtree: true } },
{ name: 'cntl.mgr2ou.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr.list', join: { 1: 'api_fkey_cntl_mgr2ou_mgr' } },
{ name: 'dns.fqdn2ou.list', join: { 0: 'api_fkey_dns_fqdn2ou_ou' } }
{ name: 'dns.fqdn2ou.list', join: { 0: 'api_fkey_dns_fqdn2ou_ou' } },
{ name: 'nd.bcd.list', join: { 0: 'api_fkey_nd_bcd_ou' } }
]
return TransactionService.execute(config, ta)
}
......
......@@ -110,6 +110,24 @@
</template>
</b-table>
</b-collapse>
<b-button block squared variant="outline-secondary"
v-b-toggle="card_data.item.short_name + '-collapse-bcds'">
Broadcastdomains (BCDs)
<b-badge pill v-if="bcds2ou[card_data.item.short_name]">{{
bcds2ou[card_data.item.short_name].length
}}
</b-badge>
<b-badge pill v-else>0</b-badge>
<br/>
<font-awesome-icon class="collapse-icon" :icon="['fas','chevron-down']"/>
</b-button>
<b-collapse :id="card_data.item.short_name + '-collapse-bcds'">
<b-table :items="bcds2ou[card_data.item.short_name]" :fields="bcd_list_fields">
<template v-slot:cell(name)="item">
<b-link :to="'/dnsvs/bcds/' + item.item.name">{{item.item.name}}</b-link>
</template>
</b-table>
</b-collapse>
</b-card>
</template>
</Paginator>
......@@ -159,10 +177,23 @@ export default {
evlogOu: null,
only_own_oe: true,
mgrs2ou: null,
bcds2ou: null,
fqdnss2ou: null,
mgrs: null,
ous: null,
db_editor_presets: {},
bcd_list_fields: [
{
key: 'name',
label: 'BCD',
sortable: true
},
{
key: 'description',
label: 'Beschreibung',
sortable: true
}
],
fqdn_list_fields: [
{
key: 'fqdn_value',
......@@ -212,6 +243,7 @@ export default {
res = (await OUService.listOwn(this.$store.state.netdb_axios_config)).data
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res[2], 'ou_short_name')
this.fqdns2ou = apiutil.dict_of_lists_by_value_of_array(res[4], 'ou_short_name')
this.bcds2ou = apiutil.dict_of_lists_by_value_of_array(res[5], 'ou_short_name')
this.mgrs = apiutil.dict_by_value_of_array(res[3], 'login_name')
this.ous = res[1]
} else {
......@@ -219,6 +251,7 @@ export default {
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res[1], 'ou_short_name')
this.mgrs = apiutil.dict_by_value_of_array(res[2], 'login_name')
this.fqdns2ou = apiutil.dict_of_lists_by_value_of_array(res[3], 'ou_short_name')
this.bcds2ou = apiutil.dict_of_lists_by_value_of_array(res[4], 'ou_short_name')
this.ous = res[0]
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment