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