Skip to content

feat(ui): add match mode selector to internal component config #1282 #1283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Zugeordnete LDAP-Gruppen",
"mapped_oidc_groups": "Zugeordnete OpenID Connect-Gruppen",
"mapped_teams": "Zugeordnete Teams",
"match_mode": {
"and": "Stimmen Sie sowohl den Namespace als auch den Namen an",
"label": "Komponentenanpassungsmodus",
"or": "Stimmen Sie den Namespace oder den Namen überein"
},
"maven": "Maven",
"members": "Mitglieder",
"mime_type": "Mime Typ",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Mapped LDAP groups",
"mapped_oidc_groups": "Mapped OpenID Connect Groups",
"mapped_teams": "Mapped Teams",
"match_mode": {
"and": "Match both namespace AND name",
"label": "Component matching mode",
"or": "Match namespace OR name"
},
"maven": "Maven",
"members": "Members",
"mime_type": "Mime type",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Grupos LDAP asignados",
"mapped_oidc_groups": "Grupos de OpenID Connect asignados",
"mapped_teams": "Equipos mapeados",
"match_mode": {
"and": "Coincidir con el espacio de nombres y el nombre",
"label": "Modo de coincidencia de componentes",
"or": "Espacio de nombres o nombre de coincidencia"
},
"maven": "Maven",
"members": "Miembros",
"mime_type": "Tipo de Mimica",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Groupes LDAP associés",
"mapped_oidc_groups": "Groupes OpenID Connect associés",
"mapped_teams": "Équipes associées",
"match_mode": {
"and": "Faire correspondre à la fois l'espace de noms et le nom",
"label": "Mode de correspondance des composants",
"or": "Correspondre à l'espace de noms ou au nom"
},
"maven": "Maven",
"members": "Membres",
"mime_type": "Type MIME",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "मैप किए गए LDAP समूह",
"mapped_oidc_groups": "मैप किए गए OpenID कनेक्ट समूह",
"mapped_teams": "मैप की गई टीमें",
"match_mode": {
"and": "नामस्थान और नाम दोनों का मिलान करें",
"label": "घटक मिलान विधा",
"or": "नेमस्पेस या नाम का मिलान करें"
},
"maven": "मावेन",
"members": "सदस्यों",
"mime_type": "माइम प्रकार",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Gruppi LDAP mappati",
"mapped_oidc_groups": "Gruppi OpenID Connect mappati",
"mapped_teams": "Squadre mappate",
"match_mode": {
"and": "Abbinare sia lo spazio dei nomi che il nome",
"label": "Modalità di corrispondenza componente",
"or": "Abbina lo spazio dei nomi o il nome"
},
"maven": "Esperto di",
"members": "Membri",
"mime_type": "Tipo mimo",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "マッピングされたLDAPグループ",
"mapped_oidc_groups": "マッピングされた OpenID Connect グループ",
"mapped_teams": "マッピングされたチーム",
"match_mode": {
"and": "名前空間と名前の両方を一致させます",
"label": "コンポーネントマッチングモード",
"or": "名前空間または名前を一致させます"
},
"maven": "Maven",
"members": "メンバー",
"mime_type": "MIMEタイプ",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Mapowane grupy LDAP",
"mapped_oidc_groups": "Mapowane grupy połączeń OpenID",
"mapped_teams": "Mapowane zespoły",
"match_mode": {
"and": "Dopasuj zarówno przestrzeń nazw, jak i nazwę",
"label": "Tryb dopasowywania komponentów",
"or": "Dopasuj przestrzeń nazw lub nazwę"
},
"maven": "Mavena",
"members": "Członkowie",
"mime_type": "Typ mima",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Grupos LDAP mapeados",
"mapped_oidc_groups": "Grupos OpenID Connect mapeados",
"mapped_teams": "Equipes mapeadas",
"match_mode": {
"and": "Combine o espaço para nome e o nome",
"label": "Modo de correspondência de componentes",
"or": "Combinar namespace ou nome"
},
"maven": "Maven",
"members": "Membros",
"mime_type": "Tipo Mime",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Grupos LDAP mapeados",
"mapped_oidc_groups": "Grupos OpenID Connect mapeados",
"mapped_teams": "Equipes mapeadas",
"match_mode": {
"and": "Combine o espaço para nome e o nome",
"label": "Modo de correspondência de componentes",
"or": "Combinar namespace ou nome"
},
"maven": "Maven",
"members": "Membros",
"mime_type": "Tipo Mime",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Сопоставленные группы LDAP",
"mapped_oidc_groups": "Сопоставленные группы OpenID Connect",
"mapped_teams": "Сопоставленные команды",
"match_mode": {
"and": "Сопоставьте пространство имен и имя",
"label": "Режим сопоставления компонентов",
"or": "Сопоставьте пространство имен или имя"
},
"maven": "Maven",
"members": "Участники",
"mime_type": "Тип MIME",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "Зіставлені групи LDAP",
"mapped_oidc_groups": "Зіставлені групи OpenID Connect",
"mapped_teams": "Зіставлені команди",
"match_mode": {
"and": "Відповідати як простору імен, так і імені",
"label": "Режим відповідності компонентів",
"or": "Простір імен відповідності"
},
"maven": "Maven",
"members": "Учасники",
"mime_type": "Тип MIME",
Expand Down
5 changes: 5 additions & 0 deletions src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@
"mapped_ldap_groups": "映射 LDAP 组",
"mapped_oidc_groups": "映射的 OpenID 连接组",
"mapped_teams": "映射团队",
"match_mode": {
"and": "匹配命名空间和名称",
"label": "元件匹配方式",
"or": "匹配命名空间或名称"
},
"maven": "Maven",
"members": "成员",
"mime_type": "Mime 类型",
Expand Down
44 changes: 36 additions & 8 deletions src/views/administration/configuration/InternalComponents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
<p>
{{ $t('admin.internal_component_desc') }}
</p>
<b-validated-input-group-form-input
id="internalComponentsConfigGroupsRegex"
:label="$t('admin.namespace_regex')"
input-group-size="mb-3"
type="text"
v-model="namespaceRegex"
:tooltip="$t('admin.namespace_regex_desc')"
/>
<b-validated-input-group-form-input
id="internalComponentsConfigNamesRegex"
:label="$t('admin.name_regex')"
Expand All @@ -20,6 +12,25 @@
v-model="nameRegex"
:tooltip="$t('admin.name_regex_desc')"
/>
<b-validated-input-group-form-input
id="internalComponentsConfigGroupsRegex"
:label="$t('admin.namespace_regex')"
input-group-size="mb-3"
type="text"
v-model="namespaceRegex"
:tooltip="$t('admin.namespace_regex_desc')"
/>
<b-form-group
:label="$t('admin.match_mode.label')"
label-for="internalComponentsConfigMatchMode"
class="mb-3"
>
<b-form-select
id="internalComponentsConfigMatchMode"
v-model="matchMode"
:options="matchModeOptions"
/>
</b-form-group>
</b-card-body>
<b-card-footer>
<b-button variant="outline-primary" class="px-4" @click="saveChanges">{{
Expand Down Expand Up @@ -53,8 +64,17 @@ export default {
return {
namespaceRegex: '',
nameRegex: '',
matchMode: 'OR',
};
},
computed: {
matchModeOptions() {
return [
{ value: 'OR', text: this.$t('admin.match_mode.or') },
{ value: 'AND', text: this.$t('admin.match_mode.and') },
];
},
},
methods: {
saveChanges: function () {
this.updateConfigProperties([
Expand All @@ -68,6 +88,11 @@ export default {
propertyName: 'names.regex',
propertyValue: this.nameRegex,
},
{
groupName: 'internal-components',
propertyName: 'match-mode',
propertyValue: this.matchMode,
},
]);
},
identifyInternalComponents: function () {
Expand All @@ -93,6 +118,9 @@ export default {
case 'groups.regex':
this.namespaceRegex = item.propertyValue;
break;
case 'match-mode':
this.matchMode = item.propertyValue || 'OR';
break;
case 'names.regex':
this.nameRegex = item.propertyValue;
break;
Expand Down
Loading