ogdhcp subnets

oggui/ogboot
Alvaro Puente Mella 2024-08-28 15:44:41 +02:00
parent b4bf55056d
commit 4b2bc5684a
8 changed files with 42 additions and 43 deletions

View File

@ -13,6 +13,8 @@ import { ImagesComponent } from './components/ogboot/images/images.component';
import { PxeComponent } from './components/ogboot/pxe/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';
const routes: Routes = [
{ path: '', redirectTo: 'auth/login', pathMatch: 'full' },
{
@ -28,6 +30,8 @@ const routes: Routes = [
{ path: 'pxe', component: PxeComponent },
{ path: 'pxe-boot-file', component: PxeBootFilesComponent },
{ path: 'ogboot-status', component: OgbootStatusComponent },
{ path: 'dhcp', component: OgdhcpComponent },
{ path: 'dhcp-subnets', component: OgDhcpSubnetsComponent }
],
},
{

View File

@ -86,7 +86,9 @@ import { CreatePxeBootFileComponent } from './components/ogboot/pxe-boot-files/c
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { DeleteImageComponent } from './components/ogboot/images/delete-image/delete-image/delete-image.component';
import { DeletePxeTemplateComponent } from './components/ogboot/pxe/pxe/delete-pxeTemplate/delete-pxe-template/delete-pxe-template.component';
import { OgdhcpComponent } from './components/ogdhcp/ogdhcp/ogdhcp.component';
import { OgdhcpComponent } from './components/ogdhcp/ogdhcp.component';
import { OgDhcpSubnetsComponent } from './components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component';
import { CreateSubnetComponent } from './components/ogdhcp/og-dhcp-subnets/create-subnet/create-subnet/create-subnet.component';
@NgModule({
declarations: [
@ -133,7 +135,9 @@ import { OgdhcpComponent } from './components/ogdhcp/ogdhcp/ogdhcp.component';
CreatePxeBootFileComponent,
DeleteImageComponent,
DeletePxeTemplateComponent,
OgdhcpComponent
OgdhcpComponent,
OgDhcpSubnetsComponent,
CreateSubnetComponent
],
bootstrap: [AppComponent],
imports: [BrowserModule,

View File

@ -1 +0,0 @@
<p>ogdhcp works!</p>

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OgdhcpComponent } from './ogdhcp.component';
describe('OgdhcpComponent', () => {
let component: OgdhcpComponent;
let fixture: ComponentFixture<OgdhcpComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [OgdhcpComponent]
})
.compileComponents();
fixture = TestBed.createComponent(OgdhcpComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,10 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-ogdhcp',
templateUrl: './ogdhcp.component.html',
styleUrl: './ogdhcp.component.css'
})
export class OgdhcpComponent {
}

View File

@ -21,16 +21,15 @@
</span>
</mat-list-item>
<!-- Main List Item for Images -->
<mat-list-item (click)="toggleSubList()">
<mat-list-item (click)="toggleOgBootSub()">
<span class="entry">
<mat-icon class="icon">desktop_windows</mat-icon>
<span i18n="@@images">ogBoot</span>
</span>
</mat-list-item>
<!-- Submenu items for Images -->
<mat-nav-list *ngIf="showSubList" style="padding-left: 20px;">
<!-- Submenu items for ogBoot -->
<mat-nav-list *ngIf="showOgBootSub" style="padding-left: 20px;">
<mat-list-item routerLink="/ogboot-status">
<span class="entry">
<mat-icon class="icon">analytics</mat-icon>
@ -56,6 +55,26 @@
</span>
</mat-list-item>
</mat-nav-list>
<!-- End ogBoot sub -->
<!-- OGDHCP -->
<mat-list-item (click)="toggleOgDhcpSub()">
<span class="entry">
<mat-icon class="icon">settings_ethernet</mat-icon>
<span i18n="@@images">ogDhcp</span>
</span>
</mat-list-item>
<!-- Submenu items ogdhcp -->
<mat-nav-list *ngIf="showOgDhcpSub" style="padding-left: 20px;">
<mat-list-item routerLink="/dhcp-subnets">
<span class="entry">
<mat-icon class="icon">lan</mat-icon>
<span i18n="@@gallery">Subnets</span>
</span>
</mat-list-item>
</mat-nav-list>
<!-- Submenu items ogdhcp -->
<mat-list-item>
<span class="entry">

View File

@ -13,11 +13,17 @@ export class SidebarComponent {
isSuperAdmin: boolean = false;
username: string = "";
decodedToken: any = "";
showSubList: boolean = false;
showOgBootSub: boolean = false;
showOgDhcpSub: boolean = false;
toggleSubList() {
this.showSubList = !this.showSubList;
toggleOgBootSub() {
this.showOgBootSub = !this.showOgBootSub;
}
toggleOgDhcpSub() {
this.showOgDhcpSub = !this.showOgDhcpSub;
}
constructor(public dialog: MatDialog) {}
ngOnInit(): void {