From cb6a426c7db35a85712f6e80e705651f00d5ff51 Mon Sep 17 00:00:00 2001 From: "Shijun Sun (c)" Date: Tue, 30 Jul 2019 17:27:40 +0800 Subject: [PATCH] Optimization for tag-retention UI Signed-off-by: Shijun Sun (c) --- src/portal/lib/src/cron-schedule/index.ts | 2 + src/portal/lib/src/index.ts | 1 + .../app/project/tag-retention/retention.ts | 2 +- .../tag-retention.component.html | 28 ++++---- .../tag-retention.component.scss | 18 ++++- .../tag-retention/tag-retention.component.ts | 70 +++++++++++++++++-- src/portal/src/i18n/lang/en-us-lang.json | 3 +- src/portal/src/i18n/lang/es-es-lang.json | 3 +- src/portal/src/i18n/lang/fr-fr-lang.json | 3 +- src/portal/src/i18n/lang/pt-br-lang.json | 3 +- src/portal/src/i18n/lang/zh-cn-lang.json | 3 +- 11 files changed, 109 insertions(+), 27 deletions(-) diff --git a/src/portal/lib/src/cron-schedule/index.ts b/src/portal/lib/src/cron-schedule/index.ts index dfcdf2056..014a84eda 100644 --- a/src/portal/lib/src/cron-schedule/index.ts +++ b/src/portal/lib/src/cron-schedule/index.ts @@ -3,6 +3,8 @@ import { Type } from "@angular/core"; import { CronScheduleComponent } from "./cron-schedule.component"; import { CronTooltipComponent } from "./cron-tooltip/cron-tooltip.component"; +export * from "./cron-schedule.component"; +export * from './cron-tooltip/cron-tooltip.component'; export const CRON_SCHEDULE_DIRECTIVES: Type[] = [ CronScheduleComponent, CronTooltipComponent diff --git a/src/portal/lib/src/index.ts b/src/portal/lib/src/index.ts index 745e73fa0..c37e890a6 100644 --- a/src/portal/lib/src/index.ts +++ b/src/portal/lib/src/index.ts @@ -27,4 +27,5 @@ export * from "./gridview/index"; export * from "./repository-gridview/index"; export * from "./operation/index"; export * from "./_animations/index"; +export * from "./cron-schedule/index"; diff --git a/src/portal/src/app/project/tag-retention/retention.ts b/src/portal/src/app/project/tag-retention/retention.ts index d536632bd..d8460c86b 100644 --- a/src/portal/src/app/project/tag-retention/retention.ts +++ b/src/portal/src/app/project/tag-retention/retention.ts @@ -32,7 +32,7 @@ export class Retention { this.trigger = { kind: "Schedule", settings: { - cron: "@daily", + cron: "0 0 0 * * *", } }; } diff --git a/src/portal/src/app/project/tag-retention/tag-retention.component.html b/src/portal/src/app/project/tag-retention/tag-retention.component.html index 92622ba74..dd84bf30f 100644 --- a/src/portal/src/app/project/tag-retention/tag-retention.component.html +++ b/src/portal/src/app/project/tag-retention/tag-retention.component.html @@ -1,9 +1,9 @@
-
- {{retention?.rules?.length ? retention?.rules?.length : 0}} +
+ {{retention?.rules?.length ? retention?.rules?.length : 0}} + Loading...
-
@@ -45,14 +45,9 @@
-
-
-
- {{'TAG_RETENTION.ADD_RULE_HELP_1' | translate}} -
-
- {{'TAG_RETENTION.ADD_RULE_HELP_2' | translate}} -
+
+
+ {{'TAG_RETENTION.ADD_RULE_HELP_1' | translate}}
@@ -60,8 +55,11 @@
+
+ +
-
+
+ class="btn btn-outline" (click)="abortRun()"> + + {{'TAG_RETENTION.ABORT' | translate}}