diff --git a/src/portal/src/app/base/left-side-nav/clearing-job/clearing-job-interfact.ts b/src/portal/src/app/base/left-side-nav/clearing-job/clearing-job-interfact.ts
index 262e4bb66db..c6de076307a 100644
--- a/src/portal/src/app/base/left-side-nav/clearing-job/clearing-job-interfact.ts
+++ b/src/portal/src/app/base/left-side-nav/clearing-job/clearing-job-interfact.ts
@@ -20,3 +20,5 @@ export const YES: string = 'TAG_RETENTION.YES';
export const NO: string = 'TAG_RETENTION.NO';
export const REFRESH_STATUS_TIME_DIFFERENCE: number = 5000;
+
+export const WORKER_OPTIONS: number[] = [1, 2, 3, 4, 5];
diff --git a/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.html b/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.html
index 2b63b0ad366..5878f296bae 100644
--- a/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.html
+++ b/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.html
@@ -50,6 +50,37 @@
[originCron]="originCron"
(inputvalue)="saveGcSchedule($event)">
+
diff --git a/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.scss b/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.scss
index 88f4a102b09..4d0cf4bc715 100644
--- a/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.scss
+++ b/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.scss
@@ -35,3 +35,7 @@
padding-left: .6rem;
padding-right: .6rem;
}
+
+.worker-select {
+ width: 4.5rem;
+}
diff --git a/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.ts b/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.ts
index 13879de85d4..b48855fa26d 100644
--- a/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.ts
+++ b/src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.ts
@@ -10,7 +10,9 @@ import { GcHistoryComponent } from './gc-history/gc-history.component';
import {
JOB_STATUS,
REFRESH_STATUS_TIME_DIFFERENCE,
+ WORKER_OPTIONS,
} from '../../clearing-job-interfact';
+import { clone } from '../../../../../shared/units/utils';
const ONE_MINUTE = 60000;
@@ -27,6 +29,8 @@ export class GcComponent implements OnInit, OnDestroy {
@ViewChild(CronScheduleComponent)
cronScheduleComponent: CronScheduleComponent;
shouldDeleteUntagged: boolean;
+ workerNum: number = 1;
+ workerOptions: number[] = clone(WORKER_OPTIONS);
dryRunOnGoing: boolean = false;
lastCompletedTime: string;
@@ -116,8 +120,10 @@ export class GcComponent implements OnInit, OnDestroy {
this.shouldDeleteUntagged = JSON.parse(
gcHistory.job_parameters
).delete_untagged;
+ this.workerNum = +JSON.parse(gcHistory.job_parameters).workers;
} else {
this.shouldDeleteUntagged = false;
+ this.workerNum = 1;
}
}
@@ -132,6 +138,7 @@ export class GcComponent implements OnInit, OnDestroy {
schedule: {
parameters: {
delete_untagged: this.shouldDeleteUntagged,
+ workers: +this.workerNum,
dry_run: false,
},
schedule: {
@@ -157,6 +164,7 @@ export class GcComponent implements OnInit, OnDestroy {
schedule: {
parameters: {
delete_untagged: this.shouldDeleteUntagged,
+ workers: +this.workerNum,
dry_run: true,
},
schedule: {
@@ -188,6 +196,7 @@ export class GcComponent implements OnInit, OnDestroy {
schedule: {
parameters: {
delete_untagged: this.shouldDeleteUntagged,
+ workers: +this.workerNum,
dry_run: false,
},
schedule: {
@@ -212,6 +221,7 @@ export class GcComponent implements OnInit, OnDestroy {
schedule: {
parameters: {
delete_untagged: this.shouldDeleteUntagged,
+ workers: +this.workerNum,
dry_run: false,
},
schedule: {
diff --git a/src/portal/src/i18n/lang/de-de-lang.json b/src/portal/src/i18n/lang/de-de-lang.json
index c38ae7b27a1..a55ee0b90cb 100644
--- a/src/portal/src/i18n/lang/de-de-lang.json
+++ b/src/portal/src/i18n/lang/de-de-lang.json
@@ -1236,7 +1236,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Artefakt erfolgreich kopiert",
diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json
index 1c6e09533bf..2aa6a5217e2 100644
--- a/src/portal/src/i18n/lang/en-us-lang.json
+++ b/src/portal/src/i18n/lang/en-us-lang.json
@@ -1237,7 +1237,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Copy artifact successfully",
diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json
index 9e40ca8a7ab..22fb70c0f43 100644
--- a/src/portal/src/i18n/lang/es-es-lang.json
+++ b/src/portal/src/i18n/lang/es-es-lang.json
@@ -1233,7 +1233,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Copy artifact successfully",
diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json
index 24f5feb9bce..6e02fc0f705 100644
--- a/src/portal/src/i18n/lang/fr-fr-lang.json
+++ b/src/portal/src/i18n/lang/fr-fr-lang.json
@@ -1203,7 +1203,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Artefact copié",
diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json
index 5f4ad235862..997bcaa381a 100644
--- a/src/portal/src/i18n/lang/pt-br-lang.json
+++ b/src/portal/src/i18n/lang/pt-br-lang.json
@@ -1233,7 +1233,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Artefato copiado com sucesso",
diff --git a/src/portal/src/i18n/lang/tr-tr-lang.json b/src/portal/src/i18n/lang/tr-tr-lang.json
index 19277aac646..cd5f5681388 100644
--- a/src/portal/src/i18n/lang/tr-tr-lang.json
+++ b/src/portal/src/i18n/lang/tr-tr-lang.json
@@ -1236,7 +1236,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Copy artifact successfully",
diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json
index f828778dfc8..15b97d35a04 100644
--- a/src/portal/src/i18n/lang/zh-cn-lang.json
+++ b/src/portal/src/i18n/lang/zh-cn-lang.json
@@ -1233,7 +1233,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}}个 blob(s) 和 {{manifest}}个 manifest(s) 已删除",
"DELETE_BLOB": "{{blob}}个 blob(s) 已删除",
"DELETE_MANIFEST": "{{manifest}}个 manifest(s) 已删除",
- "FREE_UP_SIZE": "{{size}}的空间已清理"
+ "FREE_UP_SIZE": "{{size}}的空间已清理",
+ "WORKERS_TOOLTIP": "设置可并行执行垃圾回收任务的工作者数量,默认值为1。"
},
"RETAG": {
"MSG_SUCCESS": "Artifact 拷贝成功",
diff --git a/src/portal/src/i18n/lang/zh-tw-lang.json b/src/portal/src/i18n/lang/zh-tw-lang.json
index 080d89d337b..0a3af0cd62c 100644
--- a/src/portal/src/i18n/lang/zh-tw-lang.json
+++ b/src/portal/src/i18n/lang/zh-tw-lang.json
@@ -1225,7 +1225,8 @@
"DELETE_BLOB_AND_MANIFEST": "{{blob}} blob(s) and {{manifest}} manifest(s) deleted",
"DELETE_BLOB": "{{blob}} blob(s) deleted",
"DELETE_MANIFEST": "{{manifest}} manifest(s) deleted",
- "FREE_UP_SIZE": "{{size}} space freed up"
+ "FREE_UP_SIZE": "{{size}} space freed up",
+ "WORKERS_TOOLTIP": "Set the number of workers that can execute GC tasks in parallel, the default value is 1."
},
"RETAG": {
"MSG_SUCCESS": "Artifact 複製成功",