diff --git a/ogWebconsole/src/app/app.module.ts b/ogWebconsole/src/app/app.module.ts
index b8c1f8c..6a50c12 100644
--- a/ogWebconsole/src/app/app.module.ts
+++ b/ogWebconsole/src/app/app.module.ts
@@ -34,6 +34,11 @@ import { AddRoleModalComponent } from './components/pages/admin/roles/roles/add-
import { DeleteRoleModalComponent } from './components/pages/admin/roles/roles/delete-role-modal/delete-role-modal.component';
import { ChangePasswordModalComponent } from './components/pages/admin/users/users/change-password-modal/change-password-modal.component';
import { GroupsComponent } from './components/groups/groups.component';
+import {MatDividerModule} from '@angular/material/divider';
+import { CreateOrganizationalUnitComponent } from './components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component';
+import {MatStepperModule} from '@angular/material/stepper';
+import { MatSlideToggleModule } from '@angular/material/slide-toggle';
+import { CreateClientComponent } from './components/groups/clients/create-client/create-client.component';
@NgModule({ declarations: [
@@ -53,7 +58,9 @@ import { GroupsComponent } from './components/groups/groups.component';
AddRoleModalComponent,
DeleteRoleModalComponent,
ChangePasswordModalComponent,
- GroupsComponent
+ GroupsComponent,
+ CreateOrganizationalUnitComponent,
+ CreateClientComponent
],
bootstrap: [AppComponent],
imports: [BrowserModule,
@@ -72,7 +79,10 @@ import { GroupsComponent } from './components/groups/groups.component';
MatListModule,
MatTableModule,
MatDialogModule,
- MatSelectModule],
+ MatSelectModule,
+ MatDividerModule,
+ MatStepperModule,
+ MatSlideToggleModule],
providers: [
{
provide: HTTP_INTERCEPTORS,
diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.css b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.css
new file mode 100644
index 0000000..40124bd
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.css
@@ -0,0 +1,39 @@
+h1 {
+ text-align: center;
+ font-family: 'Roboto', sans-serif;
+ font-weight: 400;
+ color: #3f51b5;
+ margin-bottom: 20px;
+ }
+
+ .network-form {
+ display: flex;
+ flex-direction: column;
+ gap: 15px;
+ }
+
+ .form-field {
+ width: 100%;
+ margin-top: 10px;
+ }
+
+ .mat-dialog-content {
+ padding: 20px;
+ }
+
+ .mat-dialog-actions {
+ display: flex;
+ justify-content: flex-end;
+ padding: 10px 20px;
+ }
+
+ button {
+ text-transform: none;
+ font-size: 16px;
+ font-weight: 500;
+ }
+
+ .mat-slide-toggle {
+ margin-top: 20px;
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.html b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.html
new file mode 100644
index 0000000..5f3f1c8
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.html
@@ -0,0 +1,54 @@
+
Añadir Cliente
+
+
+
+
+
+
+
diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.spec.ts b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.spec.ts
new file mode 100644
index 0000000..04e3075
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CreateClientComponent } from './create-client.component';
+
+describe('CreateClientComponent', () => {
+ let component: CreateClientComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [CreateClientComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(CreateClientComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.ts b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.ts
new file mode 100644
index 0000000..c08f536
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.ts
@@ -0,0 +1,44 @@
+import { Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { MatDialogRef } from '@angular/material/dialog';
+
+@Component({
+ selector: 'app-create-client',
+ templateUrl: './create-client.component.html',
+ styleUrls: ['./create-client.component.css']
+})
+export class CreateClientComponent implements OnInit {
+ clientForm!: FormGroup;
+
+ constructor(
+ private fb: FormBuilder,
+ private dialogRef: MatDialogRef
+ ) { }
+
+ ngOnInit(): void {
+ this.clientForm = this.fb.group({
+ name: ['', Validators.required],
+ serialNumber: ['', Validators.required],
+ netiface: [''],
+ netDriver: [''],
+ mac: ['', [Validators.required, Validators.pattern('^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$')]],
+ ip: ['', [Validators.required, Validators.pattern('^([0-9]{1,3}\.){3}[0-9]{1,3}$')]],
+ status: [''],
+ organizationalUnit: ['', Validators.pattern('https?://.+')],
+ menu: ['', Validators.pattern('https?://.+')],
+ hardwareProfile: ['', Validators.pattern('https?://.+')],
+ });
+ }
+
+ onSubmit() {
+ if (this.clientForm.valid) {
+ const formData = this.clientForm.value;
+ console.log('Form Data:', formData);
+ this.dialogRef.close(formData);
+ }
+ }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+}
diff --git a/ogWebconsole/src/app/components/groups/groups.component.css b/ogWebconsole/src/app/components/groups/groups.component.css
index aaecff2..a70c0c6 100644
--- a/ogWebconsole/src/app/components/groups/groups.component.css
+++ b/ogWebconsole/src/app/components/groups/groups.component.css
@@ -4,4 +4,14 @@
mat-card {
margin: 10px;
+}
+
+.groups-button-row {
+ display: flex;
+ flex-grow: 1;
+}
+button {
+ margin-left: 10px;
+
+ margin-bottom: 20px;
}
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html
index 2706b33..0e41409 100644
--- a/ogWebconsole/src/app/components/groups/groups.component.html
+++ b/ogWebconsole/src/app/components/groups/groups.component.html
@@ -1,5 +1,11 @@
-
-groups works!
+Crear
+
+
+
+
+
+
+Grupos
Unidad organizativa
@@ -16,24 +22,24 @@
Aulas
-
-
+
{{ aula.nombre }}
-
-
+
+
Clientes
-
-
+
{{ cliente.nombre }}
-
-
+
+
diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts
index e84cacf..10218db 100644
--- a/ogWebconsole/src/app/components/groups/groups.component.ts
+++ b/ogWebconsole/src/app/components/groups/groups.component.ts
@@ -2,6 +2,9 @@
import { Component, OnInit } from '@angular/core';
import { DataService } from './data.service';
import { UnidadOrganizativa, Aula, Cliente } from './model';
+import { CreateOrganizationalUnitComponent } from './organizational-units/create-organizational-unit/create-organizational-unit.component';
+import { MatDialog } from '@angular/material/dialog';
+import { CreateClientComponent } from './clients/create-client/create-client.component';
@Component({
selector: 'app-groups',
@@ -14,7 +17,7 @@ export class GroupsComponent implements OnInit {
selectedAula: Aula | null = null;
selectedClientes: Cliente[] = [];
- constructor(private dataService: DataService) {}
+ constructor(private dataService: DataService, public dialog: MatDialog) {}
ngOnInit(): void {
this.unidadesOrganizativas = this.dataService.getUnidadesOrganizativas();
@@ -30,4 +33,13 @@ export class GroupsComponent implements OnInit {
this.selectedAula = aula;
this.selectedClientes = aula.clientes;
}
+
+
+ addOU() {
+ const dialogRef = this.dialog.open(CreateOrganizationalUnitComponent);
+ }
+
+ addClient() {
+ const dialogRef = this.dialog.open(CreateClientComponent);
+ }
}
diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.css
new file mode 100644
index 0000000..8293a6b
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.css
@@ -0,0 +1,38 @@
+h1 {
+ text-align: center;
+ font-family: 'Roboto', sans-serif;
+ font-weight: 400;
+ color: #3f51b5;
+ margin-bottom: 20px;
+}
+
+.network-form {
+ display: flex;
+ flex-direction: column;
+ gap: 15px;
+}
+
+.form-field {
+ width: 100%;
+ margin-top: 10px;
+}
+
+.mat-dialog-content {
+ padding: 20px;
+}
+
+.mat-dialog-actions {
+ display: flex;
+ justify-content: flex-end;
+ padding: 10px 20px;
+}
+
+button {
+ text-transform: none;
+ font-size: 16px;
+ font-weight: 500;
+}
+
+.mat-slide-toggle {
+ margin-top: 20px;
+}
diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.html
new file mode 100644
index 0000000..ebaf5a7
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.html
@@ -0,0 +1,112 @@
+Añadir Unidad Organizativa
+
+
+
+
diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts
new file mode 100644
index 0000000..9113d3d
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CreateOrganizationalUnitComponent } from './create-organizational-unit.component';
+
+describe('CreateOrganizationalUnitComponent', () => {
+ let component: CreateOrganizationalUnitComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [CreateOrganizationalUnitComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(CreateOrganizationalUnitComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.ts
new file mode 100644
index 0000000..d5c41af
--- /dev/null
+++ b/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.ts
@@ -0,0 +1,68 @@
+import { Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { MatDialogRef } from '@angular/material/dialog';
+
+@Component({
+ selector: 'app-create-organizational-unit',
+ templateUrl: './create-organizational-unit.component.html',
+ styleUrls: ['./create-organizational-unit.component.css']
+})
+export class CreateOrganizationalUnitComponent implements OnInit {
+ isLinear = true;
+ networkForm: FormGroup;
+ generalFormGroup: FormGroup;
+ additionalInfoFormGroup: FormGroup;
+ networkSettingsFormGroup: FormGroup;
+
+ constructor(
+ private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef
+ ) {
+ this.generalFormGroup = this._formBuilder.group({
+ name: ['', Validators.required],
+ parent: ['', [Validators.required, Validators.pattern('https?://.+')]],
+ description: ['']
+ });
+ this.additionalInfoFormGroup = this._formBuilder.group({
+ comments: [''],
+ type: ['', Validators.required]
+ });
+ this.networkSettingsFormGroup = this._formBuilder.group({
+ proxy: [''],
+ dns: [''],
+ netmask: [''],
+ router: [''],
+ ntp: [''],
+ p2pMode: [''],
+ p2pTime: [0, Validators.min(0)],
+ mcastIp: [''],
+ mcastSpeed: [0, Validators.min(0)],
+ mcastPort: [0, Validators.min(0)],
+ mcastMode: [''],
+ menu: ['', Validators.pattern('https?://.+')],
+ hardwareProfile: ['', Validators.pattern('https?://.+')],
+ validation: [false]
+ });
+
+ this.networkForm = this._formBuilder.group({
+ general: this.generalFormGroup,
+ additionalInfo: this.additionalInfoFormGroup,
+ networkSettings: this.networkSettingsFormGroup
+ });
+ }
+
+ ngOnInit() {}
+
+ onSubmit() {
+ if (this.networkForm.valid) {
+ const formData = this.networkForm.value;
+ console.log('Form Data:', formData);
+ // handle form submission logic
+ this.dialogRef.close(formData); // Cierra el modal y pasa los datos del formulario
+ }
+ }
+
+ onNoClick(): void {
+ this.dialogRef.close(); // Cierra el modal sin pasar datos
+ }
+}
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_16366.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_16366.css
new file mode 100644
index 0000000..bd09f65
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_16366.css
@@ -0,0 +1,23 @@
+.user-form .form-field {
+ display: block;
+<<<<<<< HEAD
+ margin-bottom: 10px; /* Puedes ajustar el valor para cambiar la separación */
+=======
+ margin-bottom: 10px;
+>>>>>>> main
+ }
+
+ .checkbox-group label {
+ display: block;
+<<<<<<< HEAD
+ margin-bottom: 8px; /* Ajusta este valor según necesites */
+=======
+ margin-bottom: 8px;
+ }
+
+ .error-message {
+ color: red;
+ margin-top: 10px;
+>>>>>>> main
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_24186.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_24186.css
new file mode 100644
index 0000000..bd09f65
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_24186.css
@@ -0,0 +1,23 @@
+.user-form .form-field {
+ display: block;
+<<<<<<< HEAD
+ margin-bottom: 10px; /* Puedes ajustar el valor para cambiar la separación */
+=======
+ margin-bottom: 10px;
+>>>>>>> main
+ }
+
+ .checkbox-group label {
+ display: block;
+<<<<<<< HEAD
+ margin-bottom: 8px; /* Ajusta este valor según necesites */
+=======
+ margin-bottom: 8px;
+ }
+
+ .error-message {
+ color: red;
+ margin-top: 10px;
+>>>>>>> main
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_29029.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_29029.css
new file mode 100644
index 0000000..bd09f65
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BACKUP_29029.css
@@ -0,0 +1,23 @@
+.user-form .form-field {
+ display: block;
+<<<<<<< HEAD
+ margin-bottom: 10px; /* Puedes ajustar el valor para cambiar la separación */
+=======
+ margin-bottom: 10px;
+>>>>>>> main
+ }
+
+ .checkbox-group label {
+ display: block;
+<<<<<<< HEAD
+ margin-bottom: 8px; /* Ajusta este valor según necesites */
+=======
+ margin-bottom: 8px;
+ }
+
+ .error-message {
+ color: red;
+ margin-top: 10px;
+>>>>>>> main
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BASE_16366.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BASE_16366.css
new file mode 100644
index 0000000..e69de29
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BASE_24186.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BASE_24186.css
new file mode 100644
index 0000000..e69de29
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BASE_29029.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_BASE_29029.css
new file mode 100644
index 0000000..e69de29
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_16366.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_16366.css
new file mode 100644
index 0000000..6916e95
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_16366.css
@@ -0,0 +1,10 @@
+.user-form .form-field {
+ display: block;
+ margin-bottom: 10px; /* Puedes ajustar el valor para cambiar la separación */
+ }
+
+ .checkbox-group label {
+ display: block;
+ margin-bottom: 8px; /* Ajusta este valor según necesites */
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_24186.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_24186.css
new file mode 100644
index 0000000..6916e95
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_24186.css
@@ -0,0 +1,10 @@
+.user-form .form-field {
+ display: block;
+ margin-bottom: 10px; /* Puedes ajustar el valor para cambiar la separación */
+ }
+
+ .checkbox-group label {
+ display: block;
+ margin-bottom: 8px; /* Ajusta este valor según necesites */
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_29029.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_29029.css
new file mode 100644
index 0000000..6916e95
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_LOCAL_29029.css
@@ -0,0 +1,10 @@
+.user-form .form-field {
+ display: block;
+ margin-bottom: 10px; /* Puedes ajustar el valor para cambiar la separación */
+ }
+
+ .checkbox-group label {
+ display: block;
+ margin-bottom: 8px; /* Ajusta este valor según necesites */
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_16366.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_16366.css
new file mode 100644
index 0000000..605ecf3
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_16366.css
@@ -0,0 +1,15 @@
+.user-form .form-field {
+ display: block;
+ margin-bottom: 10px;
+ }
+
+ .checkbox-group label {
+ display: block;
+ margin-bottom: 8px;
+ }
+
+ .error-message {
+ color: red;
+ margin-top: 10px;
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_24186.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_24186.css
new file mode 100644
index 0000000..605ecf3
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_24186.css
@@ -0,0 +1,15 @@
+.user-form .form-field {
+ display: block;
+ margin-bottom: 10px;
+ }
+
+ .checkbox-group label {
+ display: block;
+ margin-bottom: 8px;
+ }
+
+ .error-message {
+ color: red;
+ margin-top: 10px;
+ }
+
\ No newline at end of file
diff --git a/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_29029.css b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_29029.css
new file mode 100644
index 0000000..605ecf3
--- /dev/null
+++ b/ogWebconsole/src/app/components/pages/admin/users/users/change-password-modal/change-password-modal.component_REMOTE_29029.css
@@ -0,0 +1,15 @@
+.user-form .form-field {
+ display: block;
+ margin-bottom: 10px;
+ }
+
+ .checkbox-group label {
+ display: block;
+ margin-bottom: 8px;
+ }
+
+ .error-message {
+ color: red;
+ margin-top: 10px;
+ }
+
\ No newline at end of file