From f6522475833c084c47f6a3c142feeca1c3b4261f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 24 May 2019 17:25:29 +0300 Subject: dashboard: Remove delete button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s really no point in having it --- contrib/dashboard.html | 2 +- contrib/dashboard.js | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) (limited to 'contrib') diff --git a/contrib/dashboard.html b/contrib/dashboard.html index 4468786..49a15bc 100644 --- a/contrib/dashboard.html +++ b/contrib/dashboard.html @@ -15,7 +15,7 @@

chromebot dashboard

- +
diff --git a/contrib/dashboard.js b/contrib/dashboard.js index e07f8e3..b854106 100644 --- a/contrib/dashboard.js +++ b/contrib/dashboard.js @@ -35,19 +35,12 @@ class Job { } let jobs = {}; -/* list of ignored job ids, i.e. those the user deleted from the dashboard */ -let ignored = []; let ws = new WebSocket(socket); ws.onmessage = function (event) { var msg = JSON.parse (event.data); let msgdate = new Date (Date.parse (msg.date)); var j = undefined; - console.log (msg); if (msg.job) { - if (ignored.includes (msg.job)) { - console.log ("job ignored", msg.job); - return; - } j = jobs[msg.job]; if (j === undefined) { j = new Job (msg.job, 'unknown', '', new Date ()); @@ -91,14 +84,8 @@ ws.onerror = function (event) { }; Vue.component('job-item', { - props: ['job', 'jobs', 'ignored'], - template: '', - methods: { - del: function (id) { - Vue.delete(this.jobs, id); - this.ignored.push (id); - } - } + props: ['job', 'jobs'], + template: '', }); Vue.component('job-status', { props: ['job'], -- cgit v1.2.3