Edge: menu order changes
This commit is contained in:
parent
fa8a47a59f
commit
f81413112c
@ -291,26 +291,26 @@ export class MenuService {
|
||||
);
|
||||
if (authState.edgesSupportEnabled) {
|
||||
sections.push(
|
||||
{
|
||||
id: guid(),
|
||||
name: 'edge.management',
|
||||
type: 'toggle',
|
||||
path: '/edges',
|
||||
height: '80px',
|
||||
icon: 'router',
|
||||
pages: [
|
||||
{
|
||||
id: guid(),
|
||||
name: 'edge.edge-instances',
|
||||
type: 'link',
|
||||
path: '/edges',
|
||||
path: '/edgeInstances',
|
||||
icon: 'router'
|
||||
},
|
||||
{
|
||||
id: guid(),
|
||||
name: 'edge.management',
|
||||
type: 'toggle',
|
||||
path: '/edgeManagement',
|
||||
height: '40px',
|
||||
icon: 'settings_input_antenna',
|
||||
pages: [
|
||||
{
|
||||
id: guid(),
|
||||
name: 'edge.rulechain-templates',
|
||||
type: 'link',
|
||||
path: '/edges/ruleChains',
|
||||
path: '/edgeManagement/ruleChains',
|
||||
icon: 'settings_ethernet'
|
||||
}
|
||||
]
|
||||
@ -448,12 +448,12 @@ export class MenuService {
|
||||
{
|
||||
name: 'edge.edge-instances',
|
||||
icon: 'router',
|
||||
path: '/edges'
|
||||
path: '/edgeInstances'
|
||||
},
|
||||
{
|
||||
name: 'edge.rulechain-templates',
|
||||
icon: 'settings_ethernet',
|
||||
path: '/edges/ruleChains'
|
||||
path: '/edgeManagement/ruleChains'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -548,7 +548,7 @@ export class MenuService {
|
||||
id: guid(),
|
||||
name: 'edge.edge-instances',
|
||||
type: 'link',
|
||||
path: '/edges',
|
||||
path: '/edgeInstances',
|
||||
icon: 'router'
|
||||
}
|
||||
);
|
||||
@ -606,8 +606,8 @@ export class MenuService {
|
||||
places: [
|
||||
{
|
||||
name: 'edge.edge-instances',
|
||||
icon: 'router',
|
||||
path: '/edges'
|
||||
icon: 'settings_input_antenna',
|
||||
path: '/edgeInstances'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ const routes: Routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':customerId/edges',
|
||||
path: ':customerId/edgeInstances',
|
||||
component: EntitiesTableComponent,
|
||||
data: {
|
||||
auth: [Authority.TENANT_ADMIN],
|
||||
|
||||
@ -169,7 +169,7 @@ export class CustomersTableConfigResolver implements Resolve<EntityTableConfig<C
|
||||
if ($event) {
|
||||
$event.stopPropagation();
|
||||
}
|
||||
this.router.navigateByUrl(`customers/${customer.id.id}/edges`);
|
||||
this.router.navigateByUrl(`customers/${customer.id.id}/edgeInstances`);
|
||||
}
|
||||
|
||||
onCustomerAction(action: EntityAction<Customer>): boolean {
|
||||
|
||||
@ -362,7 +362,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<
|
||||
if (this.config.componentsData.dashboardScope === 'customer') {
|
||||
this.router.navigateByUrl(`customers/${this.config.componentsData.customerId}/dashboards/${dashboard.id.id}`);
|
||||
} else if (this.config.componentsData.dashboardScope === 'edge') {
|
||||
this.router.navigateByUrl(`edges/${this.config.componentsData.edgeId}/dashboards/${dashboard.id.id}`);
|
||||
this.router.navigateByUrl(`edgeInstances/${this.config.componentsData.edgeId}/dashboards/${dashboard.id.id}`);
|
||||
} else {
|
||||
this.router.navigateByUrl(`dashboards/${dashboard.id.id}`);
|
||||
}
|
||||
|
||||
@ -39,10 +39,11 @@ import {
|
||||
RuleNodeComponentsResolver,
|
||||
TooltipsterResolver
|
||||
} from '@home/pages/rulechain/rulechain-routing.module';
|
||||
import { CustomersTableConfigResolver } from '@home/pages/customer/customers-table-config.resolver';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'edges',
|
||||
path: 'edgeInstances',
|
||||
data: {
|
||||
breadcrumb: {
|
||||
label: 'edge.edge-instances',
|
||||
@ -55,7 +56,7 @@ const routes: Routes = [
|
||||
component: EntitiesTableComponent,
|
||||
data: {
|
||||
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
|
||||
edgesType: 'tenant'
|
||||
edgesType: 'tenant',
|
||||
},
|
||||
resolve: {
|
||||
entitiesTableConfig: EdgesTableConfigResolver
|
||||
@ -187,6 +188,24 @@ const routes: Routes = [
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'edgeManagement',
|
||||
data: {
|
||||
breadcrumb: {
|
||||
label: 'edge.management',
|
||||
icon: 'settings_input_antenna'
|
||||
}
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
data: {
|
||||
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
|
||||
redirectTo: '/edgeManagement/ruleChains'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'ruleChains',
|
||||
@ -253,7 +272,8 @@ const routes: Routes = [
|
||||
]
|
||||
}
|
||||
]
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
|
||||
@ -417,7 +417,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
|
||||
suffix = 'ruleChains';
|
||||
break;
|
||||
}
|
||||
this.router.navigateByUrl(`edges/${edge.id.id}/${suffix}`);
|
||||
this.router.navigateByUrl(`edgeInstances/${edge.id.id}/${suffix}`);
|
||||
}
|
||||
|
||||
assignToCustomer($event: Event, edgesIds: Array<EdgeId>) {
|
||||
|
||||
@ -152,7 +152,7 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O
|
||||
}
|
||||
if (this.ruleNode.targetRuleChainId) {
|
||||
if (this.ruleChainType === RuleChainType.EDGE) {
|
||||
this.router.navigateByUrl(`/edges/ruleChains/${this.ruleNode.targetRuleChainId}`);
|
||||
this.router.navigateByUrl(`/edgeManagement/ruleChains/${this.ruleNode.targetRuleChainId}`);
|
||||
} else {
|
||||
this.router.navigateByUrl(`/ruleChains/${this.ruleNode.targetRuleChainId}`);
|
||||
}
|
||||
|
||||
@ -1289,7 +1289,7 @@ export class RuleChainPageComponent extends PageComponent
|
||||
if (this.ruleChainType !== RuleChainType.EDGE) {
|
||||
this.router.navigateByUrl(`ruleChains/${this.ruleChain.id.id}`);
|
||||
} else {
|
||||
this.router.navigateByUrl(`edges/ruleChains/${this.ruleChain.id.id}`);
|
||||
this.router.navigateByUrl(`edgeManagement/ruleChains/${this.ruleChain.id.id}`);
|
||||
}
|
||||
} else {
|
||||
this.createRuleChainModel();
|
||||
|
||||
@ -285,7 +285,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
|
||||
if (ruleChainImport) {
|
||||
this.itembuffer.storeRuleChainImport(ruleChainImport);
|
||||
if (this.config.componentsData.ruleChainScope === 'edges') {
|
||||
this.router.navigateByUrl(`edges/ruleChains/ruleChain/import`);
|
||||
this.router.navigateByUrl(`edgeManagement/ruleChains/ruleChain/import`);
|
||||
} else {
|
||||
this.router.navigateByUrl(`ruleChains/ruleChain/import`);
|
||||
}
|
||||
@ -298,9 +298,9 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
|
||||
$event.stopPropagation();
|
||||
}
|
||||
if (this.config.componentsData.ruleChainScope === 'edges') {
|
||||
this.router.navigateByUrl(`edges/ruleChains/${ruleChain.id.id}`);
|
||||
this.router.navigateByUrl(`edgeManagement/ruleChains/${ruleChain.id.id}`);
|
||||
} else if (this.config.componentsData.ruleChainScope === 'edge') {
|
||||
this.router.navigateByUrl(`edges/${this.config.componentsData.edgeId}/ruleChains/${ruleChain.id.id}`);
|
||||
this.router.navigateByUrl(`edgeInstances/${this.config.componentsData.edgeId}/ruleChains/${ruleChain.id.id}`);
|
||||
} else {
|
||||
this.router.navigateByUrl(`ruleChains/${ruleChain.id.id}`);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ export class RuleNodeComponent extends FcNodeComponent implements OnInit {
|
||||
}
|
||||
if (node.targetRuleChainId) {
|
||||
if (node.ruleChainType === RuleChainType.EDGE) {
|
||||
this.router.navigateByUrl(`/edges/ruleChains/${node.targetRuleChainId}`);
|
||||
this.router.navigateByUrl(`/edgeManagement/ruleChains/${node.targetRuleChainId}`);
|
||||
} else {
|
||||
this.router.navigateByUrl(`/ruleChains/${node.targetRuleChainId}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user