diff --git a/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.html b/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.html index b413c82..f1d1b60 100644 --- a/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.html +++ b/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.html @@ -8,13 +8,20 @@
- + + + share + Zones + + + + -
+
2024 - Adam Debowski
diff --git a/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.scss b/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.scss index 7ae23a0..032aad7 100644 --- a/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.scss +++ b/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.scss @@ -94,4 +94,16 @@ .mat-drawer-container { background-color: $color-gray-light; } + + .sidenav-container { + // height: 100vh; + } + + mat-sidenav { + width: 250px; + } + + mat-sidenav-content { + padding: 16px; + } } \ No newline at end of file diff --git a/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.ts b/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.ts index 75f8264..280f7ac 100644 --- a/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.ts +++ b/src/powerdns-manager/src/app/features/dashboard/layout/layout.component.ts @@ -1,4 +1,5 @@ -import { Component } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; +import { MatSidenav } from '@angular/material/sidenav'; @Component({ selector: 'app-layout', @@ -8,6 +9,8 @@ import { Component } from '@angular/core'; export class LayoutComponent { isOpen = true; + @ViewChild(MatSidenav) sidenav!: MatSidenav; + openClose(): void { this.isOpen = !this.isOpen; } diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.html b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.html new file mode 100644 index 0000000..485aad7 --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.html @@ -0,0 +1,27 @@ + + + Create a new zone + + +
+
+
+
+
+ + + + + +
diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.scss b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.scss new file mode 100644 index 0000000..dcd17ec --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.scss @@ -0,0 +1,20 @@ +@import '/src/styles/utils/variables'; + +:host { + display: flex; + width: 100%; + height: 100%; + + mat-card { + width: inherit; + + mat-card-header { + font-size: 1rem; + color: $color-white; + } + + mat-card-content { + height: calc(100% - 100px); + } + } +} \ No newline at end of file diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.spec.ts b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.spec.ts new file mode 100644 index 0000000..f783c06 --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewZoneComponent } from './new-zone.component'; + +describe('NewZoneComponent', () => { + let component: NewZoneComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [NewZoneComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(NewZoneComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.ts b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.ts new file mode 100644 index 0000000..488cb6c --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zone/new-zone.component.ts @@ -0,0 +1,21 @@ +import { Component } from '@angular/core'; +import { FormBuilder } from '@angular/forms'; + +@Component({ + selector: 'app-new-zone', + templateUrl: './new-zone.component.html', + styleUrl: './new-zone.component.scss' +}) +export class NewZoneComponent { + + form = this.fb.group({ + serviceId: [''], + zone: [''], + }); + + constructor(private fb: FormBuilder){} + + onSubmit(): void { + + } +} diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.html b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.html new file mode 100644 index 0000000..8138e0e --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.html @@ -0,0 +1 @@ +

new-zoneexit works!

diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.scss b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.spec.ts b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.spec.ts new file mode 100644 index 0000000..fdf35a0 --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewZoneexitComponent } from './new-zoneexit.component'; + +describe('NewZoneexitComponent', () => { + let component: NewZoneexitComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [NewZoneexitComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(NewZoneexitComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.ts b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.ts new file mode 100644 index 0000000..a63fdac --- /dev/null +++ b/src/powerdns-manager/src/app/features/dashboard/zones/create-zone/new-zoneexit/new-zoneexit.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-new-zoneexit', + standalone: true, + imports: [], + templateUrl: './new-zoneexit.component.html', + styleUrl: './new-zoneexit.component.scss' +}) +export class NewZoneexitComponent { + +} diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.html b/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.html index 5e8ea88..a5c6785 100644 --- a/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.html +++ b/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.html @@ -2,59 +2,84 @@
- -
Data centers
- @for(dataCenter of dataCenters$ | async; track dataCenter.id) { - - folder - -
- {{ dataCenter.city }} (Country: {{ dataCenter.country }}) -
-
- } -
+ + + Data centers + + + + @for(dataCenter of dataCenters$ | async; track dataCenter.id) { + + folder + +
+ {{ dataCenter.city }} (Country: {{ dataCenter.country }}) +
+
+ } + @empty { +

No data

+ } +
+
+
- -
Services
- @for(service of services$ | async; track service.id) { - - folder - -
- {{ service.proto}}://{{ service.hostAddress }}:{{ service.port}} -
-
- } -
+ + Services + + + @for(service of services$ | async; track service.id) { + + folder + +
+ mode: {{ service.serviceMode }}, [{{ service.proto}}://{{ service.hostAddress }}:{{ service.port}}] +
+
+ } + @empty { +

No data

+ } +
+
+
- -
Zones
- @for(zoneItem of zones$ | async; track zoneItem.id) { - - map - - - } -
+ + Zones + +
+ + @for(zoneItem of zones$ | async; track zoneItem.id) { + + map + + + } + @empty { +

No data

+ } +
+
+
+
@@ -64,7 +89,7 @@