Merge pull request #5951 from zhoumeina/refresh_gc_result

fresh page after job finished
This commit is contained in:
Mia ZHOU 2018-09-26 14:09:55 +08:00 committed by GitHub
commit 49711cc222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import { TranslateService } from '@ngx-translate/core';
import { GcJobViewModel, WeekDay } from "./gcLog";
import { GcViewModelFactory } from "./gc.viewmodel.factory";
import { GcRepoService } from "./gc.service";
import { WEEKDAYS, SCHEDULE_TYPE, ONE_MINITUE} from './gc.const';
import { WEEKDAYS, SCHEDULE_TYPE, ONE_MINITUE, THREE_SECONDS} from './gc.const';
import { GcUtility } from './gc.utility';
import { ErrorHandler } from '@harbor/ui';
@ -90,6 +90,7 @@ export class GcComponent implements OnInit {
this.errorHandler.info(res);
});
this.getJobs();
setTimeout(() => {this.getJobs(); }, THREE_SECONDS); // to avoid some jobs not finished.
}, error => {
this.errorHandler.error(error);
});

View File

@ -15,6 +15,7 @@ export const SCHEDULE_TYPE = {
};
export const ONE_MINITUE = 60000;
export const THREE_SECONDS = 3000;

View File

@ -819,6 +819,7 @@
"PENDING":"Pending",
"FINISHED":"Finished",
"STOPPED":"Stopped",
"RUNNING":"Running",
"ERROR":"Error",
"SCHEDULE": {
"NONE": "None",

View File

@ -816,6 +816,7 @@
"PENDING":"Pending",
"FINISHED":"Finished",
"STOPPED":"Stopped",
"RUNNING":"Running",
"ERROR":"Error",
"SCHEDULE": {
"NONE": "None",

View File

@ -779,6 +779,7 @@
"PENDING":"Pending",
"FINISHED":"Finished",
"STOPPED":"Stopped",
"RUNNING":"Running",
"ERROR":"Error",
"SCHEDULE": {
"NONE": "None",

View File

@ -815,6 +815,7 @@
"PENDING":"未开始",
"FINISHED":"已完成",
"STOPPED":"已停止",
"RUNNING":"执行中",
"ERROR":"错误",
"SCHEDULE": {
"NONE": "无",