From 658b4c9817467d26fb3b38aa214d77e5ee770221 Mon Sep 17 00:00:00 2001 From: nscuro Date: Sun, 14 Apr 2024 18:01:43 +0200 Subject: [PATCH] Add support for component properties Based on https://github.com/DependencyTrack/dependency-track/pull/3499 Signed-off-by: nscuro --- src/i18n/locales/en.json | 2 + src/views/portfolio/projects/Component.vue | 6 + .../projects/ComponentCreatePropertyModal.vue | 123 +++++++++++++++ .../projects/ComponentDetailsModal.vue | 9 ++ .../projects/ComponentPropertiesModal.vue | 145 ++++++++++++++++++ 5 files changed, 285 insertions(+) create mode 100644 src/views/portfolio/projects/ComponentCreatePropertyModal.vue create mode 100644 src/views/portfolio/projects/ComponentPropertiesModal.vue diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 665c9704d..a46858dc9 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -362,6 +362,7 @@ "component_namespace_group_vendor": "Namespace / group / vendor", "component_operating_system": "Operating system", "component_package_url_desc": "A Valid Package URL is required for libraries and frameworks. PURL syntax: pkg:type/namespace/name@version?qualifiers#subpath", + "component_properties": "Component Properties", "component_search": "Component Search", "component_spdx_license_desc": "Specifies the SPDX license ID of the component", "component_supplier_name_desc": "The organization that supplied the component", @@ -381,6 +382,7 @@ "cpe": "CPE", "cpe_full": "Common Platform Enumeration (CPE)", "create": "Create", + "create_component_property": "Create Component Property", "create_license_group": "Create License Group", "create_policy": "Create Policy", "create_project": "Create Project", diff --git a/src/views/portfolio/projects/Component.vue b/src/views/portfolio/projects/Component.vue index 13dee8516..e27f0e2aa 100644 --- a/src/views/portfolio/projects/Component.vue +++ b/src/views/portfolio/projects/Component.vue @@ -162,6 +162,8 @@ :component="cloneDeep(component)" v-on:componentUpdated="syncComponentFields" /> + + @@ -178,10 +180,14 @@ import EventBus from '../../../shared/eventbus'; import permissionsMixin from '../../../mixins/permissionsMixin'; import ComponentDetailsModal from './ComponentDetailsModal'; import ExternalReferencesDropdown from '../../components/ExternalReferencesDropdown.vue'; +import ComponentCreatePropertyModal from './ComponentCreatePropertyModal.vue'; +import ComponentPropertiesModal from './ComponentPropertiesModal.vue'; export default { mixins: [permissionsMixin], components: { + ComponentCreatePropertyModal, + ComponentPropertiesModal, SeverityBarChart, ComponentDashboard, ComponentVulnerabilities, diff --git a/src/views/portfolio/projects/ComponentCreatePropertyModal.vue b/src/views/portfolio/projects/ComponentCreatePropertyModal.vue new file mode 100644 index 000000000..32ba07194 --- /dev/null +++ b/src/views/portfolio/projects/ComponentCreatePropertyModal.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/src/views/portfolio/projects/ComponentDetailsModal.vue b/src/views/portfolio/projects/ComponentDetailsModal.vue index 231fc40b2..f302ada12 100644 --- a/src/views/portfolio/projects/ComponentDetailsModal.vue +++ b/src/views/portfolio/projects/ComponentDetailsModal.vue @@ -363,6 +363,13 @@ v-permission="PERMISSIONS.PORTFOLIO_MANAGEMENT" >{{ $t('message.delete') }} + {{ $t('message.properties') }} {{ $t('message.close') }} @@ -380,6 +387,7 @@ + +