diff --git a/dps_info/src/jobinfo.ts b/dps_info/src/jobinfo.ts index ebc7a7a9..b60199e0 100644 --- a/dps_info/src/jobinfo.ts +++ b/dps_info/src/jobinfo.ts @@ -74,11 +74,16 @@ export class JobTable extends Widget { // -------------------- // set description from response let disp = ''; - if (this._job_id !== undefined || this._job_id !== ''){ + if (Object.keys(DISPLAYS).length === 0){ + disp = 'No job history.' + } else if (this._job_id === undefined || this._job_id === ''){ + disp = 'Job ID not selected.'; + } else { disp = DISPLAYS[this._job_id]; - console.log(disp); + // console.log(disp); } + console.log(disp); if (document.getElementById('job-detail-display') != null) { // console.log(this._job_id); (document.getElementById('job-detail-display') as HTMLDivElement).innerHTML = disp; @@ -162,6 +167,8 @@ export class JobTable extends Widget { } me._updateJobTable(me); me._setRowClick('job-cache-display', function(){me._updateJobDisplay()}); + } else { + me._updateJobTable(me); } } else { console.log('unable to get user job list'); @@ -749,6 +756,7 @@ export class JobWidget extends Widget { let executeCell = rrow.insertCell(); executeCell.setAttribute('id','cell-execute'); executeCell.setAttribute('valign','top'); + executeCell.setAttribute('style','max-width:475px'); let overviewCell = rrow.insertCell(); overviewCell.setAttribute('id','cell-overview'); @@ -1063,20 +1071,19 @@ export class JobWidget extends Widget { let infoCell = rrow.insertCell(); infoCell.setAttribute('id','cell-jobinfo'); infoCell.setAttribute('valign','top'); - infoCell.setAttribute('style','min-width:360px'); + infoCell.setAttribute('style','min-width:360px; max-width:475px'); let resultsCell = rrow.insertCell(); resultsCell.setAttribute('id','cell-jobresults'); resultsCell.setAttribute('valign','top'); - resultsCell.setAttribute('style','min-width:360px'); + resultsCell.setAttribute('style','min-width:360px; max-width:475px'); // rrow = infoTable.insertRow() as HTMLTableRowElement; let metricsCell = rrow.insertCell(); metricsCell.setAttribute('id','cell-jobmetrics'); metricsCell.setAttribute('valign','top'); - metricsCell.setAttribute('style','min-width:720px'); - metricsCell.setAttribute('colspan','2'); + metricsCell.setAttribute('style','min-width:360px'); infoDiv.appendChild(infoTable); this._widget_div.appendChild(infoDiv); @@ -1144,6 +1151,8 @@ export class JobWidget extends Widget { } me._updateJobTable(me); me._setJobClick('widget-job-table', function(){me._updateJobInfo()}) + } else { + me._updateJobTable(me); } } else { console.log('unable to get user job list'); diff --git a/submit_jobs/submit_jobs/handlers.py b/submit_jobs/submit_jobs/handlers.py index fecf5f03..fb82bad2 100644 --- a/submit_jobs/submit_jobs/handlers.py +++ b/submit_jobs/submit_jobs/handlers.py @@ -1363,17 +1363,18 @@ def get(self): table += '' table += '' table += '' - table += '' - table += 'Job Id' - table += 'Status' - table += 'Algorithm' - table += '' - table += '' if len(jobs) == 0: - table += 'No jobs found for user.' + table += '' + table += 'No jobs found for user.' else: + table += '' + table += 'Job Id' + table += 'Status' + table += 'Algorithm' + table += '' + table += '' for job in jobs: job['detailed'] = detailed_display(job) table += '{}{}{}'.format(job['job_id'],job['status'],job['algo_id'])