Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions middlewares/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ async function getJobsOfProject(req, res, next) {
data: null,
defaultContent: '<button type=\\"button\\" data-toggle=\\"tooltip\\" title=\\"Réinitialise le job\\" class=\\"reinit_job btn btn-sm btn-circle btn-warning\\"><i class=\\"fas fa-sync-alt fa-1x\\" aria-hidden=\\"true\\"></i></button>',
},
{
title: 'Hote',
data: 'job_host',
},
]);

next();
Expand Down
3 changes: 3 additions & 0 deletions routes/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ router.get('/jobs', topBar.getInfo, projects.getProjects, (req, res) => {
{ title: 'Date début', data: 'date' },
{ title: 'Heure début (UTC)', data: 'hms' },
{ title: 'Durée (s)', data: 'duree' },
{ title: 'Action', data: '' },
{ title: 'Hôte', data: 'job_host' },

]),
jobs: [],
base: req.app.get('baseUrl'),
Expand Down
8 changes: 1 addition & 7 deletions views/partials/tab/jobs_tab.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $(document).ready(function() {
"autoWidth": false,
"createdRow": function( row, data, dataIndex, cells ) {
if (data.job_status !== 'failed')
$('button', cells[9])[0].style.visibility = "hidden";
$('button', cells[7])[0].style.visibility = "hidden";
},
"rowCallback": function( row, data, index ) {
var job_id = $('td:eq(0)', row);
Expand All @@ -63,12 +63,6 @@ $(document).ready(function() {
var job_name = $('td:eq(1)', row);
job_name.html('<a href="<%= base %>/job/'+data.job_id+'">'+data.job_name+'</a>')

var project_id = $('td:eq(7)', row);
project_id.html('<a href="<%= base %>/project/'+data.job_id_project+'">'+data.job_id_project+'</a>')

var project_name = $('td:eq(8)', row);
project_name.html('<a href="<%= base %>/project/'+data.job_id_project+'">'+data.project_name+'</a>')

var status = data.job_status;
switch(status){
case "failed":
Expand Down
Loading