Commit f81413112c2858e44dc308c056c38f8fbc5ed94f

Authored by Artem Babak
1 parent fa8a47a5

Edge: menu order changes

... ... @@ -293,24 +293,24 @@ export class MenuService {
293 293 sections.push(
294 294 {
295 295 id: guid(),
  296 + name: 'edge.edge-instances',
  297 + type: 'link',
  298 + path: '/edgeInstances',
  299 + icon: 'router'
  300 + },
  301 + {
  302 + id: guid(),
296 303 name: 'edge.management',
297 304 type: 'toggle',
298   - path: '/edges',
299   - height: '80px',
300   - icon: 'router',
  305 + path: '/edgeManagement',
  306 + height: '40px',
  307 + icon: 'settings_input_antenna',
301 308 pages: [
302 309 {
303 310 id: guid(),
304   - name: 'edge.edge-instances',
305   - type: 'link',
306   - path: '/edges',
307   - icon: 'router'
308   - },
309   - {
310   - id: guid(),
311 311 name: 'edge.rulechain-templates',
312 312 type: 'link',
313   - path: '/edges/ruleChains',
  313 + path: '/edgeManagement/ruleChains',
314 314 icon: 'settings_ethernet'
315 315 }
316 316 ]
... ... @@ -448,12 +448,12 @@ export class MenuService {
448 448 {
449 449 name: 'edge.edge-instances',
450 450 icon: 'router',
451   - path: '/edges'
  451 + path: '/edgeInstances'
452 452 },
453 453 {
454 454 name: 'edge.rulechain-templates',
455 455 icon: 'settings_ethernet',
456   - path: '/edges/ruleChains'
  456 + path: '/edgeManagement/ruleChains'
457 457 }
458 458 ]
459 459 }
... ... @@ -548,7 +548,7 @@ export class MenuService {
548 548 id: guid(),
549 549 name: 'edge.edge-instances',
550 550 type: 'link',
551   - path: '/edges',
  551 + path: '/edgeInstances',
552 552 icon: 'router'
553 553 }
554 554 );
... ... @@ -606,8 +606,8 @@ export class MenuService {
606 606 places: [
607 607 {
608 608 name: 'edge.edge-instances',
609   - icon: 'router',
610   - path: '/edges'
  609 + icon: 'settings_input_antenna',
  610 + path: '/edgeInstances'
611 611 }
612 612 ]
613 613 }
... ...
... ... @@ -98,7 +98,7 @@ const routes: Routes = [
98 98 }
99 99 },
100 100 {
101   - path: ':customerId/edges',
  101 + path: ':customerId/edgeInstances',
102 102 component: EntitiesTableComponent,
103 103 data: {
104 104 auth: [Authority.TENANT_ADMIN],
... ...
... ... @@ -169,7 +169,7 @@ export class CustomersTableConfigResolver implements Resolve<EntityTableConfig<C
169 169 if ($event) {
170 170 $event.stopPropagation();
171 171 }
172   - this.router.navigateByUrl(`customers/${customer.id.id}/edges`);
  172 + this.router.navigateByUrl(`customers/${customer.id.id}/edgeInstances`);
173 173 }
174 174
175 175 onCustomerAction(action: EntityAction<Customer>): boolean {
... ...
... ... @@ -362,7 +362,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<
362 362 if (this.config.componentsData.dashboardScope === 'customer') {
363 363 this.router.navigateByUrl(`customers/${this.config.componentsData.customerId}/dashboards/${dashboard.id.id}`);
364 364 } else if (this.config.componentsData.dashboardScope === 'edge') {
365   - this.router.navigateByUrl(`edges/${this.config.componentsData.edgeId}/dashboards/${dashboard.id.id}`);
  365 + this.router.navigateByUrl(`edgeInstances/${this.config.componentsData.edgeId}/dashboards/${dashboard.id.id}`);
366 366 } else {
367 367 this.router.navigateByUrl(`dashboards/${dashboard.id.id}`);
368 368 }
... ...
... ... @@ -39,10 +39,11 @@ import {
39 39 RuleNodeComponentsResolver,
40 40 TooltipsterResolver
41 41 } from '@home/pages/rulechain/rulechain-routing.module';
  42 +import { CustomersTableConfigResolver } from '@home/pages/customer/customers-table-config.resolver';
42 43
43 44 const routes: Routes = [
44 45 {
45   - path: 'edges',
  46 + path: 'edgeInstances',
46 47 data: {
47 48 breadcrumb: {
48 49 label: 'edge.edge-instances',
... ... @@ -55,7 +56,7 @@ const routes: Routes = [
55 56 component: EntitiesTableComponent,
56 57 data: {
57 58 auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
58   - edgesType: 'tenant'
  59 + edgesType: 'tenant',
59 60 },
60 61 resolve: {
61 62 entitiesTableConfig: EdgesTableConfigResolver
... ... @@ -187,6 +188,24 @@ const routes: Routes = [
187 188 }
188 189 }
189 190 ]
  191 + }
  192 + ]
  193 + },
  194 + {
  195 + path: 'edgeManagement',
  196 + data: {
  197 + breadcrumb: {
  198 + label: 'edge.management',
  199 + icon: 'settings_input_antenna'
  200 + }
  201 + },
  202 + children: [
  203 + {
  204 + path: '',
  205 + data: {
  206 + auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
  207 + redirectTo: '/edgeManagement/ruleChains'
  208 + }
190 209 },
191 210 {
192 211 path: 'ruleChains',
... ... @@ -253,7 +272,8 @@ const routes: Routes = [
253 272 ]
254 273 }
255 274 ]
256   - }];
  275 + }
  276 + ];
