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 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
6 changes: 6 additions & 0 deletions src/containers/DefaultContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
ProfileEditModal,
SnapshotModal,
AppSidebar,
AppAside,

Check failure on line 50 in src/containers/DefaultContainer.vue

View workflow job for this annotation

GitHub Actions / lint

The "AppAside" component has been registered but not used
Breadcrumb,
DefaultHeaderProfileDropdown,

Check failure on line 52 in src/containers/DefaultContainer.vue

View workflow job for this annotation

GitHub Actions / lint

The "DefaultHeaderProfileDropdown" component has been registered but not used
SidebarForm,
SidebarFooter,
SidebarHeader,
Expand Down Expand Up @@ -102,6 +102,12 @@
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Projektschwachstellen",
"projects": "Projekte",
"projects_at_risk": "Gefährdete Projekte",
"projects_tagged_with": "Projekte mit dem Tag {tag}",
"properties": "Eigenschaften",
"property_created": "Eigenschaft erstellt",
"property_deleted": "Eigenschaft gelöscht",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Project Vulnerabilities",
"projects": "Projects",
"projects_at_risk": "Projects at Risk",
"projects_tagged_with": "Projects tagged with {tag}",
"properties": "Properties",
"property_created": "Property created",
"property_deleted": "Property deleted",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Vulnerabilidades del proyecto",
"projects": "Proyectos",
"projects_at_risk": "Proyectos en riesgo",
"projects_tagged_with": "Proyectos etiquetados con {tag}",
"properties": "Propiedades",
"property_created": "Propiedad creada",
"property_deleted": "Propiedad eliminada",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Vulnérabilités du projet",
"projects": "Projets",
"projects_at_risk": "Projets à risque",
"projects_tagged_with": "Projets marqués avec {tag}",
"properties": "Propriétés",
"property_created": "Propriété créée",
"property_deleted": "Propriété supprimé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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "परियोजना की कमज़ोरियाँ",
"projects": "परियोजनाओं",
"projects_at_risk": "जोखिम में परियोजनाएँ",
"projects_tagged_with": "{tag} के साथ टैग किए गए प्रोजेक्ट",
"properties": "गुण",
"property_created": "संपत्ति बनाई गई",
"property_deleted": "संपत्ति हटा दी गई",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Vulnerabilità del progetto",
"projects": "Progetti",
"projects_at_risk": "Progetti a rischio",
"projects_tagged_with": "Progetti taggati con {tag}",
"properties": "Proprietà",
"property_created": "Proprietà creata",
"property_deleted": "Proprietà eliminata",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "プロジェクトの脆弱性",
"projects": "プロジェクト",
"projects_at_risk": "リスクのあるプロジェクト",
"projects_tagged_with": "{tag} でタグ付けされたプロジェクト",
"properties": "プロパティ",
"property_created": "プロパティが作成されました",
"property_deleted": "プロパティが削除されました",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Luki w zabezpieczeniach projektu",
"projects": "Projektowanie",
"projects_at_risk": "Projekty zagrożone",
"projects_tagged_with": "Projekty oznaczone tagiem {tag}",
"properties": "Nieruchomości",
"property_created": "Właściwość utworzona",
"property_deleted": "Właściwość usunięta",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Vulnerabilidades do projeto",
"projects": "Projetos",
"projects_at_risk": "Projetos em risco",
"projects_tagged_with": "Projetos marcados com {tag}",
"properties": "Propriedades",
"property_created": "Propriedade criada",
"property_deleted": "Propriedade excluída",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Vulnerabilidades do projeto",
"projects": "Projetos",
"projects_at_risk": "Projetos em risco",
"projects_tagged_with": "Projetos marcados com {tag}",
"properties": "Propriedades",
"property_created": "Propriedade criada",
"property_deleted": "Propriedade excluída",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Уязвимости проекта",
"projects": "Проекты",
"projects_at_risk": "Проекты под угрозой",
"projects_tagged_with": "Проекты с тегом {tag}",
"properties": "Характеристики",
"property_created": "Объект создан",
"property_deleted": "Ресурс удален.",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "Уразливості проекту",
"projects": "Проекти",
"projects_at_risk": "Проекти під загрозою",
"projects_tagged_with": "Проекти з тегом {tag}",
"properties": "Властивості",
"property_created": "Власність створена",
"property_deleted": "Власність видалено",
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 @@ -727,6 +728,7 @@
"project_vulnerabilities": "项目漏洞",
"projects": "项目",
"projects_at_risk": "面临风险的项目",
"projects_tagged_with": "带有 {tag} 标记的项目",
"properties": "属性",
"property_created": "创建的财产",
"property_deleted": "属性已删除",
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 @@
// 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 @@
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 Expand Up @@ -1036,7 +1048,7 @@
path: 'project',
props: (route) => ({ uuid: route.query.uuid }),
redirect: (to) => {
let { hash, params, query } = to;

Check failure on line 1051 in src/router/index.js

View workflow job for this annotation

GitHub Actions / lint

'hash' is assigned a value but never used

Check failure on line 1051 in src/router/index.js

View workflow job for this annotation

GitHub Actions / lint

'params' is assigned a value but never used
if (query.uuid) {
let uuid = query.uuid;
return { path: '/projects/' + uuid, query: null };
Expand All @@ -1049,7 +1061,7 @@
path: 'component',
props: (route) => ({ uuid: route.query.uuid }),
redirect: (to) => {
let { hash, params, query } = to;

Check failure on line 1064 in src/router/index.js

View workflow job for this annotation

GitHub Actions / lint

'hash' is assigned a value but never used

Check failure on line 1064 in src/router/index.js

View workflow job for this annotation

GitHub Actions / lint

'params' is assigned a value but never used
if (query.uuid) {
let uuid = query.uuid;
return { path: '/components/' + uuid, query: null };
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