From 00770af0c70a0ebc256f34505703fde843e08f3b Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Dec 2022 13:14:03 +0100 Subject: [PATCH] Updating job shown as possibility although unsupported #243 --- src/components/JobPanel.vue | 34 +++++++++++++++++--------------- src/components/ServicePanel.vue | 26 +++++++++++++----------- src/components/WorkPanelMixin.js | 1 - 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/src/components/JobPanel.vue b/src/components/JobPanel.vue index 9e035b188..19bc19eca 100644 --- a/src/components/JobPanel.vue +++ b/src/components/JobPanel.vue @@ -38,7 +38,21 @@ export default { }, data() { return { - columns: { + watchers: {}, + jobUpdater: null, + runId: 0 + }; + }, + mounted() { + this.listen('replaceProcess', this.replaceProcess); + }, + computed: { + ...Utils.mapState(['connection']), + ...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']), + ...Utils.mapGetters('editor', ['hasProcess']), + ...Utils.mapState('editor', ['process']), + columns() { + return { id: { name: 'ID', primaryKey: true, @@ -48,7 +62,7 @@ export default { name: 'Batch Job', computedValue: row => Utils.getResourceTitle(row), format: value => Utils.formatIdOrTitle(value), - edit: this.updateTitle + edit: this.supportsUpdate ? this.updateTitle : null }, status: { name: 'Status', @@ -68,20 +82,8 @@ export default { filterable: false, sort: false } - }, - watchers: {}, - jobUpdater: null, - runId: 0 - }; - }, - mounted() { - this.listen('replaceProcess', this.replaceProcess); - }, - computed: { - ...Utils.mapState(['connection']), - ...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']), - ...Utils.mapGetters('editor', ['hasProcess']), - ...Utils.mapState('editor', ['process']), + }; + }, supportsStart() { return this.supports('startJob'); }, diff --git a/src/components/ServicePanel.vue b/src/components/ServicePanel.vue index e9ac88d9b..4db1d16b4 100644 --- a/src/components/ServicePanel.vue +++ b/src/components/ServicePanel.vue @@ -33,7 +33,16 @@ export default { }, data() { return { - columns: { + createdQuickViews: {} + }; + }, + computed: { + ...Utils.mapState('editor', ['process']), + ...Utils.mapGetters('editor', ['hasProcess']), + ...Utils.mapState(['serviceTypes']), + ...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']), + columns() { + return { id: { name: 'ID', primaryKey: true, @@ -43,7 +52,7 @@ export default { name: 'Web Service', computedValue: row => Utils.getResourceTitle(row), format: value => Utils.formatIdOrTitle(value), - edit: this.updateTitle + edit: this.supportsUpdate ? this.updateTitle : null }, type: { name: 'Type', @@ -51,7 +60,7 @@ export default { }, enabled: { name: 'Enabled', - edit: this.toggleEnabled + edit: this.supportsUpdate ? this.toggleEnabled : null }, created: { name: 'Submitted', @@ -63,15 +72,8 @@ export default { filterable: false, sort: false } - }, - createdQuickViews: {} - }; - }, - computed: { - ...Utils.mapState('editor', ['process']), - ...Utils.mapGetters('editor', ['hasProcess']), - ...Utils.mapState(['serviceTypes']), - ...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']), + }; + }, canShare() { return Array.isArray(this.$config.supportedBatchJobSharingServices) && this.$config.supportedBatchJobSharingServices.length > 0; }, diff --git a/src/components/WorkPanelMixin.js b/src/components/WorkPanelMixin.js index 4696f3724..06686f8be 100644 --- a/src/components/WorkPanelMixin.js +++ b/src/components/WorkPanelMixin.js @@ -8,7 +8,6 @@ export default (namespace, singular, plural, loadInitially = true) => { }, data() { return { - columns: {}, syncTimer: null, lastSyncTime: null };