...
|
...
|
@@ -24,6 +24,7 @@ import { HomeSection, MenuSection } from '@core/services/menu.models'; |
24
|
24
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
25
|
25
|
import { Authority } from '@shared/models/authority.enum';
|
26
|
26
|
import { AuthUser } from '@shared/models/user.model';
|
|
27
|
+import { guid } from '@core/utils';
|
27
|
28
|
|
28
|
29
|
@Injectable({
|
29
|
30
|
providedIn: 'root'
|
...
|
...
|
@@ -74,24 +75,28 @@ export class MenuService { |
74
|
75
|
const sections: Array<MenuSection> = [];
|
75
|
76
|
sections.push(
|
76
|
77
|
{
|
|
78
|
+ id: guid(),
|
77
|
79
|
name: 'home.home',
|
78
|
80
|
type: 'link',
|
79
|
81
|
path: '/home',
|
80
|
82
|
icon: 'home'
|
81
|
83
|
},
|
82
|
84
|
{
|
|
85
|
+ id: guid(),
|
83
|
86
|
name: 'tenant.tenants',
|
84
|
87
|
type: 'link',
|
85
|
88
|
path: '/tenants',
|
86
|
89
|
icon: 'supervisor_account'
|
87
|
90
|
},
|
88
|
91
|
{
|
|
92
|
+ id: guid(),
|
89
|
93
|
name: 'widget.widget-library',
|
90
|
94
|
type: 'link',
|
91
|
95
|
path: '/widgets-bundles',
|
92
|
96
|
icon: 'now_widgets'
|
93
|
97
|
},
|
94
|
98
|
{
|
|
99
|
+ id: guid(),
|
95
|
100
|
name: 'admin.system-settings',
|
96
|
101
|
type: 'toggle',
|
97
|
102
|
path: '/settings',
|
...
|
...
|
@@ -99,18 +104,21 @@ export class MenuService { |
99
|
104
|
icon: 'settings',
|
100
|
105
|
pages: [
|
101
|
106
|
{
|
|
107
|
+ id: guid(),
|
102
|
108
|
name: 'admin.general',
|
103
|
109
|
type: 'link',
|
104
|
110
|
path: '/settings/general',
|
105
|
111
|
icon: 'settings_applications'
|
106
|
112
|
},
|
107
|
113
|
{
|
|
114
|
+ id: guid(),
|
108
|
115
|
name: 'admin.outgoing-mail',
|
109
|
116
|
type: 'link',
|
110
|
117
|
path: '/settings/outgoing-mail',
|
111
|
118
|
icon: 'mail'
|
112
|
119
|
},
|
113
|
120
|
{
|
|
121
|
+ id: guid(),
|
114
|
122
|
name: 'admin.security-settings',
|
115
|
123
|
type: 'link',
|
116
|
124
|
path: '/settings/security-settings',
|
...
|
...
|
@@ -173,54 +181,63 @@ export class MenuService { |
173
|
181
|
const sections: Array<MenuSection> = [];
|
174
|
182
|
sections.push(
|
175
|
183
|
{
|
|
184
|
+ id: guid(),
|
176
|
185
|
name: 'home.home',
|
177
|
186
|
type: 'link',
|
178
|
187
|
path: '/home',
|
179
|
188
|
icon: 'home'
|
180
|
189
|
},
|
181
|
190
|
{
|
|
191
|
+ id: guid(),
|
182
|
192
|
name: 'rulechain.rulechains',
|
183
|
193
|
type: 'link',
|
184
|
194
|
path: '/ruleChains',
|
185
|
195
|
icon: 'settings_ethernet'
|
186
|
196
|
},
|
187
|
197
|
{
|
|
198
|
+ id: guid(),
|
188
|
199
|
name: 'customer.customers',
|
189
|
200
|
type: 'link',
|
190
|
201
|
path: '/customers',
|
191
|
202
|
icon: 'supervisor_account'
|
192
|
203
|
},
|
193
|
204
|
{
|
|
205
|
+ id: guid(),
|
194
|
206
|
name: 'asset.assets',
|
195
|
207
|
type: 'link',
|
196
|
208
|
path: '/assets',
|
197
|
209
|
icon: 'domain'
|
198
|
210
|
},
|
199
|
211
|
{
|
|
212
|
+ id: guid(),
|
200
|
213
|
name: 'device.devices',
|
201
|
214
|
type: 'link',
|
202
|
215
|
path: '/devices',
|
203
|
216
|
icon: 'devices_other'
|
204
|
217
|
},
|
205
|
218
|
{
|
|
219
|
+ id: guid(),
|
206
|
220
|
name: 'entity-view.entity-views',
|
207
|
221
|
type: 'link',
|
208
|
222
|
path: '/entityViews',
|
209
|
223
|
icon: 'view_quilt'
|
210
|
224
|
},
|
211
|
225
|
{
|
|
226
|
+ id: guid(),
|
212
|
227
|
name: 'widget.widget-library',
|
213
|
228
|
type: 'link',
|
214
|
229
|
path: '/widgets-bundles',
|
215
|
230
|
icon: 'now_widgets'
|
216
|
231
|
},
|
217
|
232
|
{
|
|
233
|
+ id: guid(),
|
218
|
234
|
name: 'dashboard.dashboards',
|
219
|
235
|
type: 'link',
|
220
|
236
|
path: '/dashboards',
|
221
|
237
|
icon: 'dashboards'
|
222
|
238
|
},
|
223
|
239
|
{
|
|
240
|
+ id: guid(),
|
224
|
241
|
name: 'audit-log.audit-logs',
|
225
|
242
|
type: 'link',
|
226
|
243
|
path: '/auditLogs',
|
...
|
...
|
@@ -316,30 +333,35 @@ export class MenuService { |
316
|
333
|
const sections: Array<MenuSection> = [];
|
317
|
334
|
sections.push(
|
318
|
335
|
{
|
|
336
|
+ id: guid(),
|
319
|
337
|
name: 'home.home',
|
320
|
338
|
type: 'link',
|
321
|
339
|
path: '/home',
|
322
|
340
|
icon: 'home'
|
323
|
341
|
},
|
324
|
342
|
{
|
|
343
|
+ id: guid(),
|
325
|
344
|
name: 'asset.assets',
|
326
|
345
|
type: 'link',
|
327
|
346
|
path: '/assets',
|
328
|
347
|
icon: 'domain'
|
329
|
348
|
},
|
330
|
349
|
{
|
|
350
|
+ id: guid(),
|
331
|
351
|
name: 'device.devices',
|
332
|
352
|
type: 'link',
|
333
|
353
|
path: '/devices',
|
334
|
354
|
icon: 'devices_other'
|
335
|
355
|
},
|
336
|
356
|
{
|
|
357
|
+ id: guid(),
|
337
|
358
|
name: 'entity-view.entity-views',
|
338
|
359
|
type: 'link',
|
339
|
360
|
path: '/entityViews',
|
340
|
361
|
icon: 'view_quilt'
|
341
|
362
|
},
|
342
|
363
|
{
|
|
364
|
+ id: guid(),
|
343
|
365
|
name: 'dashboard.dashboards',
|
344
|
366
|
type: 'link',
|
345
|
367
|
path: '/dashboards',
|
...
|
...
|
|