diff --git a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.html b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.html index 0307328..2d0679b 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.html +++ b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.html @@ -13,22 +13,34 @@ Pulsar 'enter' para buscar - - - - - - - - - - - -
{{ column.header }} {{ column.cell(role) }} Acciones - - -
+
+ +
+ +
+ + + + + + + + + + + + +
{{ column.header }} {{ column.cell(role) }} Acciones + + +
+
+
(); filters: { [key: string]: string } = {}; - loading:boolean = false; + loading: boolean = false; length: number = 0; itemsPerPage: number = 10; page: number = 0; @@ -57,13 +56,16 @@ export class RolesComponent implements OnInit { } search() { + this.loading = true; this.http.get(`${this.apiUrl}?&page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( (data) => { this.dataSource.data = data['hydra:member']; this.length = data['hydra:totalItems']; + this.loading = false; }, (error) => { - console.error('Error fetching commands', error); + console.error('Error fetching roles', error); + this.loading = false; } ); } @@ -114,7 +116,7 @@ export class RolesComponent implements OnInit { }); } - onPageChange(event: any): void { + onPageChange(event: PageEvent): void { this.page = event.pageIndex; this.itemsPerPage = event.pageSize; this.length = event.length; diff --git a/ogWebconsole/src/app/components/admin/users/users/users.component.html b/ogWebconsole/src/app/components/admin/users/users/users.component.html index 59e47fd..80dea5b 100644 --- a/ogWebconsole/src/app/components/admin/users/users/users.component.html +++ b/ogWebconsole/src/app/components/admin/users/users/users.component.html @@ -13,23 +13,30 @@ Pulsar 'enter' para buscar
- - - - - +
+ +
+ +
+
{{ column.header }} {{ column.cell(user) }}
+ + + + + + + + + + + +
{{ column.header }} {{ column.cell(user) }} Acciones + + +
+ - - Acciones - - - - - - - -
(); filters: { [key: string]: string } = {}; - loading:boolean = false; + loading: boolean = false; length: number = 0; itemsPerPage: number = 10; page: number = 0; @@ -61,13 +59,16 @@ export class UsersComponent implements OnInit { } search() { + this.loading = true; this.http.get(`${this.apiUrl}?&page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( (data) => { this.dataSource.data = data['hydra:member']; this.length = data['hydra:totalItems']; + this.loading = false; }, (error) => { - console.error('Error fetching commands', error); + console.error('Error fetching users', error); + this.loading = false; } ); } @@ -78,7 +79,6 @@ export class UsersComponent implements OnInit { dialogRef.componentInstance.userAdded.subscribe(() => { this.search(); }); - } editUser(user: any): void { @@ -114,8 +114,6 @@ export class UsersComponent implements OnInit { console.error('Error deleting user:', error); } }); - } else { - console.log('User deletion cancelled'); } }); } @@ -126,5 +124,4 @@ export class UsersComponent implements OnInit { this.length = event.length; this.search(); } - } diff --git a/ogWebconsole/src/app/components/calendar/calendar.component.html b/ogWebconsole/src/app/components/calendar/calendar.component.html index ebac9b9..a776285 100644 --- a/ogWebconsole/src/app/components/calendar/calendar.component.html +++ b/ogWebconsole/src/app/components/calendar/calendar.component.html @@ -13,35 +13,43 @@ Pulsar 'enter' para buscar
- - - - - +
+ +
- - - - +
+
{{ column.header }} - - - {{ image[column.columnDef] ? 'check_circle' : 'cancel' }} - - - - {{ column.cell(image) }} - - Acciones - - - - -
+ + + + + + + + + + + + +
{{ column.header }} + + + {{ image[column.columnDef] ? 'check_circle' : 'cancel' }} + + + + + {{ column.cell(image) }} + + Acciones + + + + +
+ - - -
{ let component: CalendarComponent; @@ -32,7 +33,8 @@ describe('CalendarComponent', () => { MatTableModule, MatPaginatorModule, MatTooltipModule, - FormsModule // Añade FormsModule aquí para que ngModel funcione + FormsModule, + MatProgressSpinner ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/calendar/calendar.component.ts b/ogWebconsole/src/app/components/calendar/calendar.component.ts index c9d147e..cc686b5 100644 --- a/ogWebconsole/src/app/components/calendar/calendar.component.ts +++ b/ogWebconsole/src/app/components/calendar/calendar.component.ts @@ -1,13 +1,13 @@ -import {Component, OnInit, signal} from '@angular/core'; -import {MatTableDataSource} from "@angular/material/table"; -import {DatePipe} from "@angular/common"; -import {MatDialog} from "@angular/material/dialog"; -import {HttpClient} from "@angular/common/http"; -import {DataService} from "./data.service"; -import {ToastrService} from "ngx-toastr"; -import {PageEvent} from "@angular/material/paginator"; -import {CreateCalendarComponent} from "./create-calendar/create-calendar.component"; -import {DeleteModalComponent} from "../../shared/delete_modal/delete-modal/delete-modal.component"; +import { Component, OnInit, signal } from '@angular/core'; +import { MatTableDataSource } from "@angular/material/table"; +import { DatePipe } from "@angular/common"; +import { MatDialog } from "@angular/material/dialog"; +import { HttpClient } from "@angular/common/http"; +import { DataService } from "./data.service"; +import { ToastrService } from "ngx-toastr"; +import { PageEvent } from "@angular/material/paginator"; +import { CreateCalendarComponent } from "./create-calendar/create-calendar.component"; +import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component"; @Component({ selector: 'app-calendar', @@ -22,7 +22,7 @@ export class CalendarComponent implements OnInit { itemsPerPage: number = 10; page: number = 1; pageSizeOptions: number[] = [5, 10, 20, 40, 100]; - loading:boolean = false; + loading: boolean = false; filters: { [key: string]: string } = {}; alertMessage: string | null = null; readonly panelOpenState = signal(false); @@ -148,13 +148,16 @@ export class CalendarComponent implements OnInit { } applyFilter() { + this.loading = true; this.http.get(`${this.apiUrl}?page=${this.page}&itemsPerPage=${this.itemsPerPage}`).subscribe({ next: (response) => { this.dataSource.data = response['hydra:member']; this.length = response['hydra:totalItems']; + this.loading = false; }, error: (error) => { console.error('Error al cargar las imágenes:', error); + this.loading = false; } }); } diff --git a/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.html b/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.html index d5aff52..91bf19a 100644 --- a/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.html +++ b/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.html @@ -1,57 +1,63 @@
-

Administrar Grupos de Comandos

-
- -
-
- -
- - Buscar nombre de grupo - - search - Pulsar 'enter' para buscar - +

Administrar Grupos de Comandos

+
+
+
+ +
+ + Buscar nombre de grupo + + search + Pulsar 'enter' para buscar + +
- - - - - - - - - +
+
{{ column.header }} - - {{ column.cell(commandGroup) }} - +
+ +
- - - - - - -
Acciones - - - -
+ + + - + + + + + + + + + + + + + + +
{{ column.header }} + + {{ column.cell(commandGroup) }} + -
Acciones + + + +
+
-
- - -
+
+ + +
diff --git a/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.ts b/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.ts index d42db5b..b0437ab 100644 --- a/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-groups/commands-groups.component.ts @@ -2,11 +2,11 @@ import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { MatDialog } from '@angular/material/dialog'; import { ToastrService } from 'ngx-toastr'; -import { CreateCommandGroupComponent } from './create-command-group/create-command-group.component' +import { CreateCommandGroupComponent } from './create-command-group/create-command-group.component'; import { DetailCommandGroupComponent } from './detail-command-group/detail-command-group.component'; import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/delete-modal.component'; -import {MatTableDataSource} from "@angular/material/table"; -import {DatePipe} from "@angular/common"; +import { MatTableDataSource } from "@angular/material/table"; +import { DatePipe } from "@angular/common"; @Component({ selector: 'app-commands-groups', @@ -22,6 +22,7 @@ export class CommandsGroupsComponent implements OnInit { page: number = 0; pageSizeOptions: number[] = [10, 20, 40, 100]; datePipe: DatePipe = new DatePipe('es-ES'); + loading: boolean = false; columns = [ { columnDef: 'id', @@ -54,13 +55,16 @@ export class CommandsGroupsComponent implements OnInit { } search(): void { + this.loading = true; this.http.get(`${this.apiUrl}?page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( (data) => { this.dataSource.data = data['hydra:member']; this.length = data['hydra:totalItems']; + this.loading = false; }, (error) => { console.error('Error fetching command groups', error); + this.loading = false; } ); } diff --git a/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.html b/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.html index 0f193de..d07ffe4 100644 --- a/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.html +++ b/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.html @@ -1,6 +1,10 @@

{{ editing ? 'Editar' : 'Crear' }} grupo de comando

-
+
+ +
+ + Nombre del Grupo @@ -11,7 +15,7 @@

Comandos Disponibles

-
+
@@ -57,4 +61,3 @@ - diff --git a/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.ts b/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.ts index 1a8d172..0a50702 100644 --- a/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-groups/create-command-group/create-command-group.component.ts @@ -15,6 +15,7 @@ export class CreateCommandGroupComponent implements OnInit { groupName: string = ''; enabled: boolean = true; editing: boolean = false; + loading: boolean = false; private apiUrl = `${this.baseUrl}/commands`; constructor( @@ -34,12 +35,15 @@ export class CreateCommandGroupComponent implements OnInit { } loadAvailableCommands(): void { + this.loading = true; this.http.get(this.apiUrl).subscribe( (data) => { this.availableCommands = data['hydra:member']; + this.loading = false; }, (error) => { console.error('Error fetching available commands', error); + this.loading = false; } ); } diff --git a/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.html b/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.html index 82c143f..6a64984 100644 --- a/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.html +++ b/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.html @@ -1,16 +1,21 @@

Detalles del Grupo de Comandos

- - + + +
+ +
+ + {{ data.name }} Creado por: {{ data.createdBy }} - +

ID del Grupo: {{ data.uuid }}

Fecha de Creación: {{ data.createdAt | date:'short' }}

- +

Comandos Incluidos:

Nombre
@@ -27,11 +32,10 @@
- -
+

Selecciona los clientes:

@@ -48,7 +52,7 @@
-
+
diff --git a/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.ts b/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.ts index 636e3da..6d8a326 100644 --- a/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-groups/detail-command-group/detail-command-group.component.ts @@ -13,8 +13,9 @@ export class DetailCommandGroupComponent implements OnInit { baseUrl: string = import.meta.env.NG_APP_BASE_API_URL; form!: FormGroup; clients: any[] = []; - showClientSelect = false; // Ocultar selección de clientes inicialmente + showClientSelect = false; canExecute = false; + loading: boolean = false; constructor( @Inject(MAT_DIALOG_DATA) public data: any, @@ -29,17 +30,28 @@ export class DetailCommandGroupComponent implements OnInit { selectedClients: [[], Validators.required], }); - // Obtener la lista de clientes - this.http.get(`${this.baseUrl}/clients?page=1&itemsPerPage=30`).subscribe(response => { - this.clients = response['hydra:member']; + this.loadClients(); + } + + loadClients(): void { + this.loading = true; + this.http.get(`${this.baseUrl}/clients?page=1&itemsPerPage=30`).subscribe({ + next: (response) => { + this.clients = response['hydra:member']; + this.loading = false; + }, + error: (error) => { + console.error('Error fetching clients:', error); + this.loading = false; + } }); } toggleClientSelect(): void { if (!this.showClientSelect) { - this.showClientSelect = true; // Mostrar selección de clientes + this.showClientSelect = true; } else { - this.execute(); // Ejecutar si ya está visible + this.execute(); } } @@ -50,13 +62,16 @@ export class DetailCommandGroupComponent implements OnInit { }; const apiUrl = `${this.baseUrl}/command-groups/${this.data.uuid}/execute`; + this.loading = true; this.http.post(apiUrl, payload).subscribe({ next: () => { this.dialogRef.close(); this.toastService.success('Grupo de comandos ejecutado exitosamente'); + this.loading = false; }, error: (error) => { console.error('Error ejecutando grupo de comandos:', error); + this.loading = false; } }); } else { diff --git a/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.html b/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.html index 0eb522f..5e812eb 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.html +++ b/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.html @@ -16,46 +16,52 @@
- - - - - +
+ +
- - - - +
+
Id {{ task.id }} Info {{ task.notes }}
+ + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - -
Id {{ task.id }} Creado por {{ task.createdBy }} Info {{ task.notes }} Fecha de Ejecución {{ task.dateTime | date:'short' }} Creado por {{ task.createdBy }} Estado {{ task.enabled ? 'Habilitado' : 'Deshabilitado' }} Fecha de Ejecución {{ task.dateTime | date:'short' }} Acciones - - - - Estado {{ task.enabled ? 'Habilitado' : 'Deshabilitado' }}
+ + Acciones + + + + + + + + + + +
(`${this.apiUrl}?page=${this.page}&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( (data) => { this.tasks = data['hydra:member']; this.length = data['hydra:totalItems']; + this.loading = false; }, (error) => { console.error('Error fetching tasks', error); + this.loading = false; } ); } @@ -48,7 +52,7 @@ export class CommandsTaskComponent implements OnInit { viewTaskDetails(task: any): void { this.dialog.open(DetailTaskComponent, { width: '800px', - data: {task}, + data: { task }, }).afterClosed().subscribe(() => this.loadTasks()); } diff --git a/ogWebconsole/src/app/components/commands/commands-task/detail-task/detail-task.component.ts b/ogWebconsole/src/app/components/commands/commands-task/detail-task/detail-task.component.ts index 33e5f95..9ae5897 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/detail-task/detail-task.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/detail-task/detail-task.component.ts @@ -13,11 +13,9 @@ export class DetailTaskComponent { public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any ) { - this.task = data.task; // Asignamos la tarea que viene en el modal - console.log('tasaas',this.task); + this.task = data.task; } - // Método opcional para cerrar el modal closeDialog(): void { this.dialogRef.close(); } diff --git a/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.html b/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.html index 398bc79..3d42137 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.html +++ b/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.html @@ -5,6 +5,7 @@
+
@@ -15,7 +16,6 @@ - @@ -26,19 +26,79 @@
- - - - - + +
+ +
- - -
{{ column.header }} - - {{ column.cell(trace) }} - -
+ +
+ + + + + + + + +
{{ column.header }} + {{ column.cell(trace) }} +
+
+ +
+ + +
+
+

Trazas de comandos y procedimientos

+
+ +
+
+ + +
+ + + + + {{ client.name }} + + + + + + + + + {{ command.name }} + + + +
+ +
+ +
+ +
+ + + + + + + + +
{{ column.header }} + {{ column.cell(trace) }} +
+
`${this.datePipe.transform(trace.executedAt, 'dd/MM/yyyy hh:mm:ss')}`, }, { @@ -110,40 +110,45 @@ export class TaskLogsComponent implements OnInit { } loadTraces(): void { + this.loading = true; const url = `${this.baseUrl}/traces?page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`; this.http.get(url, { params: this.filters }).subscribe( (data) => { this.traces = data['hydra:member']; this.length = data['hydra:totalItems']; this.groupedTraces = this.groupByCommandId(this.traces); + this.loading = false; }, (error) => { console.error('Error fetching traces', error); + this.loading = false; } ); } loadCommands() { - this.http.get( `${this.baseUrl}/commands?&page=1&itemsPerPage=10000`).subscribe( + this.loading = true; + this.http.get(`${this.baseUrl}/commands?&page=1&itemsPerPage=10000`).subscribe( response => { this.commands = response['hydra:member']; this.loading = false; }, error => { - console.error('Error fetching parent units:', error); + console.error('Error fetching commands:', error); this.loading = false; } ); } loadClients() { - this.http.get( `${this.baseUrl}/clients?&page=1&itemsPerPage=10000`).subscribe( + this.loading = true; + this.http.get(`${this.baseUrl}/clients?&page=1&itemsPerPage=10000`).subscribe( response => { this.clients = response['hydra:member']; this.loading = false; }, error => { - console.error('Error fetching parent units:', error); + console.error('Error fetching clients:', error); this.loading = false; } ); diff --git a/ogWebconsole/src/app/components/commands/main-commands/commands.component.html b/ogWebconsole/src/app/components/commands/main-commands/commands.component.html index a5df741..bec46a6 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/commands.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/commands.component.html @@ -5,6 +5,7 @@
+
Buscar nombre de comando @@ -14,34 +15,38 @@
- - - - - +
+ +
- - - - +
+
{{ column.header }} - - {{ column.cell(command) }} - - - check - close - - Acciones - - - -
+ + + + - - -
{{ column.header }} + + {{ column.cell(command) }} + + + check + close + +
+ + Acciones + + + + + + + + + + +
(`${this.apiUrl}?page=${this.page +1 }&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( + this.loading = true; + this.http.get(`${this.apiUrl}?page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( (data) => { this.dataSource.data = data['hydra:member']; this.length = data['hydra:totalItems']; + this.loading = false; }, (error) => { console.error('Error fetching commands', error); + this.loading = false; } ); } @@ -87,7 +91,7 @@ export class CommandsComponent implements OnInit { }).afterClosed().subscribe(() => this.search()); } - deleteCommand(event: MouseEvent,command: any): void { + deleteCommand(event: MouseEvent, command: any): void { event.stopPropagation(); this.dialog.open(DeleteModalComponent, { width: '300px', diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.html b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.html index 0f1d858..27d79ae 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.html @@ -1,4 +1,14 @@ -
+
+

Administrar Cliente

+
+ + + +
+ +
+ +
@@ -30,8 +40,8 @@
- - + +
@@ -61,10 +71,9 @@
-
-
+
diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts index 4f00d86..ff33d94 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/client-main-view.component.ts @@ -1,5 +1,6 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { HttpClient } from '@angular/common/http'; + interface ClientInfo { property: string; value: any; @@ -18,11 +19,12 @@ export class ClientMainViewComponent implements OnInit { isPartitionAssistantVisible: boolean = false; isBootImageVisible: boolean = false; isDiskUsageVisible: boolean = true; - generalData: ClientInfo[] = []; networkData: ClientInfo[] = []; classroomData: ClientInfo[] = []; diskUsageData: any[] = []; + isDiskUsageEmpty: boolean = true; + loading: boolean = true; // Variable para controlar el estado de carga constructor(private http: HttpClient) { const url = window.location.href; @@ -36,6 +38,7 @@ export class ClientMainViewComponent implements OnInit { this.updateNetworkData(); this.updateClassroomData(); this.calculateDiskUsage(); + this.loading = false; // Desactivar el estado de carga cuando los datos se hayan procesado } updateGeneralData() { @@ -52,6 +55,7 @@ export class ClientMainViewComponent implements OnInit { { property: 'Creado por', value: this.clientData?.createdBy || '' } ]; } + updateNetworkData() { this.networkData = [ { property: 'Perfil hardware', value: this.clientData?.hardwareProfile?.description || '' }, @@ -95,7 +99,7 @@ export class ClientMainViewComponent implements OnInit { if (partition.partitionNumber === 0) { diskData!.total = partition.size / (1024 * 1024); } else { - diskData!.used += partition.size / (1024 * 1024); + diskData!.used += partition.size / (1024 * 1024); } }); @@ -103,15 +107,16 @@ export class ClientMainViewComponent implements OnInit { const percentage = total > 0 ? Math.round((used / total) * 100) : 0; return { diskNumber, total, used, percentage }; }); + this.isDiskUsageEmpty = this.diskUsageData.length === 0; } togglePartitionAssistant() { this.isPartitionAssistantVisible = !this.isPartitionAssistantVisible; - this.isBootImageVisible = false + this.isBootImageVisible = false; if (this.isPartitionAssistantVisible) { setTimeout(() => { this.assistantContainer.nativeElement.scrollIntoView({ behavior: 'smooth' }); - }, 0); + }, 200); } } diff --git a/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html b/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html index 7782e86..282e4cd 100644 --- a/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html @@ -34,6 +34,12 @@
+ +
+ +
+ +
@@ -78,3 +84,4 @@ (page)="onPageChange($event)"> + diff --git a/ogWebconsole/src/app/components/ogboot/pxe/add-clients-to-pxe/add-clients-to-pxe.component.spec.ts b/ogWebconsole/src/app/components/ogboot/pxe/add-clients-to-pxe/add-clients-to-pxe.component.spec.ts index 5aefd4b..b91fb1e 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/add-clients-to-pxe/add-clients-to-pxe.component.spec.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe/add-clients-to-pxe/add-clients-to-pxe.component.spec.ts @@ -1,6 +1,21 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { AddClientsToPxeComponent } from './add-clients-to-pxe.component'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; describe('AddClientsToPxeComponent', () => { let component: AddClientsToPxeComponent; @@ -8,7 +23,25 @@ describe('AddClientsToPxeComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [AddClientsToPxeComponent] + declarations: [AddClientsToPxeComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner, + MatOptionModule, + ReactiveFormsModule, + MatSelectModule + ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.spec.ts b/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.spec.ts index fb60007..07b3807 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.spec.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.spec.ts @@ -1,6 +1,22 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ClientsComponent } from './clients.component'; +import { MatInputModule } from '@angular/material/input'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; +import { MatDialogRef } from '@angular/material/dialog'; describe('ClientsComponent', () => { let component: ClientsComponent; @@ -8,7 +24,26 @@ describe('ClientsComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ClientsComponent] + declarations: [ClientsComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner, + MatOptionModule, + ReactiveFormsModule, + MatSelectModule, + MatDialogRef + ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.spec.ts b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.spec.ts index 38894cb..d5d8b40 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.spec.ts +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.spec.ts @@ -1,6 +1,21 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ServerInfoDialogComponent } from './server-info-dialog.component'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; describe('ServerInfoDialogComponent', () => { let component: ServerInfoDialogComponent; @@ -8,7 +23,25 @@ describe('ServerInfoDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ServerInfoDialogComponent] + declarations: [ServerInfoDialogComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner, + MatOptionModule, + ReactiveFormsModule, + MatSelectModule + ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/operative-system/operative-system.component.spec.ts b/ogWebconsole/src/app/components/operative-system/operative-system.component.spec.ts index 1f910e8..fdd66e4 100644 --- a/ogWebconsole/src/app/components/operative-system/operative-system.component.spec.ts +++ b/ogWebconsole/src/app/components/operative-system/operative-system.component.spec.ts @@ -1,6 +1,19 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { OperativeSystemComponent } from './operative-system.component'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; describe('OperativeSystemComponent', () => { let component: OperativeSystemComponent; @@ -8,7 +21,22 @@ describe('OperativeSystemComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [OperativeSystemComponent] + declarations: [OperativeSystemComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner + ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/software-profile/software-profile.component.spec.ts b/ogWebconsole/src/app/components/software-profile/software-profile.component.spec.ts index 4131330..edf6724 100644 --- a/ogWebconsole/src/app/components/software-profile/software-profile.component.spec.ts +++ b/ogWebconsole/src/app/components/software-profile/software-profile.component.spec.ts @@ -1,6 +1,21 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SoftwareProfileComponent } from './software-profile.component'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; describe('SoftwareProfileComponent', () => { let component: SoftwareProfileComponent; @@ -8,7 +23,25 @@ describe('SoftwareProfileComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [SoftwareProfileComponent] + declarations: [SoftwareProfileComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner, + MatOptionModule, + ReactiveFormsModule, + MatSelectModule + ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/software/create-software/create-software.component.spec.ts b/ogWebconsole/src/app/components/software/create-software/create-software.component.spec.ts index afd91d6..bb37b8a 100644 --- a/ogWebconsole/src/app/components/software/create-software/create-software.component.spec.ts +++ b/ogWebconsole/src/app/components/software/create-software/create-software.component.spec.ts @@ -1,6 +1,21 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CreateSoftwareComponent } from './create-software.component'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatOptionModule } from '@angular/material/core'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; describe('CreateSoftwareComponent', () => { let component: CreateSoftwareComponent; @@ -8,7 +23,25 @@ describe('CreateSoftwareComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [CreateSoftwareComponent] + declarations: [CreateSoftwareComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner, + MatOptionModule, + ReactiveFormsModule, + MatSelectModule + ] }) .compileComponents(); diff --git a/ogWebconsole/src/app/components/software/software.component.html b/ogWebconsole/src/app/components/software/software.component.html index 1f4c568..5f637fe 100644 --- a/ogWebconsole/src/app/components/software/software.component.html +++ b/ogWebconsole/src/app/components/software/software.component.html @@ -8,13 +8,13 @@
Buscar nombre de software - + search Pulsar 'enter' para buscar Buscar por tipo - + Aplicación Sistema operativo Sistema de ficheros diff --git a/ogWebconsole/src/app/components/software/software.component.spec.ts b/ogWebconsole/src/app/components/software/software.component.spec.ts index 71d391e..ec810f3 100644 --- a/ogWebconsole/src/app/components/software/software.component.spec.ts +++ b/ogWebconsole/src/app/components/software/software.component.spec.ts @@ -1,6 +1,21 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; - import { SoftwareComponent } from './software.component'; +import { MatDividerModule } from '@angular/material/divider'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastrModule } from 'ngx-toastr'; +import { MatOptionModule } from '@angular/material/core'; +import { ReactiveFormsModule } from '@angular/forms'; +import { MatSelectModule } from '@angular/material/select'; describe('SoftwareComponent', () => { let component: SoftwareComponent; @@ -8,7 +23,25 @@ describe('SoftwareComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [SoftwareComponent] + declarations: [SoftwareComponent], + imports: [ + HttpClientTestingModule, + ToastrModule.forRoot(), + BrowserAnimationsModule, + MatDividerModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + MatButtonModule, + MatTableModule, + MatPaginatorModule, + MatTooltipModule, + FormsModule, + MatProgressSpinner, + MatOptionModule, + ReactiveFormsModule, + MatSelectModule + ] }) .compileComponents(); diff --git a/ogWebconsole/src/styles.css b/ogWebconsole/src/styles.css index 7e7239a..984356e 100644 --- a/ogWebconsole/src/styles.css +++ b/ogWebconsole/src/styles.css @@ -2,3 +2,35 @@ html, body { height: 100%; } body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } + + +/* Clase general para el contenedor de carga */ +.loading-container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1000; + background-color: rgba(255, 255, 255, 0.8); /* Fondo semitransparente */ + width: 100vw; + height: 100vh; + } + + /* Spinner de Angular Material */ + .mat-spinner { + width: 100px; + height: 100px; + } + + /* Texto que acompaña al spinner */ + .loading-container p { + margin-top: 20px; + font-size: 1.2rem; + font-weight: bold; + color: #555; + } + \ No newline at end of file
{{ column.header }}