diff --git a/frontend/src/views/ObjectExplorer.vue b/frontend/src/views/ObjectExplorer.vue index d2e401fd55f18fe02c017595b73d300bc5227ff7..de00e7233c7d8617a866481423d5a95413a93777 100644 --- a/frontend/src/views/ObjectExplorer.vue +++ b/frontend/src/views/ObjectExplorer.vue @@ -1,95 +1,97 @@ <template> <div id="obj_viewer"> <Loading :data="obj"> - <b-row> - <b-col> - <h1>{{ $t('views.object_explorer.object_explorer') }} <small v-if="obj_type" class="text-muted">{{ - obj_type.object_type_fq_name - }}</small></h1> - </b-col> - <b-col lg="2"> - <b-button-group class="d-flex"> - <b-button id="editobj" variant="outline-primary" - v-b-modal:object_editor class="mt-3 shadow"> - <netvs-icon icon="edit"></netvs-icon> - </b-button> - <b-tooltip target="editobj" triggers="hover" - variant="primary" placement="bottom"> - {{ $t('system.edit') }} - </b-tooltip> - <b-button variant="outline-secondary" id="objview_evlog" - v-b-modal:object_viewer_evlog class="mt-3 shadow"> - <netvs-icon icon="evlog"></netvs-icon> - </b-button> - <b-tooltip target="obview_evlog" triggers="hover" - variant="secondary" placement="bottom"> - {{ $t('system.event_log') }} - </b-tooltip> - </b-button-group> - </b-col> - </b-row> - <b-table-simple responsive> - <b-tr v-for="(v,k) in obj" :key="v+':'+k"> - <b-th>{{ k }}<br><span class="text-muted">{{ obj_definition.attributes[k].description_detail }}</span> - </b-th> - <b-td>{{ v }}</b-td> - <b-td> - <b-button v-if="k in obj_definition_ref" - @click="join(obj_definition_ref[k].system+'.'+obj_definition_ref[k].object_type, 'default')"> - {{ $t('views.object_explorer.join_to') }} - {{ obj_definition_ref[k].system }}.{{ obj_definition_ref[k].object_type }} - </b-button> - </b-td> - </b-tr> - </b-table-simple> - <h2>{{ $t('views.object_explorer.object_attributes') }}</h2> - <b-table-simple responsive> - <b-tr v-for="a in attr_defs" :key="a.key_word"> - <b-th>{{ a.name }} <code>{{ a.key_word }}</code><br/><span class="text-muted">{{ a.description }}</span> - </b-th> - <b-td> - <ul> - <li v-for="v in attr_kv[a.key_word]" :key="v.object_gfk + '_' + v.ot_attr_def_key_word + '_' + v.value"> - <code>{{ v.value }}</code> ( - <b-link :to="'/object/'+v.ref_object_gfk">Ref</b-link> - ) - </li> - </ul> - </b-td> - </b-tr> - </b-table-simple> - <h2>{{ $t('views.object_explorer.constraints') }}</h2> - <b-table-simple responsive> - <b-tr> - <b-th>{{ $t('system.name') }}</b-th> - <b-th>{{ $t('views.object_explorer.attributes') }}</b-th> - </b-tr> - <b-tr v-for="(v,k) in obj_definition.constraints" :key="v+':'+k"> - <b-td>{{ k }}<br><span class="text-muted">{{ v.description }}</span></b-td> - <b-td> - <ul> - <li v-for="a in v.attributes" :key="k+':'+a">{{ a }}</li> - </ul> - </b-td> - </b-tr> - </b-table-simple> - <h2>{{ $t('views.object_explorer.dump') }}</h2> - <CopyField multiline :text="obj_dump"></CopyField> - <DBEditor :object_fq_name="obj_type.object_type_fq_name" object_function="update" - modal_id="object_editor" :old_data="obj" :presets="obj" :non_optionals="Object.keys(obj)" - :object_title="obj.gpk"></DBEditor> - <EVLogViewer modal_id="object_viewer_evlog" :ref_obj_fq="obj_type.object_type_fq_name" - :refobj_id_value="obj.gpk" :title="obj.gpk"></EVLogViewer> - <b-modal id="joiner" ok-only - :title="$t('views.object_explorer.join_a_to_b', {a: obj_type.object_type_fq_name, b: join_target})"> - {{ $t('views.object_explorer.results', { constraint: join_constraint }) }} - <ul> - <li v-for="r in join_res" :key="r.gpk"> - <b-link :to="'/object/'+r.gpk"><code>{{ join_res }}</code></b-link> - </li> - </ul> - <b-table></b-table> - </b-modal> + <template v-if="obj"> + <b-row> + <b-col> + <h1>{{ $t('views.object_explorer.object_explorer') }} <small v-if="obj_type" class="text-muted">{{ + obj_type.object_type_fq_name + }}</small></h1> + </b-col> + <b-col lg="2"> + <b-button-group class="d-flex"> + <b-button id="editobj" variant="outline-primary" + v-b-modal:object_editor class="mt-3 shadow"> + <netvs-icon icon="edit"></netvs-icon> + </b-button> + <b-tooltip target="editobj" triggers="hover" + variant="primary" placement="bottom"> + {{ $t('system.edit') }} + </b-tooltip> + <b-button variant="outline-secondary" id="objview_evlog" + v-b-modal:object_viewer_evlog class="mt-3 shadow"> + <netvs-icon icon="evlog"></netvs-icon> + </b-button> + <b-tooltip target="obview_evlog" triggers="hover" + variant="secondary" placement="bottom"> + {{ $t('system.event_log') }} + </b-tooltip> + </b-button-group> + </b-col> + </b-row> + <b-table-simple responsive> + <b-tr v-for="(v,k) in obj" :key="v+':'+k"> + <b-th>{{ k }}<br><span class="text-muted">{{ obj_definition.attributes[k].description_detail }}</span> + </b-th> + <b-td>{{ v }}</b-td> + <b-td> + <b-button v-if="k in obj_definition_ref" + @click="join(obj_definition_ref[k].system+'.'+obj_definition_ref[k].object_type, 'default')"> + {{ $t('views.object_explorer.join_to') }} + {{ obj_definition_ref[k].system }}.{{ obj_definition_ref[k].object_type }} + </b-button> + </b-td> + </b-tr> + </b-table-simple> + <h2>{{ $t('views.object_explorer.object_attributes') }}</h2> + <b-table-simple responsive> + <b-tr v-for="a in attr_defs" :key="a.key_word"> + <b-th>{{ a.name }} <code>{{ a.key_word }}</code><br/><span class="text-muted">{{ a.description }}</span> + </b-th> + <b-td> + <ul> + <li v-for="v in attr_kv[a.key_word]" :key="v.object_gfk + '_' + v.ot_attr_def_key_word + '_' + v.value"> + <code>{{ v.value }}</code> ( + <b-link :to="'/object/'+v.ref_object_gfk">Ref</b-link> + ) + </li> + </ul> + </b-td> + </b-tr> + </b-table-simple> + <h2>{{ $t('views.object_explorer.constraints') }}</h2> + <b-table-simple responsive> + <b-tr> + <b-th>{{ $t('system.name') }}</b-th> + <b-th>{{ $t('views.object_explorer.attributes') }}</b-th> + </b-tr> + <b-tr v-for="(v,k) in obj_definition.constraints" :key="v+':'+k"> + <b-td>{{ k }}<br><span class="text-muted">{{ v.description }}</span></b-td> + <b-td> + <ul> + <li v-for="a in v.attributes" :key="k+':'+a">{{ a }}</li> + </ul> + </b-td> + </b-tr> + </b-table-simple> + <h2>{{ $t('views.object_explorer.dump') }}</h2> + <CopyField multiline :text="obj_dump"></CopyField> + <DBEditor :object_fq_name="obj_type.object_type_fq_name" object_function="update" + modal_id="object_editor" :old_data="obj" :presets="obj" :non_optionals="Object.keys(obj)" + :object_title="obj.gpk"></DBEditor> + <EVLogViewer modal_id="object_viewer_evlog" :ref_obj_fq="obj_type.object_type_fq_name" + :refobj_id_value="obj.gpk" :title="obj.gpk"></EVLogViewer> + <b-modal id="joiner" ok-only + :title="$t('views.object_explorer.join_a_to_b', {a: obj_type.object_type_fq_name, b: join_target})"> + {{ $t('views.object_explorer.results', { constraint: join_constraint }) }} + <ul> + <li v-for="r in join_res" :key="r.gpk"> + <b-link :to="'/object/'+r.gpk"><code>{{ join_res }}</code></b-link> + </li> + </ul> + <b-table></b-table> + </b-modal> + </template> </Loading> </div> </template> diff --git a/frontend/src/views/dnsvs/BCDRecords.vue b/frontend/src/views/dnsvs/BCDRecords.vue index 8f5e5877ee39e1d4a774b1a56792a72214dc9c6b..2f16599223360ac16e40336dfe9d2c29afb25d1f 100644 --- a/frontend/src/views/dnsvs/BCDRecords.vue +++ b/frontend/src/views/dnsvs/BCDRecords.vue @@ -2,118 +2,158 @@ <div id="bcd-records"> <Loading :data="bcd"> <template v-if="bcd"> <!-- WHY?! JUST WHYYYY??? IT WORKS EVERYWHERE ELSE!? --> - <h1 class="my-4"> - {{ bcd.name }} <small class="text-muted">{{ $t('system.broadcast_domain') }} - <b-badge variant="success" :title="$t('views.dnsvs.bcd_records.both_subnets')" - pill - v-if="has_v4 && has_v6">{{ $t('system.dualstack') }} - </b-badge> - </small> - </h1> - <div style="margin-bottom: 1.5rem"> - <b-button variant="outline-primary" @click="editBCD"> - {{ $t('system.utils.update_template', { object: $tc('system.bcd', 1) }) }} - <netvs-icon icon="edit"></netvs-icon> - </b-button> - <b-button style="margin-left: 15px" variant="outline-secondary" @click="$bvModal.show('evlog_bcd')"> - {{ $t('system.event_log') }} - <netvs-icon icon="evlog"></netvs-icon> - </b-button> - </div> - <b-row> - <b-col cols="2" order="1" class="d-none d-lg-block bottom-space"> - <Loading style="top:75px" class="shadow sticky-top" :data="loaded" :class="{'py-3': !loaded}"> - <b-list-group v-if="record_types" v-b-scrollspy="{offset: 250}" class="overflow-hidden"> - <b-list-group-item href="#overview" @click="scrollIntoView($event,0, 'overview')" class="text-primary"> - <div> - <transition name="squish"> - <netvs-icon v-if="collapse_states[0]" icon="navigation_list_marker"></netvs-icon> - </transition> - {{ $t('system.broadcast_domain') }} - <b-spinner small v-show="loading_states[0]" variant="primary"/> - </div> - </b-list-group-item> - <b-list-group-item href="#reserved" @click="scrollIntoView($event,1, 'reserved')" - class="text-primary" v-if="subnets.length > 1"> - <b-badge variant="primary" class="mr-2" pill>{{ reservedAddrCount }}</b-badge> - <div class="d-inline-block"> - <transition name="squish"> - <netvs-icon v-if="collapse_states[1]" icon="navigation_list_marker"></netvs-icon> - </transition> - {{ $t('views.dnsvs.bcd_records.reserved_addresses') }} - <b-spinner small v-show="loading_states[1]" variant="primary"/> - </div> - </b-list-group-item> - <b-list-group-item v-for="(record_type, index) in record_types" :key="record_type" - :href="'#' + record_type + '-records'" - @click="scrollIntoView($event,2+index, record_type+'-records')" - class="text-primary"> - <b-badge variant="primary" class="mr-2" pill>{{ records[record_type].length }}</b-badge> - <div class="d-inline-block"> - <transition name="squish"> - <netvs-icon v-if="collapse_states[2+index]" - icon="navigation_list_marker"></netvs-icon> - </transition> - {{ record_type }} {{ $tc('system.record', 2) }} - <b-spinner small v-show="loading_states[2+index]" variant="primary"/> - </div> + <h1 class="my-4"> + {{ bcd.name }} <small class="text-muted">{{ $t('system.broadcast_domain') }} + <b-badge variant="success" :title="$t('views.dnsvs.bcd_records.both_subnets')" + pill + v-if="has_v4 && has_v6">{{ $t('system.dualstack') }} + </b-badge> + </small> + </h1> + <div style="margin-bottom: 1.5rem"> + <b-button variant="outline-primary" @click="editBCD"> + {{ $t('system.utils.update_template', { object: $tc('system.bcd', 1) }) }} + <netvs-icon icon="edit"></netvs-icon> + </b-button> + <b-button style="margin-left: 15px" variant="outline-secondary" @click="$bvModal.show('evlog_bcd')"> + {{ $t('system.event_log') }} + <netvs-icon icon="evlog"></netvs-icon> + </b-button> + </div> + <b-row> + <b-col cols="2" order="1" class="d-none d-lg-block bottom-space"> + <Loading style="top:75px" class="shadow sticky-top" :data="loaded" :class="{'py-3': !loaded}"> + <b-list-group v-if="record_types" v-b-scrollspy="{offset: 250}" class="overflow-hidden"> + <b-list-group-item href="#overview" @click="scrollIntoView($event,0, 'overview')" class="text-primary"> + <div> + <transition name="squish"> + <netvs-icon v-if="collapse_states[0]" icon="navigation_list_marker"></netvs-icon> + </transition> + {{ $t('system.broadcast_domain') }} + <b-spinner small v-show="loading_states[0]" variant="primary"/> + </div> + </b-list-group-item> + <b-list-group-item href="#reserved" @click="scrollIntoView($event,1, 'reserved')" + class="text-primary" v-if="subnets.length > 1"> + <b-badge variant="primary" class="mr-2" pill>{{ reservedAddrCount }}</b-badge> + <div class="d-inline-block"> + <transition name="squish"> + <netvs-icon v-if="collapse_states[1]" icon="navigation_list_marker"></netvs-icon> + </transition> + {{ $t('views.dnsvs.bcd_records.reserved_addresses') }} + <b-spinner small v-show="loading_states[1]" variant="primary"/> + </div> + </b-list-group-item> + <b-list-group-item v-for="(record_type, index) in record_types" :key="record_type" + :href="'#' + record_type + '-records'" + @click="scrollIntoView($event,2+index, record_type+'-records')" + class="text-primary"> + <b-badge variant="primary" class="mr-2" pill>{{ records[record_type].length }}</b-badge> + <div class="d-inline-block"> + <transition name="squish"> + <netvs-icon v-if="collapse_states[2+index]" + icon="navigation_list_marker"></netvs-icon> + </transition> + {{ record_type }} {{ $tc('system.record', 2) }} + <b-spinner small v-show="loading_states[2+index]" variant="primary"/> + </div> - </b-list-group-item> - </b-list-group> - </Loading> - </b-col> - <b-col cols="10" cols-lg="12"> - <b-card class="shadow mb-4" no-body :id="collapse_states[0] ? 'overview' : 'not-overview'"> - <b-card-header v-b-toggle:overview-collapse class="collapse-header"> - <h5 class="d-inline">{{ $t('system.broadcast_domain') }}</h5> - <netvs-icon class="collapse-icon" icon="collapse"></netvs-icon> - </b-card-header> - <b-card-body body-class="p-0"> - <b-collapse id="overview-collapse" v-model="collapse_states[0]"> - <b-table-simple responsive class="m-0" striped> - <b-tr> - <b-th> - ID - </b-th> - <b-td> - <span v-if="vni">{{ format_vni(vni.vni) }}</span><i v-else> - <netvs-icon icon="warning"/> - {{ $t('components.bcd_list.no_vni_set') }}</i> - </b-td> - </b-tr> - <b-tr> - <b-th> - {{ $t('views.dnsvs.bcd_records.broadcast_domain_name') }} - </b-th> - <b-td> - {{ bcd.name }} - </b-td> - </b-tr> - <b-tr> - <b-th> - {{ $t('system.description') }} - </b-th> - <b-td> - {{ bcd.description }} - </b-td> - </b-tr> - <b-tr> - <b-th>{{ $t('views.dnsvs.bcd_records.supervisors_admins') }}</b-th> - <b-td> - <template v-if="ous.length > 0"> - {{ $t('views.dnsvs.bcd_records.by_higher_level_OU') }} - <ul> - <OUMgrTreeEntry v-for="pou in parent_ou_tree_roots" v-bind:key="pou.short_name" :ou="pou" - :ous_by_parent="ous_by_parent" :parent_oe2mgr="parent_oe2mgr" - :parent_oe_mgr="parent_oe_mgr" - :direct_bcd2ous_by_ou="direct_bcd2ous_by_ou" - :current_bcd="bcd"/> - </ul> - </template> - <p v-else class="font-italic"> - {{ $t('views.dnsvs.bcd_records.no_OU_assigned') }} - </p> - <template v-if="bcd_groups.length > 0"> + </b-list-group-item> + </b-list-group> + </Loading> + </b-col> + <b-col cols="10" cols-lg="12"> + <b-card class="shadow mb-4" no-body :id="collapse_states[0] ? 'overview' : 'not-overview'"> + <b-card-header v-b-toggle:overview-collapse class="collapse-header"> + <h5 class="d-inline">{{ $t('system.broadcast_domain') }}</h5> + <netvs-icon class="collapse-icon" icon="collapse"></netvs-icon> + </b-card-header> + <b-card-body body-class="p-0"> + <b-collapse id="overview-collapse" v-model="collapse_states[0]"> + <b-table-simple responsive class="m-0" striped> + <b-tr> + <b-th> + ID + </b-th> + <b-td> + <span v-if="vni">{{ format_vni(vni.vni) }}</span><i v-else> + <netvs-icon icon="warning"/> + {{ $t('components.bcd_list.no_vni_set') }}</i> + </b-td> + </b-tr> + <b-tr> + <b-th> + {{ $t('views.dnsvs.bcd_records.broadcast_domain_name') }} + </b-th> + <b-td> + {{ bcd.name }} + </b-td> + </b-tr> + <b-tr> + <b-th> + {{ $t('system.description') }} + </b-th> + <b-td> + {{ bcd.description }} + </b-td> + </b-tr> + <b-tr> + <b-th>{{ $t('views.dnsvs.bcd_records.supervisors_admins') }}</b-th> + <b-td> + <template v-if="ous.length > 0"> + {{ $t('views.dnsvs.bcd_records.by_higher_level_OU') }} + <ul> + <OUMgrTreeEntry v-for="pou in parent_ou_tree_roots" v-bind:key="pou.short_name" :ou="pou" + :ous_by_parent="ous_by_parent" :parent_oe2mgr="parent_oe2mgr" + :parent_oe_mgr="parent_oe_mgr" + :direct_bcd2ous_by_ou="direct_bcd2ous_by_ou" + :current_bcd="bcd"/> + </ul> + </template> + <p v-else class="font-italic"> + {{ $t('views.dnsvs.bcd_records.no_OU_assigned') }} + </p> + <template v-if="bcd_groups.length > 0"> + {{ $t('views.dnsvs.bcd_records.through_group_assignments') }} + <ul> + <li v-for="grp in bcd_groups" v-bind:key="grp.group_name"> + <b :title="groups[grp.group_name].description"> + <b-link :to="'/cntl/groups/'+grp.group_name">{{ grp.group_name }}</b-link> + </b> + <b-badge class="ml-1" v-if="groups[grp.group_name].is_admin" variant="danger"> + {{ $t('system.admin') }} + </b-badge> + <b-badge class="ml-1" v-if="groups[grp.group_name].is_own" variant="success"> + {{ $t('system.member') }} + </b-badge> + <b-link class="ml-1" + v-if="grp.group_name in group2mgrs && group2mgrs[grp.group_name].length > 0" + :href="`mailto:${group2mgr_emails(grp.group_name).join(';')}?subject=${ + $t('views.dnsvs.bcd_records.group_mail_template', + {group_name: grp.group_name, name: bcd.name}) + }`"> + <netvs-icon icon="mail"></netvs-icon> + </b-link> + <ul v-if="grp.group_name in group2mgrs"> + <li v-for="mgr in group2mgrs[grp.group_name]" v-bind:key="mgr.mgr_login_name"> + <b-link :href="`mailto:${mgrs_mail(mgr.mgr_login_name)}`"> + {{ group_mgrs[mgr.mgr_login_name].first_name }} + {{ group_mgrs[mgr.mgr_login_name].last_name }} + </b-link> + ({{ mgr.mgr_login_name }}) + </li> + </ul> + </li> + </ul> + </template> + <p v-else class="font-italic"> + {{ $t('views.dnsvs.bcd_records.no_group_assigned') }} + </p> + </b-td> + </b-tr> + <b-tr> + <b-th>{{ $tc('system.domain', 2) }}</b-th> + <b-td> {{ $t('views.dnsvs.bcd_records.through_group_assignments') }} <ul> <li v-for="grp in bcd_groups" v-bind:key="grp.group_name"> @@ -126,97 +166,57 @@ <b-badge class="ml-1" v-if="groups[grp.group_name].is_own" variant="success"> {{ $t('system.member') }} </b-badge> - <b-link class="ml-1" - v-if="grp.group_name in group2mgrs && group2mgrs[grp.group_name].length > 0" - :href="`mailto:${group2mgr_emails(grp.group_name).join(';')}?subject=${ - $t('views.dnsvs.bcd_records.group_mail_template', - {group_name: grp.group_name, name: bcd.name}) - }`"> - <netvs-icon icon="mail"></netvs-icon> - </b-link> - <ul v-if="grp.group_name in group2mgrs"> - <li v-for="mgr in group2mgrs[grp.group_name]" v-bind:key="mgr.mgr_login_name"> - <b-link :href="`mailto:${mgrs_mail(mgr.mgr_login_name)}`"> - {{ group_mgrs[mgr.mgr_login_name].first_name }} - {{ group_mgrs[mgr.mgr_login_name].last_name }} - </b-link> - ({{ mgr.mgr_login_name }}) + <ul> + <li v-for="fqdn in fqdns2group[grp.group_name]" v-bind:key="fqdn.fqdn_value"> + <b-link :to="'/dnsvs/fqdns/'+fqdn.fqdn_value">{{ fqdn.fqdn_value }}</b-link> </li> </ul> </li> </ul> - </template> - <p v-else class="font-italic"> - {{ $t('views.dnsvs.bcd_records.no_group_assigned') }} - </p> - </b-td> - </b-tr> - <b-tr> - <b-th>{{ $tc('system.domain', 2) }}</b-th> - <b-td> - {{ $t('views.dnsvs.bcd_records.through_group_assignments') }} - <ul> - <li v-for="grp in bcd_groups" v-bind:key="grp.group_name"> - <b :title="groups[grp.group_name].description"> - <b-link :to="'/cntl/groups/'+grp.group_name">{{ grp.group_name }}</b-link> - </b> - <b-badge class="ml-1" v-if="groups[grp.group_name].is_admin" variant="danger"> - {{ $t('system.admin') }} - </b-badge> - <b-badge class="ml-1" v-if="groups[grp.group_name].is_own" variant="success"> - {{ $t('system.member') }} - </b-badge> - <ul> - <li v-for="fqdn in fqdns2group[grp.group_name]" v-bind:key="fqdn.fqdn_value"> - <b-link :to="'/dnsvs/fqdns/'+fqdn.fqdn_value">{{ fqdn.fqdn_value }}</b-link> - </li> - </ul> - </li> - </ul> - </b-td> - </b-tr> - <b-tr> - <b-th> - {{ $tc('system.subnet', subnets.length) }} - </b-th> - <b-td> + </b-td> + </b-tr> + <b-tr> + <b-th> + {{ $tc('system.subnet', subnets.length) }} + </b-th> + <b-td> <span v-for="subnet in subnets" :key="subnet.cidr"><SubnetInfo :subnet="subnet"></SubnetInfo><br/></span> - </b-td> - </b-tr> - <b-tr> - <b-th> - {{ $tc('system.vlan', 2) }} - </b-th> - <b-td> - <ul> - <li v-for="vlan in vlans" :key="vlan.gpk" :title="vlan.net_instnc">{{ vlan.name }} - ({{ vlan.id }}, {{ vlan.net_instnc }}) - </li> - </ul> - </b-td> - </b-tr> - <b-tr> - <b-th>{{ $t('views.dnsvs.bcd_records.natvs_section') }}</b-th> - <b-td> - <b-link - target="_blank" - :href="$store.state.sysinfo.host_oper_mode.is_prod?`https://admin.netdb.scc.kit.edu/~netadmin/natvs/user/wrapper.cgi/${bcd.name}/0/${bcd.name}/0/`:`https://admin.netdb-${$store.state.sysinfo.host_oper_mode.mode}.scc.kit.edu/~netadmin/natvs/user/wrapper.cgi/${bcd.name}/0/${bcd.name}/0/`" - >{{ bcd.name }} - </b-link> - </b-td> - </b-tr> - <b-tr> - <b-th>{{ $t('system.macauth') }}</b-th> - <b-td> - <b-link - :to="'/macauth/bcds/'+bcd.name">{{ bcd.name }} - </b-link> - </b-td> - </b-tr> - <b-tr> - <b-th>{{ $tc('system.gateway', 2) }}</b-th> - <b-td> + </b-td> + </b-tr> + <b-tr> + <b-th> + {{ $tc('system.vlan', 2) }} + </b-th> + <b-td> + <ul> + <li v-for="vlan in vlans" :key="vlan.gpk" :title="vlan.net_instnc">{{ vlan.name }} + ({{ vlan.id }}, {{ vlan.net_instnc }}) + </li> + </ul> + </b-td> + </b-tr> + <b-tr> + <b-th>{{ $t('views.dnsvs.bcd_records.natvs_section') }}</b-th> + <b-td> + <b-link + target="_blank" + :href="$store.state.sysinfo.host_oper_mode.is_prod?`https://admin.netdb.scc.kit.edu/~netadmin/natvs/user/wrapper.cgi/${bcd.name}/0/${bcd.name}/0/`:`https://admin.netdb-${$store.state.sysinfo.host_oper_mode.mode}.scc.kit.edu/~netadmin/natvs/user/wrapper.cgi/${bcd.name}/0/${bcd.name}/0/`" + >{{ bcd.name }} + </b-link> + </b-td> + </b-tr> + <b-tr> + <b-th>{{ $t('system.macauth') }}</b-th> + <b-td> + <b-link + :to="'/macauth/bcds/'+bcd.name">{{ bcd.name }} + </b-link> + </b-td> + </b-tr> + <b-tr> + <b-th>{{ $tc('system.gateway', 2) }}</b-th> + <b-td> <span v-for="subnet in subnets" v-bind:key="subnet.default_gateway"> <template v-if="subnet.default_gateway"> <code class="mr-2">{{ subnet.default_gateway }}</code> @@ -231,61 +231,62 @@ <br/> </template> </span> - </b-td> - </b-tr> - </b-table-simple> - </b-collapse> - </b-card-body> - </b-card> - <b-card class="shadow mb-4" no-body v-if="subnets.length > 1" :id="collapse_states[1] ? 'reserved' : 'not-reserved'"> - <b-card-header v-b-toggle:reserved-collapse class="collapse-header"> - <h5 class="d-inline">{{ $t('views.dnsvs.bcd_records.reserved_addresses') }}</h5> - <netvs-icon class="collapse-icon" icon="collapse"></netvs-icon> - </b-card-header> - <b-card-body body-class="p-0"> - <b-collapse id="reserved-collapse" v-model="collapse_states[1]"> - <b-pagination class="pt-3" v-if="loaded && reserved_addrs.length > per_page" :per_page="per_page" - align="center" v-model="current_page['_reserved']" - :total-rows="reserved_addrs.length"></b-pagination> - <b-table :items="reserved_addrs" :fields="reserved_addrs_list_fields" :per-page="per_page" - :current-page="current_page['_reserved']"> - <template v-slot:cell(value)="data"> - <code>{{ data.item.value }}</code> - <b-badge v-if="data.item.is_dhcp">{{ $t('system.dhcp') }}</b-badge> - <IPAddressTypeBadge :subnets="subnets" :record_address="data.item.value"/> - </template> - </b-table> - <b-pagination v-if="loaded && reserved_addrs.length > per_page" :per_page="per_page" - align="center" v-model="current_page['_reserved']" - :total-rows="reserved_addrs.length"></b-pagination> - </b-collapse> - </b-card-body> - </b-card> - <Loading :data="record_types"> - <DNSRecordTypeCard :loaded="loaded" :record_type="r" :key="'card_'+r" - v-for="(r, index) in record_types" :records="records[r]" - :reserved_addrs_by_ip="reserved_addrs_by_ip" :fqdns="fqdns" :bcd_has_v4="has_v4" - :bcd_has_v6="has_v6" :bcd="bcd" :record_types_by_name="record_types_by_name" - :user_possible_record_types="user_possible_record_types" - :records_by_fqdn="records_by_fqdn" - :edit_fqdn="editFQDN" :subnets="subnets" - :full_edit_fqdn_reducer="full_edit_fqdn_reducer" - :collapse_state.sync="collapse_states[2+index]"></DNSRecordTypeCard> - </Loading> - </b-col> - </b-row> - <DBEditor :presets="bcd" modal_id="edit_bcd" - :object_title="object_title" - object_function="update" object_fq_name="nd.bcd" :old_data="db_editor_old_data" - :non_optionals_order="['description']"> - </DBEditor> - <DBEditor :presets="db_editor_presets" modal_id="edit_fqdn" - :object_title="object_title" :input_reducer="full_edit_fqdn_reducer" - object_function="update" object_fq_name="dns.fqdn" :old_data="db_editor_old_data" - :non_optionals_order="['value', 'description']"> - </DBEditor> - <EVLogViewer v-if="bcd" modal_id="evlog_bcd" :title="'BCD \''+ bcd.name + '\''" - ref_obj_fq="nd.bcd" :refobj_id_value="bcd.gpk"></EVLogViewer> + </b-td> + </b-tr> + </b-table-simple> + </b-collapse> + </b-card-body> + </b-card> + <b-card class="shadow mb-4" no-body v-if="subnets.length > 1" + :id="collapse_states[1] ? 'reserved' : 'not-reserved'"> + <b-card-header v-b-toggle:reserved-collapse class="collapse-header"> + <h5 class="d-inline">{{ $t('views.dnsvs.bcd_records.reserved_addresses') }}</h5> + <netvs-icon class="collapse-icon" icon="collapse"></netvs-icon> + </b-card-header> + <b-card-body body-class="p-0"> + <b-collapse id="reserved-collapse" v-model="collapse_states[1]"> + <b-pagination class="pt-3" v-if="loaded && reserved_addrs.length > per_page" :per_page="per_page" + align="center" v-model="current_page['_reserved']" + :total-rows="reserved_addrs.length"></b-pagination> + <b-table :items="reserved_addrs" :fields="reserved_addrs_list_fields" :per-page="per_page" + :current-page="current_page['_reserved']"> + <template v-slot:cell(value)="data"> + <code>{{ data.item.value }}</code> + <b-badge v-if="data.item.is_dhcp">{{ $t('system.dhcp') }}</b-badge> + <IPAddressTypeBadge :subnets="subnets" :record_address="data.item.value"/> + </template> + </b-table> + <b-pagination v-if="loaded && reserved_addrs.length > per_page" :per_page="per_page" + align="center" v-model="current_page['_reserved']" + :total-rows="reserved_addrs.length"></b-pagination> + </b-collapse> + </b-card-body> + </b-card> + <Loading :data="record_types"> + <DNSRecordTypeCard :loaded="loaded" :record_type="r" :key="'card_'+r" + v-for="(r, index) in record_types" :records="records[r]" + :reserved_addrs_by_ip="reserved_addrs_by_ip" :fqdns="fqdns" :bcd_has_v4="has_v4" + :bcd_has_v6="has_v6" :bcd="bcd" :record_types_by_name="record_types_by_name" + :user_possible_record_types="user_possible_record_types" + :records_by_fqdn="records_by_fqdn" + :edit_fqdn="editFQDN" :subnets="subnets" + :full_edit_fqdn_reducer="full_edit_fqdn_reducer" + :collapse_state.sync="collapse_states[2+index]"></DNSRecordTypeCard> + </Loading> + </b-col> + </b-row> + <DBEditor :presets="bcd" modal_id="edit_bcd" + :object_title="object_title" + object_function="update" object_fq_name="nd.bcd" :old_data="db_editor_old_data" + :non_optionals_order="['description']"> + </DBEditor> + <DBEditor :presets="db_editor_presets" modal_id="edit_fqdn" + :object_title="object_title" :input_reducer="full_edit_fqdn_reducer" + object_function="update" object_fq_name="dns.fqdn" :old_data="db_editor_old_data" + :non_optionals_order="['value', 'description']"> + </DBEditor> + <EVLogViewer v-if="bcd" modal_id="evlog_bcd" :title="'BCD \''+ bcd.name + '\''" + ref_obj_fq="nd.bcd" :refobj_id_value="bcd.gpk"></EVLogViewer> </template> </Loading> </div>