@things-factory/integration-ui 6.1.66 → 6.1.71

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.
Files changed (113) hide show
  1. package/client/editors/{entity-editor.js → entity-editor.ts} +2 -2
  2. package/client/editors/{entity-selector.js → entity-selector.ts} +45 -57
  3. package/client/editors/{property-editor.js → property-editor.ts} +1 -0
  4. package/client/editors/{things-editor-entity-selector.js → things-editor-entity-selector.ts} +27 -31
  5. package/client/editors/{things-editor-http-body.js → things-editor-http-body.ts} +43 -48
  6. package/client/editors/{things-editor-http-headers.js → things-editor-http-headers.ts} +48 -58
  7. package/client/editors/{things-editor-http-parameters.js → things-editor-http-parameters.ts} +48 -58
  8. package/client/grist/{connection-selector.js → connection-selector.ts} +2 -2
  9. package/client/grist/{connector-selector.js → connector-selector.ts} +2 -2
  10. package/client/grist/{dynamic-selector.js → dynamic-selector.ts} +9 -7
  11. package/client/grist/{task-type-selector.js → task-type-selector.ts} +4 -2
  12. package/client/index.ts +2 -0
  13. package/client/pages/{connection.js → connection.ts} +39 -45
  14. package/client/pages/{integration-monitor.js → integration-monitor.ts} +54 -56
  15. package/client/pages/{scenario-detail.js → scenario-detail.ts} +41 -47
  16. package/client/pages/scenario-importer.ts +107 -0
  17. package/client/pages/{scenario.js → scenario.ts} +15 -21
  18. package/client/viewparts/{connections-monitor.js → connections-monitor.ts} +76 -82
  19. package/client/viewparts/{monitoring-summary.js → monitoring-summary.ts} +55 -61
  20. package/client/viewparts/{pending-q-monitor.js → pending-q-monitor.ts} +110 -114
  21. package/client/viewparts/{scenario-instance-log-view.js → scenario-instance-log-view.ts} +31 -35
  22. package/client/viewparts/{scenario-instance-monitor.js → scenario-instance-monitor.ts} +67 -73
  23. package/client/viewparts/{scenario-instance-view.js → scenario-instance-view.ts} +100 -104
  24. package/client/viewparts/{scenario-monitor.js → scenario-monitor.ts} +143 -149
  25. package/client/viewparts/scenarios-monitor.ts +147 -0
  26. package/dist-client/bootstrap.d.ts +4 -0
  27. package/dist-client/bootstrap.js +29 -0
  28. package/dist-client/bootstrap.js.map +1 -0
  29. package/dist-client/editors/entity-editor.d.ts +10 -0
  30. package/dist-client/editors/entity-editor.js +47 -0
  31. package/dist-client/editors/entity-editor.js.map +1 -0
  32. package/dist-client/editors/entity-selector.d.ts +34 -0
  33. package/dist-client/editors/entity-selector.js +305 -0
  34. package/dist-client/editors/entity-selector.js.map +1 -0
  35. package/dist-client/editors/property-editor.d.ts +20 -0
  36. package/dist-client/editors/property-editor.js +61 -0
  37. package/dist-client/editors/property-editor.js.map +1 -0
  38. package/dist-client/editors/things-editor-entity-selector.d.ts +15 -0
  39. package/dist-client/editors/things-editor-entity-selector.js +87 -0
  40. package/dist-client/editors/things-editor-entity-selector.js.map +1 -0
  41. package/dist-client/editors/things-editor-http-body.d.ts +22 -0
  42. package/dist-client/editors/things-editor-http-body.js +130 -0
  43. package/dist-client/editors/things-editor-http-body.js.map +1 -0
  44. package/dist-client/editors/things-editor-http-headers.d.ts +29 -0
  45. package/dist-client/editors/things-editor-http-headers.js +160 -0
  46. package/dist-client/editors/things-editor-http-headers.js.map +1 -0
  47. package/dist-client/editors/things-editor-http-parameters.d.ts +29 -0
  48. package/dist-client/editors/things-editor-http-parameters.js +160 -0
  49. package/dist-client/editors/things-editor-http-parameters.js.map +1 -0
  50. package/dist-client/grist/connection-selector.d.ts +5 -0
  51. package/dist-client/grist/connection-selector.js +31 -0
  52. package/dist-client/grist/connection-selector.js.map +1 -0
  53. package/dist-client/grist/connector-selector.d.ts +5 -0
  54. package/dist-client/grist/connector-selector.js +31 -0
  55. package/dist-client/grist/connector-selector.js.map +1 -0
  56. package/dist-client/grist/dynamic-selector.d.ts +8 -0
  57. package/dist-client/grist/dynamic-selector.js +33 -0
  58. package/dist-client/grist/dynamic-selector.js.map +1 -0
  59. package/dist-client/grist/task-type-selector.d.ts +7 -0
  60. package/dist-client/grist/task-type-selector.js +58 -0
  61. package/dist-client/grist/task-type-selector.js.map +1 -0
  62. package/dist-client/index.d.ts +2 -0
  63. package/dist-client/index.js +3 -0
  64. package/dist-client/index.js.map +1 -0
  65. package/dist-client/pages/connection.d.ts +53 -0
  66. package/dist-client/pages/connection.js +429 -0
  67. package/dist-client/pages/connection.js.map +1 -0
  68. package/dist-client/pages/integration-monitor.d.ts +28 -0
  69. package/dist-client/pages/integration-monitor.js +340 -0
  70. package/dist-client/pages/integration-monitor.js.map +1 -0
  71. package/dist-client/pages/scenario-detail.d.ts +1 -0
  72. package/dist-client/pages/scenario-detail.js +303 -0
  73. package/dist-client/pages/scenario-detail.js.map +1 -0
  74. package/dist-client/pages/scenario-importer.d.ts +9 -0
  75. package/dist-client/pages/scenario-importer.js +116 -0
  76. package/dist-client/pages/scenario-importer.js.map +1 -0
  77. package/dist-client/pages/scenario.d.ts +68 -0
  78. package/dist-client/pages/scenario.js +582 -0
  79. package/dist-client/pages/scenario.js.map +1 -0
  80. package/dist-client/route.d.ts +1 -0
  81. package/dist-client/route.js +14 -0
  82. package/dist-client/route.js.map +1 -0
  83. package/dist-client/tsconfig.tsbuildinfo +1 -0
  84. package/dist-client/viewparts/connections-monitor.d.ts +10 -0
  85. package/dist-client/viewparts/connections-monitor.js +169 -0
  86. package/dist-client/viewparts/connections-monitor.js.map +1 -0
  87. package/dist-client/viewparts/monitoring-summary.d.ts +12 -0
  88. package/dist-client/viewparts/monitoring-summary.js +135 -0
  89. package/dist-client/viewparts/monitoring-summary.js.map +1 -0
  90. package/dist-client/viewparts/pending-q-monitor.d.ts +17 -0
  91. package/dist-client/viewparts/pending-q-monitor.js +247 -0
  92. package/dist-client/viewparts/pending-q-monitor.js.map +1 -0
  93. package/dist-client/viewparts/scenario-instance-log-view.d.ts +21 -0
  94. package/dist-client/viewparts/scenario-instance-log-view.js +105 -0
  95. package/dist-client/viewparts/scenario-instance-log-view.js.map +1 -0
  96. package/dist-client/viewparts/scenario-instance-monitor.d.ts +15 -0
  97. package/dist-client/viewparts/scenario-instance-monitor.js +171 -0
  98. package/dist-client/viewparts/scenario-instance-monitor.js.map +1 -0
  99. package/dist-client/viewparts/scenario-instance-view.d.ts +29 -0
  100. package/dist-client/viewparts/scenario-instance-view.js +263 -0
  101. package/dist-client/viewparts/scenario-instance-view.js.map +1 -0
  102. package/dist-client/viewparts/scenario-monitor.d.ts +16 -0
  103. package/dist-client/viewparts/scenario-monitor.js +288 -0
  104. package/dist-client/viewparts/scenario-monitor.js.map +1 -0
  105. package/dist-client/viewparts/scenarios-monitor.d.ts +16 -0
  106. package/dist-client/viewparts/scenarios-monitor.js +167 -0
  107. package/dist-client/viewparts/scenarios-monitor.js.map +1 -0
  108. package/package.json +10 -7
  109. package/client/index.js +0 -0
  110. package/client/pages/scenario-importer.js +0 -118
  111. package/client/viewparts/scenarios-monitor.js +0 -153
  112. /package/client/{bootstrap.js → bootstrap.ts} +0 -0
  113. /package/client/{route.js → route.ts} +0 -0
