Fix UX issues.

This commit is contained in:
kunw 2017-04-05 18:51:37 +08:00
parent b7a196f7aa
commit 503a332937
7 changed files with 8 additions and 6 deletions

View File

@ -209,7 +209,7 @@ export class CreateEditDestinationComponent implements AfterViewChecked {
for(let i in data) {
let current = data[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;
break;
} else {

View File

@ -68,7 +68,7 @@ export class ReplicationComponent implements OnInit {
changedJobs: Job[];
initSelectedId: number;
policies: Policy[];retrieve
policies: Policy[];
jobs: Job[];
jobsTotalRecordCount: number;

View File

@ -144,7 +144,7 @@ export class TagRepositoryComponent implements OnInit, OnDestroy {
titleKey = 'REPOSITORY.DELETION_TITLE_TAG_DENIED';
summaryKey = 'REPOSITORY.DELETION_SUMMARY_TAG_DENIED';
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 {
titleKey = 'REPOSITORY.DELETION_TITLE_TAG';
summaryKey = 'REPOSITORY.DELETION_SUMMARY_TAG';

View File

@ -8,6 +8,6 @@
</div>
<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-primary" (click)="confirm()">{{'BUTTON.YES' | translate}}</button>
<button type="button" class="btn btn-primary" (click)="confirm()">{{ buttonKey | translate}}</button>
</div>
</clr-modal>

View File

@ -17,6 +17,7 @@ export class ConfirmationDialogComponent implements OnDestroy {
opened: boolean = false;
dialogTitle: string = "";
dialogContent: string = "";
buttonKey: string = 'BUTTON.OK';
confirmOnly: boolean = false;
message: ConfirmationMessage;
private annouceSubscription: Subscription;
@ -29,6 +30,7 @@ export class ConfirmationDialogComponent implements OnDestroy {
this.dialogContent = msg.message;
this.message = msg;
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.dialogContent, { 'param': msg.param }).subscribe((res: string) => this.dialogContent = res);
//Open dialog

View File

@ -293,7 +293,7 @@ export class CreateEditPolicyComponent implements OnInit, AfterViewChecked {
for(let i in data) {
let origin = this.initVal[i];
let current = data[i];
if(current && current !== origin) {
if(this.actionType === ActionType.EDIT && !this.readonly && !current || current && current !== origin) {
this.hasChanged = true;
break;
} else {

View File

@ -309,7 +309,7 @@
"DELETION_TITLE_TAG": "Confirm Tag Deletion",
"DELETION_SUMMARY_TAG": "Do you want to delete tag {{param}}?",
"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",
"TAG": "Tag",
"SIGNED": "Signed",