@openremote/manager 1.8.0-snapshot.20250725120001 → 1.8.0-snapshot.20250725123024
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/dist/{bundle.6bd21fda2e8cb09f.js → bundle.5f4402fd359cc316.js} +3411 -3411
- package/dist/bundle.ddd2e478dcd11d3c.js +3678 -0
- package/dist/index.html +18 -18
- package/index.html +88 -88
- package/lib/components/alarms/or-alarms-table.js +56 -56
- package/lib/components/configuration/or-conf-json.js +25 -25
- package/lib/components/configuration/or-conf-map/or-conf-map-card.js +177 -177
- package/lib/components/configuration/or-conf-map/or-conf-map-geojson.js +24 -24
- package/lib/components/configuration/or-conf-map/or-conf-map-global.js +153 -153
- package/lib/components/configuration/or-conf-panel.js +43 -43
- package/lib/components/configuration/or-conf-realm/or-conf-realm-card.js +200 -200
- package/lib/pages/page-account.js +243 -243
- package/lib/pages/page-alarms.js +369 -369
- package/lib/pages/page-assets.js +100 -100
- package/lib/pages/page-configuration.js +152 -152
- package/lib/pages/page-export.js +191 -191
- package/lib/pages/page-gateway-tunnel.js +106 -106
- package/lib/pages/page-gateway.js +252 -252
- package/lib/pages/page-insights.js +19 -19
- package/lib/pages/page-logs.js +11 -11
- package/lib/pages/page-map.js +37 -37
- package/lib/pages/page-provisioning.js +294 -294
- package/lib/pages/page-realms.js +284 -284
- package/lib/pages/page-roles.js +279 -279
- package/lib/pages/page-rules.js +11 -11
- package/lib/pages/page-users.js +383 -383
- package/package.json +3 -3
package/lib/pages/page-realms.js
CHANGED
|
@@ -41,184 +41,184 @@ let PageRealms = class PageRealms extends Page {
|
|
|
41
41
|
// language=CSS
|
|
42
42
|
return [
|
|
43
43
|
unsafeCSS(tableStyle),
|
|
44
|
-
css `
|
|
45
|
-
#wrapper {
|
|
46
|
-
height: 100%;
|
|
47
|
-
width: 100%;
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
overflow: auto;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
#title {
|
|
54
|
-
padding: 0 20px;
|
|
55
|
-
font-size: 18px;
|
|
56
|
-
font-weight: bold;
|
|
57
|
-
width: calc(100% - 40px);
|
|
58
|
-
max-width: 1360px;
|
|
59
|
-
margin: 20px auto;
|
|
60
|
-
align-items: center;
|
|
61
|
-
display: flex;
|
|
62
|
-
color: var(--or-app-color3, ${unsafeCSS(DefaultColor3)});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
#title or-icon {
|
|
66
|
-
margin-right: 10px;
|
|
67
|
-
margin-left: 14px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.panel {
|
|
71
|
-
width: calc(100% - 90px);
|
|
72
|
-
padding: 0 20px;
|
|
73
|
-
max-width: 1310px;
|
|
74
|
-
background-color: white;
|
|
75
|
-
border: 1px solid #e5e5e5;
|
|
76
|
-
border-radius: 5px;
|
|
77
|
-
position: relative;
|
|
78
|
-
margin: 0 auto;
|
|
79
|
-
padding: 24px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.panel-title {
|
|
83
|
-
text-transform: uppercase;
|
|
84
|
-
font-weight: bolder;
|
|
85
|
-
line-height: 1em;
|
|
86
|
-
color: var(--or-app-color3, ${unsafeCSS(DefaultColor3)});
|
|
87
|
-
margin-bottom: 20px;
|
|
88
|
-
margin-top: 0;
|
|
89
|
-
flex: 0 0 auto;
|
|
90
|
-
letter-spacing: 0.025em;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
#table-roles,
|
|
95
|
-
#table-roles table{
|
|
96
|
-
width: 100%;
|
|
97
|
-
white-space: nowrap;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.mdc-data-table__row {
|
|
101
|
-
border-top-color: #D3D3D3;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
td, th {
|
|
105
|
-
width: 25%;
|
|
106
|
-
border: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
td.large, th.large {
|
|
110
|
-
width: 50%
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.realm-container {
|
|
114
|
-
flex-direction: row;
|
|
115
|
-
overflow: hidden;
|
|
116
|
-
max-height: 0;
|
|
117
|
-
transition: max-height 0.25s ease-out;
|
|
118
|
-
padding-left: 16px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
or-mwc-input {
|
|
122
|
-
margin-bottom: 20px;
|
|
123
|
-
margin-right: 16px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
or-icon {
|
|
127
|
-
vertical-align: middle;
|
|
128
|
-
--or-icon-width: 20px;
|
|
129
|
-
--or-icon-height: 20px;
|
|
130
|
-
margin-right: 2px;
|
|
131
|
-
margin-left: -5px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.row {
|
|
135
|
-
display: flex;
|
|
136
|
-
flex-direction: row;
|
|
137
|
-
margin: 10px 0;
|
|
138
|
-
flex: 1 1 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.column {
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
margin: 0px;
|
|
145
|
-
flex: 1 1 0;
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.mdc-data-table__header-cell {
|
|
150
|
-
font-weight: bold;
|
|
151
|
-
color: ${unsafeCSS(DefaultColor3)};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.mdc-data-table__header-cell:first-child {
|
|
155
|
-
padding-left: 36px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.mdc-data-table__row {
|
|
159
|
-
cursor: pointer;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.padded-cell {
|
|
163
|
-
overflow-wrap: break-word;
|
|
164
|
-
word-wrap: break-word
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.realm-row td {
|
|
168
|
-
padding: 0;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.realm-row {
|
|
172
|
-
max-width: 0px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.realm-row.expanded .realm-container {
|
|
176
|
-
max-height: 1000px;
|
|
177
|
-
max-width: none;
|
|
178
|
-
transition: max-height 1s ease-in;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.button {
|
|
182
|
-
cursor: pointer;
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-direction: row;
|
|
185
|
-
align-content: center;
|
|
186
|
-
padding: 16px;
|
|
187
|
-
align-items: center;
|
|
188
|
-
font-size: 14px;
|
|
189
|
-
text-transform: uppercase;
|
|
190
|
-
color: var(--or-app-color4);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.button or-icon {
|
|
194
|
-
--or-icon-fill: var(--or-app-color4);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@media screen and (max-width: 1024px){
|
|
198
|
-
.row {
|
|
199
|
-
display: block;
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
@media screen and (max-width: 768px){
|
|
205
|
-
#title {
|
|
206
|
-
padding: 0;
|
|
207
|
-
width: 100%;
|
|
208
|
-
}
|
|
209
|
-
.panel {
|
|
210
|
-
border-left: 0px;
|
|
211
|
-
border-right: 0px;
|
|
212
|
-
width: calc(100% - 48px);
|
|
213
|
-
border-radius: 0;
|
|
214
|
-
}
|
|
215
|
-
.hide-mobile {
|
|
216
|
-
display: none;
|
|
217
|
-
}
|
|
218
|
-
td, th {
|
|
219
|
-
width: 50%
|
|
220
|
-
}
|
|
221
|
-
}
|
|
44
|
+
css `
|
|
45
|
+
#wrapper {
|
|
46
|
+
height: 100%;
|
|
47
|
+
width: 100%;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
overflow: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
#title {
|
|
54
|
+
padding: 0 20px;
|
|
55
|
+
font-size: 18px;
|
|
56
|
+
font-weight: bold;
|
|
57
|
+
width: calc(100% - 40px);
|
|
58
|
+
max-width: 1360px;
|
|
59
|
+
margin: 20px auto;
|
|
60
|
+
align-items: center;
|
|
61
|
+
display: flex;
|
|
62
|
+
color: var(--or-app-color3, ${unsafeCSS(DefaultColor3)});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#title or-icon {
|
|
66
|
+
margin-right: 10px;
|
|
67
|
+
margin-left: 14px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.panel {
|
|
71
|
+
width: calc(100% - 90px);
|
|
72
|
+
padding: 0 20px;
|
|
73
|
+
max-width: 1310px;
|
|
74
|
+
background-color: white;
|
|
75
|
+
border: 1px solid #e5e5e5;
|
|
76
|
+
border-radius: 5px;
|
|
77
|
+
position: relative;
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
padding: 24px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.panel-title {
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
font-weight: bolder;
|
|
85
|
+
line-height: 1em;
|
|
86
|
+
color: var(--or-app-color3, ${unsafeCSS(DefaultColor3)});
|
|
87
|
+
margin-bottom: 20px;
|
|
88
|
+
margin-top: 0;
|
|
89
|
+
flex: 0 0 auto;
|
|
90
|
+
letter-spacing: 0.025em;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
#table-roles,
|
|
95
|
+
#table-roles table{
|
|
96
|
+
width: 100%;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mdc-data-table__row {
|
|
101
|
+
border-top-color: #D3D3D3;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
td, th {
|
|
105
|
+
width: 25%;
|
|
106
|
+
border: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
td.large, th.large {
|
|
110
|
+
width: 50%
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.realm-container {
|
|
114
|
+
flex-direction: row;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
max-height: 0;
|
|
117
|
+
transition: max-height 0.25s ease-out;
|
|
118
|
+
padding-left: 16px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
or-mwc-input {
|
|
122
|
+
margin-bottom: 20px;
|
|
123
|
+
margin-right: 16px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
or-icon {
|
|
127
|
+
vertical-align: middle;
|
|
128
|
+
--or-icon-width: 20px;
|
|
129
|
+
--or-icon-height: 20px;
|
|
130
|
+
margin-right: 2px;
|
|
131
|
+
margin-left: -5px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.row {
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: row;
|
|
137
|
+
margin: 10px 0;
|
|
138
|
+
flex: 1 1 0;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.column {
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
margin: 0px;
|
|
145
|
+
flex: 1 1 0;
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.mdc-data-table__header-cell {
|
|
150
|
+
font-weight: bold;
|
|
151
|
+
color: ${unsafeCSS(DefaultColor3)};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.mdc-data-table__header-cell:first-child {
|
|
155
|
+
padding-left: 36px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.mdc-data-table__row {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.padded-cell {
|
|
163
|
+
overflow-wrap: break-word;
|
|
164
|
+
word-wrap: break-word
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.realm-row td {
|
|
168
|
+
padding: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.realm-row {
|
|
172
|
+
max-width: 0px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.realm-row.expanded .realm-container {
|
|
176
|
+
max-height: 1000px;
|
|
177
|
+
max-width: none;
|
|
178
|
+
transition: max-height 1s ease-in;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.button {
|
|
182
|
+
cursor: pointer;
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: row;
|
|
185
|
+
align-content: center;
|
|
186
|
+
padding: 16px;
|
|
187
|
+
align-items: center;
|
|
188
|
+
font-size: 14px;
|
|
189
|
+
text-transform: uppercase;
|
|
190
|
+
color: var(--or-app-color4);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.button or-icon {
|
|
194
|
+
--or-icon-fill: var(--or-app-color4);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media screen and (max-width: 1024px){
|
|
198
|
+
.row {
|
|
199
|
+
display: block;
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@media screen and (max-width: 768px){
|
|
205
|
+
#title {
|
|
206
|
+
padding: 0;
|
|
207
|
+
width: 100%;
|
|
208
|
+
}
|
|
209
|
+
.panel {
|
|
210
|
+
border-left: 0px;
|
|
211
|
+
border-right: 0px;
|
|
212
|
+
width: calc(100% - 48px);
|
|
213
|
+
border-radius: 0;
|
|
214
|
+
}
|
|
215
|
+
.hide-mobile {
|
|
216
|
+
display: none;
|
|
217
|
+
}
|
|
218
|
+
td, th {
|
|
219
|
+
width: 50%
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
222
|
`,
|
|
223
223
|
];
|
|
224
224
|
}
|
|
@@ -242,97 +242,97 @@ let PageRealms = class PageRealms extends Page {
|
|
|
242
242
|
}
|
|
243
243
|
render() {
|
|
244
244
|
if (!manager.authenticated) {
|
|
245
|
-
return html `
|
|
246
|
-
<or-translate value="notAuthenticated"></or-translate>
|
|
245
|
+
return html `
|
|
246
|
+
<or-translate value="notAuthenticated"></or-translate>
|
|
247
247
|
`;
|
|
248
248
|
}
|
|
249
249
|
if (!manager.isKeycloak()) {
|
|
250
|
-
return html `
|
|
251
|
-
<or-translate value="notSupported"></or-translate>
|
|
250
|
+
return html `
|
|
251
|
+
<or-translate value="notSupported"></or-translate>
|
|
252
252
|
`;
|
|
253
253
|
}
|
|
254
254
|
const readonly = !manager.hasRole("write:admin" /* ClientRole.WRITE_ADMIN */);
|
|
255
|
-
return html `
|
|
256
|
-
<div id="wrapper">
|
|
257
|
-
<div id="title">
|
|
258
|
-
<or-icon icon="domain"></or-icon>${i18next.t("realm_plural")}
|
|
259
|
-
</div>
|
|
260
|
-
<div class="panel">
|
|
261
|
-
<p class="panel-title">${i18next.t("realm_plural")}</p>
|
|
262
|
-
<div id="table-roles" class="mdc-data-table">
|
|
263
|
-
<table class="mdc-data-table__table" aria-label="realm list" >
|
|
264
|
-
<thead>
|
|
265
|
-
<tr class="mdc-data-table__header-row">
|
|
266
|
-
<th class="mdc-data-table__header-cell" role="columnheader" scope="col"><or-translate value="name"></or-translate></th>
|
|
267
|
-
<th class="mdc-data-table__header-cell" role="columnheader" scope="col"><or-translate value="displayName"></or-translate></th>
|
|
268
|
-
<th class="mdc-data-table__header-cell hide-mobile large" role="columnheader" scope="col"><or-translate value="status"></or-translate></th>
|
|
269
|
-
</tr>
|
|
270
|
-
</thead>
|
|
271
|
-
<tbody class="mdc-data-table__content">
|
|
255
|
+
return html `
|
|
256
|
+
<div id="wrapper">
|
|
257
|
+
<div id="title">
|
|
258
|
+
<or-icon icon="domain"></or-icon>${i18next.t("realm_plural")}
|
|
259
|
+
</div>
|
|
260
|
+
<div class="panel">
|
|
261
|
+
<p class="panel-title">${i18next.t("realm_plural")}</p>
|
|
262
|
+
<div id="table-roles" class="mdc-data-table">
|
|
263
|
+
<table class="mdc-data-table__table" aria-label="realm list" >
|
|
264
|
+
<thead>
|
|
265
|
+
<tr class="mdc-data-table__header-row">
|
|
266
|
+
<th class="mdc-data-table__header-cell" role="columnheader" scope="col"><or-translate value="name"></or-translate></th>
|
|
267
|
+
<th class="mdc-data-table__header-cell" role="columnheader" scope="col"><or-translate value="displayName"></or-translate></th>
|
|
268
|
+
<th class="mdc-data-table__header-cell hide-mobile large" role="columnheader" scope="col"><or-translate value="status"></or-translate></th>
|
|
269
|
+
</tr>
|
|
270
|
+
</thead>
|
|
271
|
+
<tbody class="mdc-data-table__content">
|
|
272
272
|
${this._realms.map((realm, index) => {
|
|
273
|
-
return html `
|
|
274
|
-
<tr id="mdc-data-table-row-${index}" class="mdc-data-table__row" @click="${(ev) => this.expanderToggle(ev, index)}">
|
|
275
|
-
<td class="padded-cell mdc-data-table__cell"
|
|
276
|
-
>
|
|
277
|
-
<or-icon id="mdc-data-table-icon-${index}" icon="chevron-right"></or-icon>
|
|
278
|
-
<span>${realm.name}</span>
|
|
279
|
-
</td>
|
|
280
|
-
<td class="padded-cell mdc-data-table__cell">
|
|
281
|
-
${realm.displayName}
|
|
282
|
-
</td>
|
|
283
|
-
<td class="padded-cell hide-mobile mdc-data-table__cell large">
|
|
284
|
-
${realm.enabled ? "Enabled" : "Disabled"}
|
|
285
|
-
|
|
286
|
-
</td>
|
|
287
|
-
</tr>
|
|
288
|
-
<tr id="realm-row-${index}" class="realm-row${!realm.id ? " expanded" : ""}">
|
|
289
|
-
<td colspan="100%">
|
|
290
|
-
<div class="realm-container">
|
|
291
|
-
|
|
292
|
-
<div class="row">
|
|
293
|
-
<div class="column">
|
|
294
|
-
<or-mwc-input ?readonly="${realm.id}" .label="${i18next.t("realm")}" .type="${InputType.TEXT}" min="1" required .value="${realm.name}" @or-mwc-input-changed="${(e) => realm.name = e.detail.value}"></or-mwc-input>
|
|
295
|
-
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("loginTheme", Util.camelCaseToSentenceCase("loginTheme"))}" .type="${InputType.TEXT}" .value="${realm.loginTheme}" @or-mwc-input-changed="${(e) => realm.loginTheme = e.detail.value}"></or-mwc-input>
|
|
296
|
-
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("resetPasswordAllowed")}" .type="${InputType.SWITCH}" min="1" .value="${realm.resetPasswordAllowed}" @or-mwc-input-changed="${(e) => realm.resetPasswordAllowed = e.detail.value}"></or-mwc-input>
|
|
297
|
-
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("enabled")}" .type="${InputType.SWITCH}" min="1" .value="${realm.enabled}" @or-mwc-input-changed="${(e) => realm.enabled = e.detail.value}"></or-mwc-input>
|
|
298
|
-
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("rememberMe")}" .type="${InputType.SWITCH}" min="1" .value="${realm.rememberMe}" @or-mwc-input-changed="${(e) => realm.rememberMe = e.detail.value}"></or-mwc-input>
|
|
299
|
-
</div>
|
|
300
|
-
<div class="column">
|
|
301
|
-
<or-mwc-input .label="${i18next.t("displayName")}" .type="${InputType.TEXT}" min="1" required .value="${realm.displayName}" @or-mwc-input-changed="${(e) => realm.displayName = e.detail.value}"></or-mwc-input>
|
|
302
|
-
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("emailTheme", Util.camelCaseToSentenceCase("emailTheme"))}" .type="${InputType.TEXT}" .value="${realm.emailTheme}" @or-mwc-input-changed="${(e) => realm.emailTheme = e.detail.value}"></or-mwc-input>
|
|
303
|
-
</div>
|
|
304
|
-
</div>
|
|
305
|
-
|
|
306
|
-
<div class="row" style="margin-bottom: 0;">
|
|
307
|
-
${realm.id && !readonly ? html `
|
|
308
|
-
${realm.name !== "master" && manager.isSuperUser() ? html `
|
|
309
|
-
<or-mwc-input label="delete" .type="${InputType.BUTTON}" .disabled="${manager.displayRealm === realm.name}" @or-mwc-input-changed="${() => this._deleteRealm(realm)}"></or-mwc-input>
|
|
310
|
-
` : ``}
|
|
311
|
-
<or-mwc-input style="margin-left: auto;" label="save" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._updateRealm(realm)}"></or-mwc-input>
|
|
312
|
-
` : !readonly ? html `
|
|
313
|
-
<or-mwc-input label="cancel" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => { this._realms.splice(-1, 1); this._realms = [...this._realms]; }}"></or-mwc-input>
|
|
314
|
-
<or-mwc-input style="margin-left: auto;" label="create" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._createRealm(realm)}"></or-mwc-input>
|
|
315
|
-
` : ``}
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
</td>
|
|
319
|
-
</tr>
|
|
273
|
+
return html `
|
|
274
|
+
<tr id="mdc-data-table-row-${index}" class="mdc-data-table__row" @click="${(ev) => this.expanderToggle(ev, index)}">
|
|
275
|
+
<td class="padded-cell mdc-data-table__cell"
|
|
276
|
+
>
|
|
277
|
+
<or-icon id="mdc-data-table-icon-${index}" icon="chevron-right"></or-icon>
|
|
278
|
+
<span>${realm.name}</span>
|
|
279
|
+
</td>
|
|
280
|
+
<td class="padded-cell mdc-data-table__cell">
|
|
281
|
+
${realm.displayName}
|
|
282
|
+
</td>
|
|
283
|
+
<td class="padded-cell hide-mobile mdc-data-table__cell large">
|
|
284
|
+
${realm.enabled ? "Enabled" : "Disabled"}
|
|
285
|
+
|
|
286
|
+
</td>
|
|
287
|
+
</tr>
|
|
288
|
+
<tr id="realm-row-${index}" class="realm-row${!realm.id ? " expanded" : ""}">
|
|
289
|
+
<td colspan="100%">
|
|
290
|
+
<div class="realm-container">
|
|
291
|
+
|
|
292
|
+
<div class="row">
|
|
293
|
+
<div class="column">
|
|
294
|
+
<or-mwc-input ?readonly="${realm.id}" .label="${i18next.t("realm")}" .type="${InputType.TEXT}" min="1" required .value="${realm.name}" @or-mwc-input-changed="${(e) => realm.name = e.detail.value}"></or-mwc-input>
|
|
295
|
+
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("loginTheme", Util.camelCaseToSentenceCase("loginTheme"))}" .type="${InputType.TEXT}" .value="${realm.loginTheme}" @or-mwc-input-changed="${(e) => realm.loginTheme = e.detail.value}"></or-mwc-input>
|
|
296
|
+
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("resetPasswordAllowed")}" .type="${InputType.SWITCH}" min="1" .value="${realm.resetPasswordAllowed}" @or-mwc-input-changed="${(e) => realm.resetPasswordAllowed = e.detail.value}"></or-mwc-input>
|
|
297
|
+
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("enabled")}" .type="${InputType.SWITCH}" min="1" .value="${realm.enabled}" @or-mwc-input-changed="${(e) => realm.enabled = e.detail.value}"></or-mwc-input>
|
|
298
|
+
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("rememberMe")}" .type="${InputType.SWITCH}" min="1" .value="${realm.rememberMe}" @or-mwc-input-changed="${(e) => realm.rememberMe = e.detail.value}"></or-mwc-input>
|
|
299
|
+
</div>
|
|
300
|
+
<div class="column">
|
|
301
|
+
<or-mwc-input .label="${i18next.t("displayName")}" .type="${InputType.TEXT}" min="1" required .value="${realm.displayName}" @or-mwc-input-changed="${(e) => realm.displayName = e.detail.value}"></or-mwc-input>
|
|
302
|
+
<or-mwc-input ?readonly="${readonly}" .label="${i18next.t("emailTheme", Util.camelCaseToSentenceCase("emailTheme"))}" .type="${InputType.TEXT}" .value="${realm.emailTheme}" @or-mwc-input-changed="${(e) => realm.emailTheme = e.detail.value}"></or-mwc-input>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div class="row" style="margin-bottom: 0;">
|
|
307
|
+
${realm.id && !readonly ? html `
|
|
308
|
+
${realm.name !== "master" && manager.isSuperUser() ? html `
|
|
309
|
+
<or-mwc-input label="delete" .type="${InputType.BUTTON}" .disabled="${manager.displayRealm === realm.name}" @or-mwc-input-changed="${() => this._deleteRealm(realm)}"></or-mwc-input>
|
|
310
|
+
` : ``}
|
|
311
|
+
<or-mwc-input style="margin-left: auto;" label="save" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._updateRealm(realm)}"></or-mwc-input>
|
|
312
|
+
` : !readonly ? html `
|
|
313
|
+
<or-mwc-input label="cancel" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => { this._realms.splice(-1, 1); this._realms = [...this._realms]; }}"></or-mwc-input>
|
|
314
|
+
<or-mwc-input style="margin-left: auto;" label="create" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._createRealm(realm)}"></or-mwc-input>
|
|
315
|
+
` : ``}
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</td>
|
|
319
|
+
</tr>
|
|
320
320
|
`;
|
|
321
|
-
})}
|
|
322
|
-
${this._realms.length > 0 && !!this._realms[this._realms.length - 1].id && !readonly ? html `
|
|
323
|
-
<tr class="mdc-data-table__row">
|
|
324
|
-
<td colspan="100%">
|
|
325
|
-
<a class="button" @click="${() => this._realms = [...this._realms, { displayName: "", enabled: true }]}"><or-icon icon="plus"></or-icon>${i18next.t("add")} ${i18next.t("realm")}</a>
|
|
326
|
-
</td>
|
|
327
|
-
</tr>
|
|
328
|
-
` : ``}
|
|
329
|
-
</tbody>
|
|
330
|
-
</table>
|
|
331
|
-
</div>
|
|
332
|
-
|
|
333
|
-
</div>
|
|
334
|
-
</div>
|
|
335
|
-
|
|
321
|
+
})}
|
|
322
|
+
${this._realms.length > 0 && !!this._realms[this._realms.length - 1].id && !readonly ? html `
|
|
323
|
+
<tr class="mdc-data-table__row">
|
|
324
|
+
<td colspan="100%">
|
|
325
|
+
<a class="button" @click="${() => this._realms = [...this._realms, { displayName: "", enabled: true }]}"><or-icon icon="plus"></or-icon>${i18next.t("add")} ${i18next.t("realm")}</a>
|
|
326
|
+
</td>
|
|
327
|
+
</tr>
|
|
328
|
+
` : ``}
|
|
329
|
+
</tbody>
|
|
330
|
+
</table>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
336
|
`;
|
|
337
337
|
}
|
|
338
338
|
stateChanged(state) {
|
|
@@ -390,9 +390,9 @@ let PageRealms = class PageRealms extends Page {
|
|
|
390
390
|
okBtnRef.value.disabled = confirmedName !== realm.name;
|
|
391
391
|
}
|
|
392
392
|
};
|
|
393
|
-
const dialogContent = html `<div>
|
|
394
|
-
<p style="text-align: justify; font-weight: bold;">${i18next.t("realmDeleteConfirm", { realmName: realm.name })}</p>
|
|
395
|
-
<or-mwc-input .type="${InputType.TEXT}" @input=${(ev) => inputChanged(ev.target.nativeValue)} .label="${i18next.t("realm")}"></or-mwc-input>
|
|
393
|
+
const dialogContent = html `<div>
|
|
394
|
+
<p style="text-align: justify; font-weight: bold;">${i18next.t("realmDeleteConfirm", { realmName: realm.name })}</p>
|
|
395
|
+
<or-mwc-input .type="${InputType.TEXT}" @input=${(ev) => inputChanged(ev.target.nativeValue)} .label="${i18next.t("realm")}"></or-mwc-input>
|
|
396
396
|
</div>`;
|
|
397
397
|
const dialogActions = [
|
|
398
398
|
{
|
|
@@ -410,26 +410,26 @@ let PageRealms = class PageRealms extends Page {
|
|
|
410
410
|
const dialog = showDialog(new OrMwcDialog()
|
|
411
411
|
.setContent(dialogContent)
|
|
412
412
|
.setActions(dialogActions)
|
|
413
|
-
.setStyles(html `
|
|
414
|
-
<style>
|
|
415
|
-
.mdc-dialog__surface {
|
|
416
|
-
display: flex;
|
|
417
|
-
width: 400px;
|
|
418
|
-
max-width: 100%;
|
|
419
|
-
overflow: visible;
|
|
420
|
-
overflow-x: visible !important;
|
|
421
|
-
overflow-y: visible !important;
|
|
422
|
-
}
|
|
423
|
-
#dialog-content {
|
|
424
|
-
text-align: center;
|
|
425
|
-
flex: 1;
|
|
426
|
-
overflow: visible;
|
|
427
|
-
min-height: 0;
|
|
428
|
-
}
|
|
429
|
-
or-asset-tree {
|
|
430
|
-
height: 100%;
|
|
431
|
-
}
|
|
432
|
-
</style>
|
|
413
|
+
.setStyles(html `
|
|
414
|
+
<style>
|
|
415
|
+
.mdc-dialog__surface {
|
|
416
|
+
display: flex;
|
|
417
|
+
width: 400px;
|
|
418
|
+
max-width: 100%;
|
|
419
|
+
overflow: visible;
|
|
420
|
+
overflow-x: visible !important;
|
|
421
|
+
overflow-y: visible !important;
|
|
422
|
+
}
|
|
423
|
+
#dialog-content {
|
|
424
|
+
text-align: center;
|
|
425
|
+
flex: 1;
|
|
426
|
+
overflow: visible;
|
|
427
|
+
min-height: 0;
|
|
428
|
+
}
|
|
429
|
+
or-asset-tree {
|
|
430
|
+
height: 100%;
|
|
431
|
+
}
|
|
432
|
+
</style>
|
|
433
433
|
`)
|
|
434
434
|
.setDismissAction(null));
|
|
435
435
|
}
|