Commit 71290184 authored by janis.streib's avatar janis.streib 🦉
Browse files

FIX: sanitize group name in groupcard

parent cf9b104d
Pipeline #119432 passed with stages
in 9 minutes and 46 seconds
......@@ -54,14 +54,14 @@
</b-col>
</b-row>
</template>
<b-button block squared variant="outline-secondary" v-b-toggle="group.name + '-collapse-bcds'">
<b-button block squared variant="outline-secondary" v-b-toggle="group.name.replace(' ', '_') + '-collapse-bcds'">
BCDs (Adressraum)
<b-badge pill v-if="bcds2grp[group.name]">{{ bcds2grp[group.name].length }}</b-badge>
<b-badge pill v-else variant="warning">0</b-badge>
<br/>
<font-awesome-icon class="collapse-icon" :icon="['fas','chevron-down']"/>
</b-button>
<b-collapse :id="group.name + '-collapse-bcds'">
<b-collapse :id="group.name.replace(' ', '_') + '-collapse-bcds'">
<b-table :items="bcds2grp[group.name]" :fields="bcd_list_fields">
<template v-slot:cell(bcd_name)="data">
<b-link :to="'/dnsvs/bcds/'+data.item.bcd_name">{{ data.item.bcd_name }}</b-link>
......@@ -71,10 +71,10 @@
</template>
<template v-slot:head(actions)>
<b-button block variant="outline-success"
:id="'button-assign-bcd-' + group.name" @click="createBcd2Group(group.name)">
:id="'button-assign-bcd-' + group.name.replace(' ', '_')" @click="createBcd2Group(group.name)">
<font-awesome-icon :icon="['fas', 'plus']"/>
</b-button>
<b-tooltip :target="'button-assign-bcd-' + group.name" triggers="hover"
<b-tooltip :target="'button-assign-bcd-' + group.name.replace(' ', '_')" triggers="hover"
variant="success" placement="left">
Neue BCD zuordnen
</b-tooltip>
......@@ -93,20 +93,20 @@
</template>
</b-table>
</b-collapse>
<b-button block squared variant="outline-secondary" v-b-toggle="group.name + '-collapse-domains'">
<b-button block squared variant="outline-secondary" v-b-toggle="group.name.replace(' ', '_') + '-collapse-domains'">
Domains (Namensraum)
<b-badge pill v-if="fqdn2grp[group.name]">{{ fqdn2grp[group.name].length }}</b-badge>
<b-badge pill v-else variant="warning">0</b-badge><br/>
<font-awesome-icon class="collapse-icon" :icon="['fas','chevron-down']"/>
</b-button>
<b-collapse :id="group.name + '-collapse-domains'">
<b-collapse :id="group.name.replace(' ', '_') + '-collapse-domains'">
<b-table :items="fqdn2grp[group.name]" :fields="fqdn_list_fields">
<template v-slot:head(actions)>
<b-button block variant="outline-success"
:id="'button-assign-fqdn-' + group.name" @click="createFqdn2Group(group.name)">
:id="'button-assign-fqdn-' + group.name.replace(' ', '_')" @click="createFqdn2Group(group.name)">
<font-awesome-icon :icon="['fas', 'plus']"/>
</b-button>
<b-tooltip :target="'button-assign-fqdn-' + group.name" triggers="hover"
<b-tooltip :target="'button-assign-fqdn-' + group.name.replace(' ', '_')" triggers="hover"
variant="success" placement="left">
Neue Domain zuordnen
</b-tooltip>
......@@ -137,14 +137,14 @@
</template>
</b-table>
</b-collapse>
<b-button block squared variant="outline-secondary" v-b-toggle="group.name + '-collapse-members'">
<b-button block squared variant="outline-secondary" v-b-toggle="group.name.replace(' ', '_') + '-collapse-members'">
Gruppenmitglieder
<b-badge pill v-if="mgrs2grp[group.name]">{{ mgrs2grp[group.name].length }}</b-badge>
<b-badge pill v-else variant="warning">0</b-badge>
<br/>
<font-awesome-icon class="collapse-icon" :icon="['fas','chevron-down']"/>
</b-button>
<b-collapse :id="group.name + '-collapse-members'">
<b-collapse :id="group.name.replace(' ', '_') + '-collapse-members'">
<b-table :items="mgrs2grp[group.name]" :fields="mgr_list_fields">
<template v-slot:cell(first_name)="data">
{{ mgrs[data.item.mgr_login_name].first_name }}
......@@ -182,21 +182,21 @@
</b-table>
</b-collapse>
<template v-if="!group.is_sub_group">
<b-button block squared variant="outline-secondary" v-b-toggle="group.name + '-collapse-subgroups'">
<b-button block squared variant="outline-secondary" v-b-toggle="group.name.replace(' ', '_') + '-collapse-subgroups'">
Untergruppen
<b-badge pill v-if="subgroups && subgroups.length > 0">{{ subgroups.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="group.name + '-collapse-subgroups'">
<b-collapse :id="group.name.replace(' ', '_') + '-collapse-subgroups'">
<b-container fluid style="margin-top: 20px">
<b-button style="margin-bottom: 20px" block variant="outline-success"
:id="'button-create-subgroup-' + group.name" @click="createSubgroup(group.name)" v-if="group.is_own">
:id="'button-create-subgroup-' + group.name.replace(' ', '_')" @click="createSubgroup(group.name)" v-if="group.is_own">
<font-awesome-icon :icon="['fas', 'plus']"/>
</b-button>
<b-alert v-else variant="info" class="text-center" show>Sie können nur Untergruppen zu Gruppen anlegen, in denen Sie Mitglied sind.</b-alert>
<b-tooltip :target="'button-create-subgroup-' + group.name" triggers="hover"
<b-tooltip :target="'button-create-subgroup-' + group.name.replace(' ', '_')" triggers="hover"
variant="success" placement="bottom">
Neue Untergruppe anlegen
</b-tooltip>
......
Supports Markdown
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