mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
[fix] issue in front ui 2.0.1
1.fix add label issue 2.fix unauthorized user can contrl page Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
58894e9d9c
commit
459314308b
@ -7,4 +7,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</clr-alert>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="globalMessageOpened" class="mask-layer"></div>
|
@ -1,3 +1,9 @@
|
||||
.alert-style {
|
||||
display: inline;
|
||||
}
|
||||
.mask-layer {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 10000;
|
||||
}
|
@ -446,20 +446,19 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
labelSelectedChange(artifact?: Artifact[]): void {
|
||||
if (artifact && artifact[0].labels) {
|
||||
this.imageStickLabels.forEach(data => {
|
||||
data.iconsShow = false;
|
||||
data.show = true;
|
||||
});
|
||||
if (artifact[0].labels.length) {
|
||||
artifact[0].labels.forEach((labelInfo: Label) => {
|
||||
let findedLabel = this.imageStickLabels.find(data => labelInfo.id === data['label'].id);
|
||||
this.imageStickLabels.forEach(data => {
|
||||
data.iconsShow = false;
|
||||
data.show = true;
|
||||
});
|
||||
if (artifact && artifact[0].labels && artifact[0].labels.length) {
|
||||
artifact[0].labels.forEach((labelInfo: Label) => {
|
||||
let findedLabel = this.imageStickLabels.find(data => labelInfo.id === data['label'].id);
|
||||
if (findedLabel) {
|
||||
this.imageStickLabels.splice(this.imageStickLabels.indexOf(findedLabel), 1);
|
||||
this.imageStickLabels.unshift(findedLabel);
|
||||
|
||||
findedLabel.iconsShow = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -491,7 +490,6 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
this.newArtifactService.addLabel(params).subscribe(res => {
|
||||
this.refresh();
|
||||
|
||||
// set the selected label in front
|
||||
this.imageStickLabels.splice(this.imageStickLabels.indexOf(labelInfo), 1);
|
||||
this.imageStickLabels.some((data, i) => {
|
||||
|
Loading…
Reference in New Issue
Block a user