fixed resizing in agent because of slickgrid change (#3786)

This commit is contained in:
Aditya Bist
2019-01-22 14:38:20 -08:00
committed by GitHub
parent d5176e0eb7
commit 2e98fde053

View File

@@ -368,7 +368,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
const self = this;
this._table.grid.onColumnsResized.subscribe((e, data: any) => {
let nameWidth: number = data.grid.getColumnWidths()[1];
let nameWidth: number = data.grid.getColumns()[1].width;
// adjust job name when resized
$('#jobsDiv .jobview-grid .slick-cell.l1.r1 .jobview-jobnametext').css('width', `${nameWidth - 10}px`);
// adjust error message when resized
@@ -377,8 +377,10 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
// generate job charts again
self.jobs.forEach(job => {
let jobHistories = self._jobCacheObject.getJobHistory(job.jobId);
let previousRuns = jobHistories.slice(jobHistories.length - 5, jobHistories.length);
self.createJobChart(job.jobId, previousRuns);
if (jobHistories) {
let previousRuns = jobHistories.slice(jobHistories.length - 5, jobHistories.length);
self.createJobChart(job.jobId, previousRuns);
}
});
});