refs #2501. Panel logs integration
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/33/head
Manuel Aranda Rosales 2025-08-05 10:29:13 +02:00
parent 9969ab303a
commit 847504f286
3 changed files with 32 additions and 2 deletions

View File

@ -422,6 +422,10 @@
<mat-icon>article</mat-icon>
<span>Logs en tiempo real</span>
</button>
<button mat-menu-item (click)="openClientLogsModal($event, client)">
<mat-icon>analytics</mat-icon>
<span>Logs de cliente</span>
</button>
<button mat-menu-item (click)="onDeleteClick($event, client)" *ngIf="auth.userCategory !== 'ou-minimal'">
<mat-icon>delete</mat-icon>
<span>{{ 'delete' | translate }}</span>
@ -613,6 +617,10 @@
<mat-icon>article</mat-icon>
<span>Logs en tiempo real</span>
</button>
<button mat-menu-item (click)="openClientLogsModal($event, client)">
<mat-icon>analytics</mat-icon>
<span>Logs de cliente</span>
</button>
<button mat-menu-item (click)="onDeleteClick($event, client)" *ngIf="auth.userCategory !== 'ou-minimal'">
<mat-icon>delete</mat-icon>
<span>{{ 'delete' | translate }}</span>

View File

@ -31,6 +31,7 @@ import { ClientTaskLogsComponent } from '../task-logs/client-task-logs/client-ta
import {ChangeParentComponent} from "./shared/change-parent/change-parent.component";
import { AuthService } from '@services/auth.service';
import { ClientPendingTasksComponent } from '../task-logs/client-pending-tasks/client-pending-tasks.component';
import { ClientLogsModalComponent } from './shared/client-logs-modal/client-logs-modal.component';
enum NodeType {
OrganizationalUnit = 'organizational-unit',
@ -995,6 +996,27 @@ export class GroupsComponent implements OnInit, OnDestroy {
}
}
openClientLogsModal(event: MouseEvent, client: Client): void {
event.stopPropagation();
if (!client.mac) {
this.toastr.error('No se puede acceder a los logs: MAC del cliente no disponible', 'Error');
return;
}
const dialogRef = this.dialog.open(ClientLogsModalComponent, {
width: '1400px',
height: '90vh',
data: { client },
disableClose: false,
hasBackdrop: true,
backdropClass: 'non-clickable-backdrop',
});
dialogRef.afterClosed().subscribe((result) => {
// El modal se cerró
});
}
openOUPendingTasks(event: MouseEvent, node: any): void {
event.stopPropagation();
this.loading = true;

View File

@ -42,8 +42,8 @@ export class HeaderComponent implements OnInit {
showGlobalStatus() {
this.dialog.open(GlobalStatusComponent, {
width: '65vw',
height: '80vh',
width: '80vw',
height: '85vh',
})
}