mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
Fix bug by ui test
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
a2dcdf8948
commit
a833f12758
@ -121,7 +121,8 @@ export const CONFIG_AUTH_MODE = {
|
||||
HTTP_AUTH: "http_auth",
|
||||
LDAP_AUTH: "ldap_auth",
|
||||
OIDC_AUTH: "oidc_auth",
|
||||
UAA_AUTH: "uaa_auth"
|
||||
UAA_AUTH: "uaa_auth",
|
||||
DB_AUTH: "db_auth",
|
||||
};
|
||||
export const QUOTA_DANGER_COEFFICIENT = 0.9;
|
||||
export const QUOTA_WARNING_COEFFICIENT = 0.7;
|
||||
|
@ -48,9 +48,9 @@
|
||||
</span>
|
||||
<a href="javascript:void(0)" (click)="onChartClick(chart)">{{ chart.name }}</a>
|
||||
</clr-dg-cell>
|
||||
<clr-dg-cell>{{ getStatusString(chart) | translate }}</clr-dg-cell>
|
||||
<clr-dg-cell>{{ chart.total_versions }}</clr-dg-cell>
|
||||
<clr-dg-cell>{{ chart.created | date }}</clr-dg-cell>
|
||||
<clr-dg-cell class="table-center">{{ getStatusString(chart) | translate }}</clr-dg-cell>
|
||||
<clr-dg-cell class="table-center">{{ chart.total_versions }}</clr-dg-cell>
|
||||
<clr-dg-cell class="table-center">{{ chart.created | date }}</clr-dg-cell>
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>
|
||||
<clr-dg-pagination #pagination [clrDgPageSize]="pageSize" [clrDgTotalItems]="totalCount">
|
||||
|
@ -115,4 +115,9 @@ button {
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.table-center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
@ -38,13 +38,13 @@ export class ProjectComponent implements OnInit {
|
||||
|
||||
loading: boolean = true;
|
||||
|
||||
get selecteType(): number {
|
||||
return this.currentFilteredType;
|
||||
get selecteType(): string {
|
||||
return this.currentFilteredType + "";
|
||||
}
|
||||
set selecteType(_project: number) {
|
||||
this.currentFilteredType = _project;
|
||||
set selecteType(_project: string) {
|
||||
this.currentFilteredType = +_project;
|
||||
if (window.sessionStorage) {
|
||||
window.sessionStorage['projectTypeValue'] = _project;
|
||||
window.sessionStorage['projectTypeValue'] = +_project;
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ export class ProjectComponent implements OnInit {
|
||||
}
|
||||
|
||||
doFilterProjects(): void {
|
||||
this.listProject.doFilterProject(this.selecteType);
|
||||
this.listProject.doFilterProject(+this.selecteType);
|
||||
}
|
||||
|
||||
refresh(): void {
|
||||
|
@ -20,7 +20,7 @@ import { SessionService } from '../shared/session.service';
|
||||
import { SignInCredential } from '../shared/sign-in-credential';
|
||||
|
||||
import { SignUpComponent } from '../account/sign-up/sign-up.component';
|
||||
import { CommonRoutes } from '@harbor/ui';
|
||||
import { CommonRoutes, CONFIG_AUTH_MODE } from '@harbor/ui';
|
||||
import { ForgotPasswordComponent } from '../account/password-setting/forgot-password/forgot-password.component';
|
||||
|
||||
import { AppConfigService } from '../app-config.service';
|
||||
@ -138,15 +138,15 @@ export class SignInComponent implements AfterViewChecked, OnInit {
|
||||
|
||||
// Whether show the 'sign up' link
|
||||
public get selfSignUp(): boolean {
|
||||
return this.appConfig.auth_mode === 'db_auth'
|
||||
return this.appConfig.auth_mode === CONFIG_AUTH_MODE.DB_AUTH
|
||||
&& this.appConfig.self_registration;
|
||||
}
|
||||
public get isOidcLoginMode(): boolean {
|
||||
return this.appConfig.auth_mode === 'oidc_auth';
|
||||
return this.appConfig.auth_mode === CONFIG_AUTH_MODE.OIDC_AUTH;
|
||||
}
|
||||
public get showForgetPwd(): boolean {
|
||||
return this.appConfig.auth_mode !== 'ldap_auth' && this.appConfig.auth_mode !== 'uaa_auth'
|
||||
&& this.appConfig.auth_mode !== 'oidc_auth';
|
||||
return this.appConfig.auth_mode !== CONFIG_AUTH_MODE.LDAP_AUTH && this.appConfig.auth_mode !== CONFIG_AUTH_MODE.UAA_AUTH
|
||||
&& this.appConfig.auth_mode !== CONFIG_AUTH_MODE.OIDC_AUTH && this.appConfig.auth_mode !== CONFIG_AUTH_MODE.HTTP_AUTH;
|
||||
}
|
||||
clickRememberMe($event: any): void {
|
||||
if ($event && $event.target) {
|
||||
|
@ -1039,7 +1039,8 @@
|
||||
"STORAGE_DEFAULT_QUOTA": "Default storage consumption",
|
||||
"SAVE_SUCCESS": "Quota edit success",
|
||||
"UNLIMITED": "unlimited",
|
||||
"INVALID_INPUT": "invalid input"
|
||||
"INVALID_INPUT": "invalid input",
|
||||
"PLACEHOLDER": "We couldn't find any project quotas"
|
||||
},
|
||||
"WEEKLY": {
|
||||
"MONDAY": "Monday",
|
||||
|
@ -1039,7 +1039,8 @@
|
||||
"STORAGE_DEFAULT_QUOTA": "Default storage quota",
|
||||
"SAVE_SUCCESS": "Quota edit success",
|
||||
"UNLIMITED": "unlimited",
|
||||
"INVALID_INPUT": "invalid input"
|
||||
"INVALID_INPUT": "invalid input",
|
||||
"PLACEHOLDER": "We couldn't find any project quotas"
|
||||
},
|
||||
"WEEKLY": {
|
||||
"MONDAY": "Monday",
|
||||
|
@ -1011,7 +1011,8 @@
|
||||
"STORAGE_DEFAULT_QUOTA": "Default storage quota",
|
||||
"SAVE_SUCCESS": "Quota edit success",
|
||||
"UNLIMITED": "unlimited",
|
||||
"INVALID_INPUT": "invalid input"
|
||||
"INVALID_INPUT": "invalid input",
|
||||
"PLACEHOLDER": "We couldn't find any project quotas"
|
||||
},
|
||||
"WEEKLY": {
|
||||
"MONDAY": "Monday",
|
||||
|
@ -1030,7 +1030,8 @@
|
||||
"STORAGE_DEFAULT_QUOTA": "Default storage quota",
|
||||
"SAVE_SUCCESS": "Quota edit success",
|
||||
"UNLIMITED": "unlimited",
|
||||
"INVALID_INPUT": "invalid input"
|
||||
"INVALID_INPUT": "invalid input",
|
||||
"PLACEHOLDER": "We couldn't find any project quotas"
|
||||
},
|
||||
"WEEKLY": {
|
||||
"MONDAY": "Segunda Feira",
|
||||
|
@ -1038,7 +1038,8 @@
|
||||
"STORAGE_DEFAULT_QUOTA": "Varsayılan depolama tüketimi",
|
||||
"SAVE_SUCCESS": "Kota düzenleme başarısı",
|
||||
"UNLIMITED": "sınırsız",
|
||||
"INVALID_INPUT": "geçersiz giriş"
|
||||
"INVALID_INPUT": "geçersiz giriş",
|
||||
"PLACEHOLDER": "We couldn't find any project quotas"
|
||||
},
|
||||
"WEEKLY": {
|
||||
"MONDAY": "Pazartesi",
|
||||
|
@ -1038,7 +1038,8 @@
|
||||
"STORAGE_DEFAULT_QUOTA": "默认配额存储",
|
||||
"SAVE_SUCCESS": "项目容量修改成功",
|
||||
"UNLIMITED": "不设限",
|
||||
"INVALID_INPUT": "输入错误"
|
||||
"INVALID_INPUT": "输入错误",
|
||||
"PLACEHOLDER": "我们找不到任何可以配置定额的项目"
|
||||
},
|
||||
"WEEKLY": {
|
||||
"MONDAY": "周一",
|
||||
|
Loading…
Reference in New Issue
Block a user