|
14 | 14 | outlined |
15 | 15 | map-options |
16 | 16 | option-label="name" |
17 | | - :disable="loadingContent" |
18 | | - :loading="loadingContent" |
| 17 | + :disable="customLoading" |
| 18 | + :loading="customLoading" |
19 | 19 | /> |
20 | 20 | </div> |
21 | 21 | <div> |
22 | | - <q-btn |
23 | | - label="Exec" |
24 | | - :loading="loadingContent" |
25 | | - @click="notAvailableMessage" |
26 | | - class="q-mr-sm" |
27 | | - /> |
28 | 22 | <q-btn |
29 | 23 | label="Exec Locally" |
30 | | - :loading="loadingContent" |
31 | | - @click="execCodeOnCurrentGraph" |
32 | | - class="q-mr-sm" |
33 | | - /> |
34 | | - <q-btn |
35 | | - label="Exec All" |
36 | | - :loading="loadingContent" |
37 | | - @click="notAvailableMessage" |
| 24 | + :loading="customLoading" |
| 25 | + @click="execCodeOnCurrentGraphLocally" |
38 | 26 | class="q-mr-sm" |
39 | 27 | /> |
40 | 28 | <q-btn |
41 | 29 | label="Exec All Locally" |
42 | | - :loading="loadingContent" |
43 | | - @click="execCodeOnAllGraphs" |
| 30 | + :loading="customLoading" |
| 31 | + @click="execCodeOnAllGraphsLocally" |
44 | 32 | class="q-mr-sm" |
45 | 33 | /> |
46 | 34 | </div> |
|
53 | 41 | type="textarea" |
54 | 42 | outlined |
55 | 43 | label="Execution Result Json (Read Only)" |
56 | | - :loading="loadingContent" |
| 44 | + :loading="customLoading" |
57 | 45 | /> |
58 | 46 | </div> |
59 | 47 | </InfoCard> |
|
62 | 50 | <JSONSubmissionAttentionCard /> |
63 | 51 | <SubmitButton |
64 | 52 | class="full-width" |
65 | | - :loading="loadingContent" |
| 53 | + :loading="customLoading" |
66 | 54 | :action="postExecJson" |
67 | 55 | /> |
68 | 56 | </template> |
|
80 | 68 | errorDialog, |
81 | 69 | successDialog, |
82 | 70 | warningDialog, |
83 | | - notAvailableMessage, |
84 | 71 | } from '@/services/helpers'; |
85 | | - import pushCodeToLocalMixin from '@/components/mixins/PushCodeToLocalMixin'; |
| 72 | + import PushCodeToLocalMixin from '@/components/mixins/PushCodeToLocalMixin'; |
86 | 73 | import { newModelUUID } from '@/services/params'; |
87 | 74 |
|
88 | 75 | export default { |
89 | | - props: ['codeId', 'codeContent'], |
90 | | - mixins: [loadingMixin, pushCodeToLocalMixin], |
| 76 | + props: ['codeId', 'codeContent', 'updating'], |
| 77 | + mixins: [loadingMixin, PushCodeToLocalMixin], |
91 | 78 | components: { |
92 | 79 | JSONSubmissionAttentionCard: () => |
93 | 80 | import( |
|
113 | 100 | this.execResults[this.graphChoice.id] |
114 | 101 | ); |
115 | 102 | }, |
| 103 | + customLoading() { |
| 104 | + return this.loadingContent || this.updating; |
| 105 | + }, |
116 | 106 | allowSubmit() { |
117 | 107 | if (this.graphOptions) { |
118 | 108 | if (this.graphOptions.length === 0) { |
|
160 | 150 | data.code.execresultjsonSet.forEach((obj) => { |
161 | 151 | this.execResults[obj.graph.id] = obj.json; |
162 | 152 | }); |
| 153 | +
|
| 154 | + successDialog({ |
| 155 | + message: 'Fetched result JSON set.', |
| 156 | + }); |
163 | 157 | }) |
164 | 158 | .catch((err) => { |
165 | 159 | errorDialog({ |
|
185 | 179 | null |
186 | 180 | ); |
187 | 181 | }, |
188 | | - async execCodeOnCurrentGraph() { |
| 182 | + async execCodeOnCurrentGraphLocally() { |
189 | 183 | if (this.graphChoice) { |
190 | 184 | const graphJson = JSON.parse(this.graphChoice.cyjs); |
191 | 185 | const graphId = this.graphChoice.id; |
|
198 | 192 | }); |
199 | 193 | } |
200 | 194 | }, |
201 | | - async execCodeOnAllGraphs() { |
| 195 | + async execCodeOnAllGraphsLocally() { |
202 | 196 | this.startLoading(); |
203 | 197 | for (const obj of this.graphOptions) { |
204 | 198 | await this.localExec(JSON.parse(obj.cyjs), obj.id); |
|
233 | 227 | this.finishedLoading(); |
234 | 228 | }); |
235 | 229 | }, |
236 | | - notAvailableMessage, |
237 | 230 | }, |
238 | 231 | mounted() { |
239 | 232 | this.fetchTutorialGraphs(); |
|
0 commit comments