Merge pull request #12866 from AllForNothing/test-3

Fix UI issues found on round-2 testing day
This commit is contained in:
Will Sun 2020-08-25 16:51:05 +08:00 committed by GitHub
commit 4a7a54cae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -26,18 +26,21 @@
<clr-dropdown>
<button type="button" class="btn btn-secondary" (click)="editInstance()"
[disabled]="!(selectedRow && selectedRow.length === 1)">
<clr-icon shape="edit" size="16"></clr-icon>&nbsp;{{'DISTRIBUTION.EDIT_ACTION' | translate}}
<clr-icon shape="edit" size="16"></clr-icon>&nbsp;
<span id="distribution-edit">{{'DISTRIBUTION.EDIT_ACTION' | translate}}</span>
</button>
<button type="button" class="btn btn-secondary" (click)="operateInstances('enable', selectedRow)"
[disabled]="!(selectedRow && selectedRow.length === 1 && !selectedRow[0].enabled)">
<clr-icon shape="connect" size="16"></clr-icon>&nbsp;{{'DISTRIBUTION.ENABLE_ACTION' | translate}}
<clr-icon shape="connect" size="16"></clr-icon>&nbsp;
<span id="distribution-enable">{{'DISTRIBUTION.ENABLE_ACTION' | translate}}</span>
</button>
<button
type="button"
class="btn btn-secondary"
(click)="operateInstances('disable', selectedRow)"
[disabled]="!(selectedRow && selectedRow.length === 1 && selectedRow[0].enabled)">
<clr-icon shape="disconnect" size="16"></clr-icon>&nbsp;{{'DISTRIBUTION.DISABLE_ACTION' | translate}}
<clr-icon shape="disconnect" size="16"></clr-icon>&nbsp;
<span id="distribution-disable">{{'DISTRIBUTION.DISABLE_ACTION' | translate}}</span>
</button>
<div class="dropdown-divider"></div>
<button
@ -45,7 +48,8 @@
class="btn btn-secondary"
(click)="operateInstances('delete', selectedRow)"
[disabled]="selectedRow.length < 1">
<clr-icon shape="window-close" size="16"></clr-icon>&nbsp;{{'DISTRIBUTION.DELETE_ACTION' | translate}}
<clr-icon shape="window-close" size="16"></clr-icon>&nbsp;
<span id="distribution-delete">{{'DISTRIBUTION.DELETE_ACTION' | translate}}</span>
</button>
</clr-dropdown>
</clr-dropdown-menu>

View File

@ -101,6 +101,6 @@
</div>
<div class="modal-footer">
<button id="new-project-cancel" type="button" class="btn btn-outline" (click)="onCancel()">{{'BUTTON.CANCEL' | translate}}</button>
<button id="new-project-ok" type="button" class="btn btn-primary" [disabled]="!isValid" (click)="onSubmit()">{{'BUTTON.OK' | translate}}</button>
<button id="new-project-ok" type="button" class="btn btn-primary" [disabled]="!isValid || (enableProxyCache && !project.registry_id)" (click)="onSubmit()">{{'BUTTON.OK' | translate}}</button>
</div>
</clr-modal>

View File

@ -287,7 +287,7 @@ export class PolicyComponent implements OnInit, OnDestroy {
description: this.addP2pPolicyComponent.policy.description,
repo: this.addP2pPolicyComponent.repos,
tag: this.addP2pPolicyComponent.tags,
onlySignedImages: this.addP2pPolicyComponent.onlySignedImages,
onlySignedImages: this.addP2pPolicyComponent.enableContentTrust,
severity: this.addP2pPolicyComponent.severity,
label: this.addP2pPolicyComponent.labels,
triggerType: this.addP2pPolicyComponent.triggerType