Skip to content

Commit

Permalink
sbom dependency tree enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
avzz-19 committed Mar 5, 2025
1 parent 351b48e commit 47be6f4
Show file tree
Hide file tree
Showing 17 changed files with 513 additions and 152 deletions.
3 changes: 3 additions & 0 deletions app/components/sbom/component-details/overview/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default class SbomComponentDetailsOverviewComponent extends Component<Sbo
@service declare intl: IntlService;
@service declare store: Store;
@service declare router: RouterService;
@service('notifications') declare notify: NotificationService;

@tracked expandedNodes: string[] = [];
@tracked treeNodes: AkTreeNodeProps[] = [];
Expand Down Expand Up @@ -158,6 +159,8 @@ export default class SbomComponentDetailsOverviewComponent extends Component<Sbo
const sbProjectId = this.sbomProject?.get('id') || '';
const sbFileId = this.sbomFile?.get('id') || '';

this.notify.error(this.intl.t('sbomModule.parentComponentNotFound'));

this.router.transitionTo(
'authenticated.dashboard.sbom.component-details',
sbProjectId,
Expand Down
8 changes: 4 additions & 4 deletions app/components/sbom/empty-loading-view/index.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{! @glint-nocheck: or}}
{{#if (or @empty @loading)}}
<AkStack
local-class='empty-loading-container'
local-class='empty-loading-container
{{if @skeleton "skeleton"}}
{{if this.tree "" "list"}}'
{{style height=(or @height '500px')}}
@alignItems='center'
@justifyContent='center'
@direction='column'
@spacing='2.5'
>
Expand All @@ -23,7 +23,7 @@
{{else}}
<AkSvg::EmptyLoadingList
width={{@loadingSvgWidth}}
height={{or @loadingSvgHeight '50%'}}
height={{or @loadingSvgHeight '40%'}}
data-test-sbom-loadingSvg
/>
{{/if}}
Expand Down
5 changes: 4 additions & 1 deletion app/components/sbom/empty-loading-view/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
width: 100%;
border: 1px solid var(--sbom-empty-loading-view-border-color);
border-radius: var(--sbom-empty-loading-view-border-radius);
padding: 1em;
justify-content: center;
align-items: center;

&.skeleton {
justify-content: flex-start;
align-items: flex-start;
}

&.list {
border: 0px;
}
}
19 changes: 11 additions & 8 deletions app/components/sbom/scan-details/component-tree/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
@alignItems='center'
@width='full'
local-class='tree-node {{if
(or node.dataObject.hasNextSibling this.hasMoreComponents)
node.dataObject.hasNextSibling
""
"last-node"
}}'
Expand Down Expand Up @@ -133,7 +133,7 @@
@underline='hover'
data-test-component-tree-nodeLabel
>
{{node.dataObject.bomRef}}&nbsp;:&nbsp;{{node.label}}
{{node.dataObject.purl}}
</AkTypography>
</AkButton>

Expand All @@ -142,14 +142,19 @@
/>

{{#if node.dataObject.isHighlighted}}
<AkStack local-class='highlighted-return-icon-container'>
<AkTooltip
@title={{t 'highlightedNodeTooltip'}}
@placement='right'
@arrow={{true}}
local-class='highlighted-return-icon-container'
>
<AkIcon
data-test-component-tree-returnIcon
@iconName='keyboard-return'
@size='small'
local-class='highlighted-return-icon'
/>
</AkStack>
</AkTooltip>
{{/if}}
</AkStack>

Expand All @@ -162,10 +167,8 @@
@color='secondary'
@underline='always'
@typographyFontWeight='medium'
{{on
'click'
(fn this.handleLoadMoreChildren node.parent.key)
}}
{{on 'click' (fn this.handleLoadMoreChildren node.parent)}}
data-test-component-tree-child-viewMore
>
<:default>{{t 'viewMore'}}</:default>
<:rightIcon>
Expand Down
Loading

0 comments on commit 47be6f4

Please sign in to comment.