mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-09 08:21:25 +01:00
Fix UX issues.
This commit is contained in:
parent
b7a196f7aa
commit
503a332937
@ -209,7 +209,7 @@ export class CreateEditDestinationComponent implements AfterViewChecked {
|
|||||||
for(let i in data) {
|
for(let i in data) {
|
||||||
let current = data[i];
|
let current = data[i];
|
||||||
let origin = this.initVal[this.mappedName[i]];
|
let origin = this.initVal[this.mappedName[i]];
|
||||||
if(current && current !== origin) {
|
if(this.actionType === ActionType.EDIT && this.editable && !current || current && current !== origin) {
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -68,7 +68,7 @@ export class ReplicationComponent implements OnInit {
|
|||||||
changedJobs: Job[];
|
changedJobs: Job[];
|
||||||
initSelectedId: number;
|
initSelectedId: number;
|
||||||
|
|
||||||
policies: Policy[];retrieve
|
policies: Policy[];
|
||||||
jobs: Job[];
|
jobs: Job[];
|
||||||
|
|
||||||
jobsTotalRecordCount: number;
|
jobsTotalRecordCount: number;
|
||||||
|
@ -144,7 +144,7 @@ export class TagRepositoryComponent implements OnInit, OnDestroy {
|
|||||||
titleKey = 'REPOSITORY.DELETION_TITLE_TAG_DENIED';
|
titleKey = 'REPOSITORY.DELETION_TITLE_TAG_DENIED';
|
||||||
summaryKey = 'REPOSITORY.DELETION_SUMMARY_TAG_DENIED';
|
summaryKey = 'REPOSITORY.DELETION_SUMMARY_TAG_DENIED';
|
||||||
confirmOnly = true;
|
confirmOnly = true;
|
||||||
content = 'notary -s https://' + this.registryUrl + ' -d ~/.docker/trust remove -p ' + this.registryUrl + '/' + this.repoName + ':' + tag.tag;
|
content = 'notary -s https://' + this.registryUrl + ':4443 -d ~/.docker/trust remove -p ' + this.registryUrl + '/' + this.repoName + ' ' + tag.tag;
|
||||||
} else {
|
} else {
|
||||||
titleKey = 'REPOSITORY.DELETION_TITLE_TAG';
|
titleKey = 'REPOSITORY.DELETION_TITLE_TAG';
|
||||||
summaryKey = 'REPOSITORY.DELETION_SUMMARY_TAG';
|
summaryKey = 'REPOSITORY.DELETION_SUMMARY_TAG';
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-outline" *ngIf="!confirmOnly" (click)="cancel()">{{'BUTTON.NO' | translate}}</button>
|
<button type="button" class="btn btn-outline" *ngIf="!confirmOnly" (click)="cancel()">{{'BUTTON.NO' | translate}}</button>
|
||||||
<button type="button" class="btn btn-primary" (click)="confirm()">{{'BUTTON.YES' | translate}}</button>
|
<button type="button" class="btn btn-primary" (click)="confirm()">{{ buttonKey | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</clr-modal>
|
</clr-modal>
|
@ -17,6 +17,7 @@ export class ConfirmationDialogComponent implements OnDestroy {
|
|||||||
opened: boolean = false;
|
opened: boolean = false;
|
||||||
dialogTitle: string = "";
|
dialogTitle: string = "";
|
||||||
dialogContent: string = "";
|
dialogContent: string = "";
|
||||||
|
buttonKey: string = 'BUTTON.OK';
|
||||||
confirmOnly: boolean = false;
|
confirmOnly: boolean = false;
|
||||||
message: ConfirmationMessage;
|
message: ConfirmationMessage;
|
||||||
private annouceSubscription: Subscription;
|
private annouceSubscription: Subscription;
|
||||||
@ -29,6 +30,7 @@ export class ConfirmationDialogComponent implements OnDestroy {
|
|||||||
this.dialogContent = msg.message;
|
this.dialogContent = msg.message;
|
||||||
this.message = msg;
|
this.message = msg;
|
||||||
this.confirmOnly = this.message.confirmOnly;
|
this.confirmOnly = this.message.confirmOnly;
|
||||||
|
this.buttonKey = this.confirmOnly ? 'BUTTON.CLOSE' : 'BUTTON.OK';
|
||||||
this.translate.get(this.dialogTitle).subscribe((res: string) => this.dialogTitle = res);
|
this.translate.get(this.dialogTitle).subscribe((res: string) => this.dialogTitle = res);
|
||||||
this.translate.get(this.dialogContent, { 'param': msg.param }).subscribe((res: string) => this.dialogContent = res);
|
this.translate.get(this.dialogContent, { 'param': msg.param }).subscribe((res: string) => this.dialogContent = res);
|
||||||
//Open dialog
|
//Open dialog
|
||||||
|
@ -293,7 +293,7 @@ export class CreateEditPolicyComponent implements OnInit, AfterViewChecked {
|
|||||||
for(let i in data) {
|
for(let i in data) {
|
||||||
let origin = this.initVal[i];
|
let origin = this.initVal[i];
|
||||||
let current = data[i];
|
let current = data[i];
|
||||||
if(current && current !== origin) {
|
if(this.actionType === ActionType.EDIT && !this.readonly && !current || current && current !== origin) {
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -309,7 +309,7 @@
|
|||||||
"DELETION_TITLE_TAG": "Confirm Tag Deletion",
|
"DELETION_TITLE_TAG": "Confirm Tag Deletion",
|
||||||
"DELETION_SUMMARY_TAG": "Do you want to delete tag {{param}}?",
|
"DELETION_SUMMARY_TAG": "Do you want to delete tag {{param}}?",
|
||||||
"DELETION_TITLE_TAG_DENIED": "Signed Tag can't be deleted",
|
"DELETION_TITLE_TAG_DENIED": "Signed Tag can't be deleted",
|
||||||
"DELETION_SUMMARY_TAG_DENIED": "The tag must be removed from the Notary before it can be deleted.\nDelete from Notary via this command:\n {{param}}",
|
"DELETION_SUMMARY_TAG_DENIED": "The tag must be removed from the Notary before it can be deleted.\nDelete from Notary via this command:\n{{param}}",
|
||||||
"FILTER_FOR_REPOSITORIES": "Filter Repositories",
|
"FILTER_FOR_REPOSITORIES": "Filter Repositories",
|
||||||
"TAG": "Tag",
|
"TAG": "Tag",
|
||||||
"SIGNED": "Signed",
|
"SIGNED": "Signed",
|
||||||
|
Loading…
Reference in New Issue
Block a user