From 5d028b60eec2fb4901ce56923c3de754d6c944c8 Mon Sep 17 00:00:00 2001 From: Thomas Chopitea Date: Wed, 3 Apr 2024 12:58:28 +0200 Subject: [PATCH] Export fixes (#169) --- src/components/TaskList.vue | 24 +++++++++++++++---- src/views/ExportList.vue | 43 ++++++++++++++++++++++++++++------- src/views/ExportTemplates.vue | 2 +- 3 files changed, 55 insertions(+), 14 deletions(-) diff --git a/src/components/TaskList.vue b/src/components/TaskList.vue index 1bbd3445..a14c23e2 100644 --- a/src/components/TaskList.vue +++ b/src/components/TaskList.vue @@ -48,10 +48,10 @@ - {{ moment.duration(item.frequency).humanize().replace("an ", "1 ").replace("a ", "1 ") }} + {{ moment.duration(item.frequency).humanize() }} - {{ item.last_run }} + {{ moment(item.last_run).format("YYYY-MM-DD HH:mm:ss") }} {{ item.description }} @@ -73,6 +73,16 @@ + + @@ -117,6 +127,10 @@ export default { selectableTasks: { type: Boolean, default: false + }, + downloadableTasks: { + type: Boolean, + default: false } }, data() { @@ -128,11 +142,11 @@ export default { { key: "name", title: "Name", sortable: true }, { key: "acts_on", title: "Acts On" }, { key: "frequency", title: "Runs every", sortable: true }, - { key: "last_run", title: "Last Run", width: "180px", sortable: true }, + { key: "last_run", title: "Last run", width: "180px", sortable: true }, { key: "description", title: "Description" }, { key: "status", title: "Status", width: "120px", sortable: true }, { key: "toggle", title: "Toggle", width: "80px" }, - { key: "refresh", title: "", width: "80px" } + { key: "refresh", title: "", width: "110px" } ], sortBy: [{ key: "name", order: "asc" }], selectedTask: null, @@ -147,7 +161,7 @@ export default { this.timer = setInterval(this.listTasks, 5000); this.$eventBus.on("taskUpdated", this.listTasks); }, - beforeDestroy() { + unmounted() { clearInterval(this.timer); }, methods: { diff --git a/src/views/ExportList.vue b/src/views/ExportList.vue index 8fab3067..e7a2dc2a 100644 --- a/src/views/ExportList.vue +++ b/src/views/ExportList.vue @@ -1,5 +1,12 @@