mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
Add logs column for worker datagrid (#18307)
1. Related back-end PR #18261 Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
38d7eda1ad
commit
1238384428
@ -105,6 +105,7 @@
|
|||||||
<clr-dg-column [clrDgField]="'checkin_at'">{{
|
<clr-dg-column [clrDgField]="'checkin_at'">{{
|
||||||
'JOB_SERVICE_DASHBOARD.CHECK_IN_AT' | translate
|
'JOB_SERVICE_DASHBOARD.CHECK_IN_AT' | translate
|
||||||
}}</clr-dg-column>
|
}}</clr-dg-column>
|
||||||
|
<clr-dg-column>{{ 'REPLICATION.LOGS' | translate }}</clr-dg-column>
|
||||||
<clr-dg-placeholder>{{
|
<clr-dg-placeholder>{{
|
||||||
'JOB_SERVICE_DASHBOARD.NO_WORKER' | translate
|
'JOB_SERVICE_DASHBOARD.NO_WORKER' | translate
|
||||||
}}</clr-dg-placeholder>
|
}}</clr-dg-placeholder>
|
||||||
@ -114,6 +115,15 @@
|
|||||||
<clr-dg-cell>{{ w.job_id }}</clr-dg-cell>
|
<clr-dg-cell>{{ w.job_id }}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{ w.start_at | harborDatetime }}</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-cell>{{ w.checkin_at | harborDatetime }}</clr-dg-cell>
|
||||||
|
<clr-dg-cell>
|
||||||
|
<a
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
[href]="viewLog(w.job_id)"
|
||||||
|
*ngIf="w.job_id">
|
||||||
|
<clr-icon shape="list"></clr-icon>
|
||||||
|
</a>
|
||||||
|
</clr-dg-cell>
|
||||||
</clr-dg-row>
|
</clr-dg-row>
|
||||||
<clr-dg-footer>
|
<clr-dg-footer>
|
||||||
<clr-dg-pagination
|
<clr-dg-pagination
|
||||||
|
@ -6,6 +6,7 @@ import { JobserviceService } from 'ng-swagger-gen/services';
|
|||||||
import { finalize, forkJoin, Subscription } from 'rxjs';
|
import { finalize, forkJoin, Subscription } from 'rxjs';
|
||||||
import { MessageHandlerService } from 'src/app/shared/services/message-handler.service';
|
import { MessageHandlerService } from 'src/app/shared/services/message-handler.service';
|
||||||
import {
|
import {
|
||||||
|
CURRENT_BASE_HREF,
|
||||||
getPageSizeFromLocalStorage,
|
getPageSizeFromLocalStorage,
|
||||||
PageSizeMapKeys,
|
PageSizeMapKeys,
|
||||||
setPageSizeToLocalStorage,
|
setPageSizeToLocalStorage,
|
||||||
@ -209,4 +210,8 @@ export class WorkerListComponent implements OnInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viewLog(jobId: number | string): string {
|
||||||
|
return `${CURRENT_BASE_HREF}/jobservice/jobs/${jobId}/log`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user