@@ -1,123 +1,121 @@
1
1
  import { css, html, LitElement } from 'lit'
2
+ import { customElement, property, query } from 'lit/decorators.js'
2
3
  import { asyncReplace } from 'lit/directives/async-replace.js'
3
4
  import { unsafeHTML } from 'lit/directives/unsafe-html.js'
4
5
 
5
6
  import { ScrollbarStyles } from '@operato/styles'
6
7
  import { sleep } from '@operato/utils'
7
8
 
9
+ @customElement('pending-q-monitor')
8
10
  export class PendingQMonitor extends LitElement {
9
- static get styles() {
10
- return [
11
- ScrollbarStyles,
12
- css`
13
- :host {
14
- display: flex;
15
- flex-direction: column;
16
- background-color: rgba(var(--primary-color-rgb), 0.1);
17
- border-radius: var(--border-radius);
18
- padding: var(--padding-narrow);
19
- }
20
-
21
- div[tags] {
22
- display: flex;
23
- align-items: center;
24
- }
25
- [tags] mwc-icon {
26
- margin: 0 var(--margin-narrow) 0 0;
27
- font-size: var(--fontsize-large);
28
- }
29
-
30
- select {
31
- flex: 1;
32
- display: inline-block;
33
- border: none;
34
- border-radius: var(--border-radius);
35
- }
36
-
37
- select:focus {
38
- outline: 0;
39
- }
40
-
41
- [pendings] {
42
- display: flex;
43
-
44
- flex: 1;
45
- position: relative;
46
- overflow: auto;
47
- }
48
-
49
- [pending-wrap] {
50
- flex: 1;
51
- margin-top: var(--margin-default);
52
- padding-left: 30px;
53
- padding-right: 4px;
54
- font-size: 8px;
55
- line-height: 16px;
56
-
57
- display: flex;
58
- }
59
-
60
- [pendings-by-tag] {
61
- flex: 1;
62
- position: relative;
63
- margin: 0 1px;
64
- }
65
-
66
- [pending] {
67
- display: block;
68
- height: 2px;
69
- width: 100%;
70
- white-space: nowrap;
71
- position: absolute;
72
- }
73
-
74
- [timeline] {
75
- position: absolute;
76
- width: 100%;
77
- }
78
- [timeline] table {
79
- border-collapse: collapse;
80
- margin-top: var(--margin-default);
81
- width: 100%;
82
- }
83
- [timeline] th {
84
- opacity: 0.5;
85
- width: 25px;
86
- border: 0;
87
- font-weight: normal;
88
- font-size: 9px;
89
- }
90
- [timeline] th span {
91
- display: block;
92
- position: absolute;
93
- margin-top: -22px;
94
- }
95
- [timeline] td {
96
- border: 0;
97
- border-top: var(--border-dark-color);
98
- height: 30px;
99
- box-sizing: border-box;
100
- }
101
- [timeline] tr:nth-child(3n + 1) td {
102
- border: 0;
103
- border-top: 1px solid rgba(0, 0, 0, 0.4);
104
- box-sizing: border-box;
105
- }
106
- `
107
- ]
108
- }
11
+ static styles = [
12
+ ScrollbarStyles,
13
+ css`
14
+ :host {
15
+ display: flex;
16
+ flex-direction: column;
17
+ background-color: rgba(var(--primary-color-rgb), 0.1);
18
+ border-radius: var(--border-radius);
19
+ padding: var(--padding-narrow);
20
+ }
109
21
 
110
- static get properties() {
111
- return {
112
- pendings: Array,
113
- filteredPendings: Array,
114
- colorIndex: Object,
115
- running: Boolean,
116
- tags: Object,
117
- tag: String,
118
- scales: Array
119
- }
120
- }
22
+ div[tags] {
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+ [tags] mwc-icon {
27
+ margin: 0 var(--margin-narrow) 0 0;
28
+ font-size: var(--fontsize-large);
29
+ }
30
+
31
+ select {
32
+ flex: 1;
33
+ display: inline-block;
34
+ border: none;
35
+ border-radius: var(--border-radius);
36
+ }
37
+
38
+ select:focus {
39
+ outline: 0;
40
+ }
41
+
42
+ [pendings] {
43
+ display: flex;
44
+
45
+ flex: 1;
46
+ position: relative;
47
+ overflow: auto;
48
+ }
49
+
50
+ [pending-wrap] {
51
+ flex: 1;
52
+ margin-top: var(--margin-default);
53
+ padding-left: 30px;
54
+ padding-right: 4px;
55
+ font-size: 8px;
56
+ line-height: 16px;
57
+
58
+ display: flex;
59
+ }
60
+
61
+ [pendings-by-tag] {
62
+ flex: 1;
63
+ position: relative;
64
+ margin: 0 1px;
65
+ }
66
+
67
+ [pending] {
68
+ display: block;
69
+ height: 2px;
70
+ width: 100%;
71
+ white-space: nowrap;
72
+ position: absolute;
73
+ }
74
+
75
+ [timeline] {
76
+ position: absolute;
77
+ width: 100%;
78
+ }
79
+ [timeline] table {
80
+ border-collapse: collapse;
81
+ margin-top: var(--margin-default);
82
+ width: 100%;
83
+ }
84
+ [timeline] th {
85
+ opacity: 0.5;
86
+ width: 25px;
87
+ border: 0;
88
+ font-weight: normal;
89
+ font-size: 9px;
90
+ }
91
+ [timeline] th span {
92
+ display: block;
93
+ position: absolute;
94
+ margin-top: -22px;
95
+ }
96
+ [timeline] td {
97
+ border: 0;
98
+ border-top: var(--border-dark-color);
99
+ height: 30px;
100
+ box-sizing: border-box;
101
+ }
102
+ [timeline] tr:nth-child(3n + 1) td {
103
+ border: 0;
104
+ border-top: 1px solid rgba(0, 0, 0, 0.4);
105
+ box-sizing: border-box;
106
+ }
107
+ `
108
+ ]
109
+
110
+ @property({ type: Array }) pendings: any
111
+ @property({ type: Array }) filteredPendings: any
112
+ @property({ type: Object }) colorIndex: any
113
+ @property({ type: Boolean }) running?: boolean
114
+ @property({ type: Object }) tags: any
115
+ @property({ type: String }) tag?: string
116
+ @property({ type: Array }) scales: any
117
+
118
+ filterPendings: any
121
119
 
122
120
  render() {
123
121
  const tag = this.tag === undefined ? '(*)' : this.tag
@@ -172,7 +170,7 @@ export class PendingQMonitor extends LitElement {
172
170
  yield pendingsByTags.map(
173
171
  pendings => html`
174
172
  <div pendings-by-tag>
175
- ${pendings.map((pending, index) => {
173
+ ${(pendings as any).map((pending, index) => {
176
174
  var due = Number(pending.due)
177
175
  var top = Math.max(Math.floor((due - now) / 1000) * 3, 0) /* 3px per second */
178
176
 
@@ -242,5 +240,3 @@ export class PendingQMonitor extends LitElement {
242
240
  }
243
241
  }
244
242
  }
245
-
246
- customElements.define('pending-q-monitor', PendingQMonitor)
@@ -1,49 +1,47 @@
1
1
  import gql from 'graphql-tag'
2
2
  import { css, html, LitElement } from 'lit'
3
+ import { customElement, property, query } from 'lit/decorators.js'
3
4
  import { connect } from 'pwa-helpers/connect-mixin'
4
5
 
5
6
  import { subscribe } from '@operato/graphql'
6
7
  import { store } from '@operato/shell'
7
8
  import { ScrollbarStyles } from '@operato/styles'
8
9
 
10
+ @customElement('scenario-instance-log-view')
9
11
  export class ScenarioInstanceLogView extends connect(store)(LitElement) {
10
- static get styles() {
11
- return [
12
- ScrollbarStyles,
13
- css`
14
- :host {
15
- display: flex;
16
- flex-direction: column;
17
- background-color: var(--theme-white-color);
18
- padding: var(--padding-wide);
19
- }
20
- :host([active]) {
21
- padding: 0;
22
- }
12
+ static styles = [
13
+ ScrollbarStyles,
14
+ css`
15
+ :host {
16
+ display: flex;
17
+ flex-direction: column;
18
+ background-color: var(--theme-white-color);
19
+ padding: var(--padding-wide);
20
+ }
21
+ :host([active]) {
22
+ padding: 0;
23
+ }
23
24
 
24
- [content] {
25
- flex: 1;
25
+ [content] {
26
+ flex: 1;
26
27
 
27
- display: flex;
28
- flex-direction: column;
29
- overflow: auto;
28
+ display: flex;
29
+ flex-direction: column;
30
+ overflow: auto;
30
31
 
31
- font-size: var(--fontsize-small);
32
- }
33
- span {
34
- color: var(--secondary-text-color);
35
- }
36
- `
37
- ]
38
- }
32
+ font-size: var(--fontsize-small);
33
+ }
34
+ span {
35
+ color: var(--secondary-text-color);
36
+ }
37
+ `
38
+ ]
39
39
 
40
- static get properties() {
41
- return {
42
- scenarioName: String,
43
- instanceName: String,
44
- logs: Array
45
- }
46
- }
40
+ @property({ type: String }) scenarioName?: string
41
+ @property({ type: String }) instanceName?: string
42
+ @property({ type: Array }) logs: any
43
+
44
+ subscription: any
47
45
 
48
46
  firstUpdated() {
49
47
  this.logs = []
@@ -109,5 +107,3 @@ export class ScenarioInstanceLogView extends connect(store)(LitElement) {
109
107
  delete this.subscription
110
108
  }
111
109
  }
112
-
113
- customElements.define('scenario-instance-log-view', ScenarioInstanceLogView)
@@ -4,6 +4,7 @@ import './scenario-instance-view'
4
4
 
5
5
  import gql from 'graphql-tag'
6
6
  import { css, html, LitElement } from 'lit'
7
+ import { customElement, property, query } from 'lit/decorators.js'
7
8
 
8
9
  import { client } from '@operato/graphql'
9
10
  import { i18next, localize } from '@operato/i18n'
@@ -14,89 +15,84 @@ function IS_SCENARIO_RUNNING(state) {
14
15
  return state && state !== 'UNLOADED'
15
16
  }
16
17
 
18
+ @customElement('scenario-instance-monitor')
17
19
  export class ScenarioInstanceMonitor extends localize(i18next)(LitElement) {
18
- static get properties() {
19
- return {
20
- instance: Object,
21
- color: String
22
- }
23
- }
20
+ static styles = [
21
+ ScrollbarStyles,
22
+ css`
23
+ :host {
24
+ display: block;
25
+ overflow: hidden;
26
+ position: relative;
27
+ padding: var(--padding-narrow);
28
+ color: var(--secondary-color);
29
+ }
24
30
 
25
- static get styles() {
26
- return [
27
- ScrollbarStyles,
28
- css`
29
- :host {
30
- display: block;
31
- overflow: hidden;
32
- position: relative;
33
- padding: var(--padding-narrow);
34
- color: var(--secondary-color);
35
- }
31
+ [running] {
32
+ background-color: lightgreen;
33
+ }
36
34
 
37
- [running] {
38
- background-color: lightgreen;
39
- }
35
+ [name] {
36
+ font-size: var(--fontsize-default);
37
+ font-weight: bold;
38
+ }
40
39
 
41
- [name] {
42
- font-size: var(--fontsize-default);
43
- font-weight: bold;
44
- }
40
+ [progress] {
41
+ display: block;
42
+ position: relative;
45
43
 
46
- [progress] {
47
- display: block;
48
- position: relative;
44
+ width: 100%;
45
+ margin: 2px;
46
+ padding: 2px;
47
+ box-sizing: border-box;
49
48
 
50
- width: 100%;
51
- margin: 2px;
52
- padding: 2px;
53
- box-sizing: border-box;
49
+ border: var(--border-dark-color);
50
+ border-radius: 10px;
51
+ background-color: var(--theme-white-color);
52
+ }
53
+ [progress-wrap] {
54
+ display: flex;
55
+ flex-direction: row;
56
+ margin: 4px 0;
57
+ }
54
58
 
55
- border: var(--border-dark-color);
56
- border-radius: 10px;
57
- background-color: var(--theme-white-color);
58
- }
59
- [progress-wrap] {
60
- display: flex;
61
- flex-direction: row;
62
- margin: 4px 0;
63
- }
59
+ [running] [progress] {
60
+ background-color: var(--theme-white-color);
61
+ }
62
+ [steps] {
63
+ padding: 0 0 0 var(--padding-narrow);
64
+ }
64
65
 
65
- [running] [progress] {
66
- background-color: var(--theme-white-color);
67
- }
68
- [steps] {
69
- padding: 0 0 0 var(--padding-narrow);
70
- }
66
+ #progressbar {
67
+ height: 100%;
68
+ text-align: left;
69
+ border-radius: 5px;
70
+ animation: width 1s linear ease-out;
71
+ }
72
+ [buttons] {
73
+ --mdc-icon-button-size: 18px;
74
+ --mdc-icon-size: 18px;
75
+ border-top: var(--border-dark-color);
76
+ padding: var(--padding-narrow) 0 0 0;
77
+ text-align: right;
78
+ }
79
+ [buttons] mwc-icon-button {
80
+ color: var(--primary-color);
81
+ }
71
82
 
72
- #progressbar {
73
- height: 100%;
74
- text-align: left;
75
- border-radius: 5px;
76
- animation: width 1s linear ease-out;
77
- }
78
- [buttons] {
79
- --mdc-icon-button-size: 18px;
80
- --mdc-icon-size: 18px;
81
- border-top: var(--border-dark-color);
82
- padding: var(--padding-narrow) 0 0 0;
83
- text-align: right;
83
+ @keyframes width {
84
+ 0% {
85
+ width: 0;
84
86
  }
85
- [buttons] mwc-icon-button {
86
- color: var(--primary-color);
87
+ 100% {
88
+ width: auto;
87
89
  }
90
+ }
91
+ `
92
+ ]
88
93
 
89
- @keyframes width {
90
- 0% {
91
- width: 0;
92
- }
93
- 100% {
94
- width: auto;
95
- }
96
- }
97
- `
98
- ]
99
- }
94
+ @property({ type: Object }) instance: any
95
+ @property({ type: String }) color?: string
100
96
 
101
97
  render() {
102
98
  var instance = this.instance
@@ -182,5 +178,3 @@ export class ScenarioInstanceMonitor extends localize(i18next)(LitElement) {
182
178
  )
183
179
  }
184
180
  }
185
-
186
- window.customElements.define('scenario-instance-monitor', ScenarioInstanceMonitor)