diff --git a/ogWebconsole/src/app/app.module.ts b/ogWebconsole/src/app/app.module.ts index 2d13964..4a39cb8 100644 --- a/ogWebconsole/src/app/app.module.ts +++ b/ogWebconsole/src/app/app.module.ts @@ -41,6 +41,7 @@ import { EditOrganizationalUnitComponent } from './components/groups/shared/orga import { EditClientComponent } from './components/groups/shared/clients/edit-client/edit-client.component'; import { ClassroomViewComponent } from './components/groups/shared/classroom-view/classroom-view.component'; import { MatProgressSpinner } from "@angular/material/progress-spinner"; +import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatMenu, MatMenuItem, MatMenuTrigger } from "@angular/material/menu"; import {MatAutocomplete, MatAutocompleteTrigger} from "@angular/material/autocomplete"; import { MatChip, MatChipListbox, MatChipOption, MatChipSet, MatChipsModule } from "@angular/material/chips"; @@ -236,6 +237,7 @@ export function HttpLoaderFactory(http: HttpClient) { MatDialogModule, MatSelectModule, MatDividerModule, + MatProgressBarModule, MatStepperModule, DragDropModule, MatSlideToggleModule, MatMenu, MatMenuTrigger, MatMenuItem, MatAutocomplete, MatChipListbox, MatChipOption, MatChipSet, MatChipsModule, MatChip, MatProgressSpinner, MatTabGroup, MatTab, MatTooltip, diff --git a/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.css b/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.css index 7d461ca..2544ffc 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.css +++ b/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.css @@ -61,6 +61,12 @@ table { box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2); } +.progress-container { + display: flex; + align-items: center; + gap: 10px; +} + .paginator-container { display: flex; justify-content: end; 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 cded0da..b166ed4 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 @@ -4,7 +4,7 @@
-

{{ 'adminCommandsTitle' | +

{{ 'adminCommandsTitle' | translate }}

@@ -64,20 +64,28 @@ - - {{ + +
+ + + {{progress}}% +
+
+ + + {{ trace.status === 'failed' ? 'Fallido' : - trace.status === 'success' ? 'Finalizado con éxito' : - trace.status === 'pending' ? 'Pendiente de ejecutar' : - trace.status === 'in-progress' ? 'Ejecutando' : - trace.status - }} - + trace.status === 'success' ? 'Finalizado con éxito' : + trace.status === 'pending' ? 'Pendiente de ejecutar' : + trace.status + }} +
+
@@ -106,4 +114,4 @@ - + \ No newline at end of file diff --git a/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.ts b/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.ts index e78cb96..f991704 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/task-logs/task-logs.component.ts @@ -5,8 +5,9 @@ import { FormControl } from '@angular/forms'; import { map, startWith } from 'rxjs/operators'; import { DatePipe } from '@angular/common'; import { JoyrideService } from 'ngx-joyride'; -import {MatDialog} from "@angular/material/dialog"; -import {InputDialogComponent} from "./input-dialog/input-dialog.component"; +import { MatDialog } from "@angular/material/dialog"; +import { InputDialogComponent } from "./input-dialog/input-dialog.component"; +import { ProgressBarMode, MatProgressBarModule } from '@angular/material/progress-bar'; @Component({ selector: 'app-task-logs', @@ -25,6 +26,9 @@ export class TaskLogsComponent implements OnInit { loading: boolean = true; pageSizeOptions: number[] = [10, 20, 30, 50]; datePipe: DatePipe = new DatePipe('es-ES'); + mode: ProgressBarMode = 'buffer'; + progress = 65; + bufferValue = 0; columns = [ { @@ -84,7 +88,7 @@ export class TaskLogsComponent implements OnInit { constructor(private http: HttpClient, private joyrideService: JoyrideService, private dialog: MatDialog - ) {} + ) { } ngOnInit(): void { this.loadTraces(); @@ -215,12 +219,12 @@ export class TaskLogsComponent implements OnInit { iniciarTour(): void { this.joyrideService.startTour({ steps: [ - 'titleStep', - 'resetFiltersStep', - 'clientSelectStep', - 'commandSelectStep', - 'tableStep', - 'paginationStep' + 'titleStep', + 'resetFiltersStep', + 'clientSelectStep', + 'commandSelectStep', + 'tableStep', + 'paginationStep' ], showPrevButton: true, themeColor: '#3f51b5'