From 018a240f84d8ceaf6a2e7b431e2b51b4845e2353 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Thu, 14 Dec 2023 11:19:42 -0500 Subject: [PATCH] Display table of all jobs on jobs page --- dist/index.js | 43 +++++++++++++++++++++++++++++++- dist/index.js.map | 2 +- src/index.ts | 40 +++++++++++++++++++++++++++++- views/index.hbs | 62 +++++++++++++++++++++++++++++++++++------------ 4 files changed, 129 insertions(+), 18 deletions(-) diff --git a/dist/index.js b/dist/index.js index aff219c..c4e88a6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -239,8 +239,49 @@ async function complete(id, meta) { }); }); } +async function all() { + const query = `SELECT * FROM queue ORDER BY created DESC;`; + return new Promise((resolve, reject) => { + return db.all(query, [], (err, rows) => { + if (err) + return reject(err); + return resolve(rows); + }); + }); +} +function annotate(row) { + row.hasModel = row.completed != null; + if (row.completed != null) { + row.status = 'Completed'; + } + else if (row.failed != null) { + row.status = 'Failed'; + } + else if (row.started != null) { + row.status = 'Training'; + } + else { + row.status = 'Waiting'; + } + return row; +} app.get('/', async (req, res, next) => { - const html = index({}); + let html; + let rows; + let input; + try { + rows = await all(); + } + catch (err) { + log.error(err); + return next('ERROR: Could not retrieve jobs from queue'); + } + rows = rows.map(annotate); + input = { + rows, + hasTable: typeof rows == 'undefined' ? false : rows.length > 0 + }; + html = index(input); res.send(html); }); app.post('/', uploadZip.single('dataset'), async (req, res, next) => { diff --git a/dist/index.js.map b/dist/index.js.map index 3f24b7c..923b25d 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA8B;AAE9B,2DAA6B;AAC7B,2BAAsC;AACtC,2BAA4B;AAC5B,+BAA4B;AAC5B,mCAA0C;AAC1C,qCAAmC;AACnC,8DAAqC;AACrC,oDAA4B;AAC5B,+BAAkC;AAClC,+BAA+B;AA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H,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,GAAa,EAAE,GAAa,EAAE,IAAmB,EAAE,EAAE;IACrF,IAAI,EAAW,CAAC;IAChB,IAAI,IAAI,GAAY,IAAI,CAAC;IAEzB,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,WAAW,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,IAAI,EAAE;QACnE,GAAG,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC;KAC/B;IAED,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,IAAI,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE;QACzC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;KACrB;IAED,IAAI;QACH,MAAM,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QACrB,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;KAC7B;IAAC,OAAO,GAAG,EAAE;QACb,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACf,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC;KACjC;IAED,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC,CAAC,CAAC;AAEH,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;IAC3B,KAAK,GAAG,MAAM,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAClD,GAAG,CAAC,IAAI,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 9d93c37..c18b447 100755 --- a/src/index.ts +++ b/src/index.ts @@ -217,8 +217,46 @@ async function complete (id : string, meta : string | null) : Promise { }); } +async function all () : Promise { + const query : string = `SELECT * FROM queue ORDER BY created DESC;`; + return new Promise((resolve : Function, reject : Function) => { + return db.all(query, [], (err : Error, rows : any) => { + if (err) return reject(err); + return resolve(rows); + }); + }); +} + +function annotate (row : any) { + row.hasModel = row.completed != null; + if (row.completed != null) { + row.status = 'Completed'; + } else if (row.failed != null) { + row.status = 'Failed'; + } else if (row.started != null) { + row.status = 'Training'; + } else { + row.status = 'Waiting'; + } + return row; +} + app.get('/', async (req : Request, res : Response, next : NextFunction) => { - const html = index({}); + let html : string; + let rows : any[]; + let input : any; + try { + rows = await all(); + } catch (err) { + log.error(err); + return next('ERROR: Could not retrieve jobs from queue'); + } + rows = rows.map(annotate); + input = { + rows, + hasTable : typeof rows == 'undefined' ? false : rows.length > 0 + }; + html = index(input); res.send(html); }); diff --git a/views/index.hbs b/views/index.hbs index 492b9fb..ad45120 100755 --- a/views/index.hbs +++ b/views/index.hbs @@ -3,20 +3,52 @@ YOLOv5 Training Web -
- -
- -
- -
- -
- -
+
+
+
+ +
+ +
+ +
+ +
+ +
+
+
+ {{#if hasTable}} + + + + + + + + + + {{#each rows}} + + + {{#if this.hasModel}} + + {{else}} + + {{/if}} + + + {{/each}} + +
JobModelStatus
{{this.name}}{{this.id}}{{this.id}}{{this.status}}
+ {{else}} +
No jobs listed in queue
+ {{/if}} +
+