From aee1de063d6fdb77bf22915bed2f0ced92d6001b Mon Sep 17 00:00:00 2001 From: Maxim Samsonov Date: Sat, 25 May 2024 21:10:08 +0300 Subject: [PATCH] Three timeouts and improved statistics --- package-lock.json | 4 ++-- package.json | 2 +- src/components/Rounds_List.vue | 34 +++++++++++++++++++++++++++------- src/stores/auth.store.js | 4 +++- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2f8b0c..41263a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dkg-frontend", - "version": "0.5.0", + "version": "0.6.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dkg-frontend", - "version": "0.5.0", + "version": "0.6.7", "dependencies": { "@fortawesome/fontawesome-free": "^6.4.0", "@fortawesome/fontawesome-svg-core": "^6.4.0", diff --git a/package.json b/package.json index 50a9b8e..c791692 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dkg-frontend", - "version": "0.6.7", + "version": "0.6.8", "private": true, "scripts": { "dev": "vite", diff --git a/src/components/Rounds_List.vue b/src/components/Rounds_List.vue index b3b21ec..ff1baf5 100644 --- a/src/components/Rounds_List.vue +++ b/src/components/Rounds_List.vue @@ -49,10 +49,11 @@ const headers = [ { title: 'Status', align: 'center', key: 'status.name', sortable: true }, { title: 'Result', align: 'center', key: 'result', sortable: false }, { title: 'Max. nodes', align: 'center', key: 'maxNodes', sortable: false }, - { title: 'Timeout (s)', align: 'center', key: 'timeout', sortable: false }, + { title: 'Timeouts (s)', align: 'center', key: 'timeouts', sortable: false }, { title: 'Nodes', align: 'center', key: 'nodeCount', sortable: true }, { title: 'Running', align: 'center', key: 'nodeCountRunning', sortable: true }, { title: 'Failed', align: 'center', key: 'nodeCountFailed', sortable: true }, + { title: 'Timed Out', align: 'center', key: 'nodeCountTimedOut', sortable: true }, { title: 'Finished', align: 'center', key: 'nodeCountFinished', sortable: true }, { title: 'Lost', align: 'center', key: 'nodeCountLost', sortable: true }, { title: 'Created', align: 'center', key: 'createdOn', sortable: true }, @@ -135,13 +136,23 @@ function formatLostData(item) { if (tt > 0) str = tt.toString() } - return str; + return str +} + +function formatTimeouts(item) { + console.log(item) + let tt = item['timeout2'].toString() + tt = tt + '/' + item['timeout3'].toString() + tt = tt + '/' + item['timeoutR'].toString() + return tt } -async function newRound(maxNodes, timeout) { +async function newRound(maxNodes, timeout2, timeout3, timeoutR) { const roundSettings = { maxNodes: maxNodes, - timeout: timeout + timeout2: timeout2, + timeout3: timeout3, + timeoutR: timeoutR } roundsStore.add(roundSettings) .then(() => { @@ -246,15 +257,20 @@ function showCancel(item) {
@@ -274,6 +290,10 @@ function showCancel(item) { item-value="id" class="elevation-1" > + + diff --git a/src/stores/auth.store.js b/src/stores/auth.store.js index 24a832e..b2e7185 100644 --- a/src/stores/auth.store.js +++ b/src/stores/auth.store.js @@ -48,7 +48,9 @@ export const useAuthStore = defineStore({ rounds_sort_by: ['id'], rounds_page: 1, max_nodes: 256, - timeout: 120, + timeout2: 60, + timeout3: 120, + timeoutR: 120, returnUrl: null, re_jwt: null, re_tgt: null