Skip to content

Commit

Permalink
Merge pull request #1480 from appknox/PD-1558-fix-sbom-deprecations
Browse files Browse the repository at this point in the history
fix sbom deprecations
  • Loading branch information
future-pirate-king authored Oct 25, 2024
2 parents 2abe30b + d688aae commit 87fc4bb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/components/sbom/app-list/filter-selected-item/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ export default class SbomAppListFilterSelectedItemComponent extends Component<Sb
declare module '@glint/environment-ember-loose/registry' {
export default interface Registry {
'Sbom::AppList::FilterSelectedItem': typeof SbomAppListFilterSelectedItemComponent;
'sbom/app-list/filter-selected-item': typeof SbomAppListFilterSelectedItemComponent;
}
}
2 changes: 1 addition & 1 deletion app/components/sbom/app-list/header/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
showLabel=true
iconName='filter-list'
}}
@selectedItemComponent='sbom/app-list/filter-selected-item'
@selectedItemComponent={{component 'sbom/app-list/filter-selected-item'}}
{{style width='auto'}}
class='select-platform-class'
data-test-select-platform-container
Expand Down
2 changes: 1 addition & 1 deletion app/components/sbom/app-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default class SbomAppListComponent extends Component<SbomAppListSignature
}

get sbomProjectList() {
return this.sbomProjectQueryResponse?.toArray() || [];
return this.sbomProjectQueryResponse?.slice() || [];
}

get totalSbomProjectCount() {
Expand Down
2 changes: 1 addition & 1 deletion app/components/sbom/app-scan/list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class SbomAppScanListComponent extends Component<SbomAppScanListS
}

get sbomFileList() {
return this.sbomFileQueryResponse?.toArray() || [];
return this.sbomFileQueryResponse?.slice() || [];
}

get totalSbomScanCount() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class SbomComponentDetailsVulnerabilitiesComponent extends Compon
}

get sbomVulnerabilityList() {
return this.componentVulnerabilityQueryResponse?.toArray() || [];
return this.componentVulnerabilityQueryResponse?.slice() || [];
}

get totalSbomVulnerabilityCount() {
Expand Down
2 changes: 1 addition & 1 deletion app/components/sbom/scan-details/component-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default class SbomScanDetailsComponentListComponent extends Component<Sbo
}

get sbomComponentList() {
return this.componentQueryResponse?.toArray() || [];
return this.componentQueryResponse?.slice() || [];
}

get totalSbomComponentCount() {
Expand Down
2 changes: 1 addition & 1 deletion app/models/sbom-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface SbomComponentProperty {
}

export default class SbomComponentModel extends Model {
@belongsTo('sbom-file')
@belongsTo('sbom-file', { async: true, inverse: null })
declare sbFile: AsyncBelongsTo<SbomFileModel>;

@attr('string')
Expand Down
2 changes: 1 addition & 1 deletion app/models/sbom-vulnerability-audit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ParsedVersion = {
};

export default class SbomVulnerabilityAuditModel extends Model {
@belongsTo('sbom-vulnerability', { async: false })
@belongsTo('sbom-vulnerability', { async: false, inverse: null })
declare sbVulnerability: SbomVulnerabilityModel;

@attr()
Expand Down

0 comments on commit 87fc4bb

Please sign in to comment.