Skip to content
Snippets Groups Projects
Commit 4f1c8c71 authored by Janis Streib's avatar Janis Streib :owl: Committed by Janis Streib
Browse files

ADD: show ou-type in ou view (#440)

parent 6ab1ea3b
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,8 @@ export default {
{ name: 'dns.fqdn2ou.list', inner_join_ref: { parent_ou: 'default' } },
{ name: 'nd.bcd2ou.list', inner_join_ref: { parent_ou: 'default' } },
{ name: 'nd.bcd.list', inner_join_ref: { bcd2ou_list: 'default' } },
{ name: 'cntl.group.list', inner_join_ref: { parent_ou: 'default' } }
{ name: 'cntl.group.list', inner_join_ref: { parent_ou: 'default' } },
{ name: 'org.unit_type.list', inner_join_ref: { unit_list: 'default' } }
]
return TransactionService.execute(config, ta)
},
......@@ -24,6 +25,7 @@ export default {
{ name: 'dns.fqdn2ou.list', inner_join_ref: { unit_list_superset: 'default' } },
{ name: 'nd.bcd2ou.list', inner_join_ref: { unit_list_superset: 'default' } },
{ name: 'nd.bcd.list', inner_join_ref: { bcd2ou_list: 'default' } },
{ name: 'org.unit_type.list', inner_join_ref: { unit_list: 'default' } }
]
return TransactionService.execute(config, ta)
},
......@@ -34,7 +36,8 @@ export default {
{ name: 'cntl.mgr.list', inner_join_ref: { mgr2ou_list: 'default' } },
{ name: 'dns.fqdn2ou.list', inner_join_ref: { unit_list: 'default' } },
{ name: 'nd.bcd2ou.list', inner_join_ref: { unit_list: 'default' } },
{ name: 'nd.bcd.list', inner_join_ref: { bcd2ou_list: 'default' } }
{ name: 'nd.bcd.list', inner_join_ref: { bcd2ou_list: 'default' } },
{ name: 'org.unit_type.list', inner_join_ref: { unit_list: 'default' } }
]
return TransactionService.execute(config, ta)
}
......
......@@ -18,7 +18,8 @@
<b-row>
<b-col>
<h1>{{ ou.name }} ({{ ou.short_name }}) <small
class="text-muted">{{ $tc('system.organizational_unit', 1) }}</small></h1>
class="text-muted">{{ $tc('system.organizational_unit', 1) }}</small></h1><br/>
<h3 class="text-muted"><netvs-icon icon="org_types"/> {{ outypes_by_shortname[ou.type].name }}</h3>
</b-col>
<b-col lg="2">
<b-button-group class="d-flex">
......@@ -361,6 +362,7 @@ export default {
bcd2ou_db_editor_old_data: null,
bcd2ou_db_editor_non_optionals: ['ou_short_name', 'bcd_value'],
bcd2ou_action: 'create',
outypes_by_shortname: {}
}
},
watch: {
......@@ -463,6 +465,7 @@ export default {
this.mgrs_by_login_name = null
let ou_name_req = this.$route.params.ou || null
this.mgrs = this.mgrs2ou = this.ous = null
this.outypes_by_shortname = null
let res = null
if (ou_name_req) {
EventBus.$emit('overwrite_breadcrumbs', function () {
......@@ -478,6 +481,7 @@ export default {
this.mgrs_by_login_name = apiutil.dict_by_value_of_array(res.mgr_list, 'login_name')
this.fqdns2ou = apiutil.dict_of_lists_by_value_of_array(res.fqdn2ou_list, 'ou_short_name')
this.bcds2ou = apiutil.dict_of_lists_by_value_of_array(res.bcd2ou_list, 'ou_short_name')
this.outypes_by_shortname = apiutil.dict_by_value_of_array(res.unit_type_list, 'short_name')
this.ous = res.unit_list
if (this.ous.length === 0) {
this.ou = ''
......@@ -512,6 +516,7 @@ export default {
this.mgrs_by_login_name = apiutil.dict_by_value_of_array(res.mgr_list, 'login_name')
this.ous = res.unit_list_superset
this.root_ous = res.unit_list
this.outypes_by_shortname = apiutil.dict_by_value_of_array(res.unit_type_list, 'short_name')
} else {
res = (await OUService.listAll(this.$store.state.netdb_axios_config)).data
this.mgrs2ou = apiutil.dict_of_lists_by_value_of_array(res.mgr2ou_list, 'ou_short_name')
......@@ -520,6 +525,7 @@ export default {
this.bcds2ou = apiutil.dict_of_lists_by_value_of_array(res.bcd2ou_list, 'ou_short_name')
this.ous = res.unit_list
this.root_ous = apiutil.dict_of_lists_by_value_of_array(this.ous, 'tree_level')['0']
this.outypes_by_shortname = apiutil.dict_by_value_of_array(res.unit_type_list, 'short_name')
}
}
this.ous_by_parent = apiutil.dict_of_lists_by_value_of_array(this.ous, 'parent_short_name')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment