Merge pull request #8764 from goharbor/ui-modify

ui adjustment for tag-retention and webhook
This commit is contained in:
Will Sun 2019-08-21 18:39:25 +08:00 committed by GitHub
commit 427a369d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 59 deletions

View File

@ -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>

View File

@ -70,11 +70,6 @@ export class Rule {
kind: 'doublestar',
decoration: 'matches',
pattern: '**'
},
{
kind: 'label',
decoration: "withLabels",
pattern: null
}
];
}

View File

@ -11,11 +11,6 @@
<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>
</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}">
@ -30,8 +25,13 @@
(click)="deleteRule(i)">{{'TAG_RETENTION.DELETE' | translate}}</button>
</div>
</div>
</div>
<div class="clr-col">
<span>
<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>

View File

@ -1,12 +1,3 @@
.align-center {
text-align: center;
}
.webhook-section {
margin-left: calc(50% - 10rem);
text-align: left;
}
.icon-tooltip {
margin-top: 4px;
}

View File

@ -8,11 +8,11 @@
.webhook-form-wrap {
width: 19rem;
margin: 0 auto;
margin: 0 ;
}
.create-text {
margin: 0 auto;
margin: 0;
width: 19rem;
}