[Cherry-pick]Fix ui issues found in testing-day-round-2 (#17358)

Fix ui issues found in testing-day-round-2

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
Shijun Sun 2022-08-09 12:15:44 +08:00 committed by GitHub
parent 0b1fee46a6
commit 792db58a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 47 additions and 21 deletions

View File

@ -5,7 +5,6 @@ import {
ConfirmationButtons, ConfirmationButtons,
ConfirmationState, ConfirmationState,
ConfirmationTargets, ConfirmationTargets,
REFRESH_TIME_DIFFERENCE,
} from 'src/app/shared/entities/shared.const'; } from 'src/app/shared/entities/shared.const';
import { ErrorHandler } from 'src/app/shared/units/error-handler/error-handler'; import { ErrorHandler } from 'src/app/shared/units/error-handler/error-handler';
import { import {
@ -16,7 +15,12 @@ import {
setPageSizeToLocalStorage, setPageSizeToLocalStorage,
} from 'src/app/shared/units/utils'; } from 'src/app/shared/units/utils';
import { PurgeService } from '../../../../../../../ng-swagger-gen/services/purge.service'; import { PurgeService } from '../../../../../../../ng-swagger-gen/services/purge.service';
import { JOB_STATUS, NO, YES } from '../../clearing-job-interfact'; import {
JOB_STATUS,
NO,
REFRESH_STATUS_TIME_DIFFERENCE,
YES,
} from '../../clearing-job-interfact';
import { ConfirmationMessage } from '../../../../global-confirmation-dialog/confirmation-message'; import { ConfirmationMessage } from '../../../../global-confirmation-dialog/confirmation-message';
import { ConfirmationDialogService } from '../../../../global-confirmation-dialog/confirmation-dialog.service'; import { ConfirmationDialogService } from '../../../../global-confirmation-dialog/confirmation-dialog.service';
import { ExecHistory } from '../../../../../../../ng-swagger-gen/models/exec-history'; import { ExecHistory } from '../../../../../../../ng-swagger-gen/models/exec-history';
@ -159,8 +163,8 @@ export class PurgeHistoryComponent implements OnInit, OnDestroy {
// to avoid some jobs not finished. // to avoid some jobs not finished.
if (!this.timerDelay) { if (!this.timerDelay) {
this.timerDelay = timer( this.timerDelay = timer(
REFRESH_TIME_DIFFERENCE, REFRESH_STATUS_TIME_DIFFERENCE,
REFRESH_TIME_DIFFERENCE REFRESH_STATUS_TIME_DIFFERENCE
).subscribe(() => { ).subscribe(() => {
let count: number = 0; let count: number = 0;
this.jobs.forEach(job => { this.jobs.forEach(job => {

View File

@ -8,7 +8,7 @@
</div> </div>
<div class="clr-col"> <div class="clr-col">
<div class="clr-row"> <div class="clr-row">
<div class="clr-col-4"> <div class="p-06 mr-2">
<span class="mr-1 font-style">{{ <span class="mr-1 font-style">{{
'CLEARANCES.LAST_COMPLETED' | translate 'CLEARANCES.LAST_COMPLETED' | translate
}}</span> }}</span>
@ -31,7 +31,7 @@
</ng-container> </ng-container>
</span> </span>
</div> </div>
<div class="clr-col"> <div class="p-06">
<span class="mr-1 font-style" *ngIf="nextScheduledTime">{{ <span class="mr-1 font-style" *ngIf="nextScheduledTime">{{
'CLEARANCES.NEXT_SCHEDULED_TIME' | translate 'CLEARANCES.NEXT_SCHEDULED_TIME' | translate
}}</span> }}</span>

View File

@ -46,3 +46,8 @@
.pt { .pt {
padding-right: 1rem; padding-right: 1rem;
} }
.p-06 {
padding-left: .6rem;
padding-right: .6rem;
}

View File

@ -5,7 +5,6 @@ import {
ConfirmationButtons, ConfirmationButtons,
ConfirmationState, ConfirmationState,
ConfirmationTargets, ConfirmationTargets,
REFRESH_TIME_DIFFERENCE,
} from '../../../../../../shared/entities/shared.const'; } from '../../../../../../shared/entities/shared.const';
import { GcService } from '../../../../../../../../ng-swagger-gen/services/gc.service'; import { GcService } from '../../../../../../../../ng-swagger-gen/services/gc.service';
import { import {
@ -18,7 +17,12 @@ import {
import { ClrDatagridStateInterface } from '@clr/angular'; import { ClrDatagridStateInterface } from '@clr/angular';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
import { GCHistory } from '../../../../../../../../ng-swagger-gen/models/gchistory'; import { GCHistory } from '../../../../../../../../ng-swagger-gen/models/gchistory';
import { JOB_STATUS, NO, YES } from '../../../clearing-job-interfact'; import {
JOB_STATUS,
NO,
REFRESH_STATUS_TIME_DIFFERENCE,
YES,
} from '../../../clearing-job-interfact';
import { ConfirmationMessage } from '../../../../../global-confirmation-dialog/confirmation-message'; import { ConfirmationMessage } from '../../../../../global-confirmation-dialog/confirmation-message';
import { ConfirmationDialogService } from '../../../../../global-confirmation-dialog/confirmation-dialog.service'; import { ConfirmationDialogService } from '../../../../../global-confirmation-dialog/confirmation-dialog.service';
@ -161,8 +165,8 @@ export class GcHistoryComponent implements OnInit, OnDestroy {
// to avoid some jobs not finished. // to avoid some jobs not finished.
if (!this.timerDelay) { if (!this.timerDelay) {
this.timerDelay = timer( this.timerDelay = timer(
REFRESH_TIME_DIFFERENCE, REFRESH_STATUS_TIME_DIFFERENCE,
REFRESH_TIME_DIFFERENCE REFRESH_STATUS_TIME_DIFFERENCE
).subscribe(() => { ).subscribe(() => {
let count: number = 0; let count: number = 0;
this.jobs.forEach(job => { this.jobs.forEach(job => {

View File

@ -8,7 +8,7 @@
</div> </div>
<div class="clr-col"> <div class="clr-col">
<div class="clr-row"> <div class="clr-row">
<div class="clr-col-4"> <div class="p-06 mr-2">
<span class="mr-1 font-style">{{ <span class="mr-1 font-style">{{
'CLEARANCES.LAST_COMPLETED' | translate 'CLEARANCES.LAST_COMPLETED' | translate
}}</span> }}</span>
@ -31,7 +31,7 @@
</ng-container> </ng-container>
</span> </span>
</div> </div>
<div class="clr-col"> <div class="p-06">
<span class="mr-1 font-style" *ngIf="nextScheduledTime">{{ <span class="mr-1 font-style" *ngIf="nextScheduledTime">{{
'CLEARANCES.NEXT_SCHEDULED_TIME' | translate 'CLEARANCES.NEXT_SCHEDULED_TIME' | translate
}}</span> }}</span>

View File

@ -30,3 +30,8 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.p-06 {
padding-left: .6rem;
padding-right: .6rem;
}

View File

@ -49,7 +49,7 @@
<div class="card" *ngIf="hasQuotaReadPermission"> <div class="card" *ngIf="hasQuotaReadPermission">
<div class="card-block container"> <div class="card-block container">
<div class="head"> <div class="head">
{{ 'STATISTICS.STORAGE_USED' | translate }} {{ 'QUOTA.QUOTA_USED' | translate }}
</div> </div>
<div class="storage-used font-weight-700"> <div class="storage-used font-weight-700">
<div *ngIf="projectQuota"> <div *ngIf="projectQuota">

View File

@ -1184,7 +1184,8 @@
"UNLIMITED": "unlimitiert", "UNLIMITED": "unlimitiert",
"INVALID_INPUT": "ungültige Eingabe", "INVALID_INPUT": "ungültige Eingabe",
"PLACEHOLDER": "Es konnten keine Begrenzungen gefunden werden", "PLACEHOLDER": "Es konnten keine Begrenzungen gefunden werden",
"FILTER_PLACEHOLDER": "Suche nach Name (genaue Übereinstimmung)" "FILTER_PLACEHOLDER": "Suche nach Name (genaue Übereinstimmung)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "Montag", "MONDAY": "Montag",

View File

@ -1184,7 +1184,8 @@
"UNLIMITED": "unlimited", "UNLIMITED": "unlimited",
"INVALID_INPUT": "invalid input", "INVALID_INPUT": "invalid input",
"PLACEHOLDER": "We couldn't find any project quotas", "PLACEHOLDER": "We couldn't find any project quotas",
"FILTER_PLACEHOLDER": "Search by name(exact match)" "FILTER_PLACEHOLDER": "Search by name(exact match)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "Monday", "MONDAY": "Monday",

View File

@ -1186,7 +1186,8 @@
"UNLIMITED": "unlimited", "UNLIMITED": "unlimited",
"INVALID_INPUT": "invalid input", "INVALID_INPUT": "invalid input",
"PLACEHOLDER": "We couldn't find any project quotas", "PLACEHOLDER": "We couldn't find any project quotas",
"FILTER_PLACEHOLDER": "Search by name(exact match)" "FILTER_PLACEHOLDER": "Search by name(exact match)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "Monday", "MONDAY": "Monday",

View File

@ -1158,7 +1158,8 @@
"UNLIMITED": "Illimité", "UNLIMITED": "Illimité",
"INVALID_INPUT": "Saisie non valide", "INVALID_INPUT": "Saisie non valide",
"PLACEHOLDER": "Nous n'avons trouvé aucun quota de projet !", "PLACEHOLDER": "Nous n'avons trouvé aucun quota de projet !",
"FILTER_PLACEHOLDER": "Chercher par nom (correspondance exacte)" "FILTER_PLACEHOLDER": "Chercher par nom (correspondance exacte)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "Lundi", "MONDAY": "Lundi",

View File

@ -1177,7 +1177,8 @@
"UNLIMITED": "∞", "UNLIMITED": "∞",
"INVALID_INPUT": "valor inválido", "INVALID_INPUT": "valor inválido",
"PLACEHOLDER": "Nenhuma limite encontrado nos projetos", "PLACEHOLDER": "Nenhuma limite encontrado nos projetos",
"FILTER_PLACEHOLDER": "Buscar pelo nome (exato)" "FILTER_PLACEHOLDER": "Buscar pelo nome (exato)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "Segunda Feira", "MONDAY": "Segunda Feira",

View File

@ -1184,7 +1184,8 @@
"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", "PLACEHOLDER": "We couldn't find any project quotas",
"FILTER_PLACEHOLDER": "Search by name(exact match)" "FILTER_PLACEHOLDER": "Search by name(exact match)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "Pazartesi", "MONDAY": "Pazartesi",

View File

@ -1185,7 +1185,8 @@
"UNLIMITED": "不设限", "UNLIMITED": "不设限",
"INVALID_INPUT": "输入错误", "INVALID_INPUT": "输入错误",
"PLACEHOLDER": "我们找不到任何可以配置定额的项目", "PLACEHOLDER": "我们找不到任何可以配置定额的项目",
"FILTER_PLACEHOLDER": "按名称查找(完全匹配)" "FILTER_PLACEHOLDER": "按名称查找(完全匹配)",
"QUOTA_USED": "已使用的配额"
}, },
"WEEKLY": { "WEEKLY": {
"MONDAY": "周一", "MONDAY": "周一",

View File

@ -1180,7 +1180,8 @@
"UNLIMITED": "不設限", "UNLIMITED": "不設限",
"INVALID_INPUT": "輸入錯誤", "INVALID_INPUT": "輸入錯誤",
"PLACEHOLDER": "我們找不到任何可以配置定額的項目", "PLACEHOLDER": "我們找不到任何可以配置定額的項目",
"FILTER_PLACEHOLDER": "Search by name(exact match)" "FILTER_PLACEHOLDER": "Search by name(exact match)",
"QUOTA_USED": "Quota used"
}, },
"WEEKLY":{ "WEEKLY":{
"MONDAY": "週一", "MONDAY": "週一",