Fix UI issues with label 2.2.0 (#14151)

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
Will Sun 2021-02-04 10:32:27 +08:00 committed by GitHub
parent 5144ed6f7a
commit e51b98b8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 53 additions and 12 deletions

View File

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

View File

@ -49,3 +49,8 @@
.showWarning {
color: #b3a000;
}
.dropdown-item {
min-height: 20px;
display: flex;
align-items: center;
}

View File

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

View File

@ -15,4 +15,6 @@
}
.dropdown-item {
min-height: 20px;
display: flex;
align-items: center;
}

View File

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

View File

@ -72,3 +72,8 @@
.showWarning {
color: #b3a000;
}
.dropdown-item {
min-height: 20px;
display: flex;
align-items: center;
}

View File

@ -29,7 +29,15 @@
</clr-dropdown>
</clr-dg-action-bar>
<clr-dg-column>{{'USER.COLUMN_NAME' | translate}}</clr-dg-column>
<clr-dg-column>{{'USER.COLUMN_ADMIN' | translate}}</clr-dg-column>
<clr-dg-column>
<span>{{'USER.COLUMN_ADMIN' | translate}}</span>
<clr-tooltip>
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
<span>{{'USER.UNKNOWN_TIP' | translate }}</span>
</clr-tooltip-content>
</clr-tooltip>
</clr-dg-column>
<clr-dg-column>{{'USER.COLUMN_EMAIL' | translate}}</clr-dg-column>
<clr-dg-column>{{'USER.COLUMN_REG_NAME' | translate}}</clr-dg-column>
<clr-dg-row *ngFor="let user of users" [clrDgItem]="user">

View File

@ -29,6 +29,7 @@ import { throwError as observableThrowError } from "rxjs";
import { OperationService } from "../../lib/components/operation/operation.service";
import { operateChanges, OperateInfo, OperationState } from "../../lib/components/operation/operate";
import { errorHandler } from "../../lib/utils/shared/shared.utils";
import { CONFIG_AUTH_MODE } from "../../lib/entities/shared.const";
/**
* NOTES:
@ -137,6 +138,10 @@ export class UserComponent implements OnInit, OnDestroy {
return "{{MISS}}";
}
let key: string = u.sysadmin_flag ? "USER.IS_ADMIN" : "USER.IS_NOT_ADMIN";
const appConfig = this.appConfigService.getConfig();
if (appConfig && appConfig.auth_mode !== CONFIG_AUTH_MODE.DB_AUTH && !u.sysadmin_flag) {
key = "USER.UNKNOWN";
}
this.translate.get(key).subscribe((res: string) => this.adminColumn = res);
return this.adminColumn;
}

View File

@ -204,7 +204,9 @@
"ITEMS": "Einträge",
"OF": "von",
"RESET_OK": "Passwort des Nutzers erfolgreich zurückgesetzt.",
"EXISTING_PASSWORD": "Das neue und das alte Passwort dürfen nicht übereinstimmen."
"EXISTING_PASSWORD": "Das neue und das alte Passwort dürfen nicht übereinstimmen.",
"UNKNOWN": "Unbekannt",
"UNKNOWN_TIP": "Bitte überprüfen Sie, ob der Benutzer über den Identity Provider den Status \"Admin\" hat, wenn der Wert \"Unknown\" lautet."
},
"PROJECT": {
"PROJECTS": "Projekte",

View File

@ -204,7 +204,9 @@
"ITEMS": "items",
"OF": "of",
"RESET_OK": "Users password reset successfully",
"EXISTING_PASSWORD": "The new password can not be same with the old one"
"EXISTING_PASSWORD": "The new password can not be same with the old one",
"UNKNOWN": "Unknown",
"UNKNOWN_TIP": "Please verify whether the user has admin status through the Identity Provider System if the value is \"Unknown\""
},
"PROJECT": {
"PROJECTS": "Projects",

View File

@ -204,7 +204,9 @@
"ITEMS": "elementos",
"OF": "of",
"RESET_OK": "Users password reset successfully",
"EXISTING_PASSWORD": "The new password can not be same with the old one"
"EXISTING_PASSWORD": "The new password can not be same with the old one",
"UNKNOWN": "Unknown",
"UNKNOWN_TIP": "Please verify whether the user has admin status through the Identity Provider System if the value is \"Unknown\""
},
"PROJECT": {
"PROJECTS": "Proyectos",

View File

@ -198,7 +198,9 @@
"ITEMS": "items",
"OF": "de",
"RESET_OK": "Users password reset successfully",
"EXISTING_PASSWORD": "The new password can not be same with the old one"
"EXISTING_PASSWORD": "The new password can not be same with the old one",
"UNKNOWN": "Unknown",
"UNKNOWN_TIP": "Please verify whether the user has admin status through the Identity Provider System if the value is \"Unknown\""
},
"PROJECT": {
"PROJECTS": "Projets",

View File

@ -202,7 +202,9 @@
"ITEMS": "itens",
"OF": "de",
"RESET_OK": "Senha do usuário redefinida com sucesso",
"EXISTING_PASSWORD": "A nova senha não deve ser igual à antiga"
"EXISTING_PASSWORD": "A nova senha não deve ser igual à antiga",
"UNKNOWN": "Unknown",
"UNKNOWN_TIP": "Please verify whether the user has admin status through the Identity Provider System if the value is \"Unknown\""
},
"PROJECT": {
"PROJECTS": "Projetos",

View File

@ -204,7 +204,9 @@
"ITEMS": "ürün",
"OF": "of",
"RESET_OK": "Kullanıcılar parola başarıyla sıfırlandı",
"EXISTING_PASSWORD": "Yeni şifre eskisi ile aynı olamaz"
"EXISTING_PASSWORD": "Yeni şifre eskisi ile aynı olamaz",
"UNKNOWN": "Unknown",
"UNKNOWN_TIP": "Please verify whether the user has admin status through the Identity Provider System if the value is \"Unknown\""
},
"PROJECT": {
"PROJECTS": "Projeler",

View File

@ -203,7 +203,9 @@
"OF": "共计",
"ITEMS": "条记录",
"RESET_OK": "成功修改用户密码",
"EXISTING_PASSWORD": "新密码不能与旧密码一致"
"EXISTING_PASSWORD": "新密码不能与旧密码一致",
"UNKNOWN": "未知",
"UNKNOWN_TIP": "当此项的值为\"未知\"时,请根据该用户的源头身份提供系统来判定该用户是否为管理员"
},
"PROJECT": {
"PROJECTS": "项目",

View File

@ -201,7 +201,9 @@
"OF": "共計",
"ITEMS": "條記錄",
"RESET_OK": "成功修改用戶密碼",
"EXISTING_PASSWORD": "新密碼不能與舊密碼一致"
"EXISTING_PASSWORD": "新密碼不能與舊密碼一致",
"UNKNOWN": "Unknown",
"UNKNOWN_TIP": "Please verify whether the user has admin status through the Identity Provider System if the value is \"Unknown\""
},
"PROJECT": {
"PROJECTS": "項目",