@things-factory/integration-ui 6.2.91 → 6.2.92

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;
@@ -230,17 +234,8 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
230
234
  <div buttons ?detail=${this.mode == 'detail'}>
231
235
  <mwc-icon-button @click=${e => this.popupLogView(scenario)} icon="text_snippet"></mwc-icon-button>
232
236
  ${!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
- `}
237
+ ? html` <mwc-icon-button icon="play_circle_outline" @click=${e => this.startScenario(scenario)}></mwc-icon-button>`
238
+ : html` <mwc-icon-button icon="pause_circle_outline" @click=${e => this.stopScenario(scenario)} stop></mwc-icon-button> `}
244
239
  </div>
245
240
  `
246
241
  }
@@ -268,9 +263,7 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
268
263
 
269
264
  notify({
270
265
  level: 'info',
271
- message: `${!IS_SCENARIO_RUNNING(response.data.startScenario.state) ? 'fail' : 'success'} to start instance : ${
272
- scenario.name
273
- }`
266
+ message: `${!IS_SCENARIO_RUNNING(response.data.startScenario.state) ? 'fail' : 'success'} to start instance : ${scenario.name}`
274
267
  })
275
268
  }
276
269
 
@@ -290,9 +283,7 @@ export class ScenarioMonitor extends localize(i18next)(LitElement) {
290
283
 
291
284
  notify({
292
285
  level: 'info',
293
- message: `${IS_SCENARIO_RUNNING(response.data.stopScenario.state) ? 'fail' : 'success'} to stop instance : ${
294
- scenario.name
295
- }`
286
+ message: `${IS_SCENARIO_RUNNING(response.data.stopScenario.state) ? 'fail' : 'success'} to stop instance : ${scenario.name}`
296
287
  })
297
288
  }
298
289
  }
@@ -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 {