Skip to content
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

Port : Add tag management view #107

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions src/containers/DefaultContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ export default {
icon: 'fa fa-balance-scale',
permission: permissions.VIEW_PORTFOLIO,
},
{
name: 'Tags',
url: '/tags',
icon: 'fa fa-tag',
permission: permissions.VIEW_PORTFOLIO,
},
{
title: true,
name: this.$t('message.global_audit'),
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Überprüfen Sie die aktuellen Anmeldeinformationen und versuchen Sie es erneut",
"phone": "Telefon",
"policies": "Richtlinien",
"policies_tagged_with": "Richtlinien mit dem Tag {tag}",
"policy_bundle_hash": "Paket-Hash",
"policy_bundle_info": "Paket-Info",
"policy_bundle_sync": "Paket synchronisieren",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Projekt aktualisiert",
"project_vulnerabilities": "Projektschwachstellen",
"projects": "Projekte",
"projects_tagged_with": "Projekte mit dem Tag {tag}",
"projects_at_risk": "Gefährdete Projekte",
"properties": "Eigenschaften",
"property_created": "Eigenschaft erstellt",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Check current login credentials and try again",
"phone": "Phone",
"policies": "Policies",
"policies_tagged_with": "Policies tagged with {tag}",
"policy_bundle_hash": "Bundle Hash",
"policy_bundle_info": "Bundle Info",
"policy_bundle_sync": "Sync Bundle",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Project updated",
"project_vulnerabilities": "Project Vulnerabilities",
"projects": "Projects",
"projects_tagged_with": "Projects tagged with {tag}",
"projects_at_risk": "Projects at Risk",
"properties": "Properties",
"property_created": "Property created",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Verifique las credenciales de inicio de sesión actuales e inténtelo nuevamente",
"phone": "Teléfono",
"policies": "Políticas",
"policies_tagged_with": "Políticas etiquetadas con {tag}",
"policy_bundle_hash": "paquete de hash",
"policy_bundle_info": "Información del paquete",
"policy_bundle_sync": "Paquete de sincronización",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Proyecto actualizado",
"project_vulnerabilities": "Vulnerabilidades del proyecto",
"projects": "Proyectos",
"projects_tagged_with": "Proyectos etiquetados con {tag}",
"projects_at_risk": "Proyectos en riesgo",
"properties": "Propiedades",
"property_created": "Propiedad creada",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Vérifiez les informations de connexion actuelles et réessayez",
"phone": "Téléphone",
"policies": "Politiques",
"policies_tagged_with": "Règles marquées avec {tag}",
"policy_bundle_hash": "Hachage groupé",
"policy_bundle_info": "Informations sur le forfait",
"policy_bundle_sync": "Pack de synchronisation",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Projet mis à jour",
"project_vulnerabilities": "Vulnérabilités du projet",
"projects": "Projets",
"projects_tagged_with": "Projets marqués avec {tag}",
"projects_at_risk": "Projets à risque",
"properties": "Propriétés",
"property_created": "Propriété créée",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "वर्तमान लॉगिन क्रेडेंशियल जांचें और पुनः प्रयास करें",
"phone": "फ़ोन",
"policies": "नीतियों",
"policies_tagged_with": "{tag} के साथ टैग की गईं नीतियां",
"policy_bundle_hash": "बंडल हैश",
"policy_bundle_info": "बंडल जानकारी",
"policy_bundle_sync": "सिंक बंडल",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "परियोजना अद्यतन",
"project_vulnerabilities": "परियोजना की कमज़ोरियाँ",
"projects": "परियोजनाओं",
"projects_tagged_with": "{tag} के साथ टैग किए गए प्रोजेक्ट",
"projects_at_risk": "जोखिम में परियोजनाएँ",
"properties": "गुण",
"property_created": "संपत्ति बनाई गई",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Controlla le credenziali di accesso attuali e riprova",
"phone": "Telefono",
"policies": "Politiche",
"policies_tagged_with": "Politiche contrassegnate con {tag}",
"policy_bundle_hash": "Pacchetto Hash",
"policy_bundle_info": "Informazioni sul pacchetto",
"policy_bundle_sync": "Pacchetto di sincronizzazione",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Progetto aggiornato",
"project_vulnerabilities": "Vulnerabilità del progetto",
"projects": "Progetti",
"projects_tagged_with": "Progetti taggati con {tag}",
"projects_at_risk": "Progetti a rischio",
"properties": "Proprietà",
"property_created": "Proprietà creata",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "現在のログイン資格情報を確認して、もう一度お試しください",
"phone": "電話",
"policies": "ポリシー",
"policies_tagged_with": "{tag} でタグ付けされたポリシー",
"policy_bundle_hash": "バンドルハッシュ",
"policy_bundle_info": "バンドル情報",
"policy_bundle_sync": "同期バンドル",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "プロジェクトが更新されました",
"project_vulnerabilities": "プロジェクトの脆弱性",
"projects": "プロジェクト",
"projects_tagged_with": "{tag} でタグ付けされたプロジェクト",
"projects_at_risk": "リスクのあるプロジェクト",
"properties": "プロパティ",
"property_created": "プロパティが作成されました",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Sprawdź aktualne dane logowania i spróbuj ponownie",
"phone": "Telefon",
"policies": "Zasady",
"policies_tagged_with": "Zasady oznaczone tagiem {tag}",
"policy_bundle_hash": "Hash pakietu",
"policy_bundle_info": "Informacje o pakiecie",
"policy_bundle_sync": "Pakiet synchronizacji",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Projekt zaktualizowany",
"project_vulnerabilities": "Luki w zabezpieczeniach projektu",
"projects": "Projektowanie",
"projects_tagged_with": "Projekty oznaczone tagiem {tag}",
"projects_at_risk": "Projekty zagrożone",
"properties": "Nieruchomości",
"property_created": "Właściwość utworzona",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Verifique as credenciais de login atuais e tente novamente",
"phone": "Telefone",
"policies": "Políticas",
"policies_tagged_with": "Políticas marcadas com {tag}",
"policy_bundle_hash": "Hash do pacote",
"policy_bundle_info": "Informações do pacote",
"policy_bundle_sync": "Pacote de sincronização",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Projeto atualizado",
"project_vulnerabilities": "Vulnerabilidades do projeto",
"projects": "Projetos",
"projects_tagged_with": "Projetos marcados com {tag}",
"projects_at_risk": "Projetos em risco",
"properties": "Propriedades",
"property_created": "Propriedade criada",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Verifique as credenciais de login atuais e tente novamente",
"phone": "Telefone",
"policies": "Políticas",
"policies_tagged_with": "Políticas marcadas com {tag}",
"policy_bundle_hash": "Hash do pacote",
"policy_bundle_info": "Informações do pacote",
"policy_bundle_sync": "Pacote de sincronização",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Projeto atualizado",
"project_vulnerabilities": "Vulnerabilidades do projeto",
"projects": "Projetos",
"projects_tagged_with": "Projetos marcados com {tag}",
"projects_at_risk": "Projetos em risco",
"properties": "Propriedades",
"property_created": "Propriedade criada",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Проверьте текущие учетные данные для входа и повторите попытку.",
"phone": "Телефон",
"policies": "Политика",
"policies_tagged_with": "Политики с тегом {tag}",
"policy_bundle_hash": "Пакетный хеш",
"policy_bundle_info": "Информация о пакете",
"policy_bundle_sync": "Пакет синхронизации",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Проект обновлен",
"project_vulnerabilities": "Уязвимости проекта",
"projects": "Проекты",
"projects_tagged_with": "Проекты с тегом {tag}",
"projects_at_risk": "Проекты под угрозой",
"properties": "Характеристики",
"property_created": "Объект создан",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "Перевірте поточні облікові дані для входу та повторіть спробу",
"phone": "Телефон",
"policies": "політики",
"policies_tagged_with": "Правила з тегом {tag}",
"policy_bundle_hash": "Хеш пакета",
"policy_bundle_info": "Інформація про пакет",
"policy_bundle_sync": "Пакет синхронізації",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "Проект оновлений",
"project_vulnerabilities": "Уразливості проекту",
"projects": "Проекти",
"projects_tagged_with": "Проекти з тегом {tag}",
"projects_at_risk": "Проекти під загрозою",
"properties": "Властивості",
"property_created": "Власність створена",
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@
"password_unauthorized": "检查当前登录凭据并重试",
"phone": "电话",
"policies": "策略",
"policies_tagged_with": "带有 {tag} 标记的政策",
"policy_bundle_hash": "捆绑哈希",
"policy_bundle_info": "捆绑信息",
"policy_bundle_sync": "同步包",
Expand Down Expand Up @@ -726,6 +727,7 @@
"project_updated": "项目已更新",
"project_vulnerabilities": "项目漏洞",
"projects": "项目",
"projects_tagged_with": "带有 {tag} 标记的项目",
"projects_at_risk": "面临风险的项目",
"properties": "属性",
"property_created": "创建的财产",
Expand Down
12 changes: 12 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const DefaultContainer = () => import('@/containers/DefaultContainer');
// Views
const Dashboard = () => import('@/views/Dashboard');
const ProjectList = () => import('@/views/portfolio/projects/ProjectList');
const TagList = () => import('@/views/portfolio/tags/TagList.vue');
const ComponentSearch = () =>
import('@/views/portfolio/components/ComponentSearch');
const VulnerabilityList = () =>
Expand Down Expand Up @@ -266,6 +267,17 @@ function configRoutes() {
permissions: ['VIEW_PORTFOLIO'],
},
},
{
path: 'tags',
name: 'Tags',
component: TagList,
meta: {
title: i18n.t('message.tags'),
i18n: 'message.tags',
sectionPath: '/tags',
permission: 'VIEW_PORTFOLIO',
},
},
{
path: 'licenses',
name: 'Licenses',
Expand Down
13 changes: 9 additions & 4 deletions src/views/administration/accessmanagement/SelectProjectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import xssFilters from 'xss-filters';
import permissionsMixin from '../../../mixins/permissionsMixin';
import common from '../../../shared/common';
import { Switch as cSwitch } from '@coreui/vue';
import router from '@/router';

export default {
mixins: [permissionsMixin],
Expand All @@ -70,16 +71,20 @@ export default {
title: this.$t('message.project_name'),
field: 'name',
sortable: true,
formatter(value, row, index) {
let url = xssFilters.uriInUnQuotedAttr('../projects/' + row.uuid);
return `<a href="${url}">${xssFilters.inHTMLData(value)}</a>`;
formatter(value, row) {
// TODO: Close modal when link is clicked.
const href = router.resolve({
name: 'Project',
params: { uuid: row.uuid },
}).href;
return `<a href="${href}">${xssFilters.inHTMLData(value)}</a>`;
},
},
{
title: this.$t('message.version'),
field: 'version',
sortable: true,
formatter(value, row, index) {
formatter(value) {
return xssFilters.inHTMLData(common.valueWithDefault(value, ''));
},
},
Expand Down
Loading
Loading