Fix css issues for robot and replication (#15834)

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
孙世军 2021-10-22 10:09:16 +08:00 committed by GitHub
parent bc6a7f65a6
commit 3da8e573a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 3 deletions

View File

@ -116,11 +116,15 @@
placeholder="select labels"> placeholder="select labels">
</div> </div>
</button> </button>
<clr-dropdown-menu class="right-align" clrPosition="bottom-left" *clrIfOpen> <clr-dropdown-menu [ngStyle]="{'max-height.px': 230}" class="right-align" clrPosition="bottom-left" *clrIfOpen>
<button type="button" class="dropdown-item flex" *ngFor="let value of supportedFilterLabels" (click)="stickLabel(value,i)"> <button type="button" class="dropdown-item flex" *ngFor="let value of supportedFilterLabels" (click)="stickLabel(value,i)">
<clr-icon shape="check" [style.visibility]="value.select ? 'visible' : 'hidden'"></clr-icon> <clr-icon shape="check" [style.visibility]="value.select ? 'visible' : 'hidden'"></clr-icon>
<hbr-label-piece [label]="value" [labelWidth]="130"></hbr-label-piece> <hbr-label-piece [label]="value" [labelWidth]="130"></hbr-label-piece>
</button> </button>
<button type="button" class="dropdown-item space-between no-labels" *ngIf="!supportedFilterLabels?.length">
<span class="alert-label">{{"REPLICATION.NO_LABEL_INFO" | translate}}</span>
<span class="alert-label go-link" routerLink="/harbor/labels">{{'CONFIG.LABEL' | translate}}</span>
</button>
</clr-dropdown-menu> </clr-dropdown-menu>
</clr-dropdown> </clr-dropdown>
</div> </div>

View File

@ -265,8 +265,17 @@ clr-modal {
width: 6rem; width: 6rem;
} }
.right-align { .right-align {
min-width: 204px;
overflow-y: auto;
transform: translateX(-4.3rem) translateY(1.25rem)!important; transform: translateX(-4.3rem) translateY(1.25rem)!important;
} }
.dropdown-item {
min-height: 26px;
}
.no-labels {
cursor: default;
padding: 0 0.5rem;
}
.unit { .unit {
width: 4.18rem !important; width: 4.18rem !important;
} }

View File

@ -95,7 +95,7 @@
{{getPermissions()}} {{"SYSTEM_ROBOT.PERMISSIONS" | translate}} {{getPermissions()}} {{"SYSTEM_ROBOT.PERMISSIONS" | translate}}
<clr-icon shape="caret down"></clr-icon> <clr-icon shape="caret down"></clr-icon>
</button> </button>
<clr-dropdown-menu [style.height.px]="230" clrPosition="bottom-left" *clrIfOpen> <clr-dropdown-menu class="overflow-y-scroll" [style.height.px]="230" clrPosition="bottom-left" *clrIfOpen>
<div clrDropdownItem *ngFor="let item of defaultAccesses" (click)="chooseAccess(item)"> <div clrDropdownItem *ngFor="let item of defaultAccesses" (click)="chooseAccess(item)">
<clr-icon class="check" shape="check" [style.visibility]="item.checked ? 'visible' : 'hidden'"></clr-icon> <clr-icon class="check" shape="check" [style.visibility]="item.checked ? 'visible' : 'hidden'"></clr-icon>
<span>{{i18nMap[item.action] | translate}} {{i18nMap[item.resource] | translate}}</span> <span>{{i18nMap[item.action] | translate}} {{i18nMap[item.resource] | translate}}</span>

View File

@ -53,4 +53,7 @@
min-height: 20px; min-height: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.overflow-y-scroll {
overflow-y: auto;
}

View File

@ -597,6 +597,7 @@
"PLACEHOLDER": "Es konnten keine Replikations-Regeln gefunden werden!", "PLACEHOLDER": "Es konnten keine Replikations-Regeln gefunden werden!",
"JOB_PLACEHOLDER": "Es konnten keine Replikations-Jobs gefunden werden!", "JOB_PLACEHOLDER": "Es konnten keine Replikations-Jobs gefunden werden!",
"NO_ENDPOINT_INFO": "Bitte zuerst einen Endpunkt hinzufügen", "NO_ENDPOINT_INFO": "Bitte zuerst einen Endpunkt hinzufügen",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "Dieses Projekt existiert nicht", "NO_PROJECT_INFO": "Dieses Projekt existiert nicht",
"SOURCE_RESOURCE_FILTER": "Quellen-Filter", "SOURCE_RESOURCE_FILTER": "Quellen-Filter",
"SCHEDULED": "Geplant", "SCHEDULED": "Geplant",

View File

@ -597,6 +597,7 @@
"PLACEHOLDER": "We couldn't find any replication rules!", "PLACEHOLDER": "We couldn't find any replication rules!",
"JOB_PLACEHOLDER": "We couldn't find any replication jobs!", "JOB_PLACEHOLDER": "We couldn't find any replication jobs!",
"NO_ENDPOINT_INFO": "Please add an endpoint first", "NO_ENDPOINT_INFO": "Please add an endpoint first",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "This project is not exist", "NO_PROJECT_INFO": "This project is not exist",
"SOURCE_RESOURCE_FILTER": "Source resource filter", "SOURCE_RESOURCE_FILTER": "Source resource filter",
"SCHEDULED": "Scheduled", "SCHEDULED": "Scheduled",

