@things-factory/integration-ui 6.1.52 → 6.1.69
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/editors/{entity-editor.js → entity-editor.ts} +2 -2
- package/client/editors/{entity-selector.js → entity-selector.ts} +45 -57
- package/client/editors/{property-editor.js → property-editor.ts} +1 -0
- package/client/editors/{things-editor-entity-selector.js → things-editor-entity-selector.ts} +27 -31
- package/client/editors/{things-editor-http-body.js → things-editor-http-body.ts} +43 -48
- package/client/editors/{things-editor-http-headers.js → things-editor-http-headers.ts} +48 -58
- package/client/editors/{things-editor-http-parameters.js → things-editor-http-parameters.ts} +48 -58
- package/client/grist/{connection-selector.js → connection-selector.ts} +2 -2
- package/client/grist/{connector-selector.js → connector-selector.ts} +2 -2
- package/client/grist/{dynamic-selector.js → dynamic-selector.ts} +9 -7
- package/client/grist/{task-type-selector.js → task-type-selector.ts} +4 -2
- package/client/index.ts +2 -0
- package/client/pages/{connection.js → connection.ts} +38 -44
- package/client/pages/{integration-monitor.js → integration-monitor.ts} +54 -56
- package/client/pages/{scenario-detail.js → scenario-detail.ts} +41 -47
- package/client/pages/scenario-importer.ts +107 -0
- package/client/pages/{scenario.js → scenario.ts} +14 -20
- package/client/viewparts/{connections-monitor.js → connections-monitor.ts} +76 -82
- package/client/viewparts/{monitoring-summary.js → monitoring-summary.ts} +55 -61
- package/client/viewparts/{pending-q-monitor.js → pending-q-monitor.ts} +110 -114
- package/client/viewparts/{scenario-instance-log-view.js → scenario-instance-log-view.ts} +31 -35
- package/client/viewparts/{scenario-instance-monitor.js → scenario-instance-monitor.ts} +67 -73
- package/client/viewparts/{scenario-instance-view.js → scenario-instance-view.ts} +100 -104
- package/client/viewparts/{scenario-monitor.js → scenario-monitor.ts} +143 -149
- package/client/viewparts/scenarios-monitor.ts +147 -0
- package/dist-client/bootstrap.d.ts +4 -0
- package/dist-client/bootstrap.js +29 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/editors/entity-editor.d.ts +10 -0
- package/dist-client/editors/entity-editor.js +47 -0
- package/dist-client/editors/entity-editor.js.map +1 -0
- package/dist-client/editors/entity-selector.d.ts +34 -0
- package/dist-client/editors/entity-selector.js +305 -0
- package/dist-client/editors/entity-selector.js.map +1 -0
- package/dist-client/editors/property-editor.d.ts +20 -0
- package/dist-client/editors/property-editor.js +61 -0
- package/dist-client/editors/property-editor.js.map +1 -0
- package/dist-client/editors/things-editor-entity-selector.d.ts +15 -0
- package/dist-client/editors/things-editor-entity-selector.js +87 -0
- package/dist-client/editors/things-editor-entity-selector.js.map +1 -0
- package/dist-client/editors/things-editor-http-body.d.ts +22 -0
- package/dist-client/editors/things-editor-http-body.js +130 -0
- package/dist-client/editors/things-editor-http-body.js.map +1 -0
- package/dist-client/editors/things-editor-http-headers.d.ts +29 -0
- package/dist-client/editors/things-editor-http-headers.js +160 -0
- package/dist-client/editors/things-editor-http-headers.js.map +1 -0
- package/dist-client/editors/things-editor-http-parameters.d.ts +29 -0
- package/dist-client/editors/things-editor-http-parameters.js +160 -0
- package/dist-client/editors/things-editor-http-parameters.js.map +1 -0
- package/dist-client/grist/connection-selector.d.ts +5 -0
- package/dist-client/grist/connection-selector.js +31 -0
- package/dist-client/grist/connection-selector.js.map +1 -0
- package/dist-client/grist/connector-selector.d.ts +5 -0
- package/dist-client/grist/connector-selector.js +31 -0
- package/dist-client/grist/connector-selector.js.map +1 -0
- package/dist-client/grist/dynamic-selector.d.ts +8 -0
- package/dist-client/grist/dynamic-selector.js +33 -0
- package/dist-client/grist/dynamic-selector.js.map +1 -0
- package/dist-client/grist/task-type-selector.d.ts +7 -0
- package/dist-client/grist/task-type-selector.js +58 -0
- package/dist-client/grist/task-type-selector.js.map +1 -0
- package/dist-client/index.d.ts +2 -0
- package/dist-client/index.js +3 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/connection.d.ts +53 -0
- package/dist-client/pages/connection.js +428 -0
- package/dist-client/pages/connection.js.map +1 -0
- package/dist-client/pages/integration-monitor.d.ts +28 -0
- package/dist-client/pages/integration-monitor.js +340 -0
- package/dist-client/pages/integration-monitor.js.map +1 -0
- package/dist-client/pages/scenario-detail.d.ts +1 -0
- package/dist-client/pages/scenario-detail.js +303 -0
- package/dist-client/pages/scenario-detail.js.map +1 -0
- package/dist-client/pages/scenario-importer.d.ts +9 -0
- package/dist-client/pages/scenario-importer.js +116 -0
- package/dist-client/pages/scenario-importer.js.map +1 -0
- package/dist-client/pages/scenario.d.ts +68 -0
- package/dist-client/pages/scenario.js +581 -0
- package/dist-client/pages/scenario.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +14 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/viewparts/connections-monitor.d.ts +10 -0
- package/dist-client/viewparts/connections-monitor.js +169 -0
- package/dist-client/viewparts/connections-monitor.js.map +1 -0
- package/dist-client/viewparts/monitoring-summary.d.ts +12 -0
- package/dist-client/viewparts/monitoring-summary.js +135 -0
- package/dist-client/viewparts/monitoring-summary.js.map +1 -0
- package/dist-client/viewparts/pending-q-monitor.d.ts +17 -0
- package/dist-client/viewparts/pending-q-monitor.js +247 -0
- package/dist-client/viewparts/pending-q-monitor.js.map +1 -0
- package/dist-client/viewparts/scenario-instance-log-view.d.ts +21 -0
- package/dist-client/viewparts/scenario-instance-log-view.js +105 -0
- package/dist-client/viewparts/scenario-instance-log-view.js.map +1 -0
- package/dist-client/viewparts/scenario-instance-monitor.d.ts +15 -0
- package/dist-client/viewparts/scenario-instance-monitor.js +171 -0
- package/dist-client/viewparts/scenario-instance-monitor.js.map +1 -0
- package/dist-client/viewparts/scenario-instance-view.d.ts +29 -0
- package/dist-client/viewparts/scenario-instance-view.js +263 -0
- package/dist-client/viewparts/scenario-instance-view.js.map +1 -0
- package/dist-client/viewparts/scenario-monitor.d.ts +16 -0
- package/dist-client/viewparts/scenario-monitor.js +288 -0
- package/dist-client/viewparts/scenario-monitor.js.map +1 -0
- package/dist-client/viewparts/scenarios-monitor.d.ts +16 -0
- package/dist-client/viewparts/scenarios-monitor.js +167 -0
- package/dist-client/viewparts/scenarios-monitor.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -10
- package/client/index.js +0 -0
- package/client/pages/scenario-importer.js +0 -118
- package/client/viewparts/scenarios-monitor.js +0 -153
- /package/client/{bootstrap.js → bootstrap.ts} +0 -0
- /package/client/{route.js → route.ts} +0 -0
|
@@ -2,57 +2,54 @@ import '@operato/data-grist/ox-grist.js'
|
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
5
6
|
|
|
7
|
+
import { DataGrist } from '@operato/data-grist/ox-grist.js'
|
|
6
8
|
import { client } from '@operato/graphql'
|
|
7
9
|
import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'
|
|
8
10
|
import { i18next, localize } from '@operato/i18n'
|
|
9
11
|
import { isMobileDevice } from '@operato/utils'
|
|
10
12
|
|
|
13
|
+
const SelectFields = ['name', 'description', 'sequence', 'task', 'connection', 'params', 'result', 'skip', 'log']
|
|
14
|
+
|
|
15
|
+
@customElement('scenario-detail')
|
|
11
16
|
class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
12
|
-
static
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
17
|
+
static styles = [
|
|
18
|
+
css`
|
|
19
|
+
:host {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
css`
|
|
23
|
-
:host {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
}
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
ox-grist {
|
|
27
|
+
flex: 1;
|
|
28
|
+
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
.button-container {
|
|
31
|
+
display: flex;
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
padding: var(--padding-default);
|
|
34
|
+
}
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
`
|
|
46
|
+
]
|
|
39
47
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[danger] {
|
|
44
|
-
--mdc-theme-primary: var(--mdc-danger-button-primary-color);
|
|
45
|
-
}
|
|
46
|
-
mwc-button {
|
|
47
|
-
margin-left: var(--margin-default);
|
|
48
|
-
}
|
|
49
|
-
`
|
|
50
|
-
]
|
|
51
|
-
}
|
|
48
|
+
@property({ type: Object }) scenario: any
|
|
49
|
+
@property({ type: Object }) gristConfig: any
|
|
50
|
+
@property({ type: Object }) taskTypes: any
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
55
|
-
}
|
|
52
|
+
@query('ox-grist') grist!: DataGrist
|
|
56
53
|
|
|
57
54
|
render() {
|
|
58
55
|
return html`
|
|
@@ -69,7 +66,6 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
async firstUpdated() {
|
|
72
|
-
this.select = ['name', 'description', 'sequence', 'task', 'connection', 'params', 'result', 'skip', 'log']
|
|
73
69
|
this.gristConfig = {
|
|
74
70
|
list: { fields: ['name', 'description', 'task'] },
|
|
75
71
|
columns: [
|
|
@@ -185,8 +181,8 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
185
181
|
record: {
|
|
186
182
|
editable: true,
|
|
187
183
|
options: (value, column, record, row, field) => {
|
|
188
|
-
var { name, parameterSpec: spec, help } = record.task ? this.taskTypes?.[record.task] : {}
|
|
189
|
-
const context = this.
|
|
184
|
+
var { name, parameterSpec: spec, help } = record.task ? this.taskTypes?.[record.task] : ({} as any)
|
|
185
|
+
const context = this.grist
|
|
190
186
|
return { name, spec, help, context }
|
|
191
187
|
},
|
|
192
188
|
renderer: 'json5'
|
|
@@ -224,7 +220,7 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
224
220
|
) {
|
|
225
221
|
items {
|
|
226
222
|
id
|
|
227
|
-
${
|
|
223
|
+
${SelectFields.join('\n')}
|
|
228
224
|
}
|
|
229
225
|
total
|
|
230
226
|
}
|
|
@@ -265,7 +261,7 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
265
261
|
}
|
|
266
262
|
|
|
267
263
|
async _updateSteps() {
|
|
268
|
-
let patches = this.
|
|
264
|
+
let patches = this.grist._data.records
|
|
269
265
|
if (patches && patches.length) {
|
|
270
266
|
patches = patches.map(patch => {
|
|
271
267
|
var patchField = {}
|
|
@@ -292,19 +288,17 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
|
|
|
292
288
|
})
|
|
293
289
|
|
|
294
290
|
if (!response.errors) {
|
|
295
|
-
this.
|
|
291
|
+
this.grist.fetch()
|
|
296
292
|
this.requestRefresh()
|
|
297
293
|
}
|
|
298
294
|
}
|
|
299
295
|
}
|
|
300
296
|
|
|
301
297
|
async _deleteSteps() {
|
|
302
|
-
this.
|
|
298
|
+
this.grist.deleteSelectedRecords(true)
|
|
303
299
|
}
|
|
304
300
|
|
|
305
301
|
requestRefresh() {
|
|
306
302
|
this.dispatchEvent(new CustomEvent('requestRefresh'))
|
|
307
303
|
}
|
|
308
304
|
}
|
|
309
|
-
|
|
310
|
-
window.customElements.define('scenario-detail', ScenarioDetail)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import '@operato/data-grist'
|
|
2
|
+
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
6
|
+
|
|
7
|
+
import { client } from '@operato/graphql'
|
|
8
|
+
import { i18next } from '@operato/i18n'
|
|
9
|
+
import { isMobileDevice } from '@operato/utils'
|
|
10
|
+
|
|
11
|
+
@customElement('scenario-importer')
|
|
12
|
+
export class ScenarioImporter extends LitElement {
|
|
13
|
+
static styles = [
|
|
14
|
+
css`
|
|
15
|
+
:host {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
|
|
19
|
+
background-color: #fff;
|
|
20
|
+
}
|
|
21
|
+
ox-grist {
|
|
22
|
+
flex: 1;
|
|
23
|
+
}
|
|
24
|
+
.button-container {
|
|
25
|
+
display: flex;
|
|
26
|
+
margin-left: auto;
|
|
27
|
+
padding: var(--padding-default);
|
|
28
|
+
}
|
|
29
|
+
mwc-button {
|
|
30
|
+
margin-left: var(--margin-default);
|
|
31
|
+
}
|
|
32
|
+
`
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
@property({ type: Array }) scenarios: any
|
|
36
|
+
@property({ type: Object }) columns: any = {
|
|
37
|
+
list: { fields: ['name', 'description'] },
|
|
38
|
+
pagination: { infinite: true },
|
|
39
|
+
columns: [
|
|
40
|
+
{
|
|
41
|
+
type: 'string',
|
|
42
|
+
name: 'name',
|
|
43
|
+
header: i18next.t('field.name'),
|
|
44
|
+
width: 150
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'string',
|
|
48
|
+
name: 'type',
|
|
49
|
+
header: i18next.t('field.type'),
|
|
50
|
+
width: 100
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'string',
|
|
54
|
+
name: 'description',
|
|
55
|
+
header: i18next.t('field.description'),
|
|
56
|
+
width: 200
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'crontab',
|
|
60
|
+
name: 'schedule',
|
|
61
|
+
header: i18next.t('field.schedule'),
|
|
62
|
+
width: 80
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: 'string',
|
|
66
|
+
name: 'timezone',
|
|
67
|
+
header: i18next.t('field.timezone'),
|
|
68
|
+
width: 120
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'checkbox',
|
|
72
|
+
name: 'active',
|
|
73
|
+
header: i18next.t('field.active'),
|
|
74
|
+
width: 60
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
render() {
|
|
80
|
+
return html`
|
|
81
|
+
<ox-grist
|
|
82
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
83
|
+
.config=${this.columns}
|
|
84
|
+
.data="${{ records: this.scenarios }}"
|
|
85
|
+
></ox-grist>
|
|
86
|
+
|
|
87
|
+
<div class="button-container">
|
|
88
|
+
<mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
|
|
89
|
+
</div>
|
|
90
|
+
`
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async save() {
|
|
94
|
+
const response = await client.mutate({
|
|
95
|
+
mutation: gql`
|
|
96
|
+
mutation importScenarios($scenarios: [ScenarioPatch!]!) {
|
|
97
|
+
importScenarios(scenarios: $scenarios)
|
|
98
|
+
}
|
|
99
|
+
`,
|
|
100
|
+
variables: { scenarios: this.scenarios }
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
if (response.errors?.length) return
|
|
104
|
+
|
|
105
|
+
this.dispatchEvent(new CustomEvent('imported'))
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -4,14 +4,16 @@ import './scenario-importer'
|
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
6
|
import { css, html } from 'lit'
|
|
7
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
8
|
import moment from 'moment-timezone'
|
|
8
9
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
9
10
|
|
|
11
|
+
import { DataGrist } from '@operato/data-grist/ox-grist.js'
|
|
10
12
|
import { client } from '@operato/graphql'
|
|
11
13
|
import { i18next, localize } from '@operato/i18n'
|
|
12
14
|
import { notify, openPopup } from '@operato/layout'
|
|
13
15
|
import { navigate, PageView, store } from '@operato/shell'
|
|
14
|
-
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
|
16
|
+
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
15
17
|
import { isMobileDevice } from '@operato/utils'
|
|
16
18
|
|
|
17
19
|
const DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
@@ -21,17 +23,11 @@ function IS_SCENARIO_RUNNING(state) {
|
|
|
21
23
|
return state && state !== 'UNLOADED'
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
@customElement('scenario-page')
|
|
24
27
|
export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
25
|
-
static get properties() {
|
|
26
|
-
return {
|
|
27
|
-
active: String,
|
|
28
|
-
gristConfig: Object,
|
|
29
|
-
taskTypes: Object
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
28
|
static get styles() {
|
|
34
29
|
return [
|
|
30
|
+
CommonGristStyles,
|
|
35
31
|
ScrollbarStyles,
|
|
36
32
|
css`
|
|
37
33
|
:host {
|
|
@@ -61,6 +57,12 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
61
57
|
]
|
|
62
58
|
}
|
|
63
59
|
|
|
60
|
+
@property({ type: Boolean }) active: boolean = false
|
|
61
|
+
@property({ type: Object }) gristConfig: any
|
|
62
|
+
@property({ type: Object }) taskTypes: any
|
|
63
|
+
|
|
64
|
+
@query('ox-grist') grist!: DataGrist
|
|
65
|
+
|
|
64
66
|
get context() {
|
|
65
67
|
return {
|
|
66
68
|
search: {
|
|
@@ -119,15 +121,10 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
119
121
|
.config=${this.gristConfig}
|
|
120
122
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
121
123
|
>
|
|
122
|
-
<div slot="headroom" id="filters"></div>
|
|
123
124
|
</ox-grist>
|
|
124
125
|
`
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
get grist() {
|
|
128
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
129
|
-
}
|
|
130
|
-
|
|
131
128
|
async pageInitialized(lifecycle) {
|
|
132
129
|
this.fetchTaskTypes()
|
|
133
130
|
|
|
@@ -251,8 +248,7 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
251
248
|
record: {
|
|
252
249
|
editable: true
|
|
253
250
|
},
|
|
254
|
-
width: 110
|
|
255
|
-
label: true
|
|
251
|
+
width: 110
|
|
256
252
|
},
|
|
257
253
|
{
|
|
258
254
|
type: 'select',
|
|
@@ -443,10 +439,10 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
443
439
|
}
|
|
444
440
|
|
|
445
441
|
async _updateScenario() {
|
|
446
|
-
|
|
442
|
+
var patches = this.grist.dirtyRecords
|
|
447
443
|
if (patches && patches.length) {
|
|
448
444
|
patches = patches.map(patch => {
|
|
449
|
-
let patchField = patch.id ? { id: patch.id } : {}
|
|
445
|
+
let patchField: any = patch.id ? { id: patch.id } : {}
|
|
450
446
|
const dirtyFields = patch.__dirtyfields__
|
|
451
447
|
for (let key in dirtyFields) {
|
|
452
448
|
if (['message', 'step', 'steps', 'progress', 'rounds'].indexOf(key) == -1) {
|
|
@@ -617,5 +613,3 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
|
|
|
617
613
|
)
|
|
618
614
|
}
|
|
619
615
|
}
|
|
620
|
-
|
|
621
|
-
window.customElements.define('scenario-page', Scenario)
|
|
@@ -2,98 +2,94 @@ import '@material/mwc-icon-button'
|
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
5
6
|
|
|
6
7
|
import { client } from '@operato/graphql'
|
|
7
8
|
import { ScrollbarStyles } from '@operato/styles'
|
|
8
9
|
|
|
10
|
+
@customElement('connections-monitor')
|
|
9
11
|
export class ConnectionsMonitor extends LitElement {
|
|
10
|
-
static
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
12
|
+
static styles = [
|
|
13
|
+
ScrollbarStyles,
|
|
14
|
+
css`
|
|
15
|
+
:host {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
background-color: var(--theme-white-color);
|
|
21
|
+
border-radius: var(--border-radius);
|
|
22
|
+
border: var(--border-dark-color);
|
|
23
|
+
}
|
|
24
|
+
h2 {
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
|
|
27
|
+
border-bottom: var(--border-dark-color);
|
|
28
|
+
font: var(--subtitle-font);
|
|
29
|
+
color: var(--secondary-color);
|
|
30
|
+
text-transform: capitalize;
|
|
31
|
+
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
[cards] {
|
|
34
|
+
flex: 1;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
overflow: auto;
|
|
39
|
+
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
[card] {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
padding: var(--padding-default);
|
|
45
|
+
border-bottom: var(--border-dark-color);
|
|
46
|
+
color: var(--secondary-color);
|
|
47
|
+
}
|
|
48
|
+
[card] * {
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
}
|
|
53
|
+
[card] strong {
|
|
54
|
+
color: var(--primary-color);
|
|
55
|
+
}
|
|
56
|
+
[card] span {
|
|
57
|
+
font-size: var(--fontsize-default);
|
|
58
|
+
line-height: var(--fontsize-large);
|
|
59
|
+
}
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
[connected] strong::after {
|
|
62
|
+
content: '';
|
|
63
|
+
display: inline-block;
|
|
64
|
+
width: 10px;
|
|
65
|
+
height: 10px;
|
|
66
|
+
border-radius: 50%;
|
|
67
|
+
background-color: var(--status-success-color);
|
|
68
|
+
margin-left: var(--margin-narrow);
|
|
69
|
+
}
|
|
70
|
+
[buttons] {
|
|
71
|
+
--mdc-icon-button-size: 20px;
|
|
72
|
+
--mdc-icon-size: 20px;
|
|
73
|
+
border-top: 1px dashed rgba(0, 0, 0, 0.1);
|
|
74
|
+
margin: var(--margin-narrow) 0 0 0;
|
|
75
|
+
padding: var(--padding-narrow) 0 0 0;
|
|
76
|
+
text-align: right;
|
|
77
|
+
}
|
|
78
|
+
[buttons] mwc-icon-button {
|
|
79
|
+
color: rgba(var(--secondary-color-rgb), 0.8);
|
|
80
|
+
}
|
|
81
|
+
@media screen and (max-width: 480px) {
|
|
82
|
+
h2 {
|
|
83
|
+
padding: var(--padding-narrow);
|
|
79
84
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
padding: var(--padding-narrow);
|
|
83
|
-
}
|
|
84
|
-
[card] span {
|
|
85
|
-
display: none;
|
|
86
|
-
}
|
|
85
|
+
[card] span {
|
|
86
|
+
display: none;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
]
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
connections: Array
|
|
95
|
-
}
|
|
96
|
-
}
|
|
92
|
+
@property({ type: Array }) connections: any
|
|
97
93
|
|
|
98
94
|
render() {
|
|
99
95
|
var connections = this.connections || []
|
|
@@ -183,5 +179,3 @@ export class ConnectionsMonitor extends LitElement {
|
|
|
183
179
|
)
|
|
184
180
|
}
|
|
185
181
|
}
|
|
186
|
-
|
|
187
|
-
customElements.define('connections-monitor', ConnectionsMonitor)
|
|
@@ -1,81 +1,77 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
2
|
|
|
3
3
|
import { css, html, LitElement } from 'lit'
|
|
4
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
4
5
|
|
|
5
6
|
import { i18next, localize } from '@operato/i18n'
|
|
6
7
|
import { ScrollbarStyles } from '@operato/styles'
|
|
7
8
|
|
|
9
|
+
@customElement('integration-summary')
|
|
8
10
|
export class IntegrationMonitoringSummary extends localize(i18next)(LitElement) {
|
|
9
|
-
static
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
11
|
+
static styles = [
|
|
12
|
+
ScrollbarStyles,
|
|
13
|
+
css`
|
|
14
|
+
:host {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: row;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
background-color: var(--paper-grey-800);
|
|
20
|
+
border-radius: var(--border-radius);
|
|
21
|
+
color: var(--opacity-light-color);
|
|
22
|
+
}
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
[card] {
|
|
25
|
+
flex: 1;
|
|
26
|
+
margin: var(--margin-default);
|
|
27
|
+
padding: var(--padding-narrow) var(--padding-default);
|
|
28
|
+
border-right: var(--border-light-color);
|
|
29
|
+
}
|
|
30
|
+
:host :last-child {
|
|
31
|
+
border-right: none;
|
|
32
|
+
}
|
|
33
|
+
strong {
|
|
34
|
+
font-size: 36px;
|
|
35
|
+
line-height: 30px;
|
|
36
|
+
color: var(--theme-white-color);
|
|
37
|
+
}
|
|
38
|
+
span {
|
|
39
|
+
display: block;
|
|
40
|
+
margin-bottom: var(--margin-narrow);
|
|
41
|
+
font-size: var(--fontsize-small);
|
|
42
|
+
text-transform: capitalize;
|
|
43
|
+
}
|
|
44
|
+
@media screen and (max-width: 480px) {
|
|
45
|
+
:host {
|
|
46
|
+
font-size: 0.8em;
|
|
29
47
|
}
|
|
30
|
-
|
|
31
48
|
[card] {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
padding: var(--padding-narrow) var(--padding-default);
|
|
35
|
-
border-right: var(--border-light-color);
|
|
49
|
+
margin: var(--margin-narrow);
|
|
50
|
+
padding: var(--padding-narrow);
|
|
36
51
|
}
|
|
37
|
-
:
|
|
52
|
+
[card]:nth-child(5),
|
|
53
|
+
[card]:nth-child(6) {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
[card]:nth-child(4) {
|
|
38
57
|
border-right: none;
|
|
39
58
|
}
|
|
40
|
-
|
|
41
|
-
font-size:
|
|
42
|
-
line-height: 30px;
|
|
43
|
-
color: var(--theme-white-color);
|
|
59
|
+
mwc-icon {
|
|
60
|
+
font-size: var(--fontsize-large);
|
|
44
61
|
}
|
|
45
62
|
span {
|
|
46
|
-
|
|
47
|
-
margin-bottom: var(--margin-narrow);
|
|
48
|
-
font-size: var(--fontsize-small);
|
|
49
|
-
text-transform: capitalize;
|
|
63
|
+
line-height: 1;
|
|
50
64
|
}
|
|
51
|
-
|
|
52
|
-
:
|
|
53
|
-
font-size: 0.8em;
|
|
54
|
-
}
|
|
55
|
-
[card] {
|
|
56
|
-
margin: var(--margin-narrow);
|
|
57
|
-
padding: var(--padding-narrow);
|
|
58
|
-
}
|
|
59
|
-
[card]:nth-child(5),
|
|
60
|
-
[card]:nth-child(6) {
|
|
61
|
-
display: none;
|
|
62
|
-
}
|
|
63
|
-
[card]:nth-child(4) {
|
|
64
|
-
border-right: none;
|
|
65
|
-
}
|
|
66
|
-
mwc-icon {
|
|
67
|
-
font-size: var(--fontsize-large);
|
|
68
|
-
}
|
|
69
|
-
span {
|
|
70
|
-
line-height: 1;
|
|
71
|
-
}
|
|
72
|
-
strong {
|
|
73
|
-
font-size: 24px;
|
|
74
|
-
}
|
|
65
|
+
strong {
|
|
66
|
+
font-size: 24px;
|
|
75
67
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
}
|
|
69
|
+
`
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
@property({ type: Array }) pendings: any
|
|
73
|
+
@property({ type: Array }) scenarios: any
|
|
74
|
+
@property({ type: Array }) connections: any
|
|
79
75
|
|
|
80
76
|
render() {
|
|
81
77
|
const now = Date.now()
|
|
@@ -134,5 +130,3 @@ export class IntegrationMonitoringSummary extends localize(i18next)(LitElement)
|
|
|
134
130
|
`
|
|
135
131
|
}
|
|
136
132
|
}
|
|
137
|
-
|
|
138
|
-
window.customElements.define('integration-summary', IntegrationMonitoringSummary)
|