Skip to content

Commit

Permalink
Update i18n for group filter and schedule list (goharbor#17884)
Browse files Browse the repository at this point in the history
Fixes goharbor#17868 and goharbor#17853

Signed-off-by: AllForNothing <[email protected]>

Signed-off-by: AllForNothing <[email protected]>
Signed-off-by: Stephan Hohn <[email protected]>
  • Loading branch information
AllForNothing authored and Stephan Hohn committed Feb 16, 2023
1 parent 6fd5028 commit cde9d93
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<clr-dg-column>{{
'JOB_SERVICE_DASHBOARD.CRON' | translate
}}</clr-dg-column>
<clr-dg-column>{{
'JOB_SERVICE_DASHBOARD.CRON_TYPE' | translate
}}</clr-dg-column>
<clr-dg-column>{{
'JOB_SERVICE_DASHBOARD.EXTRA_ATTR' | translate
}}</clr-dg-column>
<clr-dg-column [clrDgSortBy]="'creation_time'">{{
'REPLICATION.UPDATE_TIME' | translate
}}</clr-dg-column>
Expand All @@ -35,23 +29,6 @@
<clr-dg-cell>{{ p.vendor_type }}</clr-dg-cell>
<clr-dg-cell>{{ p.vendor_id }}</clr-dg-cell>
<clr-dg-cell>{{ p.cron }}</clr-dg-cell>
<clr-dg-cell>{{ toI18nString(p.cron_type) | translate }}</clr-dg-cell>
<clr-dg-cell class="flex">
<clr-signpost>
<a class="btn btn-link link-normal" clrSignpostTrigger>{{
p.extra_attrs
}}</a>
<clr-signpost-content
class="pre"
[clrPosition]="'top-middle'"
*clrIfOpen>
<pre
[innerHTML]="
json(p.extra_attrs) | json | markdown
"></pre>
</clr-signpost-content>
</clr-signpost>
</clr-dg-cell>
<clr-dg-cell>{{ p.update_time | harborDatetime }}</clr-dg-cell>
</clr-dg-row>
<clr-dg-footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '../../../../services/event-service/event.service';
import { Subscription } from 'rxjs';
import { ScheduleService } from '../../../../../../ng-swagger-gen/services/schedule.service';
import { CronTypeI18nMap } from '../job-service-dashboard.interface';

@Component({
selector: 'app-schedule-list',
Expand Down Expand Up @@ -90,15 +89,4 @@ export class ScheduleListComponent implements OnInit, OnDestroy {
},
});
}

json(v: string): object {
if (v) {
return JSON.parse(v);
}
return null;
}

toI18nString(v: string): string {
return CronTypeI18nMap[v] ? CronTypeI18nMap[v] : v;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ <h2>{{ 'JOB_SERVICE_DASHBOARD.WORKERS' | translate }}</h2>
<clr-dg-column [clrDgField]="'job_id'">{{
'JOB_SERVICE_DASHBOARD.JOB_ID' | translate
}}</clr-dg-column>
<clr-dg-column>{{
'JOB_SERVICE_DASHBOARD.JOB_PARAM' | translate
}}</clr-dg-column>
<clr-dg-column [clrDgField]="'start_at'">{{
'JOB_SERVICE_DASHBOARD.START_AT' | translate
}}</clr-dg-column>
Expand All @@ -115,19 +112,6 @@ <h2>{{ 'JOB_SERVICE_DASHBOARD.WORKERS' | translate }}</h2>
<clr-dg-cell>{{ w.id }}</clr-dg-cell>
<clr-dg-cell>{{ w.job_name }}</clr-dg-cell>
<clr-dg-cell>{{ w.job_id }}</clr-dg-cell>
<clr-dg-cell class="flex">
<clr-signpost>
<a class="btn btn-link link-normal" clrSignpostTrigger>{{
w.args
}}</a>
<clr-signpost-content
class="pre"
[clrPosition]="'top-middle'"
*clrIfOpen>
<pre [innerHTML]="json(w.args) | json | markdown"></pre>
</clr-signpost-content>
</clr-signpost>
</clr-dg-cell>
<clr-dg-cell>{{ w.start_at | harborDatetime }}</clr-dg-cell>
<clr-dg-cell>{{ w.checkin_at | harborDatetime }}</clr-dg-cell>
</clr-dg-row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
text-transform: unset;
}

