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 @@
-
-
- @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
+ }
+
+
+
-
-
- @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
+ }
+
+
+
-
-
- @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 @@
- Name{{ zone.name }}
- Serial{{ zone.serial }}
- - Last check{{ zone.last_check }}
+ - Last check{{ zone.last_check | date:'yyyy-MM-dd HH:mm:ss' }}
- Kind{{ zone.kind }}
- DNS SEC{{ zone.dnssec}}
- Records no{{ zone.rrsets.length }}
diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.scss b/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.scss
index 0282e8f..13021ed 100644
--- a/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.scss
+++ b/src/powerdns-manager/src/app/features/dashboard/zones/home/home.component.scss
@@ -1,6 +1,34 @@
@import '/src/styles/utils/variables';
:host {
+ color: $color-white;
+
+ mat-card {
+ height: 300px;
+ }
+
+ mat-card-header {
+ font-size: 1rem;
+ }
+
+ mat-card-content {
+ p {
+ font-size: 1rem;
+ color: $color-white;
+ }
+ > div {
+ height: 220px;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ mat-list-item {
+ a {
+ color: $color-white !important;
+ }
+ }
+ }
+
ul {
font-size: 1rem;
list-style-type: 'ยป ';
@@ -36,14 +64,6 @@
text-decoration: underline;
}
- > div {
- background-color: $color-white;
- height: 280px;
- overflow: hidden;
- overflow-y: auto;
- }
-
-
.listItem {
a {
color: $color-blue-navy;
@@ -62,10 +82,10 @@
}
.resultContainer {
- height: 500px !important;
+ color: $color-black;
+ height: 480px !important;
width: 1550px;
overflow: hidden;
- background-color: $color-white;
.details {
border-top: solid 1px $color-blue-navy;
diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/zones-routing.module.ts b/src/powerdns-manager/src/app/features/dashboard/zones/zones-routing.module.ts
index 59f419c..ac11eca 100644
--- a/src/powerdns-manager/src/app/features/dashboard/zones/zones-routing.module.ts
+++ b/src/powerdns-manager/src/app/features/dashboard/zones/zones-routing.module.ts
@@ -1,11 +1,16 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { HomeComponent } from "./home/home.component";
+import { NewZoneComponent } from "./create-zone/new-zone/new-zone.component";
const routes : Routes = [
{
path: '',
component: HomeComponent
+ },
+ {
+ path: 'new',
+ component: NewZoneComponent
}
]
diff --git a/src/powerdns-manager/src/app/features/dashboard/zones/zones.module.ts b/src/powerdns-manager/src/app/features/dashboard/zones/zones.module.ts
index 807d79e..8f50b47 100644
--- a/src/powerdns-manager/src/app/features/dashboard/zones/zones.module.ts
+++ b/src/powerdns-manager/src/app/features/dashboard/zones/zones.module.ts
@@ -10,11 +10,13 @@ import { DataCenterService } from '../data-centers/services/data-center.service'
import { ServerService } from '../servers/services/server-service.service';
import { LoadingService } from '@shared/components/loading/loading.service';
import { LoadingModule } from '@shared/components/loading/loading.module';
+import { NewZoneComponent } from './create-zone/new-zone/new-zone.component';
@NgModule({
declarations: [
- HomeComponent
+ HomeComponent,
+ NewZoneComponent
],
imports: [
CommonModule,
diff --git a/src/powerdns-manager/src/styles/utils/_variables.scss b/src/powerdns-manager/src/styles/utils/_variables.scss
index 078e936..bf50ac4 100644
--- a/src/powerdns-manager/src/styles/utils/_variables.scss
+++ b/src/powerdns-manager/src/styles/utils/_variables.scss
@@ -2,7 +2,7 @@ $color-orange: #FF3E1B;
$color-black: #2C292E;
$color-gray: #f1f1f1;
$color-gray-light: #EFEFEF;
-$color-white: rgb(255, 228, 196);
+$color-white: rgb(254, 254, 254);
$color-blue: #2E22E4;
$color-blue-navy: #004a9f;