diff --git a/templates/apps.html b/templates/apps.html index d31e1c1..03dfbc0 100644 --- a/templates/apps.html +++ b/templates/apps.html @@ -16,8 +16,8 @@ Day - {{app.name}} {{app.app_list}} {{app.state}} - #{{app.job_id}} {{app.job_state}} + {{app.name}} {{app.app_list}} {{app.state}} + #{{app.job_id}} {{app.job_state}} {{timestampToDate(app.created_time)}} {{timestampToDate(app.started_time)}} {{timestampToDate(app.end_time)}} @@ -44,6 +44,25 @@ if (timestamp === null) return ""; return new Date(timestamp * 1000).toLocaleString() + }, + appStateTagClass: function (appState) { + // this is one the only used one + if (appState == "working") + return {"is-success": true} + // other states notworking inprogress validated + if (appState == "") + return {"is-danger": true} + return {"is-danger": true} + }, + jobStateTagClass: function (jobState) { + if (jobState == "done") + return {"is-success": true} + if (jobState == "failure") + return {"is-danger": true} + if (jobState == "canceled") + return {"is-warning": true} + if (jobState == "running") + return {"is-info": true} } } })