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 { ...@@ -7,7 +7,8 @@ export default {
{ name: 'org.unit.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' }, old: { do_subtree: true } }, { 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.mgr2ou.list', join: { 1: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr.list', join: { 2: 'api_fkey_cntl_mgr2ou_mgr' } }, { 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) return TransactionService.execute(config, ta)
}, },
...@@ -16,7 +17,8 @@ export default { ...@@ -16,7 +17,8 @@ export default {
{ name: 'org.unit.list', old: { do_subtree: true } }, { name: 'org.unit.list', old: { do_subtree: true } },
{ name: 'cntl.mgr2ou.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' } }, { name: 'cntl.mgr2ou.list', join: { 0: 'api_fkey_cntl_mgr2ou_ou' } },
{ name: 'cntl.mgr.list', join: { 1: 'api_fkey_cntl_mgr2ou_mgr' } }, { 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) return TransactionService.execute(config, ta)
} }
......
...@@ -110,6 +110,24 @@ ...@@ -110,6 +110,24 @@
</template> </template>
</b-table> </b-table>
</b-collapse> </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> </b-card>
</template> </template>
</Paginator> </Paginator>
...@@ -159,10 +177,23 @@ export default { ...@@ -159,10 +177,23 @@ export default {
evlogOu: null, evlogOu: null,
only_own_oe: true, only_own_oe: true,
mgrs2ou: null, mgrs2ou: null,
bcds2ou: null,
fqdnss2ou: null, fqdnss2ou: null,
mgrs: null, mgrs: null,
ous: null, ous: null,
db_editor_presets: {}, db_editor_presets: {},
bcd_list_fields: [
{
key: 'name',
label: 'BCD',
sortable: true
},
{
key: 'description',
label: 'Beschreibung',
sortable: true
}
],
fqdn_list_fields: [ fqdn_list_fields: [
{ {
key: 'fqdn_value', key: 'fqdn_value',
...@@ -212,6 +243,7 @@ export default { ...@@ -212,6 +243,7 @@ export default {
res = (await OUService.listOwn(this.$store.state.netdb_axios_config)).data 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.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.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.mgrs = apiutil.dict_by_value_of_array(res[3], 'login_name')
this.ous = res[1] this.ous = res[1]
} else { } else {
...@@ -219,6 +251,7 @@ export default { ...@@ -219,6 +251,7 @@ export default {
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res[1], 'ou_short_name') 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.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.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] 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