import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { MainLayoutComponent } from './layout/main-layout/main-layout.component'; import { AuthLayoutComponent } from './layout/auth-layout/auth-layout.component'; import { LoginComponent } from './components/login/login.component'; import { DashboardComponent } from './components/dashboard/dashboard.component'; import { PageNotFoundComponent } from './shared/page-not-found/page-not-found.component'; import { AdminComponent } from './components/admin/admin.component'; import { UsersComponent } from './components/admin/users/users/users.component'; import { RolesComponent } from './components/admin/roles/roles/roles.component'; import { GroupsComponent } from './components/groups/groups.component'; import { ImagesComponent } from './components/ogboot/images/images.component'; import { PxeComponent } from './components/ogboot/pxe/pxe.component'; import { PxeBootFilesComponent } from './components/ogboot/pxe-boot-files/pxe-boot-files.component'; import {OgbootStatusComponent} from "./components/ogboot/ogboot-status/ogboot-status.component"; import { OgdhcpComponent } from './components/ogdhcp/ogdhcp.component'; import { OgDhcpSubnetsComponent } from './components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component'; import { CalendarComponent } from "./components/calendar/calendar.component"; import { CommandsComponent } from './components/commands/main-commands/commands.component'; import { CommandsGroupsComponent } from './components/commands/commands-groups/commands-groups.component'; import { CommandsTaskComponent } from './components/commands/commands-task/commands-task.component'; import { TaskLogsComponent } from './components/commands/commands-task/task-logs/task-logs.component'; const routes: Routes = [ { path: '', redirectTo: 'auth/login', pathMatch: 'full' }, { path: '', component: MainLayoutComponent, children: [ { path: 'dashboard', component: DashboardComponent }, { path: 'admin', component: AdminComponent }, { path: 'users', component: UsersComponent }, { path: 'user-groups', component: RolesComponent }, { path: 'groups', component: GroupsComponent }, { path: 'images', component: ImagesComponent }, { path: 'pxe', component: PxeComponent }, { path: 'pxe-boot-file', component: PxeBootFilesComponent }, { path: 'ogboot-status', component: OgbootStatusComponent }, { path: 'dhcp', component: OgdhcpComponent }, { path: 'dhcp-subnets', component: OgDhcpSubnetsComponent }, { path: 'commands', component: CommandsComponent }, { path: 'commands-groups', component: CommandsGroupsComponent }, { path: 'commands-task', component: CommandsTaskComponent }, { path: 'commands-logs', component: TaskLogsComponent }, { path: 'calendars', component: CalendarComponent }, ], }, { path: 'auth', component: AuthLayoutComponent, children: [ { path: 'login', component: LoginComponent }, ], }, { path: '**', component: PageNotFoundComponent }, ]; @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) export class AppRoutingModule { }