Skip to content

Commit 00770af

Browse files
committed
Updating job shown as possibility although unsupported #243
1 parent 6cfc16f commit 00770af

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

src/components/JobPanel.vue

+18-16
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,21 @@ export default {
3838
},
3939
data() {
4040
return {
41-
columns: {
41+
watchers: {},
42+
jobUpdater: null,
43+
runId: 0
44+
};
45+
},
46+
mounted() {
47+
this.listen('replaceProcess', this.replaceProcess);
48+
},
49+
computed: {
50+
...Utils.mapState(['connection']),
51+
...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']),
52+
...Utils.mapGetters('editor', ['hasProcess']),
53+
...Utils.mapState('editor', ['process']),
54+
columns() {
55+
return {
4256
id: {
4357
name: 'ID',
4458
primaryKey: true,
@@ -48,7 +62,7 @@ export default {
4862
name: 'Batch Job',
4963
computedValue: row => Utils.getResourceTitle(row),
5064
format: value => Utils.formatIdOrTitle(value),
51-
edit: this.updateTitle
65+
edit: this.supportsUpdate ? this.updateTitle : null
5266
},
5367
status: {
5468
name: 'Status',
@@ -68,20 +82,8 @@ export default {
6882
filterable: false,
6983
sort: false
7084
}
71-
},
72-
watchers: {},
73-
jobUpdater: null,
74-
runId: 0
75-
};
76-
},
77-
mounted() {
78-
this.listen('replaceProcess', this.replaceProcess);
79-
},
80-
computed: {
81-
...Utils.mapState(['connection']),
82-
...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']),
83-
...Utils.mapGetters('editor', ['hasProcess']),
84-
...Utils.mapState('editor', ['process']),
85+
};
86+
},
8587
supportsStart() {
8688
return this.supports('startJob');
8789
},

src/components/ServicePanel.vue

+14-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ export default {
3333
},
3434
data() {
3535
return {
36-
columns: {
36+
createdQuickViews: {}
37+
};
38+
},
39+
computed: {
40+
...Utils.mapState('editor', ['process']),
41+
...Utils.mapGetters('editor', ['hasProcess']),
42+
...Utils.mapState(['serviceTypes']),
43+
...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']),
44+
columns() {
45+
return {
3746
id: {
3847
name: 'ID',
3948
primaryKey: true,
@@ -43,15 +52,15 @@ export default {
4352
name: 'Web Service',
4453
computedValue: row => Utils.getResourceTitle(row),
4554
format: value => Utils.formatIdOrTitle(value),
46-
edit: this.updateTitle
55+
edit: this.supportsUpdate ? this.updateTitle : null
4756
},
4857
type: {
4958
name: 'Type',
5059
format: value => typeof value === 'string' ? value.toUpperCase() : value,
5160
},
5261
enabled: {
5362
name: 'Enabled',
54-
edit: this.toggleEnabled
63+
edit: this.supportsUpdate ? this.toggleEnabled : null
5564
},
5665
created: {
5766
name: 'Submitted',
@@ -63,15 +72,8 @@ export default {
6372
filterable: false,
6473
sort: false
6574
}
66-
},
67-
createdQuickViews: {}
68-
};
69-
},
70-
computed: {
71-
...Utils.mapState('editor', ['process']),
72-
...Utils.mapGetters('editor', ['hasProcess']),
73-
...Utils.mapState(['serviceTypes']),
74-
...Utils.mapGetters(['supports', 'supportsBilling', 'supportsBillingPlans']),
75+
};
76+
},
7577
canShare() {
7678
return Array.isArray(this.$config.supportedBatchJobSharingServices) && this.$config.supportedBatchJobSharingServices.length > 0;
7779
},

src/components/WorkPanelMixin.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default (namespace, singular, plural, loadInitially = true) => {
88
},
99
data() {
1010
return {
11-
columns: {},
1211
syncTimer: null,
1312
lastSyncTime: null
1413
};

0 commit comments

Comments
 (0)