Browse Source
Merge pull request #8258 from vvlladd28/improvemen/menu/ruleChains
Move rule chains menu link in top level
pull/8260/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
10 additions and
30 deletions
-
ui-ngx/src/app/core/services/menu.service.ts
-
ui-ngx/src/app/modules/home/pages/features/features-routing.module.ts
-
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-routing.module.ts
-
ui-ngx/src/app/shared/models/entity-type.models.ts
|
|
|
@ -374,6 +374,13 @@ export class MenuService { |
|
|
|
type: 'link', |
|
|
|
path: '/customers', |
|
|
|
icon: 'supervisor_account' |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: guid(), |
|
|
|
name: 'rulechain.rulechains', |
|
|
|
type: 'link', |
|
|
|
path: '/ruleChains', |
|
|
|
icon: 'settings_ethernet' |
|
|
|
} |
|
|
|
); |
|
|
|
if (authState.edgesSupportEnabled) { |
|
|
|
@ -411,13 +418,6 @@ export class MenuService { |
|
|
|
path: '/features', |
|
|
|
icon: 'construction', |
|
|
|
pages: [ |
|
|
|
{ |
|
|
|
id: guid(), |
|
|
|
name: 'rulechain.rulechains', |
|
|
|
type: 'link', |
|
|
|
path: '/features/ruleChains', |
|
|
|
icon: 'settings_ethernet' |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: guid(), |
|
|
|
name: 'ota-update.ota-updates', |
|
|
|
|
|
|
|
@ -17,7 +17,6 @@ |
|
|
|
import { RouterModule, Routes } from '@angular/router'; |
|
|
|
import { Authority } from '@shared/models/authority.enum'; |
|
|
|
import { NgModule } from '@angular/core'; |
|
|
|
import { ruleChainsRoutes } from '@home/pages/rulechain/rulechain-routing.module'; |
|
|
|
import { otaUpdatesRoutes } from '@home/pages/ota-update/ota-update-routing.module'; |
|
|
|
import { vcRoutes } from '@home/pages/vc/vc-routing.module'; |
|
|
|
|
|
|
|
@ -37,10 +36,9 @@ const routes: Routes = [ |
|
|
|
children: [], |
|
|
|
data: { |
|
|
|
auth: [Authority.TENANT_ADMIN], |
|
|
|
redirectTo: '/features/ruleChains' |
|
|
|
redirectTo: '/features/otaUpdates' |
|
|
|
} |
|
|
|
}, |
|
|
|
...ruleChainsRoutes, |
|
|
|
...otaUpdatesRoutes, |
|
|
|
...vcRoutes |
|
|
|
] |
|
|
|
|
|
|
|
@ -122,7 +122,7 @@ export const importRuleChainBreadcumbLabelFunction: BreadCrumbLabelFunction<Rule |
|
|
|
return `${translate.instant('rulechain.import')}: ${component.ruleChain.name}`; |
|
|
|
}); |
|
|
|
|
|
|
|
export const ruleChainsRoutes: Routes = [ |
|
|
|
const routes: Routes = [ |
|
|
|
{ |
|
|
|
path: 'ruleChains', |
|
|
|
data: { |
|
|
|
@ -189,24 +189,6 @@ export const ruleChainsRoutes: Routes = [ |
|
|
|
} |
|
|
|
]; |
|
|
|
|
|
|
|
const routes: Routes = [ |
|
|
|
{ |
|
|
|
path: 'ruleChains', |
|
|
|
pathMatch: 'full', |
|
|
|
redirectTo: '/features/ruleChains' |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'ruleChains/:ruleChainId', |
|
|
|
pathMatch: 'full', |
|
|
|
redirectTo: '/features/ruleChains/:ruleChainId' |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'ruleChains/ruleChain/import', |
|
|
|
pathMatch: 'full', |
|
|
|
redirectTo: '/features/ruleChains/ruleChain/import' |
|
|
|
} |
|
|
|
]; |
|
|
|
|
|
|
|
// @dynamic
|
|
|
|
@NgModule({ |
|
|
|
imports: [RouterModule.forChild(routes)], |
|
|
|
|
|
|
|
@ -449,7 +449,7 @@ export const baseDetailsPageByEntityType = new Map<EntityType, string>([ |
|
|
|
[EntityType.DEVICE, '/entities/devices'], |
|
|
|
[EntityType.DEVICE_PROFILE, '/profiles/deviceProfiles'], |
|
|
|
[EntityType.ASSET_PROFILE, '/profiles/assetProfiles'], |
|
|
|
[EntityType.RULE_CHAIN, '/features/ruleChains'], |
|
|
|
[EntityType.RULE_CHAIN, '/ruleChains'], |
|
|
|
[EntityType.EDGE, '/edgeManagement/instances'], |
|
|
|
[EntityType.ENTITY_VIEW, '/entities/entityViews'], |
|
|
|
[EntityType.TB_RESOURCE, '/resources/resources-library'], |
|
|
|
|