|
|
|
@ -58,6 +58,45 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
if (authority !== user.authority) { |
|
|
|
sections = []; |
|
|
|
authority = user.authority; |
|
|
|
var edgeMenuSection = { |
|
|
|
side: { |
|
|
|
name: 'edge.management', |
|
|
|
type: 'toggle', |
|
|
|
state: 'home.edges', |
|
|
|
height: '80px', |
|
|
|
icon: 'router', |
|
|
|
pages: [ |
|
|
|
{ |
|
|
|
name: 'edge.edges', |
|
|
|
type: 'link', |
|
|
|
state: 'home.edges', |
|
|
|
icon: 'router' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'rulechain.edge-rulechains', |
|
|
|
type: 'link', |
|
|
|
state: 'home.edges.edgeRuleChains', |
|
|
|
icon: 'code' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
home: { |
|
|
|
name: 'edge.management', |
|
|
|
places: [ |
|
|
|
{ |
|
|
|
name: 'edge.edges', |
|
|
|
icon: 'router', |
|
|
|
state: 'home.edges' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'rulechain.edge-rulechains', |
|
|
|
icon: 'code', |
|
|
|
state: 'home.edges.edgeRuleChains' |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (authority === 'SYS_ADMIN') { |
|
|
|
sections = [ |
|
|
|
{ |
|
|
|
@ -156,24 +195,9 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'rulechain.rulechains', |
|
|
|
type: 'toggle', |
|
|
|
type: 'link', |
|
|
|
state: 'home.ruleChains', |
|
|
|
height: '80px', |
|
|
|
icon: 'settings_ethernet', |
|
|
|
pages: [ |
|
|
|
{ |
|
|
|
name: 'rulechain.core-rulechains', |
|
|
|
type: 'link', |
|
|
|
state: 'home.ruleChains.core', |
|
|
|
icon: 'settings_ethernet' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'rulechain.edge-rulechains', |
|
|
|
type: 'link', |
|
|
|
state: 'home.ruleChains.edge', |
|
|
|
icon: 'code' |
|
|
|
} |
|
|
|
] |
|
|
|
icon: 'settings_ethernet' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'customer.customers', |
|
|
|
@ -199,12 +223,6 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
state: 'home.entityViews', |
|
|
|
icon: 'view_quilt' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'edge.edges', |
|
|
|
type: 'link', |
|
|
|
state: 'home.edges', |
|
|
|
icon: 'router' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'widget.widget-library', |
|
|
|
type: 'link', |
|
|
|
@ -226,17 +244,12 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
|
|
|
|
homeSections = |
|
|
|
[{ |
|
|
|
name: 'rulechain.management', |
|
|
|
name: 'rulechain.rulechains', |
|
|
|
places: [ |
|
|
|
{ |
|
|
|
name: 'rulechain.core-rulechains', |
|
|
|
name: 'rulechain.rulechains', |
|
|
|
icon: 'settings_ethernet', |
|
|
|
state: 'home.ruleChains.core' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'rulechain.edge-rulechains', |
|
|
|
icon: 'code', |
|
|
|
state: 'home.ruleChains.edge' |
|
|
|
state: 'home.ruleChains' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
@ -280,16 +293,6 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'edge.management', |
|
|
|
places: [ |
|
|
|
{ |
|
|
|
name: 'edge.edges', |
|
|
|
icon: 'router', |
|
|
|
state: 'home.edges' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'dashboard.management', |
|
|
|
places: [ |
|
|
|
@ -316,6 +319,11 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
] |
|
|
|
}]; |
|
|
|
|
|
|
|
if (userService.isEdgesSupportEnabled()) { |
|
|
|
sections.splice(6, 0, edgeMenuSection.side); |
|
|
|
homeSections.splice(5, 0, edgeMenuSection.home); |
|
|
|
} |
|
|
|
|
|
|
|
} else if (authority === 'CUSTOMER_USER') { |
|
|
|
sections = [ |
|
|
|
{ |
|
|
|
@ -342,12 +350,6 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
state: 'home.entityViews', |
|
|
|
icon: 'view_quilt' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'edge.edges', |
|
|
|
type: 'link', |
|
|
|
state: 'home.edges', |
|
|
|
icon: 'router' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'dashboard.dashboards', |
|
|
|
type: 'link', |
|
|
|
@ -386,16 +388,6 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'edge.management', |
|
|
|
places: [ |
|
|
|
{ |
|
|
|
name: 'edge.edges', |
|
|
|
icon: 'router', |
|
|
|
state: 'home.edges' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'dashboard.view-dashboards', |
|
|
|
places: [ |
|
|
|
@ -406,6 +398,11 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
} |
|
|
|
] |
|
|
|
}]; |
|
|
|
|
|
|
|
if (userService.isEdgesSupportEnabled()) { |
|
|
|
sections.splice(4, 0, edgeMenuSection.side); |
|
|
|
homeSections.splice(3, 0, edgeMenuSection.home); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -423,4 +420,4 @@ function Menu(userService, $state, $rootScope) { |
|
|
|
return $state.includes(section.state); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|