Skip to content

Commit

Permalink
Fix a bug with the "Exclusive" field in job info
Browse files Browse the repository at this point in the history
A click on a job provides detailed information in a modal window.
The display was based on the non-existent job.exclusive field.
The job is exclusive if job.shared is 0.
  • Loading branch information
OldMansCave authored and rezib committed Dec 1, 2021
1 parent b19325f commit efb2327
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions dashboard/js/helpers/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,12 @@ define([
}
return options.inverse(this);
});

// handlebar helper to label exclusive: based on job.shared
Handlebars.registerHelper('isExclusive', function(shared){
if(shared === '0'){
return 'Yes';
}
return 'No';
});
});
2 changes: 1 addition & 1 deletion dashboard/js/modules/jobs/modal-job.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<li>QOS: {{job.qos}}</li>
<li>partition: {{job.partition}}</li>
<li>workload: {{job.wckey}}</li>
<li>exclusive: {{yesOrNo (different job.exclusive)}}</li>
<li>exclusive: {{isExclusive job.shared}}</li>
<li>command: {{printCommand job.command}}</li>
<li>start time: {{printDateFromTimestamp job.start_time}}</li>
<li>eligible time: {{printDateFromTimestamp job.eligible_time}}</li>
Expand Down

0 comments on commit efb2327

Please sign in to comment.