.flex {
display: flex;
}

.action-bar {
display: flex;
justify-content: right;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,4 @@ export class WorkerListComponent implements OnInit, OnDestroy {
},
});
}

json(v: string): object {
if (v) {
return JSON.parse(v);
}
return null;
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/de-de-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@
"OIDC_ADMIN_GROUP": "OIDC Administratorengruppe",
"OIDC_ADMIN_GROUP_INFO": "Spezifiziere den Namen einer OIDC Administratorengruppe. Alle Mitglieder dieser Gruppe haben in Harbor administrative Berechtigungen. Falls dies nicht gewünscht ist, kann das Feld leer gelassen werden.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "Alle Scans erfolgreich zum Anhalten aufgefordert!",
Expand Down Expand Up @@ -1804,7 +1804,6 @@
"RESUME_ALL_SUCCESS": "Alle Pläne erfolgreich fortgesetzt",
"VENDOR_TYPE": "Hersteller Typ",
"VENDOR_ID": "Hersteller ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "Es konnte kein Plan gefunden werden",
"WORKERS": "Arbeiter",
"FREE_ALL": "Alle befreien",
Expand All @@ -1824,7 +1823,6 @@
"FREE": "Frei",
"WORKER_ID": "Arbeiter-ID",
"JOB_ID": "Job-ID",
"JOB_PARAM": "Job-Parameter",
"CHECK_IN_AT": "Eingecheckt um",
"NO_WORKER": "Es konnte kein Arbeiter gefunden werden",
"JOB_QUEUE": "Job-Warteschlange",
Expand All @@ -1843,7 +1841,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSIEREN — Pausiert die Ausführung aller Pläne.",
"SCHEDULE_RESUME_BTN_INFO": "FORTSETZEN — Setzt die Ausführung aller Pläne fort.",
"WORKER_FREE_BTN_INFO": "Halte den aktuell laufenden Job an um den Arbeiter zu befreien.",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/en-us-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@
"OIDC_ADMIN_GROUP": "OIDC Admin Group",
"OIDC_ADMIN_GROUP_INFO": "Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "Trigger stopping scan all successfully!",
Expand Down Expand Up @@ -1804,7 +1804,6 @@
"RESUME_ALL_SUCCESS": "Resumed all the schedules successfully",
"VENDOR_TYPE": "Vendor Type",
"VENDOR_ID": "Vendor ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "We could not find any schedule",
"WORKERS": "Workers",
"FREE_ALL": "Free all",
Expand All @@ -1824,7 +1823,6 @@
"FREE": "Free",
"WORKER_ID": "Worker ID",
"JOB_ID": "Job ID",
"JOB_PARAM": "Job Parameter",
"CHECK_IN_AT": "Checked In At",
"NO_WORKER": "We could not find any worker",
"JOB_QUEUE": "Job Queues",
Expand All @@ -1843,7 +1841,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSE — Pause all schedules to execute.",
"SCHEDULE_RESUME_BTN_INFO": "RESUME — Resume all schedules to execute.",
"WORKER_FREE_BTN_INFO": "Stop the current running job to free the worker",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/es-es-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@
"OIDC_ADMIN_GROUP": "OIDC Admin Group",
"OIDC_ADMIN_GROUP_INFO": "Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "Trigger stopping scan all successfully!",
Expand Down Expand Up @@ -1803,7 +1803,6 @@
"RESUME_ALL_SUCCESS": "Resumed all the schedules Successfully",
"VENDOR_TYPE": "Vendor Type",
"VENDOR_ID": "Vendor ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "We could not find any schedule",
"WORKERS": "Workers",
"FREE_ALL": "Free all",
Expand All @@ -1823,7 +1822,6 @@
"FREE": "Free",
"WORKER_ID": "Worker ID",
"JOB_ID": "Job ID",
"JOB_PARAM": "Job Parameter",
"CHECK_IN_AT": "Checked In At",
"NO_WORKER": "We could not find any worker",
"JOB_QUEUE": "Job Queues",
Expand All @@ -1842,7 +1840,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSE — Pause all schedules to execute.",
"SCHEDULE_RESUME_BTN_INFO": "RESUME — Resume all schedules to execute.",
"WORKER_FREE_BTN_INFO": "Stop the current running job to free the worker",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/fr-fr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@
"OIDC_ADMIN_GROUP": "OIDC Admin Group",
"OIDC_ADMIN_GROUP_INFO": "Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "Déclenchement avec succès de l'arrêt de l'analyse globale !",
Expand Down Expand Up @@ -1773,7 +1773,6 @@
"RESUME_ALL_SUCCESS": "Resumed all the schedules Successfully",
"VENDOR_TYPE": "Vendor Type",
"VENDOR_ID": "Vendor ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "We could not find any schedule",
"WORKERS": "Workers",
"FREE_ALL": "Free all",
Expand All @@ -1793,7 +1792,6 @@
"FREE": "Free",
"WORKER_ID": "Worker ID",
"JOB_ID": "Job ID",
"JOB_PARAM": "Job Parameter",
"CHECK_IN_AT": "Checked In At",
"NO_WORKER": "We could not find any worker",
"JOB_QUEUE": "Job Queues",
Expand All @@ -1812,7 +1810,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSE — Pause all schedules to execute.",
"SCHEDULE_RESUME_BTN_INFO": "RESUME — Resume all schedule to execute.",
"WORKER_FREE_BTN_INFO": "Stop the current running job to free the worker",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/pt-br-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@
"OIDC_ADMIN_GROUP": "Grupo Administrativo",
"OIDC_ADMIN_GROUP_INFO": "Informe o nome do grupo OIDC que será considerado administrativo. Todos os usuários deste grupo obterão privilégios de adiministração no Harbor. Deixe vazio para ser ignorado.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "Todos os exames foram interrompidos!",
Expand Down Expand Up @@ -1800,7 +1800,6 @@
"RESUME_ALL_SUCCESS": "Resumed all the schedules Successfully",
"VENDOR_TYPE": "Vendor Type",
"VENDOR_ID": "Vendor ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "We could not find any schedule",
"WORKERS": "Workers",
"FREE_ALL": "Free all",
Expand All @@ -1820,7 +1819,6 @@
"FREE": "Free",
"WORKER_ID": "Worker ID",
"JOB_ID": "Job ID",
"JOB_PARAM": "Job Parameter",
"CHECK_IN_AT": "Checked In At",
"NO_WORKER": "We could not find any worker",
"JOB_QUEUE": "Job Queues",
Expand All @@ -1839,7 +1837,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSE — Pause all schedules to execute.",
"SCHEDULE_RESUME_BTN_INFO": "RESUME — Resume all schedule to execute.",
"WORKER_FREE_BTN_INFO": "Stop the current running job to free the worker",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/tr-tr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@
"OIDC_ADMIN_GROUP": "OIDC Admin Group",
"OIDC_ADMIN_GROUP_INFO": "Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "Trigger stopping scan all successfully!",
Expand Down Expand Up @@ -1804,7 +1804,6 @@
"RESUME_ALL_SUCCESS": "Resumed all the schedules Successfully",
"VENDOR_TYPE": "Vendor Type",
"VENDOR_ID": "Vendor ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "We could not find any schedule",
"WORKERS": "Workers",
"FREE_ALL": "Free all",
Expand All @@ -1824,7 +1823,6 @@
"FREE": "Free",
"WORKER_ID": "Worker ID",
"JOB_ID": "Job ID",
"JOB_PARAM": "Job Parameter",
"CHECK_IN_AT": "Checked In At",
"NO_WORKER": "We could not find any worker",
"JOB_QUEUE": "Job Queues",
Expand All @@ -1843,7 +1841,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSE — Pause all schedules to execute.",
"SCHEDULE_RESUME_BTN_INFO": "RESUME — Resume all schedule to execute.",
"WORKER_FREE_BTN_INFO": "Stop the current running job to free the worker",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/zh-cn-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@
"OIDC_ADMIN_GROUP": "OIDC管理员组",
"OIDC_ADMIN_GROUP_INFO": "OIDC管理员组名称。所有该组内用户都会有管理员权限,此属性可以为空。",
"OIDC_GROUP_FILTER": "OIDC 组过滤器",
"OIDC_GROUP_FILTER_INFO": "该过滤器将会过滤掉不匹配此项正则表达式的 OIDC 组"
"OIDC_GROUP_FILTER_INFO": "该过滤器将会过滤掉不匹配此项正则表达式的 OIDC 组。若不填,则表示匹配所有。"
},
"SCANNING": {
"STOP_SCAN_ALL_SUCCESS": "停止扫描所有镜像任务成功!",
Expand Down Expand Up @@ -1802,7 +1802,6 @@
"RESUME_ALL_SUCCESS": "重启所有定时任务成功",
"VENDOR_TYPE": "供应商类型",
"VENDOR_ID": "供应商 ID",
"EXTRA_ATTR": "其他属性",
"NO_SCHEDULE": "未发现任何定时任务",
"WORKERS": "工作者",
"FREE_ALL": "停下全部",
Expand All @@ -1822,7 +1821,6 @@
"FREE": "停下",
"WORKER_ID": "工作者 ID",
"JOB_ID": "任务 ID",
"JOB_PARAM": "任务参数",
"CHECK_IN_AT": "检查时间",
"NO_WORKER": "未发现任何工作者",
"JOB_QUEUE": "任务栈",
Expand All @@ -1841,7 +1839,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "暂停 — 暂停所有定时任务,暂停中的定时任务将不会被执行。",
"SCHEDULE_RESUME_BTN_INFO": "重启 — 重启所有定时任务,定时任务在触发时会正常执行。",
"WORKER_FREE_BTN_INFO": "停下选中的工作者当前正在执行的任务以便释放该工作者,被释放的工作者会继续执行其他任务。",
"CRON": "Cron",
"CRON_TYPE": "Cron 类型"
"CRON": "Cron"
}
}
7 changes: 2 additions & 5 deletions src/portal/src/i18n/lang/zh-tw-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@
"OIDC_ADMIN_GROUP": "OIDC Admin Group",
"OIDC_ADMIN_GROUP_INFO": "Specify an OIDC admin group name. All OIDC users in this group will have harbor admin privilege. Keep it blank if you do not want to.",
"OIDC_GROUP_FILTER": "OIDC Group Filter",
"OIDC_GROUP_FILTER_INFO": "Exclude OIDC groups who match the provided regular expression."
"OIDC_GROUP_FILTER_INFO": "Filter OIDC groups who match the provided regular expression.Keep it blank to match all the groups."
},
"SCANNING":{
"STOP_SCAN_ALL_SUCCESS": "Trigger stopping scan all successfully!",
Expand Down Expand Up @@ -1795,7 +1795,6 @@
"RESUME_ALL_SUCCESS": "Resumed all the schedules Successfully",
"VENDOR_TYPE": "Vendor Type",
"VENDOR_ID": "Vendor ID",
"EXTRA_ATTR": "Extra Attribute",
"NO_SCHEDULE": "We could not find any schedule",
"WORKERS": "Workers",
"FREE_ALL": "Free all",
Expand All @@ -1815,7 +1814,6 @@
"FREE": "Free",
"WORKER_ID": "Worker ID",
"JOB_ID": "Job ID",
"JOB_PARAM": "Job Parameter",
"CHECK_IN_AT": "Checked In At",
"NO_WORKER": "We could not find any worker",
"JOB_QUEUE": "Job Queues",
Expand All @@ -1834,7 +1832,6 @@
"SCHEDULE_PAUSE_BTN_INFO": "PAUSE — Pause all schedules to execute.",
"SCHEDULE_RESUME_BTN_INFO": "RESUME — Resume all schedule to execute.",
"WORKER_FREE_BTN_INFO": "Stop the current running job to free the worker",
"CRON": "Cron",
"CRON_TYPE": "Cron Type"
"CRON": "Cron"
}
}

0 comments on commit cde9d93

Please sign in to comment.