@things-factory/integration-ui 5.0.0-zeta.20 → 5.0.0-zeta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/integration-monitor.js +42 -33
- package/client/pages/scenario.js +19 -15
- package/package.json +16 -17
|
@@ -195,21 +195,21 @@ export class IntegrationMonitor extends localize(i18next)(PageView) {
|
|
|
195
195
|
|
|
196
196
|
this.scenarioInstanceStateSubscription = await subscribe(
|
|
197
197
|
{
|
|
198
|
-
query: `
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
198
|
+
query: gql`
|
|
199
|
+
subscription {
|
|
200
|
+
scenarioInstanceState {
|
|
201
|
+
instanceName
|
|
202
|
+
scenarioName
|
|
203
|
+
state
|
|
204
|
+
progress {
|
|
205
|
+
rate
|
|
206
|
+
steps
|
|
207
|
+
step
|
|
208
|
+
rounds
|
|
210
209
|
}
|
|
211
210
|
}
|
|
212
|
-
|
|
211
|
+
}
|
|
212
|
+
`
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
next: async ({ data }) => {
|
|
@@ -246,24 +246,33 @@ export class IntegrationMonitor extends localize(i18next)(PageView) {
|
|
|
246
246
|
this.scenarios.splice(this.scenarios.indexOf(scenario), 1, { ...scenario })
|
|
247
247
|
this.scenarios = [...this.scenarios]
|
|
248
248
|
}
|
|
249
|
+
},
|
|
250
|
+
start: subscription => {
|
|
251
|
+
console.log(subscription)
|
|
252
|
+
},
|
|
253
|
+
error: error => {
|
|
254
|
+
console.log(error)
|
|
255
|
+
},
|
|
256
|
+
complete: () => {
|
|
257
|
+
console.log('complete')
|
|
249
258
|
}
|
|
250
259
|
}
|
|
251
260
|
)
|
|
252
261
|
|
|
253
262
|
this.scenarioQueueStateSubscription = await subscribe(
|
|
254
263
|
{
|
|
255
|
-
query: `
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
+
query: gql`
|
|
265
|
+
subscription {
|
|
266
|
+
scenarioQueueState {
|
|
267
|
+
queue {
|
|
268
|
+
stuff
|
|
269
|
+
due
|
|
270
|
+
priority
|
|
271
|
+
tag
|
|
264
272
|
}
|
|
265
273
|
}
|
|
266
|
-
|
|
274
|
+
}
|
|
275
|
+
`
|
|
267
276
|
},
|
|
268
277
|
{
|
|
269
278
|
next: ({ data }) => {
|
|
@@ -276,17 +285,17 @@ export class IntegrationMonitor extends localize(i18next)(PageView) {
|
|
|
276
285
|
|
|
277
286
|
this.connectionStateSubscription = await subscribe(
|
|
278
287
|
{
|
|
279
|
-
query: `
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
+
query: gql`
|
|
289
|
+
subscription {
|
|
290
|
+
connectionState {
|
|
291
|
+
id
|
|
292
|
+
name
|
|
293
|
+
description
|
|
294
|
+
type
|
|
295
|
+
state
|
|
288
296
|
}
|
|
289
|
-
|
|
297
|
+
}
|
|
298
|
+
`
|
|
290
299
|
},
|
|
291
300
|
{
|
|
292
301
|
next: async ({ data }) => {
|
package/client/pages/scenario.js
CHANGED
|
@@ -276,11 +276,11 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
async pageUpdated(changes, lifecycle) {
|
|
280
|
+
if (this.active) {
|
|
281
|
+
this.grist.fetch()
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
284
|
|
|
285
285
|
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
286
286
|
const response = await client.query({
|
|
@@ -458,12 +458,12 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
458
458
|
const state = response.data.startScenario.state
|
|
459
459
|
record.state = state
|
|
460
460
|
|
|
461
|
-
this.grist.refresh()
|
|
462
|
-
|
|
463
461
|
notify({
|
|
464
462
|
level: 'info',
|
|
465
463
|
message: `${IS_SCENARIO_RUNNING(state) ? 'success' : 'fail'} to start scenario : ${record.name}`
|
|
466
464
|
})
|
|
465
|
+
|
|
466
|
+
this.grist.fetch()
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
async stopScenario(record) {
|
|
@@ -480,15 +480,19 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
480
480
|
}
|
|
481
481
|
})
|
|
482
482
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
483
|
+
if (!response.errors) {
|
|
484
|
+
notify({
|
|
485
|
+
level: 'info',
|
|
486
|
+
message: `success to stop scenario : ${record.name}`
|
|
487
|
+
})
|
|
488
|
+
} else {
|
|
489
|
+
notify({
|
|
490
|
+
level: 'error',
|
|
491
|
+
message: `${response.errors.map(error => error.message).join('\n')}`
|
|
492
|
+
})
|
|
493
|
+
}
|
|
487
494
|
|
|
488
|
-
|
|
489
|
-
level: 'info',
|
|
490
|
-
message: `${IS_SCENARIO_RUNNING(state) ? 'fail' : 'success'} to stop scenario : ${record.name}`
|
|
491
|
-
})
|
|
495
|
+
this.grist.fetch()
|
|
492
496
|
}
|
|
493
497
|
|
|
494
498
|
async exportHandler() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-ui",
|
|
3
|
-
"version": "5.0.0-zeta.
|
|
3
|
+
"version": "5.0.0-zeta.23",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,21 +24,20 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@operato/app": "^1.0.0-beta.
|
|
28
|
-
"@operato/data-grist": "^1.0.0-beta.
|
|
29
|
-
"@operato/graphql": "^1.0.0-beta.
|
|
30
|
-
"@operato/grist-editor": "^1.0.0-beta.
|
|
31
|
-
"@operato/help": "^1.0.0-beta.
|
|
32
|
-
"@operato/i18n": "^1.0.0-beta.
|
|
33
|
-
"@operato/layout": "^1.0.0-beta.
|
|
34
|
-
"@operato/property-editor": "^1.0.0-beta.
|
|
35
|
-
"@operato/styles": "^1.0.0-beta.
|
|
36
|
-
"@operato/utils": "^1.0.0-beta.
|
|
37
|
-
"@things-factory/export-base": "^5.0.0-zeta.
|
|
38
|
-
"@things-factory/import-base": "^5.0.0-zeta.
|
|
39
|
-
"@things-factory/integration-base": "^5.0.0-zeta.
|
|
40
|
-
"moment-timezone": "^0.5.27"
|
|
41
|
-
"subscriptions-transport-ws": "^0.11.0"
|
|
27
|
+
"@operato/app": "^1.0.0-beta.49",
|
|
28
|
+
"@operato/data-grist": "^1.0.0-beta.49",
|
|
29
|
+
"@operato/graphql": "^1.0.0-beta.49",
|
|
30
|
+
"@operato/grist-editor": "^1.0.0-beta.49",
|
|
31
|
+
"@operato/help": "^1.0.0-beta.49",
|
|
32
|
+
"@operato/i18n": "^1.0.0-beta.49",
|
|
33
|
+
"@operato/layout": "^1.0.0-beta.49",
|
|
34
|
+
"@operato/property-editor": "^1.0.0-beta.49",
|
|
35
|
+
"@operato/styles": "^1.0.0-beta.49",
|
|
36
|
+
"@operato/utils": "^1.0.0-beta.49",
|
|
37
|
+
"@things-factory/export-base": "^5.0.0-zeta.23",
|
|
38
|
+
"@things-factory/import-base": "^5.0.0-zeta.23",
|
|
39
|
+
"@things-factory/integration-base": "^5.0.0-zeta.23",
|
|
40
|
+
"moment-timezone": "^0.5.27"
|
|
42
41
|
},
|
|
43
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "a77e5b8804e88e81b81bbc78c43663f4246e48b0"
|
|
44
43
|
}
|