2021-04-12 16:56:00 +03:00
|
|
|
///
|
|
|
|
|
/// Copyright © 2016-2021 The Thingsboard Authors
|
|
|
|
|
///
|
|
|
|
|
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
/// you may not use this file except in compliance with the License.
|
|
|
|
|
/// You may obtain a copy of the License at
|
|
|
|
|
///
|
|
|
|
|
/// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
///
|
|
|
|
|
/// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
/// See the License for the specific language governing permissions and
|
|
|
|
|
/// limitations under the License.
|
|
|
|
|
///
|
|
|
|
|
|
|
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
|
import { EntitiesTableComponent } from '@home/components/entity/entities-table.component';
|
|
|
|
|
import { Authority } from '@shared/models/authority.enum';
|
|
|
|
|
import { NgModule } from '@angular/core';
|
2021-05-31 18:15:31 +03:00
|
|
|
import { OtaUpdateTableConfigResolve } from '@home/pages/ota-update/ota-update-table-config.resolve';
|
2021-12-28 12:01:26 +02:00
|
|
|
import { EntityDetailsPageComponent } from '@home/components/entity/entity-details-page.component';
|
|
|
|
|
import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard';
|
|
|
|
|
import { entityDetailsPageBreadcrumbLabelFunction } from '@core/utils';
|
|
|
|
|
import { BreadCrumbConfig } from '@shared/components/breadcrumb';
|
2021-04-12 16:56:00 +03:00
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
|
{
|
2021-05-31 18:15:31 +03:00
|
|
|
path: 'otaUpdates',
|
2021-04-12 16:56:00 +03:00
|
|
|
data: {
|
|
|
|
|
breadcrumb: {
|
2021-05-31 18:15:31 +03:00
|
|
|
label: 'ota-update.ota-updates',
|
2021-04-12 16:56:00 +03:00
|
|
|
icon: 'memory'
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-12-28 12:01:26 +02:00
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
|
|
|
|
component: EntitiesTableComponent,
|
|
|
|
|
data: {
|
|
|
|
|
auth: [Authority.TENANT_ADMIN],
|
|
|
|
|
title: 'ota-update.ota-updates'
|
|
|
|
|
},
|
|
|
|
|
resolve: {
|
|
|
|
|
entitiesTableConfig: OtaUpdateTableConfigResolve
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: ':entityId',
|
|
|
|
|
component: EntityDetailsPageComponent,
|
|
|
|
|
canDeactivate: [ConfirmOnExitGuard],
|
|
|
|
|
data: {
|
|
|
|
|
breadcrumb: {
|
|
|
|
|
labelFunction: entityDetailsPageBreadcrumbLabelFunction,
|
|
|
|
|
icon: 'memory'
|
|
|
|
|
} as BreadCrumbConfig<EntityDetailsPageComponent>,
|
|
|
|
|
auth: [Authority.TENANT_ADMIN],
|
|
|
|
|
title: 'ota-update.ota-updates'
|
|
|
|
|
},
|
|
|
|
|
resolve: {
|
|
|
|
|
entitiesTableConfig: OtaUpdateTableConfigResolve
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2021-04-12 16:56:00 +03:00
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
|
imports: [RouterModule.forChild(routes)],
|
|
|
|
|
exports: [RouterModule],
|
|
|
|
|
providers: [
|
2021-05-31 18:15:31 +03:00
|
|
|
OtaUpdateTableConfigResolve
|
2021-04-12 16:56:00 +03:00
|
|
|
]
|
|
|
|
|
})
|
2021-05-31 18:15:31 +03:00
|
|
|
export class OtaUpdateRoutingModule { }
|