Commit f81413112c2858e44dc308c056c38f8fbc5ed94f

Authored by Artem Babak
1 parent fa8a47a5

Edge: menu order changes

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