257 277
258 278 @NgModule({
259 279 imports: [RouterModule.forChild(routes)],
... ...
... ... @@ -417,7 +417,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
417 417 suffix = 'ruleChains';
418 418 break;
419 419 }
420   - this.router.navigateByUrl(`edges/${edge.id.id}/${suffix}`);
  420 + this.router.navigateByUrl(`edgeInstances/${edge.id.id}/${suffix}`);
421 421 }
422 422
423 423 assignToCustomer($event: Event, edgesIds: Array<EdgeId>) {
... ...
... ... @@ -152,7 +152,7 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O
152 152 }
153 153 if (this.ruleNode.targetRuleChainId) {
154 154 if (this.ruleChainType === RuleChainType.EDGE) {
155   - this.router.navigateByUrl(`/edges/ruleChains/${this.ruleNode.targetRuleChainId}`);
  155 + this.router.navigateByUrl(`/edgeManagement/ruleChains/${this.ruleNode.targetRuleChainId}`);
156 156 } else {
157 157 this.router.navigateByUrl(`/ruleChains/${this.ruleNode.targetRuleChainId}`);
158 158 }
... ...
... ... @@ -1289,7 +1289,7 @@ export class RuleChainPageComponent extends PageComponent
1289 1289 if (this.ruleChainType !== RuleChainType.EDGE) {
1290 1290 this.router.navigateByUrl(`ruleChains/${this.ruleChain.id.id}`);
1291 1291 } else {
1292   - this.router.navigateByUrl(`edges/ruleChains/${this.ruleChain.id.id}`);
  1292 + this.router.navigateByUrl(`edgeManagement/ruleChains/${this.ruleChain.id.id}`);
1293 1293 }
1294 1294 } else {
1295 1295 this.createRuleChainModel();
... ...
... ... @@ -285,7 +285,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
285 285 if (ruleChainImport) {
286 286 this.itembuffer.storeRuleChainImport(ruleChainImport);
287 287 if (this.config.componentsData.ruleChainScope === 'edges') {
288   - this.router.navigateByUrl(`edges/ruleChains/ruleChain/import`);
  288 + this.router.navigateByUrl(`edgeManagement/ruleChains/ruleChain/import`);
289 289 } else {
290 290 this.router.navigateByUrl(`ruleChains/ruleChain/import`);
291 291 }
... ... @@ -298,9 +298,9 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
298 298 $event.stopPropagation();
299 299 }
300 300 if (this.config.componentsData.ruleChainScope === 'edges') {
301   - this.router.navigateByUrl(`edges/ruleChains/${ruleChain.id.id}`);
  301 + this.router.navigateByUrl(`edgeManagement/ruleChains/${ruleChain.id.id}`);
302 302 } else if (this.config.componentsData.ruleChainScope === 'edge') {
303   - this.router.navigateByUrl(`edges/${this.config.componentsData.edgeId}/ruleChains/${ruleChain.id.id}`);
  303 + this.router.navigateByUrl(`edgeInstances/${this.config.componentsData.edgeId}/ruleChains/${ruleChain.id.id}`);
304 304 } else {
305 305 this.router.navigateByUrl(`ruleChains/${ruleChain.id.id}`);
306 306 }
... ...
... ... @@ -50,7 +50,7 @@ export class RuleNodeComponent extends FcNodeComponent implements OnInit {
50 50 }
51 51 if (node.targetRuleChainId) {
52 52 if (node.ruleChainType === RuleChainType.EDGE) {
53   - this.router.navigateByUrl(`/edges/ruleChains/${node.targetRuleChainId}`);
  53 + this.router.navigateByUrl(`/edgeManagement/ruleChains/${node.targetRuleChainId}`);
54 54 } else {
55 55 this.router.navigateByUrl(`/ruleChains/${node.targetRuleChainId}`);
56 56 }
... ...