Skip to content

Commit

Permalink
Merge pull request #776 from setchy/feature/component-view-internal-e…
Browse files Browse the repository at this point in the history
…xternal-badge

feat(component): add internal / external classification badge
  • Loading branch information
nscuro authored Mar 22, 2024
2 parents ec65cfa + d90d44d commit 3b9f27c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@
"component_device": "Device",
"component_firmware": "Firmware",
"component_file": "File",
"component_classification": "Classification",
"component_classification_desc": "Classifies whether a component is considered internal or external to an organization",
"dates": "Dates",
"owasp_rr": "OWASP Risk Rating",
"owasp_rr_likelihood_score": "OWASP RR Likelihood score",
Expand Down
11 changes: 10 additions & 1 deletion src/views/portfolio/projects/Component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
<b-row>
<b-col>
<i class="fa fa-cube bg-primary p-3 font-2xl mr-3 float-left"></i>
<div class="h5 mb-0 mt-2">{{ componentLabel }}</div>
<div class="h5 mb-0 mt-2">
{{ componentLabel }}&nbsp;
<b-badge
:variant="component.isInternal ? 'tab-total' : 'tab-info'"
v-b-tooltip.hover
:title="$t('message.component_classification_desc')"
>{{ component.isInternal ? 'INTERNAL' : 'EXTERNAL' }}</b-badge
>
<b-badge></b-badge>
</div>
<i
class="fa fa-sitemap"
style="cursor: pointer"
Expand Down
8 changes: 8 additions & 0 deletions src/views/portfolio/projects/ComponentDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
:tooltip="this.$t('message.component_group_desc')"
:readonly="this.isNotPermitted(PERMISSIONS.PORTFOLIO_MANAGEMENT)"
/>
{{ $t('message.component_classification') }}
<b-badge
:variant="component.isInternal ? 'tab-total' : 'tab-info'"
v-b-tooltip.hover
:title="$t('message.component_classification_desc')"
>{{ component.isInternal ? 'INTERNAL' : 'EXTERNAL' }}</b-badge
>
<p></p>
<b-input-group-form-input
id="component-author-input"
input-group-size="mb-3"
Expand Down

0 comments on commit 3b9f27c

Please sign in to comment.