From 4ca60c6d4e861c03bde4b96735dda823c91872e9 Mon Sep 17 00:00:00 2001 From: Arjav Date: Wed, 11 Jun 2025 16:53:29 +0530 Subject: [PATCH] feat(policy): add tag exclusion functionality in PolicyList Signed-off-by: Arjav --- src/i18n/locales/en.json | 2 ++ src/views/policy/PolicyList.vue | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 527fb23f7..7b33ce12f 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -161,6 +161,8 @@ "limit_to": "Limit To", "limit_to_projects": "Limit to projects", "limit_to_tags": "Limit to tags", + "exclude_tags":"Excluded Tags", + "invert_tag_match": "Exclude selected tags", "managed_users": "Managed Users", "mapped_ldap_groups": "Mapped LDAP groups", "mapped_oidc_groups": "Mapped OpenID Connect Groups", diff --git a/src/views/policy/PolicyList.vue b/src/views/policy/PolicyList.vue index f08ef9e75..2e30f3daf 100644 --- a/src/views/policy/PolicyList.vue +++ b/src/views/policy/PolicyList.vue @@ -170,7 +170,12 @@ export default { - + +
@@ -221,6 +226,7 @@ export default { tags: row.tags, includeChildren: row.includeChildren, onlyLatestProjectVersion: row.onlyLatestProjectVersion, + invertTagMatch: row.invertTagMatch || false, }; }, methods: { @@ -265,6 +271,7 @@ export default { violationState: this.violationState, includeChildren: this.includeChildren, onlyLatestProjectVersion: this.onlyLatestProjectVersion, + invertTagMatch: this.invertTagMatch, }) .then((response) => { // prevent that "limit to" details are hidden after updates where table does not need to refresh @@ -305,6 +312,7 @@ export default { this.conditions = policy.policyConditions; this.includeChildren = policy.includeChildren; this.onlyLatestProjectVersion = policy.onlyLatestProjectVersion; + this.invertTagMatch = policy.invertTagMatch || false; }, deleteProjectLimiter: function (projectUuid) { let url = `${this.$api.BASE_URL}/${this.$api.URL_POLICY}/${this.policy.uuid}/project/${projectUuid}`; @@ -399,6 +407,9 @@ export default { onlyLatestProjectVersion() { this.updatePolicy(); }, + invertTagMatch() { + this.updatePolicy(); + }, }, }); },