Skip to content

Commit

Permalink
Updating job shown as possibility although unsupported #243
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Dec 8, 2022
1 parent 6cfc16f commit 00770af
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 29 deletions.
34 changes: 18 additions & 16 deletions src/components/JobPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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',
Expand All @@ -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');
},
Expand Down
26 changes: 14 additions & 12 deletions src/components/ServicePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -43,15 +52,15 @@ 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',
format: value => typeof value === 'string' ? value.toUpperCase() : value,
},
enabled: {
name: 'Enabled',
edit: this.toggleEnabled
edit: this.supportsUpdate ? this.toggleEnabled : null
},
created: {
name: 'Submitted',
Expand All @@ -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;
},
Expand Down
1 change: 0 additions & 1 deletion src/components/WorkPanelMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default (namespace, singular, plural, loadInitially = true) => {
},
data() {
return {
columns: {},
syncTimer: null,
lastSyncTime: null
};
Expand Down

0 comments on commit 00770af

Please sign in to comment.