@things-factory/integration-ui 4.0.0-alpha.7 → 4.0.0-beta.1
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/connection.js +16 -10
- package/client/pages/scenario.js +16 -11
- package/package.json +7 -7
- package/translations/en.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -1
- package/translations/zh.json +2 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import '@things-factory/grist-ui'
|
|
2
|
-
|
|
3
|
-
import { client, PageView, store } from '@things-factory/shell'
|
|
4
|
-
import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
|
|
5
|
-
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
6
|
-
import { HelpDecoratedRenderer } from '@things-factory/help'
|
|
2
|
+
|
|
7
3
|
import gql from 'graphql-tag'
|
|
8
4
|
import { css, html } from 'lit-element'
|
|
9
5
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
6
|
|
|
7
|
+
import { HelpDecoratedRenderer } from '@things-factory/help'
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, PageView, store } from '@things-factory/shell'
|
|
10
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
11
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
12
|
+
|
|
11
13
|
export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
12
14
|
static get properties() {
|
|
13
15
|
return {
|
|
@@ -54,7 +56,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
58
|
title: i18next.t('button.delete'),
|
|
57
|
-
action: this.
|
|
59
|
+
action: this._deleteConnections.bind(this),
|
|
58
60
|
...CommonButtonStyles.delete
|
|
59
61
|
}
|
|
60
62
|
]
|
|
@@ -124,7 +126,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
124
126
|
]
|
|
125
127
|
|
|
126
128
|
this.gristConfig = {
|
|
127
|
-
list: { fields: ['name', 'description', 'type'] },
|
|
129
|
+
list: { fields: ['name', 'description', 'type', 'active'] },
|
|
128
130
|
columns: [
|
|
129
131
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
130
132
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
@@ -154,6 +156,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
154
156
|
{
|
|
155
157
|
type: 'string',
|
|
156
158
|
name: 'name',
|
|
159
|
+
label: true,
|
|
157
160
|
header: i18next.t('field.name'),
|
|
158
161
|
record: {
|
|
159
162
|
editable: true
|
|
@@ -179,6 +182,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
179
182
|
{
|
|
180
183
|
type: 'string',
|
|
181
184
|
name: 'description',
|
|
185
|
+
label: true,
|
|
182
186
|
header: i18next.t('field.description'),
|
|
183
187
|
record: {
|
|
184
188
|
editable: true
|
|
@@ -188,6 +192,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
188
192
|
{
|
|
189
193
|
type: 'checkbox',
|
|
190
194
|
name: 'active',
|
|
195
|
+
label: true,
|
|
191
196
|
header: i18next.t('field.active'),
|
|
192
197
|
record: {
|
|
193
198
|
editable: true
|
|
@@ -198,6 +203,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
198
203
|
{
|
|
199
204
|
type: 'connector',
|
|
200
205
|
name: 'type',
|
|
206
|
+
label: true,
|
|
201
207
|
header: i18next.t('field.type'),
|
|
202
208
|
record: {
|
|
203
209
|
renderer: HelpDecoratedRenderer,
|
|
@@ -371,7 +377,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
371
377
|
})
|
|
372
378
|
}
|
|
373
379
|
|
|
374
|
-
async
|
|
380
|
+
async _deleteConnections(name) {
|
|
375
381
|
if (
|
|
376
382
|
confirm(
|
|
377
383
|
i18next.t('text.sure_to_x', {
|
|
@@ -383,8 +389,8 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
383
389
|
if (names && names.length > 0) {
|
|
384
390
|
const response = await client.mutate({
|
|
385
391
|
mutation: gql`
|
|
386
|
-
mutation($names: [String]!) {
|
|
387
|
-
|
|
392
|
+
mutation($names: [String!]!) {
|
|
393
|
+
deleteConnections(names: $names)
|
|
388
394
|
}
|
|
389
395
|
`,
|
|
390
396
|
variables: {
|
package/client/pages/scenario.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import '@things-factory/grist-ui'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
6
|
-
import { isMobileDevice } from '@things-factory/utils'
|
|
2
|
+
import './scenario-detail'
|
|
3
|
+
import './scenario-importer'
|
|
4
|
+
|
|
7
5
|
import gql from 'graphql-tag'
|
|
8
6
|
import { css, html } from 'lit-element'
|
|
9
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
7
|
import moment from 'moment-timezone'
|
|
11
|
-
import '
|
|
12
|
-
|
|
8
|
+
import { connect } from 'pwa-helpers/connect-mixin'
|
|
9
|
+
|
|
10
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
11
|
+
import { notify, openPopup } from '@things-factory/layout-base'
|
|
12
|
+
import { client, navigate, PageView, store } from '@things-factory/shell'
|
|
13
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
14
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
13
15
|
|
|
14
16
|
function IS_SCENARIO_RUNNING(state) {
|
|
15
17
|
return state && state !== 'UNLOADED'
|
|
@@ -216,6 +218,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
216
218
|
{
|
|
217
219
|
type: 'string',
|
|
218
220
|
name: 'name',
|
|
221
|
+
label: true,
|
|
219
222
|
header: i18next.t('field.name'),
|
|
220
223
|
record: {
|
|
221
224
|
editable: true
|
|
@@ -246,6 +249,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
246
249
|
{
|
|
247
250
|
type: 'string',
|
|
248
251
|
name: 'description',
|
|
252
|
+
label: true,
|
|
249
253
|
header: i18next.t('field.description'),
|
|
250
254
|
record: {
|
|
251
255
|
editable: true
|
|
@@ -255,6 +259,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
255
259
|
{
|
|
256
260
|
type: 'crontab',
|
|
257
261
|
name: 'schedule',
|
|
262
|
+
label: true,
|
|
258
263
|
header: i18next.t('field.schedule'),
|
|
259
264
|
record: {
|
|
260
265
|
editable: true
|
|
@@ -275,13 +280,13 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
275
280
|
{
|
|
276
281
|
type: 'checkbox',
|
|
277
282
|
name: 'active',
|
|
283
|
+
label: true,
|
|
278
284
|
header: i18next.t('field.active'),
|
|
279
285
|
record: {
|
|
280
286
|
editable: true
|
|
281
287
|
},
|
|
282
288
|
sortable: true,
|
|
283
|
-
width: 60
|
|
284
|
-
label: true
|
|
289
|
+
width: 60
|
|
285
290
|
},
|
|
286
291
|
{
|
|
287
292
|
type: 'object',
|
|
@@ -469,7 +474,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
469
474
|
if (!confirm(i18next.t('text.sure_to_x', { x: i18next.t('text.copy') }))) return
|
|
470
475
|
var response = await client.mutate({
|
|
471
476
|
mutation: gql`
|
|
472
|
-
mutation($ids: [String]!) {
|
|
477
|
+
mutation($ids: [String!]!) {
|
|
473
478
|
copyScenarios(ids: $ids) {
|
|
474
479
|
id
|
|
475
480
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-ui",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/export-base": "^4.0.0-
|
|
28
|
-
"@things-factory/import-base": "^4.0.0-
|
|
29
|
-
"@things-factory/integration-base": "^4.0.0-
|
|
30
|
-
"@things-factory/modeller-ui": "^4.0.0-
|
|
27
|
+
"@things-factory/export-base": "^4.0.0-beta.1",
|
|
28
|
+
"@things-factory/import-base": "^4.0.0-beta.1",
|
|
29
|
+
"@things-factory/integration-base": "^4.0.0-beta.1",
|
|
30
|
+
"@things-factory/modeller-ui": "^4.0.0-beta.1",
|
|
31
31
|
"moment-timezone": "^0.5.27",
|
|
32
|
-
"subscriptions-transport-ws": "^0.
|
|
32
|
+
"subscriptions-transport-ws": "^0.11.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "99c01f42759b9b426087544268cb68f10bc2e978"
|
|
35
35
|
}
|
package/translations/en.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"label.day-of-month": "day of month",
|
|
32
32
|
"label.day-of-week": "day of week",
|
|
33
33
|
"label.encoding": "encoding",
|
|
34
|
+
"label.encrypt": "encrypt",
|
|
34
35
|
"label.endian": "endian",
|
|
35
36
|
"label.error-propagation": "error propagation",
|
|
36
37
|
"label.examples": "examples",
|
|
@@ -109,4 +110,4 @@
|
|
|
109
110
|
"title.scenario-instance": "scenario instance",
|
|
110
111
|
"title.scenario-log": "scenario log",
|
|
111
112
|
"title.import scenario": "import scenario"
|
|
112
|
-
}
|
|
113
|
+
}
|
package/translations/ko.json
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"label.day-of-month": "날짜",
|
|
33
33
|
"label.day-of-week": "요일",
|
|
34
34
|
"label.encoding": "엔코딩",
|
|
35
|
+
"label.encrypt": "암호화",
|
|
35
36
|
"label.endian": "endian",
|
|
36
37
|
"label.error-propagation": "오류 전파",
|
|
37
38
|
"label.examples": "예시",
|
|
@@ -110,4 +111,4 @@
|
|
|
110
111
|
"title.scenario-instance": "시나리오 인스턴스",
|
|
111
112
|
"title.scenario-log": "시나리오 로그",
|
|
112
113
|
"title.import scenario": "시나리오 불러오기"
|
|
113
|
-
}
|
|
114
|
+
}
|
package/translations/ms.json
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"label.day-of-month": "hari bulan",
|
|
33
33
|
"label.day-of-week": "hari dalam seminggu",
|
|
34
34
|
"label.encoding": "pengekodan",
|
|
35
|
+
"label.encrypt": "[ms] encrypt",
|
|
35
36
|
"label.endian": "[ms] endian",
|
|
36
37
|
"label.error-propagation": "masalah dalam penyebaran",
|
|
37
38
|
"label.examples": "contoh",
|
|
@@ -110,4 +111,4 @@
|
|
|
110
111
|
"title.scenario-instance": "[ms] scenario instance",
|
|
111
112
|
"title.scenario-log": "[ms] scenario log",
|
|
112
113
|
"title.import scenario": "[ms] import scenario"
|
|
113
|
-
}
|
|
114
|
+
}
|
package/translations/zh.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"label.day-of-month": "月日",
|
|
32
32
|
"label.day-of-week": "星期几",
|
|
33
33
|
"label.encoding": "加密",
|
|
34
|
+
"label.encrypt": "[zh] encrypt",
|
|
34
35
|
"label.endian": "尾数",
|
|
35
36
|
"label.error-propagation": "错误传播",
|
|
36
37
|
"label.examples": "例子",
|
|
@@ -109,4 +110,4 @@
|
|
|
109
110
|
"title.scenario-instance": "场景实例",
|
|
110
111
|
"title.scenario-log": "场景日志",
|
|
111
112
|
"title.import scenario": "[zh] import scenario"
|
|
112
|
-
}
|
|
113
|
+
}
|