Commit 45931430 authored by Yogi_Wang's avatar Yogi_Wang
Browse files

[fix] issue in front ui 2.0.1


1.fix add label issue
2.fix unauthorized user can contrl page
Signed-off-by: default avatarYogi_Wang <yawang@vmware.com>
parent 58894e9d
...@@ -7,4 +7,5 @@ ...@@ -7,4 +7,5 @@
</div> </div>
</div> </div>
</clr-alert> </clr-alert>
</div> </div>
\ No newline at end of file <div *ngIf="globalMessageOpened" class="mask-layer"></div>
\ No newline at end of file
.alert-style { .alert-style {
display: inline; display: inline;
} }
.mask-layer {
position: absolute;
width: 100%;
height: 100%;
z-index: 10000;
}
\ No newline at end of file
...@@ -446,20 +446,19 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy { ...@@ -446,20 +446,19 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
} }
labelSelectedChange(artifact?: Artifact[]): void { labelSelectedChange(artifact?: Artifact[]): void {
if (artifact && artifact[0].labels) { this.imageStickLabels.forEach(data => {
this.imageStickLabels.forEach(data => { data.iconsShow = false;
data.iconsShow = false; data.show = true;
data.show = true; });
}); if (artifact && artifact[0].labels && artifact[0].labels.length) {
if (artifact[0].labels.length) { artifact[0].labels.forEach((labelInfo: Label) => {
artifact[0].labels.forEach((labelInfo: Label) => { let findedLabel = this.imageStickLabels.find(data => labelInfo.id === data['label'].id);
let findedLabel = this.imageStickLabels.find(data => labelInfo.id === data['label'].id); if (findedLabel) {
this.imageStickLabels.splice(this.imageStickLabels.indexOf(findedLabel), 1); this.imageStickLabels.splice(this.imageStickLabels.indexOf(findedLabel), 1);
this.imageStickLabels.unshift(findedLabel); this.imageStickLabels.unshift(findedLabel);
findedLabel.iconsShow = true; findedLabel.iconsShow = true;
}); }
} });
} }
} }
...@@ -491,7 +490,6 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy { ...@@ -491,7 +490,6 @@ export class ArtifactListTabComponent implements OnInit, OnDestroy {
}; };
this.newArtifactService.addLabel(params).subscribe(res => { this.newArtifactService.addLabel(params).subscribe(res => {
this.refresh(); this.refresh();
// set the selected label in front // set the selected label in front
this.imageStickLabels.splice(this.imageStickLabels.indexOf(labelInfo), 1); this.imageStickLabels.splice(this.imageStickLabels.indexOf(labelInfo), 1);
this.imageStickLabels.some((data, i) => { this.imageStickLabels.some((data, i) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment