1
0
mirror of https://github.com/goharbor/harbor.git synced 2024-12-23 00:57:44 +01:00

Merge pull request from AllForNothing/task-col

Modify column name for preheat task list UI
This commit is contained in:
Will Sun 2020-07-29 10:45:37 +08:00 committed by GitHub
commit b2593589ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 43 additions and 15 deletions

View File

@ -110,7 +110,7 @@
<select id="severity" name="severity" class="clr-select"
#ngSeverity="ngModel"
[(ngModel)]="severity">
<option class="display-none" value=""></option>
<option>--</option>
<option [selected]="severity == s.severity" *ngFor='let s of severityOptions' value="{{s.severity}}">
{{ s.severityLevel | translate }}</option>
</select>

View File

@ -87,7 +87,9 @@
<clr-dg-column [clrDgField]="'id'">{{'REPLICATION.TASK_ID'| translate}}</clr-dg-column>
<clr-dg-column [clrDgField]="'execution_id'">{{'P2P_PROVIDER.ID' | translate}}</clr-dg-column>
<clr-dg-column [clrDgField]="'status'">{{'REPLICATION.STATUS' | translate}}</clr-dg-column>
<clr-dg-column>{{'P2P_PROVIDER.EXTRA_ATTRS' | translate}}</clr-dg-column>
<clr-dg-column>{{'P2P_PROVIDER.ARTIFACT' | translate}}</clr-dg-column>
<clr-dg-column>{{'P2P_PROVIDER.DIGEST' | translate}}</clr-dg-column>
<clr-dg-column>{{'P2P_PROVIDER.TYPE' | translate}}</clr-dg-column>
<clr-dg-column [clrDgSortBy]="startTimeComparator">{{'REPLICATION.CREATION_TIME' | translate}}</clr-dg-column>
<clr-dg-column>{{'REPLICATION.DURATION' | translate}}</clr-dg-column>
<clr-dg-column>{{'REPLICATION.LOGS' | translate}}</clr-dg-column>
@ -104,10 +106,15 @@
</clr-tooltip>
</clr-dg-cell>
<clr-dg-cell>
<span>{{t.extra_attrs?.artifact}}</span>,&nbsp;
<span>{{t.extra_attrs?.digest}}</span>,&nbsp;
<span>{{t.extra_attrs?.artifact}}</span>
</clr-dg-cell>
<clr-dg-cell>
<span>{{t.extra_attrs?.digest}}</span>
</clr-dg-cell>
<clr-dg-cell>
<span>{{t.extra_attrs?.kind}}</span>
</clr-dg-cell>
<clr-dg-cell>{{t.start_time | date: 'short'}}</clr-dg-cell>
<clr-dg-cell>{{getDuration(t)}}</clr-dg-cell>
<clr-dg-cell>

View File

@ -36,6 +36,7 @@ export class TaskListComponent implements OnInit, OnDestroy {
hasUpdatePermission: boolean = false;
btnState: ClrLoadingState = ClrLoadingState.DEFAULT;
timeout: any;
timeoutForTaskList: any;
constructor(
private translate: TranslateService,
private router: Router,
@ -65,6 +66,10 @@ export class TaskListComponent implements OnInit, OnDestroy {
clearTimeout(this.timeout);
this.timeout = null;
}
if (this.timeoutForTaskList) {
clearTimeout(this.timeoutForTaskList);
this.timeoutForTaskList = null;
}
}
getPermissions() {
const permissionsList: Observable<boolean>[] = [];
@ -191,12 +196,14 @@ export class TaskListComponent implements OnInit, OnDestroy {
this.totalCount = this.tasks.length;
for (let i = 0; i < this.tasks.length; i++) {
if (this.p2pProviderService.willChangStatus(this.tasks[i].status)) {
setTimeout(() => {
if (!this.timeoutForTaskList) {
this.timeoutForTaskList = setTimeout(() => {
this.clrLoadTasks(false);
}, TIME_OUT);
}
}
}
}
},
error => {
this.messageHandlerService.error(error);

View File

@ -1536,7 +1536,9 @@
"PROVIDER_TYPE": "Vendor",
"ID": "Execution ID",
"NO_PROVIDER": "Please add a provider first",
"EXTRA_ATTRS": "Artifact, Digest and Kind",
"ARTIFACT": "Artifact",
"DIGEST": "Digest",
"TYPE": "Type",
"TASKS": "Tasks",
"TASKS_PLACEHOLDER": "We couldn't find any task",
"SEVERITY_WARNING": "Vulnerability settings here conflicts with the relevant project configuration that will override the settings here",

View File

@ -1534,7 +1534,9 @@
"PROVIDER_TYPE": "Vendor",
"ID": "Execution ID",
"NO_PROVIDER": "Please add a provider first",
"EXTRA_ATTRS": "Artifact, Digest and Kind",
"ARTIFACT": "Artifact",
"DIGEST": "Digest",
"TYPE": "Type",
"TASKS": "Tasks",
"TASKS_PLACEHOLDER": "We couldn't find any task",
"SEVERITY_WARNING": "Vulnerability settings here conflicts with the relevant project configuration that will override the settings here",

View File

@ -1504,7 +1504,9 @@
"PROVIDER_TYPE": "Vendor",
"ID": "Execution ID",
"NO_PROVIDER": "Please add a provider first",
"EXTRA_ATTRS": "Artifact, Digest and Kind",
"ARTIFACT": "Artifact",
"DIGEST": "Digest",
"TYPE": "Type",
"TASKS": "Tasks",
"TASKS_PLACEHOLDER": "We couldn't find any task",
"SEVERITY_WARNING": "Vulnerability settings here conflicts with the relevant project configuration that will override the settings here",

View File

@ -1532,7 +1532,9 @@
"PROVIDER_TYPE": "Vendor",
"ID": "Execution ID",
"NO_PROVIDER": "Please add a provider first",
"EXTRA_ATTRS": "Artifact, Digest and Kind",
"ARTIFACT": "Artifact",
"DIGEST": "Digest",
"TYPE": "Type",
"TASKS": "Tasks",
"TASKS_PLACEHOLDER": "We couldn't find any task",
"SEVERITY_WARNING": "Vulnerability settings here conflicts with the relevant project configuration that will override the settings here",

View File

@ -1536,7 +1536,9 @@
"PROVIDER_TYPE": "Vendor",
"ID": "Execution ID",
"NO_PROVIDER": "Please add a provider first",
"EXTRA_ATTRS": "Artifact, Digest and Kind",
"ARTIFACT": "Artifact",
"DIGEST": "Digest",
"TYPE": "Type",
"TASKS": "Tasks",
"TASKS_PLACEHOLDER": "We couldn't find any task",
"SEVERITY_WARNING": "Vulnerability settings here conflicts with the relevant project configuration that will override the settings here",

View File

@ -1533,7 +1533,9 @@
"PROVIDER_TYPE": "发起方",
"ID": "执行 ID",
"NO_PROVIDER": "请先添加提供商",
"EXTRA_ATTRS": "Artifact, 摘要和类型",
"ARTIFACT": "Artifact",
"DIGEST": "摘要",
"TYPE": "类型",
"TASKS": "任务",
"TASKS_PLACEHOLDER": "暂无记录",
"SEVERITY_WARNING": "此处漏洞等级设置与项目设置冲突且将会被项目设置覆盖",

View File

@ -1520,7 +1520,9 @@
"PROVIDER_TYPE": "Vendor",
"ID": "Execution ID",
"NO_PROVIDER": "Please add a provider first",
"EXTRA_ATTRS": "Artifact, Digest and Kind",
"ARTIFACT": "Artifact",
"DIGEST": "Digest",
"TYPE": "Type",
"TASKS": "Tasks",
"TASKS_PLACEHOLDER": "We couldn't find any task",
"SEVERITY_WARNING": "Vulnerability settings here conflicts with the relevant project configuration that will override the settings here",