Updated trace filters and added logs in real time
testing/ogGui-multibranch/pipeline/pr-main There was a failure building this commit Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details

pull/30/head
Manuel Aranda Rosales 2025-06-27 09:57:34 +02:00
parent 642a439f21
commit 01390a1fab
3 changed files with 38 additions and 7 deletions

View File

@ -377,8 +377,28 @@ table {
}
.command-id, .client-ip {
font-size: 0.75rem;
color: #6c757d;
font-size: 0.8rem;
color: #666;
font-family: monospace;
}
.clickable-job-id {
cursor: pointer;
color: #1976d2 !important;
text-decoration: underline;
transition: all 0.2s ease;
}
.clickable-job-id:hover {
color: #1565c0 !important;
text-decoration: none;
background-color: rgba(25, 118, 210, 0.1);
padding: 2px 4px;
border-radius: 4px;
}
.clickable-job-id:active {
transform: scale(0.98);
}
.date-time {

View File

@ -254,7 +254,12 @@
<ng-container *ngSwitchCase="'command'">
<div class="command-cell">
<span class="command-name">{{ translateCommand(trace.command) }}</span>
<span class="command-id">{{ trace.jobId }}</span>
<span class="command-id"
[class.clickable-job-id]="trace.status === 'in-progress'"
(click)="trace.status === 'in-progress' ? openLogsInNewTab(trace) : null"
[matTooltip]="trace.status === 'in-progress' ? 'Ver logs' : ''">
{{ trace.jobId }}
</span>
</div>
</ng-container>
@ -303,10 +308,7 @@
<span class="material-symbols-outlined">info</span>
</mat-icon>
</button>
<button mat-icon-button color="warn" *ngIf="trace.status === 'pending'"
(click)="cancelTrace(trace)" matTooltip="{{ 'cancelTrace' | translate }}">
<mat-icon>cancel</mat-icon>
</button>
</div>
</td>
</ng-container>

View File

@ -382,6 +382,15 @@ export class TaskLogsComponent implements OnInit, OnDestroy {
});
}
openLogsInNewTab(trace: any): void {
if (trace.client?.ip) {
const logsUrl = `${this.baseUrl}/pcclients/${trace.client.ip}/cgi-bin/httpd-log.sh`;
window.open(logsUrl, '_blank');
} else {
this.toastService.error('No se puede acceder a los logs: IP del cliente no disponible', 'Error');
}
}
loadTraces(): void {
this.loading = true;
const url = `${this.baseUrl}/traces?page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`;