@things-factory/integration-ui 7.0.0-alpha.4 → 7.0.0-alpha.5

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.
@@ -23,7 +23,6 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
23
23
  :host {
24
24
  display: flex;
25
25
  flex-direction: row;
26
- margin: var(--margin-default);
27
26
 
28
27
  border: var(--border-dark-color);
29
28
  background-color: var(--theme-white-color);
@@ -34,11 +33,11 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
34
33
  }
35
34
 
36
35
  [desc] {
36
+ flex: 1;
37
37
  position: relative;
38
38
  display: flex;
39
39
  flex-direction: column;
40
40
  padding: var(--padding-default);
41
- width: 200px;
42
41
  color: var(--secondary-color);
43
42
  font-size: var(--fontsize-small);
44
43
  }
@@ -114,9 +113,15 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
114
113
  margin: var(--margin-default) 0 0 0;
115
114
  }
116
115
 
116
+ :host([mode='detail']) [desc] {
117
+ flex: unset;
118
+ width: 200px;
119
+ }
120
+
117
121
  :host([mode='detail']) [desc] [buttons] {
118
122
  display: none;
119
123
  }
124
+
120
125
  :host([mode='detail']) [buttons] {
121
126
  border-top: none;
122
127
  padding: var(--padding-default);
@@ -137,7 +142,6 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
137
142
  position: relative;
138
143
  margin: var(--margin-default);
139
144
  min-width: 140px;
140
- max-width: 180px;
141
145
  border: 1px solid black;
142
146
  border-radius: var(--border-radius);
143
147
  font-size: 12px;
@@ -154,21 +158,12 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
154
158
  @media screen and (max-width: 480px) {
155
159
  :host {
156
160
  margin: var(--margin-narrow);
157
- max-width: 46%;
158
- }
159
-
160
- :host([mode='detail']) {
161
- max-width: initial;
162
161
  }
163
162
 
164
163
  [desc] {
165
164
  padding: var(--padding-narrow);
166
165
  }
167
166
 
168
- :host([mode='detail']) > [desc] {
169
- max-width: 125px;
170
- }
171
-
172
167
  [desc] [detail-info] {
173
168
  height: 38px;
174
169
  }
@@ -230,17 +225,8 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
230
225
  <div buttons ?detail=${this.mode == 'detail'}>
231
226
  <mwc-icon-button @click=${e => this.popupLogView(scenario)} icon="text_snippet"></mwc-icon-button>
232
227
  ${!scenarioInstance
233
- ? html` <mwc-icon-button
234
- icon="play_circle_outline"
235
- @click=${e => this.startScenario(scenario)}
236
- ></mwc-icon-button>`
237
- : html`
238
- <mwc-icon-button
239
- icon="pause_circle_outline"
240
- @click=${e => this.stopScenario(scenario)}
241
- stop
242
- ></mwc-icon-button>
243
- `}
228
+ ? html` <mwc-icon-button icon="play_circle_outline" @click=${e => this.startScenario(scenario)}></mwc-icon-button>`
229
+ : html` <mwc-icon-button icon="pause_circle_outline" @click=${e => this.stopScenario(scenario)} stop></mwc-icon-button> `}
244
230
  </div>
245
231
  `
246
232
  }
@@ -268,9 +254,7 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
268
254
 
269
255
  notify({
270
256
  level: 'info',
271
- message: `${!IS_SCENARIO_RUNNING(response.data.startScenario.state) ? 'fail' : 'success'} to start instance : ${
272
- scenario.name
273
- }`
257
+ message: `${!IS_SCENARIO_RUNNING(response.data.startScenario.state) ? 'fail' : 'success'} to start instance : ${scenario.name}`
274
258
  })
275
259
  }
276
260
 
@@ -290,9 +274,7 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
290
274
 
291
275
  notify({
292
276
  level: 'info',
293
- message: `${IS_SCENARIO_RUNNING(response.data.stopScenario.state) ? 'fail' : 'success'} to stop instance : ${
294
- scenario.name
295
- }`
277
+ message: `${IS_SCENARIO_RUNNING(response.data.stopScenario.state) ? 'fail' : 'success'} to stop instance : ${scenario.name}`
296
278
  })
297
279
  }
298
280
  }
@@ -8,10 +8,6 @@ import { customElement, property, query } from 'lit/decorators.js'
8
8
  import { i18next, localize } from '@operato/i18n'
9
9
  import { ScrollbarStyles } from '@operato/styles'
10
10
 
11
- function IS_SCENARIO_RUNNING(state) {
12
- return state && state !== 'UNLOADED'
13
- }
14
-
15
11
  @customElement('scenarios-monitor')
16
12
  export class ScenariosMonitor extends localize(i18next)(LitElement) {
17
13
  static styles = [
@@ -84,12 +80,17 @@ export class ScenariosMonitor extends localize(i18next)(LitElement) {
84
80
  [scenarios] [flowbox] {
85
81
  display: flex;
86
82
  flex-direction: column;
87
- min-height: min-content;
83
+ padding: 10px;
84
+ gap: 12px;
88
85
  }
89
86
 
90
87
  [scenarios][mode='brief'] [flowbox] {
91
- flex-flow: row wrap;
92
- align-self: start;
88
+ overflow: auto;
89
+ display: grid;
90
+
91
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
92
+ grid-auto-rows: max-content;
93
+ grid-gap: 12px;
93
94
  }
94
95
 
95
96
  scenario-monitor {