From 4eee2a056d6017fa93f9c3424a4fe3aff6809d76 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 22 Jan 2019 02:34:22 +0100 Subject: [PATCH] [enh] better UX for index.html during loading --- templates/index.html | 46 ++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/templates/index.html b/templates/index.html index 7ffcd44..33d06f2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,22 +5,32 @@

Jobs display last done job of each app and next scheduled job

- - - - - - - - - - - - - - - -
AppStateCreated timeStarted timeEnd time
{{job.name}}{{job.name}} (deleted) #{{job.id}} {{job.state}}{{timestampToDate(job.created_time)}}{{timestampToDate(job.started_time)}}{{timestampToDate(job.end_time)}}
+
+ + + + + + + + +
+
+ + + + + + + +
+
+ +
AppStateCreated timeStarted timeEnd time
{{job.name}}{{job.name}} (deleted) #{{job.id}} {{job.state}}{{timestampToDate(job.created_time)}}{{timestampToDate(job.started_time)}}{{timestampToDate(job.end_time)}}
Not jobs available yet.
+
+
+ Loading... +
@@ -32,7 +42,8 @@ var app = new Vue({ el: '#jobs', data: { - jobs: [] + jobs: [], + inited: false, }, methods: { timestampToDate: function (timestamp) { @@ -52,6 +63,7 @@ if (action == "init_jobs") { app.jobs = data; + app.inited = true; } else if (action == "update_job") { for (var i = 0; i < app.jobs.length; ++i) { if (app.jobs[i].id == data.id) {