Added route for edge dashboard
This commit is contained in:
parent
fee5034e46
commit
a6a0a65d25
@ -357,7 +357,10 @@ 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 {
|
} else if (this.config.componentsData.dashboardScope === 'edge') {
|
||||||
|
this.router.navigateByUrl(`edges/${this.config.componentsData.edgeId}/dashboards/${dashboard.id.id}`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.router.navigateByUrl(`dashboards/${dashboard.id.id}`);
|
this.router.navigateByUrl(`dashboards/${dashboard.id.id}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,9 @@ import { DevicesTableConfigResolver } from "@home/pages/device/devices-table-con
|
|||||||
import { EntityViewsTableConfigResolver } from "@home/pages/entity-view/entity-views-table-config.resolver";
|
import { EntityViewsTableConfigResolver } from "@home/pages/entity-view/entity-views-table-config.resolver";
|
||||||
import { DashboardsTableConfigResolver } from "@home/pages/dashboard/dashboards-table-config.resolver";
|
import { DashboardsTableConfigResolver } from "@home/pages/dashboard/dashboards-table-config.resolver";
|
||||||
import { RuleChainsTableConfigResolver } from "@home/pages/rulechain/rulechains-table-config.resolver";
|
import { RuleChainsTableConfigResolver } from "@home/pages/rulechain/rulechains-table-config.resolver";
|
||||||
|
import { DashboardPageComponent } from "@home/pages/dashboard/dashboard-page.component";
|
||||||
|
import { dashboardBreadcumbLabelFunction, DashboardResolver } from "@home/pages/dashboard/dashboard-routing.module";
|
||||||
|
import { BreadCrumbConfig } from "@shared/components/breadcrumb";
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@ -108,19 +111,43 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':edgeId/dashboards',
|
path: ':edgeId/dashboards',
|
||||||
component: EntitiesTableComponent,
|
|
||||||
data: {
|
data: {
|
||||||
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
|
|
||||||
dashboardsType: 'edge',
|
|
||||||
breadcrumb: {
|
breadcrumb: {
|
||||||
label: 'edge.dashboards',
|
label: 'edge.dashboards',
|
||||||
icon: 'dashboard'
|
icon: 'dashboard'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resolve: {
|
children: [
|
||||||
entitiesTableConfig: DashboardsTableConfigResolver
|
{
|
||||||
}
|
path: '',
|
||||||
}]
|
component: EntitiesTableComponent,
|
||||||
|
data: {
|
||||||
|
auth: [Authority.TENANT_ADMIN],
|
||||||
|
dashboardsType: 'edge'
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
entitiesTableConfig: DashboardsTableConfigResolver
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':dashboardId',
|
||||||
|
component: DashboardPageComponent,
|
||||||
|
data: {
|
||||||
|
breadcrumb: {
|
||||||
|
labelFunction: dashboardBreadcumbLabelFunction,
|
||||||
|
icon: 'dashboard'
|
||||||
|
} as BreadCrumbConfig<DashboardPageComponent>,
|
||||||
|
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
|
||||||
|
title: 'edge.dashboard',
|
||||||
|
widgetEditMode: false
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
dashboard: DashboardResolver
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -1005,7 +1005,8 @@
|
|||||||
"any-edge": "Any edge",
|
"any-edge": "Any edge",
|
||||||
"no-edge-types-matching": "No edge types matching '{{entitySubtype}}' were found.",
|
"no-edge-types-matching": "No edge types matching '{{entitySubtype}}' were found.",
|
||||||
"edge-type-list-empty": "No device types selected.",
|
"edge-type-list-empty": "No device types selected.",
|
||||||
"edge-types": "Edge types"
|
"edge-types": "Edge types",
|
||||||
|
"dashboard": "Edge dashboard"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"unable-to-connect": "Unable to connect to the server! Please check your internet connection.",
|
"unable-to-connect": "Unable to connect to the server! Please check your internet connection.",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user