mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-28 21:37:31 +02:00
Merge cosign check and notation check (#19079)
1.Merge cosign check and notaion check into one API call, related issue #19077 Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
1132a6654e
commit
cdd3f267b5
@ -343,16 +343,16 @@
|
|||||||
</clr-dg-cell>
|
</clr-dg-cell>
|
||||||
<clr-dg-cell>
|
<clr-dg-cell>
|
||||||
<span
|
<span
|
||||||
*ngIf="artifact.coSigned === 'checking'"
|
*ngIf="artifact.signed === 'checking'"
|
||||||
class="spinner spinner-inline ml-2"></span>
|
class="spinner spinner-inline ml-2"></span>
|
||||||
<clr-icon
|
<clr-icon
|
||||||
shape="check-circle"
|
shape="check-circle"
|
||||||
*ngIf="artifact.coSigned === 'true'"
|
*ngIf="artifact.signed === 'true'"
|
||||||
size="20"
|
size="20"
|
||||||
class="signed"></clr-icon>
|
class="signed"></clr-icon>
|
||||||
<clr-icon
|
<clr-icon
|
||||||
shape="times-circle"
|
shape="times-circle"
|
||||||
*ngIf="artifact.coSigned === 'false'"
|
*ngIf="artifact.signed === 'false'"
|
||||||
size="16"
|
size="16"
|
||||||
class="color-red"></clr-icon>
|
class="color-red"></clr-icon>
|
||||||
</clr-dg-cell>
|
</clr-dg-cell>
|
||||||
|
@ -881,8 +881,6 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
|
|||||||
projectName: this.projectName,
|
projectName: this.projectName,
|
||||||
repositoryName: dbEncodeURIComponent(this.repoName),
|
repositoryName: dbEncodeURIComponent(this.repoName),
|
||||||
reference: item.digest,
|
reference: item.digest,
|
||||||
withSignature: true,
|
|
||||||
withImmutableStatus: true,
|
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 8,
|
pageSize: 8,
|
||||||
};
|
};
|
||||||
@ -935,43 +933,30 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
|
|||||||
if (artifacts) {
|
if (artifacts) {
|
||||||
if (artifacts.length) {
|
if (artifacts.length) {
|
||||||
artifacts.forEach(item => {
|
artifacts.forEach(item => {
|
||||||
item.coSigned = CHECKING;
|
item.signed = CHECKING;
|
||||||
const listTagParams: NewArtifactService.ListAccessoriesParams =
|
this.newArtifactService
|
||||||
{
|
.listAccessories({
|
||||||
projectName: this.projectName,
|
projectName: this.projectName,
|
||||||
repositoryName: dbEncodeURIComponent(this.repoName),
|
repositoryName: dbEncodeURIComponent(this.repoName),
|
||||||
reference: item.digest,
|
reference: item.digest,
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: ACCESSORY_PAGE_SIZE,
|
pageSize: ACCESSORY_PAGE_SIZE,
|
||||||
};
|
|
||||||
forkJoin([
|
|
||||||
this.newArtifactService.listAccessories({
|
|
||||||
...listTagParams,
|
|
||||||
q: encodeURIComponent(
|
q: encodeURIComponent(
|
||||||
`type=${AccessoryType.COSIGN}`
|
`type={${AccessoryType.COSIGN} ${AccessoryType.NOTATION}}`
|
||||||
),
|
),
|
||||||
}),
|
})
|
||||||
this.newArtifactService.listAccessories({
|
.subscribe({
|
||||||
...listTagParams,
|
next: res => {
|
||||||
q: encodeURIComponent(
|
if (res?.length) {
|
||||||
`type=${AccessoryType.NOTATION}`
|
item.signed = TRUE;
|
||||||
),
|
} else {
|
||||||
}),
|
item.signed = FALSE;
|
||||||
]).subscribe({
|
}
|
||||||
next: res => {
|
},
|
||||||
if (
|
error: err => {
|
||||||
res?.length &&
|
item.signed = FALSE;
|
||||||
(res[0]?.length || res[1]?.length)
|
},
|
||||||
) {
|
});
|
||||||
item.coSigned = TRUE;
|
|
||||||
} else {
|
|
||||||
item.coSigned = FALSE;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: err => {
|
|
||||||
item.coSigned = FALSE;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ export interface ArtifactFront extends Artifact {
|
|||||||
pullCommand?: string;
|
pullCommand?: string;
|
||||||
annotationsArray?: Array<{ [key: string]: any }>;
|
annotationsArray?: Array<{ [key: string]: any }>;
|
||||||
tagNumber?: number;
|
tagNumber?: number;
|
||||||
coSigned?: string;
|
signed?: string;
|
||||||
accessoryNumber?: number;
|
accessoryNumber?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user