@things-factory/integration-ui 7.0.1-alpha.9 → 7.0.1-alpha.90
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/bootstrap.ts +1 -6
- package/client/editors/entity-selector.ts +9 -33
- package/client/editors/things-editor-entity-selector.ts +3 -3
- package/client/editors/things-editor-oracle-procedure.ts +9 -9
- package/client/grist/connection-selector.ts +0 -2
- package/client/grist/connector-selector.ts +0 -2
- package/client/grist/dynamic-selector.ts +1 -5
- package/client/pages/connection-importer.ts +6 -15
- package/client/pages/connection.ts +3 -2
- package/client/pages/scenario-detail.ts +7 -23
- package/client/pages/scenario-importer.ts +6 -15
- package/client/pages/scenario.ts +9 -24
- package/client/viewparts/connections-monitor.ts +10 -9
- package/client/viewparts/monitoring-summary.ts +4 -3
- package/client/viewparts/pending-q-monitor.ts +5 -3
- package/client/viewparts/scenario-instance-log-view.ts +7 -2
- package/client/viewparts/scenario-instance-monitor.ts +9 -6
- package/client/viewparts/scenario-monitor.ts +14 -14
- package/client/viewparts/scenarios-monitor.ts +7 -5
- package/dist-client/bootstrap.d.ts +0 -1
- package/dist-client/bootstrap.js +0 -1
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/editors/entity-selector.d.ts +1 -1
- package/dist-client/editors/entity-selector.js +9 -29
- package/dist-client/editors/entity-selector.js.map +1 -1
- package/dist-client/editors/things-editor-entity-selector.d.ts +1 -1
- package/dist-client/editors/things-editor-entity-selector.js +3 -3
- package/dist-client/editors/things-editor-entity-selector.js.map +1 -1
- package/dist-client/editors/things-editor-oracle-procedure.d.ts +1 -1
- package/dist-client/editors/things-editor-oracle-procedure.js +9 -9
- package/dist-client/editors/things-editor-oracle-procedure.js.map +1 -1
- package/dist-client/grist/connection-selector.d.ts +0 -1
- package/dist-client/grist/connection-selector.js +0 -1
- package/dist-client/grist/connection-selector.js.map +1 -1
- package/dist-client/grist/connector-selector.d.ts +0 -1
- package/dist-client/grist/connector-selector.js +0 -1
- package/dist-client/grist/connector-selector.js.map +1 -1
- package/dist-client/grist/dynamic-selector.d.ts +0 -1
- package/dist-client/grist/dynamic-selector.js +0 -1
- package/dist-client/grist/dynamic-selector.js.map +1 -1
- package/dist-client/pages/connection-importer.d.ts +1 -0
- package/dist-client/pages/connection-importer.js +6 -15
- package/dist-client/pages/connection-importer.js.map +1 -1
- package/dist-client/pages/connection.js +3 -2
- package/dist-client/pages/connection.js.map +1 -1
- package/dist-client/pages/scenario-detail.d.ts +1 -0
- package/dist-client/pages/scenario-detail.js +7 -23
- package/dist-client/pages/scenario-detail.js.map +1 -1
- package/dist-client/pages/scenario-importer.d.ts +1 -0
- package/dist-client/pages/scenario-importer.js +6 -15
- package/dist-client/pages/scenario-importer.js.map +1 -1
- package/dist-client/pages/scenario.js +4 -16
- package/dist-client/pages/scenario.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/connections-monitor.d.ts +1 -1
- package/dist-client/viewparts/connections-monitor.js +10 -9
- package/dist-client/viewparts/connections-monitor.js.map +1 -1
- package/dist-client/viewparts/monitoring-summary.d.ts +1 -0
- package/dist-client/viewparts/monitoring-summary.js +4 -3
- package/dist-client/viewparts/monitoring-summary.js.map +1 -1
- package/dist-client/viewparts/pending-q-monitor.d.ts +1 -0
- package/dist-client/viewparts/pending-q-monitor.js +4 -3
- package/dist-client/viewparts/pending-q-monitor.js.map +1 -1
- package/dist-client/viewparts/scenario-instance-log-view.d.ts +2 -1
- package/dist-client/viewparts/scenario-instance-log-view.js +7 -2
- package/dist-client/viewparts/scenario-instance-log-view.js.map +1 -1
- package/dist-client/viewparts/scenario-instance-monitor.d.ts +1 -1
- package/dist-client/viewparts/scenario-instance-monitor.js +9 -6
- package/dist-client/viewparts/scenario-instance-monitor.js.map +1 -1
- package/dist-client/viewparts/scenario-monitor.d.ts +1 -1
- package/dist-client/viewparts/scenario-monitor.js +13 -14
- package/dist-client/viewparts/scenario-monitor.js.map +1 -1
- package/dist-client/viewparts/scenarios-monitor.d.ts +1 -1
- package/dist-client/viewparts/scenarios-monitor.js +6 -5
- package/dist-client/viewparts/scenarios-monitor.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
package/client/bootstrap.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import '@material/mwc-icon'
|
|
2
1
|
import './editors/entity-editor'
|
|
3
2
|
import './editors/property-editor'
|
|
4
3
|
|
|
5
4
|
import { OxGristEditorJson } from '@operato/app/grist-editor/ox-grist-editor-json.js'
|
|
6
5
|
import { OxGristRendererCrontab } from '@operato/app/grist-editor/ox-grist-renderer-crontab.js'
|
|
7
|
-
import {
|
|
8
|
-
registerEditor as registerGristEditor,
|
|
9
|
-
registerRenderer as registerGristRenderer,
|
|
10
|
-
OxGristRendererJson5
|
|
11
|
-
} from '@operato/data-grist'
|
|
6
|
+
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer, OxGristRendererJson5 } from '@operato/data-grist'
|
|
12
7
|
import { OxGristEditorCrontab } from '@operato/grist-editor/ox-grist-editor-crontab.js'
|
|
13
8
|
import { OxGristEditorPrivilege } from '@operato/app/grist-editor/ox-grist-editor-privilege.js'
|
|
14
9
|
import { OxGristEditorParameters } from '@operato/grist-editor/ox-grist-editor-parameters.js'
|
|
@@ -8,11 +8,13 @@ import { DataGrist } from '@operato/data-grist/ox-grist.js'
|
|
|
8
8
|
import { buildArgs, client } from '@operato/graphql'
|
|
9
9
|
import { i18next } from '@operato/i18n'
|
|
10
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
-
import { MultiColumnFormStyles } from '@
|
|
11
|
+
import { MultiColumnFormStyles } from '@operato/form'
|
|
12
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
12
13
|
|
|
13
14
|
@customElement('entity-selector')
|
|
14
15
|
export class EntitySelector extends LitElement {
|
|
15
16
|
static styles = [
|
|
17
|
+
ButtonContainerStyles,
|
|
16
18
|
MultiColumnFormStyles,
|
|
17
19
|
css`
|
|
18
20
|
:host {
|
|
@@ -26,11 +28,6 @@ export class EntitySelector extends LitElement {
|
|
|
26
28
|
flex: 1;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
.button-container {
|
|
30
|
-
display: flex;
|
|
31
|
-
margin-left: auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
31
|
form {
|
|
35
32
|
position: relative;
|
|
36
33
|
}
|
|
@@ -68,16 +65,11 @@ export class EntitySelector extends LitElement {
|
|
|
68
65
|
.fields="${this.searchFields}"
|
|
69
66
|
></search-form>
|
|
70
67
|
|
|
71
|
-
<ox-grist
|
|
72
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
73
|
-
.config=${this.config}
|
|
74
|
-
.data=${this.data}
|
|
75
|
-
.fetchHandler="${this.fetchHandler.bind(this)}"
|
|
76
|
-
></ox-grist>
|
|
68
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data} .fetchHandler="${this.fetchHandler.bind(this)}"></ox-grist>
|
|
77
69
|
|
|
78
70
|
<div class="button-container">
|
|
79
|
-
<
|
|
80
|
-
<
|
|
71
|
+
<button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
72
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>check</md-icon>${i18next.t('button.confirm')}</button>
|
|
81
73
|
</div>
|
|
82
74
|
`
|
|
83
75
|
}
|
|
@@ -168,21 +160,9 @@ export class EntitySelector extends LitElement {
|
|
|
168
160
|
return {
|
|
169
161
|
label: selectField.header || i18next.t(`field.${selectField.name}`),
|
|
170
162
|
name: selectField.name,
|
|
171
|
-
type:
|
|
172
|
-
fieldType === 'string'
|
|
173
|
-
? 'text'
|
|
174
|
-
: numberTypes.indexOf(fieldType) >= 0
|
|
175
|
-
? 'number'
|
|
176
|
-
: fieldType === 'boolean'
|
|
177
|
-
? 'checkbox'
|
|
178
|
-
: fieldType,
|
|
163
|
+
type: fieldType === 'string' ? 'text' : numberTypes.indexOf(fieldType) >= 0 ? 'number' : fieldType === 'boolean' ? 'checkbox' : fieldType,
|
|
179
164
|
queryName: selectField.queryName,
|
|
180
|
-
props:
|
|
181
|
-
fieldType === 'string'
|
|
182
|
-
? { searchOper: 'i_like' }
|
|
183
|
-
: fieldType === 'object'
|
|
184
|
-
? { searchOper: 'in' }
|
|
185
|
-
: { searchOper: 'eq' },
|
|
165
|
+
props: fieldType === 'string' ? { searchOper: 'i_like' } : fieldType === 'object' ? { searchOper: 'in' } : { searchOper: 'eq' },
|
|
186
166
|
attrs: fieldType === 'boolean' ? ['indeterminated'] : []
|
|
187
167
|
}
|
|
188
168
|
})
|
|
@@ -273,11 +253,7 @@ export class EntitySelector extends LitElement {
|
|
|
273
253
|
return `items {
|
|
274
254
|
${this.select.map(selectField => {
|
|
275
255
|
return selectField.type === 'object'
|
|
276
|
-
? `${selectField.name} { ${
|
|
277
|
-
selectField.subFields && selectField.subFields.length > 0
|
|
278
|
-
? selectField.subFields.join(' ')
|
|
279
|
-
: `id name description`
|
|
280
|
-
} }`
|
|
256
|
+
? `${selectField.name} { ${selectField.subFields && selectField.subFields.length > 0 ? selectField.subFields.join(' ') : `id name description`} }`
|
|
281
257
|
: `${selectField.name}`
|
|
282
258
|
})}
|
|
283
259
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '@material/
|
|
5
|
+
import '@material/web/icon/icon.js'
|
|
6
6
|
import './entity-selector'
|
|
7
7
|
|
|
8
8
|
import { css, html, LitElement } from 'lit'
|
|
@@ -26,7 +26,7 @@ export default class ThingsEditorEntitySelector extends LitElement {
|
|
|
26
26
|
height: 100%;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
md-icon {
|
|
30
30
|
position: absolute;
|
|
31
31
|
top: 0;
|
|
32
32
|
right: 0;
|
|
@@ -50,7 +50,7 @@ export default class ThingsEditorEntitySelector extends LitElement {
|
|
|
50
50
|
return html`
|
|
51
51
|
<input id="text" type="text" .value=${this.value || ''} @change=${e => this._onInputChanged(e)} />
|
|
52
52
|
|
|
53
|
-
<
|
|
53
|
+
<md-icon @click=${e => this.openSelector()}>dashboard</md-icon>
|
|
54
54
|
`
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '@material/
|
|
5
|
+
import '@material/web/icon/icon.js'
|
|
6
6
|
|
|
7
7
|
import '@operato/i18n/ox-i18n.js'
|
|
8
8
|
import { css, html } from 'lit'
|
|
@@ -82,8 +82,8 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
82
82
|
margin-left: -5px;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
button
|
|
86
|
-
|
|
85
|
+
button md-icon {
|
|
86
|
+
--md-icon-size: var(--fontsize-default);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
button:focus,
|
|
@@ -194,13 +194,13 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
194
194
|
<input type="number" data-max-size placeholder="max-size" .value=${String(item.maxSize)} />
|
|
195
195
|
|
|
196
196
|
<button class="record-action" @click=${(e: MouseEvent) => this._delete(e)} tabindex="-1">
|
|
197
|
-
<
|
|
197
|
+
<md-icon>remove</md-icon>
|
|
198
198
|
</button>
|
|
199
199
|
<button class="record-action" @click=${(e: MouseEvent) => this._up(e)} tabindex="-1">
|
|
200
|
-
<
|
|
200
|
+
<md-icon>arrow_upward</md-icon>
|
|
201
201
|
</button>
|
|
202
202
|
<button class="record-action" @click=${(e: MouseEvent) => this._down(e)} tabindex="-1">
|
|
203
|
-
<
|
|
203
|
+
<md-icon>arrow_downward</md-icon>
|
|
204
204
|
</button>
|
|
205
205
|
</div>
|
|
206
206
|
`
|
|
@@ -231,10 +231,10 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
231
231
|
<input type="number" data-max-size placeholder="max-size" value="" />
|
|
232
232
|
|
|
233
233
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
|
234
|
-
<
|
|
234
|
+
<md-icon>add</md-icon>
|
|
235
235
|
</button>
|
|
236
|
-
<button class="hidden"><
|
|
237
|
-
<button class="hidden"><
|
|
236
|
+
<button class="hidden"><md-icon>add</md-icon></button>
|
|
237
|
+
<button class="hidden"><md-icon>add</md-icon></button>
|
|
238
238
|
</div>
|
|
239
239
|
|
|
240
240
|
<datalist id="step-list">${steps.map(id => html` <option value=${id}></option> `)}</datalist>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import '@material/mwc-icon'
|
|
2
|
-
|
|
3
1
|
import { OxGristEditor } from '@operato/data-grist'
|
|
4
2
|
import { html } from 'lit'
|
|
5
3
|
|
|
@@ -35,9 +33,7 @@ export class DynamicSelector extends OxGristEditor {
|
|
|
35
33
|
|
|
36
34
|
return html`
|
|
37
35
|
<select>
|
|
38
|
-
${options.map(
|
|
39
|
-
option => html` <option ?selected=${option.name == this.value} value=${option.name}>${option.name}</option> `
|
|
40
|
-
)}
|
|
36
|
+
${options.map(option => html` <option ?selected=${option.name == this.value} value=${option.name}>${option.name}</option> `)}
|
|
41
37
|
</select>
|
|
42
38
|
`
|
|
43
39
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,11 +8,12 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
10
|
-
import { CommonGristStyles } from '@operato/styles'
|
|
11
|
+
import { ButtonContainerStyles, CommonGristStyles } from '@operato/styles'
|
|
11
12
|
|
|
12
13
|
@customElement('connection-importer')
|
|
13
14
|
export class ConnectionImporter extends LitElement {
|
|
14
15
|
static styles = [
|
|
16
|
+
ButtonContainerStyles,
|
|
15
17
|
CommonGristStyles,
|
|
16
18
|
css`
|
|
17
19
|
:host {
|
|
@@ -20,17 +22,10 @@ export class ConnectionImporter extends LitElement {
|
|
|
20
22
|
|
|
21
23
|
background-color: #fff;
|
|
22
24
|
}
|
|
25
|
+
|
|
23
26
|
ox-grist {
|
|
24
27
|
flex: 1;
|
|
25
28
|
}
|
|
26
|
-
.button-container {
|
|
27
|
-
display: flex;
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
padding: var(--padding-default);
|
|
30
|
-
}
|
|
31
|
-
mwc-button {
|
|
32
|
-
margin-left: var(--margin-default);
|
|
33
|
-
}
|
|
34
29
|
`
|
|
35
30
|
]
|
|
36
31
|
|
|
@@ -68,14 +63,10 @@ export class ConnectionImporter extends LitElement {
|
|
|
68
63
|
|
|
69
64
|
render() {
|
|
70
65
|
return html`
|
|
71
|
-
<ox-grist
|
|
72
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
73
|
-
.config=${this.columns}
|
|
74
|
-
.data=${{ records: this.connections }}
|
|
75
|
-
></ox-grist>
|
|
66
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.columns} .data=${{ records: this.connections }}></ox-grist>
|
|
76
67
|
|
|
77
68
|
<div class="button-container">
|
|
78
|
-
<
|
|
69
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
79
70
|
</div>
|
|
80
71
|
`
|
|
81
72
|
}
|
|
@@ -214,7 +214,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
214
214
|
width: 100
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
|
-
type: 'object',
|
|
217
|
+
type: 'resource-object',
|
|
218
218
|
name: 'edge',
|
|
219
219
|
header: i18next.t('field.edge-server'),
|
|
220
220
|
record: {
|
|
@@ -227,7 +227,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
227
227
|
width: 120
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
|
-
type: 'object',
|
|
230
|
+
type: 'resource-object',
|
|
231
231
|
name: 'updater',
|
|
232
232
|
header: i18next.t('field.updater'),
|
|
233
233
|
record: {
|
|
@@ -321,6 +321,7 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
|
|
|
321
321
|
label
|
|
322
322
|
placeholder
|
|
323
323
|
property
|
|
324
|
+
styles
|
|
324
325
|
}
|
|
325
326
|
}
|
|
326
327
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist/ox-grist.js'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -9,12 +10,14 @@ import { client } from '@operato/graphql'
|
|
|
9
10
|
import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'
|
|
10
11
|
import { i18next, localize } from '@operato/i18n'
|
|
11
12
|
import { isMobileDevice } from '@operato/utils'
|
|
13
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
12
14
|
|
|
13
15
|
const SelectFields = ['name', 'description', 'sequence', 'task', 'connection', 'params', 'result', 'skip', 'log']
|
|
14
16
|
|
|
15
17
|
@customElement('scenario-detail')
|
|
16
18
|
class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
17
19
|
static styles = [
|
|
20
|
+
ButtonContainerStyles,
|
|
18
21
|
css`
|
|
19
22
|
:host {
|
|
20
23
|
display: flex;
|
|
@@ -26,22 +29,6 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
26
29
|
ox-grist {
|
|
27
30
|
flex: 1;
|
|
28
31
|
}
|
|
29
|
-
|
|
30
|
-
.button-container {
|
|
31
|
-
display: flex;
|
|
32
|
-
margin-left: auto;
|
|
33
|
-
padding: var(--padding-default);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
form {
|
|
37
|
-
position: relative;
|
|
38
|
-
}
|
|
39
|
-
[danger] {
|
|
40
|
-
--mdc-theme-primary: var(--mdc-danger-button-primary-color);
|
|
41
|
-
}
|
|
42
|
-
mwc-button {
|
|
43
|
-
margin-left: var(--margin-default);
|
|
44
|
-
}
|
|
45
32
|
`
|
|
46
33
|
]
|
|
47
34
|
|
|
@@ -53,14 +40,10 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
53
40
|
|
|
54
41
|
render() {
|
|
55
42
|
return html`
|
|
56
|
-
<ox-grist
|
|
57
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
58
|
-
.config=${this.gristConfig}
|
|
59
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
60
|
-
></ox-grist>
|
|
43
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
|
|
61
44
|
<div class="button-container">
|
|
62
|
-
<
|
|
63
|
-
<
|
|
45
|
+
<button danger @click=${this._deleteSteps.bind(this)}><md-icon>delete</md-icon>${i18next.t('button.delete')}</button>
|
|
46
|
+
<button @click=${this._updateSteps.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
64
47
|
</div>
|
|
65
48
|
`
|
|
66
49
|
}
|
|
@@ -253,6 +236,7 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
253
236
|
label
|
|
254
237
|
placeholder
|
|
255
238
|
property
|
|
239
|
+
styles
|
|
256
240
|
}
|
|
257
241
|
}
|
|
258
242
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,11 +8,12 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
10
|
-
import { CommonGristStyles } from '@operato/styles'
|
|
11
|
+
import { ButtonContainerStyles, CommonGristStyles } from '@operato/styles'
|
|
11
12
|
|
|
12
13
|
@customElement('scenario-importer')
|
|
13
14
|
export class ScenarioImporter extends LitElement {
|
|
14
15
|
static styles = [
|
|
16
|
+
ButtonContainerStyles,
|
|
15
17
|
CommonGristStyles,
|
|
16
18
|
css`
|
|
17
19
|
:host {
|
|
@@ -20,17 +22,10 @@ export class ScenarioImporter extends LitElement {
|
|
|
20
22
|
|
|
21
23
|
background-color: #fff;
|
|
22
24
|
}
|
|
25
|
+
|
|
23
26
|
ox-grist {
|
|
24
27
|
flex: 1;
|
|
25
28
|
}
|
|
26
|
-
.button-container {
|
|
27
|
-
display: flex;
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
padding: var(--padding-default);
|
|
30
|
-
}
|
|
31
|
-
mwc-button {
|
|
32
|
-
margin-left: var(--margin-default);
|
|
33
|
-
}
|
|
34
29
|
`
|
|
35
30
|
]
|
|
36
31
|
|
|
@@ -74,14 +69,10 @@ export class ScenarioImporter extends LitElement {
|
|
|
74
69
|
|
|
75
70
|
render() {
|
|
76
71
|
return html`
|
|
77
|
-
<ox-grist
|
|
78
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
79
|
-
.config=${this.columns}
|
|
80
|
-
.data=${{ records: this.scenarios }}
|
|
81
|
-
></ox-grist>
|
|
72
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.columns} .data=${{ records: this.scenarios }}></ox-grist>
|
|
82
73
|
|
|
83
74
|
<div class="button-container">
|
|
84
|
-
<
|
|
75
|
+
<button @click=${this.save.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
85
76
|
</div>
|
|
86
77
|
`
|
|
87
78
|
}
|
package/client/pages/scenario.ts
CHANGED
|
@@ -5,7 +5,7 @@ import './scenario-importer'
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
6
|
import { css, html } from 'lit'
|
|
7
7
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
8
|
-
import moment from 'moment-timezone'
|
|
8
|
+
import moment from '@operato/moment-timezone-es'
|
|
9
9
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
10
|
|
|
11
11
|
import { DataGrist } from '@operato/data-grist/ox-grist.js'
|
|
@@ -115,14 +115,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
render() {
|
|
118
|
-
return html`
|
|
119
|
-
<ox-grist
|
|
120
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
121
|
-
.config=${this.gristConfig}
|
|
122
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
123
|
-
>
|
|
124
|
-
</ox-grist>
|
|
125
|
-
`
|
|
118
|
+
return html` <ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist> `
|
|
126
119
|
}
|
|
127
120
|
|
|
128
121
|
async pageInitialized(lifecycle) {
|
|
@@ -181,21 +174,12 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
181
174
|
handlers: {
|
|
182
175
|
click: (columns, data, column, record, rowIndex) => {
|
|
183
176
|
if (!record.id) return
|
|
184
|
-
openPopup(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
></scenario-detail>
|
|
191
|
-
`,
|
|
192
|
-
{
|
|
193
|
-
backdrop: true,
|
|
194
|
-
help: 'integration/ui/scenario-detail',
|
|
195
|
-
size: 'large',
|
|
196
|
-
title: i18next.t('title.scenario-detail')
|
|
197
|
-
}
|
|
198
|
-
)
|
|
177
|
+
openPopup(html` <scenario-detail .scenario=${record} .taskTypes=${this.taskTypes} @requestRefresh="${() => this.grist.fetch()}"></scenario-detail> `, {
|
|
178
|
+
backdrop: true,
|
|
179
|
+
help: 'integration/ui/scenario-detail',
|
|
180
|
+
size: 'large',
|
|
181
|
+
title: i18next.t('title.scenario-detail')
|
|
182
|
+
})
|
|
199
183
|
}
|
|
200
184
|
}
|
|
201
185
|
},
|
|
@@ -396,6 +380,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
396
380
|
label
|
|
397
381
|
placeholder
|
|
398
382
|
property
|
|
383
|
+
styles
|
|
399
384
|
}
|
|
400
385
|
}
|
|
401
386
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -67,21 +67,24 @@ export class ConnectionsMonitor extends LitElement {
|
|
|
67
67
|
background-color: var(--primary-color);
|
|
68
68
|
margin-left: var(--margin-narrow);
|
|
69
69
|
}
|
|
70
|
+
|
|
70
71
|
[buttons] {
|
|
71
|
-
--
|
|
72
|
-
--mdc-icon-size: 20px;
|
|
72
|
+
--md-icon-size: 20px;
|
|
73
73
|
border-top: 1px dashed rgba(0, 0, 0, 0.1);
|
|
74
74
|
margin: var(--margin-narrow) 0 0 0;
|
|
75
75
|
padding: var(--padding-narrow) 0 0 0;
|
|
76
76
|
text-align: right;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
[buttons] md-icon {
|
|
79
80
|
color: rgba(var(--secondary-color-rgb), 0.8);
|
|
80
81
|
}
|
|
82
|
+
|
|
81
83
|
@media screen and (max-width: 480px) {
|
|
82
84
|
h2 {
|
|
83
85
|
padding: var(--padding-narrow);
|
|
84
86
|
}
|
|
87
|
+
|
|
85
88
|
[card] span {
|
|
86
89
|
display: none;
|
|
87
90
|
}
|
|
@@ -113,11 +116,9 @@ export class ConnectionsMonitor extends LitElement {
|
|
|
113
116
|
<span>${description}</span>
|
|
114
117
|
<span>Type : ${type}</span>
|
|
115
118
|
<div buttons>
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
label=${connected ? 'disconnect' : 'connect'}
|
|
120
|
-
></mwc-icon-button>
|
|
119
|
+
<md-icon @click=${e => (connected ? this.disconnect(connection) : this.connect(connection))} title=${connected ? 'disconnect' : 'connect'}
|
|
120
|
+
>${connected ? 'link_off' : 'link'}</md-icon
|
|
121
|
+
>
|
|
121
122
|
</div>
|
|
122
123
|
</div>
|
|
123
124
|
`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -56,8 +57,8 @@ export class IntegrationMonitoringSummary extends localize(i18next)(LitElement)
|
|
|
56
57
|
[card]:nth-child(4) {
|
|
57
58
|
border-right: none;
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
md-icon {
|
|
61
|
+
--md-icon-size: var(--fontsize-large);
|
|
61
62
|
}
|
|
62
63
|
span {
|
|
63
64
|
line-height: 1;
|
|
@@ -124,7 +125,7 @@ export class IntegrationMonitoringSummary extends localize(i18next)(LitElement)
|
|
|
124
125
|
return html`
|
|
125
126
|
<div card>
|
|
126
127
|
<span>${title}</span>
|
|
127
|
-
<
|
|
128
|
+
<md-icon>${icon}</md-icon>
|
|
128
129
|
<strong> ${value}</strong>
|
|
129
130
|
</div>
|
|
130
131
|
`
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { css, html, LitElement } from 'lit'
|
|
2
4
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
3
5
|
import { asyncReplace } from 'lit/directives/async-replace.js'
|
|
@@ -23,9 +25,9 @@ export class PendingQMonitor extends LitElement {
|
|
|
23
25
|
display: flex;
|
|
24
26
|
align-items: center;
|
|
25
27
|
}
|
|
26
|
-
[tags]
|
|
28
|
+
[tags] md-icon {
|
|
29
|
+
--md-icon-size: var(--fontsize-large);
|
|
27
30
|
margin: 0 var(--margin-narrow) 0 0;
|
|
28
|
-
font-size: var(--fontsize-large);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
select {
|
|
@@ -123,7 +125,7 @@ export class PendingQMonitor extends LitElement {
|
|
|
123
125
|
|
|
124
126
|
return html`
|
|
125
127
|
<div tags>
|
|
126
|
-
<
|
|
128
|
+
<md-icon>bookmark_border</md-icon>
|
|
127
129
|
<select @change=${e => (this.tag = e.target.value)} .value=${tag}>
|
|
128
130
|
<option value="(*)">*</option>
|
|
129
131
|
${Object.keys(this.tags || {})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/fab/fab.js'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
4
5
|
|
|
@@ -84,7 +85,11 @@ export class ScenarioInstanceLogView extends connect(store)(LitElement) {
|
|
|
84
85
|
({ timestamp, message, level }) => html` <div class="${level}"><span>${new Date(timestamp).toLocaleString()}</span> <strong>${level}</strong> ${message}</div> `
|
|
85
86
|
)}
|
|
86
87
|
</div>
|
|
87
|
-
${this.startable
|
|
88
|
+
${this.startable
|
|
89
|
+
? html`<md-fab id="start" title="start" @click=${() => this.dispatchEvent(new CustomEvent('start'))}>
|
|
90
|
+
<md-icon slot="icon">play_arrow</md-icon>
|
|
91
|
+
</md-fab>`
|
|
92
|
+
: nothing}
|
|
88
93
|
`
|
|
89
94
|
}
|
|
90
95
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
|
-
import '@material/mwc-icon'
|
|
3
3
|
import './scenario-instance-view'
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
@@ -59,6 +59,7 @@ export class ScenarioInstanceMonitor extends localize(i18next)(LitElement) {
|
|
|
59
59
|
[running] [progress] {
|
|
60
60
|
background-color: var(--theme-white-color);
|
|
61
61
|
}
|
|
62
|
+
|
|
62
63
|
[steps] {
|
|
63
64
|
padding: 0 0 0 var(--padding-narrow);
|
|
64
65
|
}
|
|
@@ -69,14 +70,16 @@ export class ScenarioInstanceMonitor extends localize(i18next)(LitElement) {
|
|
|
69
70
|
border-radius: 5px;
|
|
70
71
|
animation: width 1s linear ease-out;
|
|
71
72
|
}
|
|
73
|
+
|
|
72
74
|
[buttons] {
|
|
73
|
-
--
|
|
74
|
-
|
|
75
|
+
--md-icon-size: 18px;
|
|
76
|
+
|
|
75
77
|
border-top: var(--border-dark-color);
|
|
76
78
|
padding: var(--padding-narrow) 0 0 0;
|
|
77
79
|
text-align: right;
|
|
78
80
|
}
|
|
79
|
-
|
|
81
|
+
|
|
82
|
+
[buttons] md-icon {
|
|
80
83
|
color: var(--primary-color);
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -111,8 +114,8 @@ export class ScenarioInstanceMonitor extends localize(i18next)(LitElement) {
|
|
|
111
114
|
</div>
|
|
112
115
|
<div buttons>
|
|
113
116
|
<span><strong>${rounds}</strong> round</span>
|
|
114
|
-
<
|
|
115
|
-
<
|
|
117
|
+
<md-icon @click=${e => this.showInstanceDetail()}>wysiwyg</md-icon>
|
|
118
|
+
<md-icon @click=${e => (running ? this.stopScenario(instance) : this.startScenario(instance))}>${running ? 'pause' : 'play_arrow'}</md-icon>
|
|
116
119
|
</div>
|
|
117
120
|
`
|
|
118
121
|
}
|