View File

@ -599,6 +599,7 @@
"PLACEHOLDER": "We couldn't find any replication rules!", "PLACEHOLDER": "We couldn't find any replication rules!",
"JOB_PLACEHOLDER": "We couldn't find any replication jobs!", "JOB_PLACEHOLDER": "We couldn't find any replication jobs!",
"NO_ENDPOINT_INFO": "Please add an endpoint first", "NO_ENDPOINT_INFO": "Please add an endpoint first",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "This project is not exist", "NO_PROJECT_INFO": "This project is not exist",
"SOURCE_RESOURCE_FILTER": "Source resource filter", "SOURCE_RESOURCE_FILTER": "Source resource filter",
"SCHEDULED": "Scheduled", "SCHEDULED": "Scheduled",

View File

@ -587,6 +587,7 @@
"PLACEHOLDER": "Nous n'avons trouvé aucune règle de réplication !", "PLACEHOLDER": "Nous n'avons trouvé aucune règle de réplication !",
"JOB_PLACEHOLDER": "Nous n'avons trouvé aucun travail de réplication !", "JOB_PLACEHOLDER": "Nous n'avons trouvé aucun travail de réplication !",
"NO_ENDPOINT_INFO": "Please add an endpoint first", "NO_ENDPOINT_INFO": "Please add an endpoint first",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "This project is not exist", "NO_PROJECT_INFO": "This project is not exist",
"SOURCE_RESOURCE_FILTER": "Source resource filter", "SOURCE_RESOURCE_FILTER": "Source resource filter",
"SCHEDULED": "Scheduled", "SCHEDULED": "Scheduled",

View File

@ -597,6 +597,7 @@
"PLACEHOLDER": "Não foi possível encontrar nenhuma regra de replicação!", "PLACEHOLDER": "Não foi possível encontrar nenhuma regra de replicação!",
"JOB_PLACEHOLDER": "Não foi possível encontrar nenhuma tarefa de replicação!", "JOB_PLACEHOLDER": "Não foi possível encontrar nenhuma tarefa de replicação!",
"NO_ENDPOINT_INFO": "Por favor adicione antes um endpoint", "NO_ENDPOINT_INFO": "Por favor adicione antes um endpoint",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "Esse projeto não existe", "NO_PROJECT_INFO": "Esse projeto não existe",
"SOURCE_RESOURCE_FILTER": "Filtro de recursos da origem", "SOURCE_RESOURCE_FILTER": "Filtro de recursos da origem",
"SCHEDULED": "Agendado", "SCHEDULED": "Agendado",

View File

@ -597,6 +597,7 @@
"PLACEHOLDER": "Herhangi bir çoğaltma kuralı bulamadık!", "PLACEHOLDER": "Herhangi bir çoğaltma kuralı bulamadık!",
"JOB_PLACEHOLDER": "Çoğaltma işi bulamadık!", "JOB_PLACEHOLDER": "Çoğaltma işi bulamadık!",
"NO_ENDPOINT_INFO": "Lütfen önce bir uç noktası ekleyin", "NO_ENDPOINT_INFO": "Lütfen önce bir uç noktası ekleyin",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "Bu proje mevcut değil", "NO_PROJECT_INFO": "Bu proje mevcut değil",
"SOURCE_RESOURCE_FILTER": "Kaynak vasıtası filtresi", "SOURCE_RESOURCE_FILTER": "Kaynak vasıtası filtresi",
"SCHEDULED": "Belirlenmiş", "SCHEDULED": "Belirlenmiş",

View File

@ -599,6 +599,7 @@
"PLACEHOLDER": "未发现任何复制规则!", "PLACEHOLDER": "未发现任何复制规则!",
"JOB_PLACEHOLDER": "未发现任何复制任务!", "JOB_PLACEHOLDER": "未发现任何复制任务!",
"NO_ENDPOINT_INFO": "请先添加一个目标", "NO_ENDPOINT_INFO": "请先添加一个目标",
"NO_LABEL_INFO": "请先添加一个标签",
"NO_PROJECT_INFO": "此项目不存在", "NO_PROJECT_INFO": "此项目不存在",
"SOURCE_RESOURCE_FILTER": "源资源过滤器", "SOURCE_RESOURCE_FILTER": "源资源过滤器",
"SCHEDULED": "定时", "SCHEDULED": "定时",

View File

@ -594,6 +594,7 @@
"PLACEHOLDER": "未發現任何復制規則!", "PLACEHOLDER": "未發現任何復制規則!",
"JOB_PLACEHOLDER": "未發現任何復制任務!", "JOB_PLACEHOLDER": "未發現任何復制任務!",
"NO_ENDPOINT_INFO": "請先添加一個目標", "NO_ENDPOINT_INFO": "請先添加一個目標",
"NO_LABEL_INFO": "Please add a label first",
"NO_PROJECT_INFO": "此項目不存在", "NO_PROJECT_INFO": "此項目不存在",
"SOURCE_RESOURCE_FILTER": "源資源過濾器", "SOURCE_RESOURCE_FILTER": "源資源過濾器",
"SCHEDULED": "定時", "SCHEDULED": "定時",