mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 12:15:20 +01:00
Merge pull request #8764 from goharbor/ui-modify
ui adjustment for tag-retention and webhook
This commit is contained in:
commit
427a369d3a
@ -81,32 +81,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="height-72">
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4">
|
||||
<label>{{'TAG_RETENTION.LABELS' | translate}}</label>
|
||||
</div>
|
||||
<div class="clr-col-3">
|
||||
<div class="clr-select-wrapper w-100">
|
||||
<select [(ngModel)]="labelsSelect" class="clr-select w-100">
|
||||
<option *ngFor="let d of metadata?.tag_selectors[0]?.decorations"
|
||||
value="{{d}}">{{getI18nKey(d)|translate}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr-col-5">
|
||||
<div class="w-100">
|
||||
<input [(ngModel)]="labelsInput" class="clr-input w-100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-4"></div>
|
||||
<div class="clr-col-8">
|
||||
<span>{{'TAG_RETENTION.REP_LABELS' | translate}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline" (click)="cancel()">{{'BUTTON.CANCEL' | translate}}</button>
|
||||
|
@ -70,11 +70,6 @@ export class Rule {
|
||||
kind: 'doublestar',
|
||||
decoration: 'matches',
|
||||
pattern: '**'
|
||||
},
|
||||
{
|
||||
kind: 'label',
|
||||
decoration: "withLabels",
|
||||
pattern: null
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -11,27 +11,27 @@
|
||||
<li class="rule" *ngFor="let rule of retention?.rules;let i = index;">
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-1">
|
||||
<clr-icon *ngIf="!rule?.disabled" class="color-green" shape="success-standard"></clr-icon>
|
||||
<clr-icon *ngIf="rule?.disabled" class="color-red" shape="error-standard"></clr-icon>
|
||||
<clr-icon (click)="openEditor(i)" shape="ellipsis-vertical"
|
||||
class="dropdown-toggle hand"></clr-icon>
|
||||
<div class="dropdown" [ngClass]="{open:ruleIndex===i}">
|
||||
<div class="dropdown-menu">
|
||||
<button *ngIf="!rule?.disabled" type="button" class="dropdown-item"
|
||||
(click)="toggleDisable(i,true)">{{'TAG_RETENTION.DISABLE' | translate}}</button>
|
||||
<button *ngIf="rule?.disabled" type="button" class="dropdown-item"
|
||||
(click)="toggleDisable(i,false)">{{'TAG_RETENTION.ENABLE' | translate}}</button>
|
||||
<button type="button" class="dropdown-item"
|
||||
(click)="editRuleByIndex(i)">{{'TAG_RETENTION.EDIT' | translate}}</button>
|
||||
<button type="button" class="dropdown-item"
|
||||
(click)="deleteRule(i)">{{'TAG_RETENTION.DELETE' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr-col">
|
||||
<span>
|
||||
<clr-icon (click)="openEditor(i)" shape="ellipsis-vertical"
|
||||
class="dropdown-toggle hand"></clr-icon>
|
||||
<div class="dropdown" [ngClass]="{open:ruleIndex===i}">
|
||||
<div class="dropdown-menu">
|
||||
<button *ngIf="!rule?.disabled" type="button" class="dropdown-item"
|
||||
(click)="toggleDisable(i,true)">{{'TAG_RETENTION.DISABLE' | translate}}</button>
|
||||
<button *ngIf="rule?.disabled" type="button" class="dropdown-item"
|
||||
(click)="toggleDisable(i,false)">{{'TAG_RETENTION.ENABLE' | translate}}</button>
|
||||
<button type="button" class="dropdown-item"
|
||||
(click)="editRuleByIndex(i)">{{'TAG_RETENTION.EDIT' | translate}}</button>
|
||||
<button type="button" class="dropdown-item"
|
||||
(click)="deleteRule(i)">{{'TAG_RETENTION.DELETE' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<clr-icon *ngIf="!rule?.disabled" class="color-green" shape="success-standard"></clr-icon>
|
||||
<clr-icon *ngIf="rule?.disabled" class="color-red" shape="error-standard"></clr-icon>
|
||||
</span>
|
||||
<span class="rule-name">
|
||||
<span class="rule-name ml-5">
|
||||
<span>{{'TAG_RETENTION.IN_REPOSITORIES' | translate}}</span>
|
||||
<span>{{getI18nKey(rule?.scope_selectors?.repository[0]?.decoration)|translate}}</span>
|
||||
<span>{{formatPattern(rule?.scope_selectors?.repository[0]?.pattern)}}</span>
|
||||
|
@ -1,12 +1,3 @@
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.webhook-section {
|
||||
margin-left: calc(50% - 10rem);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.icon-tooltip {
|
||||
margin-top: 4px;
|
||||
}
|
@ -8,11 +8,11 @@
|
||||
|
||||
.webhook-form-wrap {
|
||||
width: 19rem;
|
||||
margin: 0 auto;
|
||||
margin: 0 ;
|
||||
}
|
||||
|
||||
.create-text {
|
||||
margin: 0 auto;
|
||||
margin: 0;
|
||||
width: 19rem;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user