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