From 6d29d017d92d62627a0d42cc3a55bf456595e624 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Thu, 23 Apr 2026 09:20:13 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20translate=20instante=20en=20los?= =?UTF-8?q?=20controladores=20ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/env-vars/env-vars.component.ts | 11 +- .../add-role-modal.component.ts | 17 +- .../admin/roles/roles/data.service.ts | 7 +- .../admin/roles/roles/roles.component.html | 2 +- .../admin/roles/roles/roles.component.ts | 15 +- .../add-user-modal.component.ts | 9 +- .../change-password-modal.component.ts | 9 +- .../admin/users/users/data.service.ts | 11 +- .../admin/users/users/users.component.html | 2 +- .../admin/users/users/users.component.ts | 21 +- .../calendar/calendar.component.html | 2 +- .../components/calendar/calendar.component.ts | 19 +- .../create-calendar-rule.component.ts | 7 +- .../create-calendar.component.ts | 13 +- .../app/components/calendar/data.service.ts | 7 +- .../commands-groups.component.html | 2 +- .../commands-groups.component.ts | 17 +- .../create-command-group.component.ts | 17 +- .../detail-command-group.component.ts | 9 +- .../commands-task.component.html | 2 +- .../commands-task/commands-task.component.ts | 23 +- .../create-task-schedule.component.ts | 27 +- .../create-task-script.component.ts | 10 +- .../create-task/create-task.component.ts | 41 +- .../show-task-schedule.component.html | 2 +- .../show-task-schedule.component.ts | 29 +- .../show-task-script.component.ts | 29 +- .../main-commands/commands.component.html | 2 +- .../main-commands/commands.component.ts | 17 +- .../create-command.component.ts | 11 +- .../commands/main-commands/data.service.ts | 7 +- .../command-detail.component.ts | 5 +- .../boot-so-partition.component.html | 2 +- .../boot-so-partition.component.ts | 19 +- .../execute-command.component.ts | 27 +- .../remove-cache-image.component.html | 2 +- .../remove-cache-image.component.ts | 21 +- .../software-profile-partition.component.html | 2 +- .../software-profile-partition.component.ts | 21 +- .../global-status/global-status.component.ts | 25 +- .../ogboot-status/ogboot-status.component.ts | 7 +- .../ogdhcp-status/ogdhcp-status.component.ts | 7 +- .../ogrepository-status.component.ts | 7 +- .../client-main-view.component.html | 2 +- .../create-image/create-image.component.ts | 55 +- .../create-repository-modal.component.ts | 7 +- .../deploy-image/deploy-image.component.ts | 37 +- .../partition-assistant.component.ts | 31 +- .../run-script-assistant.component.html | 2 +- .../run-script-assistant.component.ts | 15 +- .../save-script/save-script.component.ts | 7 +- .../app/components/groups/groups.component.ts | 45 +- .../groups/services/data.service.ts | 29 +- .../change-parent/change-parent.component.ts | 9 +- .../classroom-view.component.ts | 9 +- .../client-details.component.html | 2 +- .../client-details.component.ts | 19 +- .../create-multiple-client.component.ts | 15 +- .../manage-client/manage-client.component.ts | 29 +- .../disk-partition-selector.component.html | 2 +- .../execute-command-ou.component.ts | 13 +- .../manage-organizational-unit.component.ts | 45 +- .../show-organizational-unit.component.ts | 7 +- .../hardware-collection-modal.component.html | 2 +- .../hardware-collection-modal.component.ts | 8 +- .../hardware-profile.component.html | 2 +- .../hardware-profile.component.ts | 21 +- .../hardware-type.component.html | 2 +- .../hardware-type/hardware-type.component.ts | 19 +- .../hardware/hardware.component.html | 2 +- .../components/hardware/hardware.component.ts | 17 +- .../create-image/create-image.component.ts | 13 +- .../src/app/components/images/data.service.ts | 7 +- .../export-image/export-image.component.ts | 9 +- .../components/images/images.component.html | 2 +- .../app/components/images/images.component.ts | 19 +- .../asset-manager-modal.component.ts | 9 +- .../create-menu/create-menu.component.ts | 25 +- .../src/app/components/menus/data.service.ts | 17 +- .../app/components/menus/menus.component.html | 2 +- .../app/components/menus/menus.component.ts | 21 +- .../boot-servers/boot-servers.component.html | 2 +- .../boot-servers/boot-servers.component.ts | 29 +- .../manage-boot-server.component.ts | 11 +- .../ogboot/pxe-boot-files/data.service.ts | 5 +- .../pxe-boot-files.component.ts | 17 +- .../create-image/create-image.component.ts | 9 +- .../ogboot/pxe-images/data.service.ts | 5 +- .../pxe-images/pxe-images.component.html | 2 +- .../ogboot/pxe-images/pxe-images.component.ts | 29 +- .../app/components/ogboot/pxe/data.service.ts | 5 +- .../create-pxe-template.component.ts | 9 +- .../components/ogboot/pxe/pxe.component.html | 2 +- .../components/ogboot/pxe/pxe.component.ts | 23 +- .../add-clients-to-subnet.component.ts | 7 +- .../create-subnet/create-subnet.component.ts | 9 +- .../dhcp-servers/dhcp-servers.component.html | 2 +- .../dhcp-servers/dhcp-servers.component.ts | 23 +- .../manage-dhcp-server.component.ts | 11 +- .../ogdhcp/og-dhcp-subnets.component.html | 2 +- .../ogdhcp/og-dhcp-subnets.component.ts | 47 +- .../show-clients/show-clients.component.html | 2 +- .../show-clients/show-clients.component.ts | 21 +- .../sync-subnet-dialog.component.ts | 5 +- .../create-operative-system.component.ts | 13 +- .../operative-system.component.html | 2 +- .../operative-system.component.ts | 15 +- .../backup-image/backup-image.component.ts | 7 +- .../convert-image-to-virtual.component.ts | 7 +- .../convert-image/convert-image.component.ts | 7 +- .../edit-image/edit-image.component.ts | 7 +- .../import-image/import-image.component.ts | 5 +- .../main-repository-view.component.ts | 37 +- .../manage-repository.component.ts | 11 +- .../rename-image/rename-image.component.ts | 7 +- .../repositories/repositories.component.html | 2 +- .../repositories/repositories.component.ts | 21 +- .../backup-repository-modal.component.ts | 7 +- .../create-branch-modal.component.ts | 7 +- .../create-tag-modal.component.ts | 7 +- .../show-git-images.component.html | 2 +- .../show-git-images.component.ts | 53 +- .../show-monolitic-images.component.html | 2 +- .../show-monolitic-images.component.ts | 49 +- .../create-software-profile.component.ts | 17 +- .../software-profile/data.service.ts | 7 +- .../software-profile.component.html | 2 +- .../software-profile.component.ts | 17 +- .../create-software.component.ts | 13 +- .../app/components/software/data.service.ts | 7 +- .../software/software.component.html | 2 +- .../components/software/software.component.ts | 17 +- .../client-pending-tasks.component.html | 2 +- .../client-pending-tasks.component.ts | 35 +- .../client-task-logs.component.html | 2 +- .../client-task-logs.component.ts | 29 +- .../task-logs/task-logs.component.html | 2 +- .../task-logs/task-logs.component.ts | 55 +- .../app/core/services/custom.interceptor.ts | 5 +- ogWebconsole/src/app/services/auth.service.ts | 5 +- .../src/app/services/config.service.ts | 5 +- ogWebconsole/src/locale/en.json | 480 ++++++++++++++++- ogWebconsole/src/locale/es.json | 490 +++++++++++++++++- 143 files changed, 2056 insertions(+), 800 deletions(-) diff --git a/ogWebconsole/src/app/components/admin/env-vars/env-vars.component.ts b/ogWebconsole/src/app/components/admin/env-vars/env-vars.component.ts index a47109d..aa8a912 100644 --- a/ogWebconsole/src/app/components/admin/env-vars/env-vars.component.ts +++ b/ogWebconsole/src/app/components/admin/env-vars/env-vars.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component } from '@angular/core'; import { HttpClient } from "@angular/common/http"; import { ToastrService } from "ngx-toastr"; @@ -9,6 +11,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './env-vars.component.css' }) export class EnvVarsComponent { + public translate = inject(TranslateService); envVars: { name: string; value: string }[] = []; displayedColumns: string[] = ['name', 'value']; private apiUrl: string; @@ -31,7 +34,7 @@ export class EnvVarsComponent { this.envVars = Object.entries(response.vars).map(([name, value]) => ({ name, value })); }, error: (err) => { - this.toastService.error('No se pudieron cargar las variables de entorno.'); + this.toastService.error(this.translate.instant('noSePudieronCargarLas')); } }); } @@ -48,11 +51,11 @@ export class EnvVarsComponent { this.http.post(this.apiUrl, { vars }).subscribe({ next: () => { - this.toastService.success('Variables de entorno guardadas correctamente.'); + this.toastService.success(this.translate.instant('variablesDeEntornoGuardadasCorrectamente')); }, error: (err) => { - console.error('Error al guardar las variables de entorno:', err); - this.toastService.error('No se pudieron cargar las variables de entorno.'); + console.error(this.translate.instant('errorAlGuardarLasVariables'), err); + this.toastService.error(this.translate.instant('noSePudieronCargarLas')); } }); } diff --git a/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts b/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts index 446a490..79e508b 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts +++ b/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { Component, Inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./add-role-modal.component.css'] }) export class AddRoleModalComponent { + public translate = inject(TranslateService); roleForm: FormGroup; roleId: string | null = null; baseUrl: string; @@ -56,7 +59,7 @@ export class AddRoleModalComponent { this.roleId = response['@id']; }, error: (err) => { - console.error('Error fetching remote calendar:', err); + console.error(this.translate.instant('errorFetchingRemoteCalendar'), err); } }); } @@ -85,23 +88,23 @@ export class AddRoleModalComponent { if (this.roleId) { this.http.put(`${this.baseUrl}${this.roleId}`, payload).subscribe( (response) => { - this.toastService.success('Rol actualizado correctamente'); + this.toastService.success(this.translate.instant('rolActualizadoCorrectamente')); this.dialogRef.close(); }, (error) => { - this.toastService.error('Error al editar el rol:', error); - console.error('Error al editar el rol', error); + this.toastService.error(this.translate.instant('errorAlEditarElRol1'), error); + console.error(this.translate.instant('errorAlEditarElRol'), error); } ); } else { this.http.post(`${this.baseUrl}/user-groups`, payload).subscribe( (response) => { - this.toastService.success('Rol añadido correctamente'); + this.toastService.success(this.translate.instant('rolAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { - this.toastService.error('Error al añadir rol:', error); - console.error('Error al añadir rol', error); + this.toastService.error(this.translate.instant('errorAlAnadirRol1'), error); + console.error(this.translate.instant('errorAlAnadirRol'), error); } ); } diff --git a/ogWebconsole/src/app/components/admin/roles/roles/data.service.ts b/ogWebconsole/src/app/components/admin/roles/roles/data.service.ts index 6ba662e..c7087dc 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/data.service.ts +++ b/ogWebconsole/src/app/components/admin/roles/roles/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import {HttpClient, HttpParams} from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -31,7 +34,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching user groups', error); + console.error(this.translate.instant('errorFetchingUserGroups'), error); return throwError(error); }) ); @@ -47,7 +50,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching user group', error); + console.error(this.translate.instant('errorFetchingUserGroup'), error); return throwError(error); }) ); 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 183d4ff..34cfc9e 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.html +++ b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.html @@ -24,7 +24,7 @@
- + diff --git a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts index 7e4c266..5a9de6d 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts +++ b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { MatTableDataSource } from '@angular/material/table'; import { MatDialog } from '@angular/material/dialog'; @@ -15,6 +17,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./roles.component.css'] }) export class RolesComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string = this.configService.apiUrl; dataSource = new MatTableDataSource(); filters: { [key: string]: string } = {}; @@ -27,17 +30,17 @@ export class RolesComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (role: any) => `${role.id}` }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (role: any) => `${role.name}` }, { columnDef: 'permissions', - header: 'Permisos', + header: 'permisos', cell: (role: any) => `${role.permissions.join(', ')}` } ]; @@ -66,7 +69,7 @@ export class RolesComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching roles', error); + console.error(this.translate.instant('errorFetchingRoles'), error); this.loading = false; } ); @@ -108,10 +111,10 @@ export class RolesComponent implements OnInit { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Role deleted successfully'); + this.toastService.success(this.translate.instant('roleDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting role:', error); + this.toastService.error(this.translate.instant('errorDeletingRole'), error); } }); } diff --git a/ogWebconsole/src/app/components/admin/users/users/add-user-modal/add-user-modal.component.ts b/ogWebconsole/src/app/components/admin/users/users/add-user-modal/add-user-modal.component.ts index 5642ee8..862adf2 100644 --- a/ogWebconsole/src/app/components/admin/users/users/add-user-modal/add-user-modal.component.ts +++ b/ogWebconsole/src/app/components/admin/users/users/add-user-modal/add-user-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; @@ -18,6 +20,7 @@ interface UserGroup { styleUrls: ['./add-user-modal.component.css'] }) export class AddUserModalComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; @Output() userAdded = new EventEmitter(); @Output() userEdited = new EventEmitter(); @@ -94,7 +97,7 @@ export class AddUserModalComponent implements OnInit { }, error: (err) => { this.loading = false; - console.error('Error fetching user:', err); + console.error(this.translate.instant('errorFetchingUser'), err); } }); } @@ -125,7 +128,7 @@ export class AddUserModalComponent implements OnInit { if (this.userId) { this.http.put(`${this.baseUrl}${this.userId}`, payload).subscribe( (response) => { - this.toastService.success('Usuario editado correctamente'); + this.toastService.success(this.translate.instant('usuarioEditadoCorrectamente')); this.userEdited.emit(); this.dialogRef.close(); this.loading = false; @@ -138,7 +141,7 @@ export class AddUserModalComponent implements OnInit { } else { this.http.post(`${this.baseUrl}/users`, payload).subscribe( (response) => { - this.toastService.success('Usuario añadido correctamente'); + this.toastService.success(this.translate.instant('usuarioAnadidoCorrectamente')); this.userAdded.emit(); this.dialogRef.close(); this.loading = false; diff --git a/ogWebconsole/src/app/components/admin/users/users/change-password-modal/change-password-modal.component.ts b/ogWebconsole/src/app/components/admin/users/users/change-password-modal/change-password-modal.component.ts index 5e99ff5..ad79cfe 100644 --- a/ogWebconsole/src/app/components/admin/users/users/change-password-modal/change-password-modal.component.ts +++ b/ogWebconsole/src/app/components/admin/users/users/change-password-modal/change-password-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, EventEmitter, Inject, Output } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; @@ -10,6 +12,7 @@ import {ToastrService} from "ngx-toastr"; styleUrl: './change-password-modal.component.css' }) export class ChangePasswordModalComponent { + public translate = inject(TranslateService); @Output() userEdited = new EventEmitter(); userForm: FormGroup; passwordMismatch: boolean = false; @@ -55,10 +58,10 @@ export class ChangePasswordModalComponent { next: () => { this.userEdited.emit(); this.dialogRef.close(); - this.toastService.success('Contraseña cambiada con éxito'); + this.toastService.success(this.translate.instant('contrasenaCambiadaConExito')); }, error: (err) => { - console.error('Error changing password:', err); + console.error(this.translate.instant('errorChangingPassword'), err); this.toastService.error(err.error['hydra:description']); this.resetPasswordError = err.error.message; this.updateError = true; @@ -66,7 +69,7 @@ export class ChangePasswordModalComponent { } }); } else { - console.error('Form is invalid'); + console.error(this.translate.instant('formIsInvalid')); this.passwordMismatch = this.userForm.hasError('mismatch'); this.updateError = true; this.loading = false diff --git a/ogWebconsole/src/app/components/admin/users/users/data.service.ts b/ogWebconsole/src/app/components/admin/users/users/data.service.ts index 7346685..45ed42b 100644 --- a/ogWebconsole/src/app/components/admin/users/users/data.service.ts +++ b/ogWebconsole/src/app/components/admin/users/users/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import {HttpClient, HttpParams} from '@angular/common/http'; @@ -9,6 +11,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -32,7 +35,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching users', error); + console.error(this.translate.instant('errorFetchingUsers'), error); return throwError(error); }) ); @@ -48,7 +51,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching user group', error); + console.error(this.translate.instant('errorFetchingUserGroup'), error); return throwError(error); }) ); @@ -64,7 +67,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching user groups', error); + console.error(this.translate.instant('errorFetchingUserGroups'), error); return throwError(error); }) ); @@ -80,7 +83,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching organizational units', error); + console.error(this.translate.instant('errorFetchingOrganizationalUnits'), error); return throwError(error); }) ); 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 02a9230..696ecd7 100644 --- a/ogWebconsole/src/app/components/admin/users/users/users.component.html +++ b/ogWebconsole/src/app/components/admin/users/users/users.component.html @@ -24,7 +24,7 @@
{{ column.header }} {{ column.header | translate }} {{ column.cell(role) }}
- +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/admin/users/users/users.component.ts b/ogWebconsole/src/app/components/admin/users/users/users.component.ts index a7d3ce5..921cfa0 100644 --- a/ogWebconsole/src/app/components/admin/users/users/users.component.ts +++ b/ogWebconsole/src/app/components/admin/users/users/users.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { MatTableDataSource } from '@angular/material/table'; import { MatDialog } from '@angular/material/dialog'; @@ -13,6 +15,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./users.component.css'] }) export class UsersComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -25,32 +28,32 @@ export class UsersComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (user: any) => `${user.id}` }, { columnDef: 'username', - header: 'Nombre de Usuario', + header: 'nombreDeUsuario', cell: (user: any) => `${user.username}` }, { columnDef: 'groupsView', - header: 'Vista de Grupos', + header: 'vistaDeGrupos', cell: (user: any) => `${user.groupsView}` }, { columnDef: 'clientsPerPage', - header: 'Clientes por página', + header: 'clientesPorPagina', cell: (user: any) => user.clientsPerPage != null ? `${user.clientsPerPage}` : '-' }, { columnDef: 'allowedOrganizationalUnits', - header: 'Unidades Organizacionales Permitidas', + header: 'unidadesOrganizacionalesPermitidas', cell: (user: any) => `${user.allowedOrganizationalUnits.map((unit: { name: any; }) => unit.name).join(', ')}` }, { columnDef: 'roles', - header: 'Roles', + header: 'roles', cell: (user: any) => `${user.roles.join(', ')}` } ]; @@ -79,7 +82,7 @@ export class UsersComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching users', error); + console.error(this.translate.instant('errorFetchingUsers'), error); this.loading = false; } ); @@ -123,11 +126,11 @@ export class UsersComponent implements OnInit { this.http.delete(apiUrl).subscribe({ next: () => { console.log('User deleted successfully'); - this.toastService.success('User deleted successfully'); + this.toastService.success(this.translate.instant('userDeletedSuccessfully')); this.search(); }, error: (error) => { - console.error('Error deleting user:', error); + console.error(this.translate.instant('errorDeletingUser'), error); } }); } diff --git a/ogWebconsole/src/app/components/calendar/calendar.component.html b/ogWebconsole/src/app/components/calendar/calendar.component.html index 706f2f4..d390222 100644 --- a/ogWebconsole/src/app/components/calendar/calendar.component.html +++ b/ogWebconsole/src/app/components/calendar/calendar.component.html @@ -30,7 +30,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/calendar/calendar.component.ts b/ogWebconsole/src/app/components/calendar/calendar.component.ts index 199d98b..72883b6 100644 --- a/ogWebconsole/src/app/components/calendar/calendar.component.ts +++ b/ogWebconsole/src/app/components/calendar/calendar.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -17,6 +19,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './calendar.component.css' }) export class CalendarComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; images: { downloadUrl: string; name: string; uuid: string }[] = []; @@ -34,22 +37,22 @@ export class CalendarComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (remoteCalendar: any) => `${remoteCalendar.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (remoteCalendar: any) => `${remoteCalendar.name}` }, { columnDef: 'rulesLength', - header: 'Nº de reglas', + header: 'nDeReglas', cell: (remoteCalendar: any) => `${remoteCalendar.remoteCalendarRules.length}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (remoteCalendar: any) => `${this.datePipe.transform(remoteCalendar.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -89,7 +92,7 @@ export class CalendarComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching calendars', error); + console.error(this.translate.instant('errorFetchingCalendars'), error); this.loading = false; } ); @@ -99,7 +102,7 @@ export class CalendarComponent implements OnInit { this.syncUds = true; this.http.post(`${this.apiUrl}/${calendar.uuid}/sync-uds`, {}).subscribe({ next: () => { - this.toastService.success('Calendarios sincronizados correctamente'); + this.toastService.success(this.translate.instant('calendariosSincronizadosCorrectamente')); this.search(); this.syncUds = false; }, @@ -136,10 +139,10 @@ export class CalendarComponent implements OnInit { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Calendar deleted successfully'); + this.toastService.success(this.translate.instant('calendarDeletedSuccessfully')); }, error: () => { - this.toastService.error('Error deleting calendar'); + this.toastService.error(this.translate.instant('errorDeletingCalendar')); } }); } diff --git a/ogWebconsole/src/app/components/calendar/create-calendar-rule/create-calendar-rule.component.ts b/ogWebconsole/src/app/components/calendar/create-calendar-rule/create-calendar-rule.component.ts index 25440b8..3cb84e0 100644 --- a/ogWebconsole/src/app/components/calendar/create-calendar-rule/create-calendar-rule.component.ts +++ b/ogWebconsole/src/app/components/calendar/create-calendar-rule/create-calendar-rule.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject } from '@angular/core'; import { ToastrService } from "ngx-toastr"; import { HttpClient } from "@angular/common/http"; @@ -10,6 +12,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-calendar-rule.component.css' }) export class CreateCalendarRuleComponent { + public translate = inject(TranslateService); baseUrl: string; name: string = ''; remoteCalendarRules: any[] = []; @@ -98,7 +101,7 @@ export class CreateCalendarRuleComponent { this.http.put(`${this.baseUrl}${this.ruleId}`, formData) .subscribe({ next: (response) => { - this.toastService.success('Calendar rule updated successfully'); + this.toastService.success(this.translate.instant('calendarRuleUpdatedSuccessfully')); this.dialogRef.close(true); }, error: (error) => { @@ -110,7 +113,7 @@ export class CreateCalendarRuleComponent { this.http.post(`${this.baseUrl}/remote-calendar-rules`, formData) .subscribe({ next: (response) => { - this.toastService.success('Calendar rule created successfully'); + this.toastService.success(this.translate.instant('calendarRuleCreatedSuccessfully')); this.dialogRef.close(true); }, error: (error) => { diff --git a/ogWebconsole/src/app/components/calendar/create-calendar/create-calendar.component.ts b/ogWebconsole/src/app/components/calendar/create-calendar/create-calendar.component.ts index a3b9a51..98a7f06 100644 --- a/ogWebconsole/src/app/components/calendar/create-calendar/create-calendar.component.ts +++ b/ogWebconsole/src/app/components/calendar/create-calendar/create-calendar.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { ToastrService } from "ngx-toastr"; import { HttpClient } from "@angular/common/http"; @@ -13,6 +15,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-calendar.component.css' }) export class CreateCalendarComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; name: string = ''; remoteCalendarRules: any[] = []; @@ -50,7 +53,7 @@ export class CreateCalendarComponent implements OnInit { }); }, error: (err) => { - console.error('Error fetching remote calendar:', err); + console.error(this.translate.instant('errorFetchingRemoteCalendar'), err); } }); } @@ -75,7 +78,7 @@ export class CreateCalendarComponent implements OnInit { this.http.patch(`${this.baseUrl}${this.calendarId}`, payload) .subscribe({ next: (response) => { - this.toastService.success('Calendar updated successfully'); + this.toastService.success(this.translate.instant('calendarUpdatedSuccessfully')); this.dialogRef.close(true); this.load() }, @@ -88,7 +91,7 @@ export class CreateCalendarComponent implements OnInit { this.http.post(`${this.baseUrl}/remote-calendars`, payload) .subscribe({ next: (response) => { - this.toastService.success('Calendar created successfully'); + this.toastService.success(this.translate.instant('calendarCreatedSuccessfully')); this.dialogRef.close(true); this.load() }, @@ -129,10 +132,10 @@ export class CreateCalendarComponent implements OnInit { next: () => { console.log('Calendar deleted successfully'); this.load(); - this.toastService.success('Calendar deleted successfully'); + this.toastService.success(this.translate.instant('calendarDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting calendar'); + this.toastService.error(this.translate.instant('errorDeletingCalendar')); } }); } else { diff --git a/ogWebconsole/src/app/components/calendar/data.service.ts b/ogWebconsole/src/app/components/calendar/data.service.ts index f6bd68a..b90ccd4 100644 --- a/ogWebconsole/src/app/components/calendar/data.service.ts +++ b/ogWebconsole/src/app/components/calendar/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -28,7 +31,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching remote calendars', error); + console.error(this.translate.instant('errorFetchingRemoteCalendars'), error); return throwError(error); }) ); @@ -44,7 +47,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching calendar', error); + console.error(this.translate.instant('errorFetchingCalendar'), error); return throwError(error); }) ); 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 424b5a9..8dd261f 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 @@ -28,7 +28,7 @@
- +
{{ column.header }} {{ column.header | translate }} {{ column.cell(commandGroup) }} 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 62fd4ee..5c5b6a8 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 @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { MatDialog } from '@angular/material/dialog'; @@ -16,6 +18,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./commands-groups.component.css'] }) export class CommandsGroupsComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -29,22 +32,22 @@ export class CommandsGroupsComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (group: any) => `${group.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (group: any) => `${group.name}` }, { columnDef: 'commands', - header: 'Lista de comandos', + header: 'listaDeComandos', cell: (group: any) => `${group.commands}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (group: any) => `${this.datePipe.transform(group.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -69,7 +72,7 @@ export class CommandsGroupsComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching command groups', error); + console.error(this.translate.instant('errorFetchingCommandGroups'), error); this.loading = false; } ); @@ -103,11 +106,11 @@ export class CommandsGroupsComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${group.uuid}`).subscribe({ next: () => { - this.toastService.success('Grupo de comandos eliminado con éxito'); + this.toastService.success(this.translate.instant('grupoDeComandosEliminadoCon')); this.search(); }, error: (error) => { - console.error('Error al eliminar el grupo de comandos:', error); + console.error(this.translate.instant('errorAlEliminarElGrupo'), error); } }); } 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 1d897f5..ce0ed43 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 @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./create-command-group.component.css'] }) export class CreateCommandGroupComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; availableCommands: any[] = []; selectedCommands: any[] = []; @@ -48,7 +51,7 @@ export class CreateCommandGroupComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching available commands', error); + console.error(this.translate.instant('errorFetchingAvailableCommands'), error); this.loading = false; } ); @@ -88,23 +91,23 @@ export class CreateCommandGroupComponent implements OnInit { const groupId = this.data.group.uuid; this.http.patch(`${this.baseUrl}/command-groups/${groupId}`, payload).subscribe({ next: () => { - this.toastService.success('Grupo de comandos actualizado con éxito'); + this.toastService.success(this.translate.instant('grupoDeComandosActualizadoCon')); this.dialogRef.close(); }, error: (error) => { - console.error('Error actualizando el grupo de comandos', error); - this.toastService.error('Error al actualizar el grupo de comandos'); + console.error(this.translate.instant('errorActualizandoElGrupoDe'), error); + this.toastService.error(this.translate.instant('errorAlActualizarElGrupo')); } }); } else { this.http.post(`${this.baseUrl}/command-groups`, payload).subscribe({ next: () => { - this.toastService.success('Grupo de comandos creado con éxito'); + this.toastService.success(this.translate.instant('grupoDeComandosCreadoCon')); this.dialogRef.close(); }, error: (error) => { - console.error('Error creando el grupo de comandos', error); - this.toastService.error('Error al crear el grupo de comandos'); + console.error(this.translate.instant('errorCreandoElGrupoDe'), error); + this.toastService.error(this.translate.instant('errorAlCrearElGrupo')); } }); } 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 9d484e1..2d4a2fc 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 @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./detail-command-group.component.css'] }) export class DetailCommandGroupComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; form!: FormGroup; clients: any[] = []; @@ -45,7 +48,7 @@ export class DetailCommandGroupComponent implements OnInit { this.loading = false; }, error: (error) => { - console.error('Error fetching clients:', error); + console.error(this.translate.instant('errorFetchingClients1'), error); this.loading = false; } }); @@ -70,11 +73,11 @@ export class DetailCommandGroupComponent implements OnInit { this.http.post(apiUrl, payload).subscribe({ next: () => { this.dialogRef.close(); - this.toastService.success('Grupo de comandos ejecutado exitosamente'); + this.toastService.success(this.translate.instant('grupoDeComandosEjecutadoExitosamente')); this.loading = false; }, error: (error) => { - console.error('Error ejecutando grupo de comandos:', error); + console.error(this.translate.instant('errorEjecutandoGrupoDeComandos'), error); this.loading = false; } }); 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 54f469d..f9312d8 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 @@ -26,7 +26,7 @@
- +
{{ column.header }} {{ column.header | translate }} {{ column.cell(task) }} diff --git a/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts b/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts index e445c50..a811f2a 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { MatDialog } from '@angular/material/dialog'; @@ -16,6 +18,7 @@ import {DatePipe} from "@angular/common"; styleUrls: ['./commands-task.component.css'] }) export class CommandsTaskComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; tasks: any[] = []; filters: { [key: string]: string | boolean } = {}; @@ -26,13 +29,13 @@ export class CommandsTaskComponent implements OnInit { datePipe: DatePipe = new DatePipe('es-ES'); columns = [ - { columnDef: 'id', header: 'ID', cell: (task: any) => task.id }, - { columnDef: 'name', header: 'Nombre de tarea', cell: (task: any) => task.name }, - { columnDef: 'scope', header: 'Ámbito', cell: (task: any) => task.scope }, - { columnDef: 'organizationalUnit', header: 'Unidad Organizativa', cell: (task: any) => task.organizationalUnit?.name || '' }, - { columnDef: 'management', header: 'Gestiones', cell: (task: any) => task.schedules }, - { columnDef: 'nextExecution', header: 'Próxima ejecución', cell: (task: any) => this.datePipe.transform(task.nextExecution, 'dd/MM/yyyy HH:mm:ss') }, - { columnDef: 'createdBy', header: 'Creado por', cell: (task: any) => task.createdBy }, + { columnDef: 'id', header: 'id', cell: (task: any) => task.id }, + { columnDef: 'name', header: 'nombreDeTarea', cell: (task: any) => task.name }, + { columnDef: 'scope', header: 'ambito', cell: (task: any) => task.scope }, + { columnDef: 'organizationalUnit', header: 'unidadOrganizativa', cell: (task: any) => task.organizationalUnit?.name || '' }, + { columnDef: 'management', header: 'gestiones', cell: (task: any) => task.schedules }, + { columnDef: 'nextExecution', header: 'proximaEjecucion', cell: (task: any) => this.datePipe.transform(task.nextExecution, 'dd/MM/yyyy HH:mm:ss') }, + { columnDef: 'createdBy', header: 'creadoPor', cell: (task: any) => task.createdBy }, ]; displayedColumns: string[] = ['id', 'name', 'scope', 'management', 'nextExecution', 'createdBy', 'actions']; @@ -65,7 +68,7 @@ export class CommandsTaskComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching tasks', error); + console.error(this.translate.instant('errorFetchingTasks'), error); this.loading = false; } ); @@ -133,11 +136,11 @@ export class CommandsTaskComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${task.uuid}`).subscribe({ next: () => { - this.toastService.success('Tarea eliminada con éxito'); + this.toastService.success(this.translate.instant('tareaEliminadaConExito')); this.loadTasks(); }, error: (error) => { - console.error('Error al eliminar la tarea:', error); + console.error(this.translate.instant('errorAlEliminarLaTarea'), error); } }); } diff --git a/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.ts b/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.ts index 0104241..c11f15b 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {FormBuilder, FormGroup} from "@angular/forms"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {HttpClient} from "@angular/common/http"; @@ -11,12 +13,13 @@ import {ConfigService} from "@services/config.service"; styleUrl: './create-task-schedule.component.css' }) export class CreateTaskScheduleComponent implements OnInit{ + public translate = inject(TranslateService); form: FormGroup; baseUrl: string; apiUrl: string; recurrenceTypes = [ - { value: 'none', label: 'Sin repetición' }, - { value: 'custom', label: 'Repetición personalizada' } + { value: 'none', label : this.translate.instant('sinRepeticion') }, + { value: 'custom', label : this.translate.instant('repeticionPersonalizada') } ]; weekDays: string[] = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']; isSingleDateSelected: boolean = true; @@ -105,7 +108,7 @@ export class CreateTaskScheduleComponent implements OnInit{ }, {}); }, (error) => { - console.error('Error loading schedule data', error); + console.error(this.translate.instant('errorLoadingScheduleData'), error); } ); } @@ -173,12 +176,12 @@ export class CreateTaskScheduleComponent implements OnInit{ const selectedMonthNames = Object.keys(this.selectedMonths).filter(month => this.selectedMonths[month]); if (selectedDayNames.length === 0) { - this.toastr.error('Debe seleccionar al menos un día de la semana'); + this.toastr.error(this.translate.instant('debeSeleccionarAlMenosUn1')); return; } if (selectedMonthNames.length === 0) { - this.toastr.error('Debe seleccionar al menos un mes'); + this.toastr.error(this.translate.instant('debeSeleccionarAlMenosUn2')); return; } @@ -186,12 +189,12 @@ export class CreateTaskScheduleComponent implements OnInit{ const endDate = formData.recurrenceDetails?.endDate; if (!initDate || !endDate) { - this.toastr.error('Debe especificar fecha de inicio y fecha de fin'); + this.toastr.error(this.translate.instant('debeEspecificarFechaDeInicio')); return; } if (new Date(endDate) <= new Date(initDate)) { - this.toastr.error('La fecha de fin debe ser posterior a la fecha de inicio'); + this.toastr.error(this.translate.instant('laFechaDeFinDebe')); return; } } @@ -215,21 +218,21 @@ export class CreateTaskScheduleComponent implements OnInit{ const taskId = this.data.task.uuid; this.http.patch(`${this.baseUrl}${this.data.schedule['@id']}`, payload).subscribe({ next: () => { - this.toastr.success('Programacion de tarea actualizada con éxito'); + this.toastr.success(this.translate.instant('programacionDeTareaActualizadaCon')); this.dialogRef.close(true); }, error: () => { - this.toastr.error('Error al actualizar la tarea'); + this.toastr.error(this.translate.instant('errorAlActualizarLaTarea')); } }); } else { this.http.post(this.apiUrl, payload).subscribe({ next: () => { - this.toastr.success('Programacion de tarea creada con éxito'); + this.toastr.success(this.translate.instant('programacionDeTareaCreadaCon')); this.dialogRef.close(true); }, error: () => { - this.toastr.error('Error al crear la tarea'); + this.toastr.error(this.translate.instant('errorAlCrearLaTarea')); } }); } diff --git a/ogWebconsole/src/app/components/commands/commands-task/create-task-script/create-task-script.component.ts b/ogWebconsole/src/app/components/commands/commands-task/create-task-script/create-task-script.component.ts index 3f99b43..05d4f8c 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/create-task-script/create-task-script.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/create-task-script/create-task-script.component.ts @@ -200,7 +200,7 @@ export class CreateTaskScriptComponent implements OnInit { saveNewScript(): void { if (!this.newScript.trim()) { - this.toastService.error('Debe ingresar un script antes de guardar.'); + this.toastService.error(this.translate.instant('debeIngresarUnScriptAntes')); return; } const dialogRef = this.dialog.open(SaveScriptComponent, { @@ -209,7 +209,7 @@ export class CreateTaskScriptComponent implements OnInit { }); dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Script guardado correctamente'); + this.toastService.success(this.translate.instant('scriptGuardadoCorrectamente')); } }); } @@ -244,7 +244,7 @@ export class CreateTaskScriptComponent implements OnInit { break; default: - this.toastService.error('Tipo de acción no reconocido'); + this.toastService.error(this.translate.instant('tipoDeAccionNoReconocido')); return; } @@ -269,12 +269,12 @@ export class CreateTaskScriptComponent implements OnInit { private validateScript(): boolean { if (this.commandType === 'new') { if (!this.newScript.trim()) { - this.toastService.error('Debe ingresar un script'); + this.toastService.error(this.translate.instant('debeIngresarUnScript')); return false; } } else if (this.commandType === 'existing') { if (!this.selectedScript) { - this.toastService.error('Debe seleccionar un script'); + this.toastService.error(this.translate.instant('debeSeleccionarUnScript')); return false; } } diff --git a/ogWebconsole/src/app/components/commands/commands-task/create-task/create-task.component.ts b/ogWebconsole/src/app/components/commands/commands-task/create-task/create-task.component.ts index d697a52..fb17859 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/create-task/create-task.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/create-task/create-task.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material/dialog'; @@ -15,6 +17,7 @@ import {ShowTaskScriptComponent} from "../show-task-script/show-task-script.comp styleUrls: ['./create-task.component.css'] }) export class CreateTaskComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; taskForm: FormGroup; availableCommandGroups: any[] = []; @@ -109,7 +112,7 @@ export class CreateTaskComponent implements OnInit { resolve(); }, (error) => { - this.toastr.error('Error al cargar los datos de la tarea'); + this.toastr.error(this.translate.instant('errorAlCargarLosDatos')); reject(error); } ); @@ -124,7 +127,7 @@ export class CreateTaskComponent implements OnInit { resolve(); }, (error) => { - this.toastr.error('Error al cargar las tareas existentes'); + this.toastr.error(this.translate.instant('errorAlCargarLasTareas')); reject(error); } ); @@ -137,7 +140,7 @@ export class CreateTaskComponent implements OnInit { this.selectedClients = [...this.data.selectedClients]; this.clients = [...this.data.selectedClients]; } else { - this.toastr.error('No hay clientes pre-seleccionados para este ámbito'); + this.toastr.error(this.translate.instant('noHayClientesPreseleccionadosPara')); this.taskForm.get('scope')?.setValue(''); return; } @@ -168,7 +171,7 @@ export class CreateTaskComponent implements OnInit { this.availableOrganizationalUnits = filteredUnits; resolve(); }, error => { - this.toastr.error('Error al filtrar las unidades organizacionales'); + this.toastr.error(this.translate.instant('errorAlFiltrarLasUnidades')); reject(error); }); }) @@ -187,7 +190,7 @@ export class CreateTaskComponent implements OnInit { resolve(); }, (error) => { - this.toastr.error('Error al cargar los grupos de comandos'); + this.toastr.error(this.translate.instant('errorAlCargarLosGrupos')); reject(error); }); }); @@ -201,7 +204,7 @@ export class CreateTaskComponent implements OnInit { resolve(); }, (error) => { - this.toastr.error('Error al cargar los comandos individuales'); + this.toastr.error(this.translate.instant('errorAlCargarLosComandos')); reject(error); }); }); @@ -216,7 +219,7 @@ export class CreateTaskComponent implements OnInit { resolve(); }, (error) => { - this.toastr.error('Error al cargar las unidades organizacionales'); + this.toastr.error(this.translate.instant('errorAlCargarLasUnidades')); reject(error); } ); @@ -225,12 +228,12 @@ export class CreateTaskComponent implements OnInit { addToExistingTask() { if (!this.selectedExistingTask) { - this.toastr.error('Debes seleccionar una tarea existente.'); + this.toastr.error(this.translate.instant('debesSeleccionarUnaTareaExistente')); return; } if (this.executionOrder == null || this.executionOrder < 1) { - this.toastr.error('Debes introducir un orden de ejecución válido (mayor que 0).'); + this.toastr.error(this.translate.instant('debesIntroducirUnOrdenDe')); return; } @@ -239,14 +242,14 @@ export class CreateTaskComponent implements OnInit { executionOrder: this.executionOrder }; - this.toastr.success('Tarea actualizada con éxito'); + this.toastr.success(this.translate.instant('tareaActualizadaConExito')); this.dialogRef.close(data); } saveTask(): void { if (this.taskForm.invalid) { - this.toastr.error('Por favor, rellene todos los campos obligatorios'); + this.toastr.error(this.translate.instant('porFavorRelleneTodosLos')); return; } @@ -254,12 +257,12 @@ export class CreateTaskComponent implements OnInit { const scope = formData.scope; if (scope === 'clients' && this.selectedClients.length === 0) { - this.toastr.error('Debe seleccionar al menos un cliente'); + this.toastr.error(this.translate.instant('debeSeleccionarAlMenosUn')); return; } if (scope !== 'clients' && !formData.organizationalUnit) { - this.toastr.error('Debe seleccionar una unidad organizativa'); + this.toastr.error(this.translate.instant('debeSeleccionarUnaUnidadOrganizativa')); return; } @@ -280,17 +283,17 @@ export class CreateTaskComponent implements OnInit { const taskId = this.data.task.uuid; this.http.patch(`${this.apiUrl}/${taskId}`, payload).subscribe({ next: () => { - this.toastr.success('Tarea actualizada con éxito'); + this.toastr.success(this.translate.instant('tareaActualizadaConExito')); this.dialogRef.close(true); }, error: () => { - this.toastr.error('Error al actualizar la tarea'); + this.toastr.error(this.translate.instant('errorAlActualizarLaTarea')); } }); } else { this.http.post(this.apiUrl, payload).subscribe({ next: response => { - this.toastr.success('Tarea creada con éxito'); + this.toastr.success(this.translate.instant('tareaCreadaConExito')); this.dialogRef.close(response); if (this.data?.source === 'assistant') { if (formData.scheduleAfterCreate) { @@ -301,7 +304,7 @@ export class CreateTaskComponent implements OnInit { } }, error: () => { - this.toastr.error('Error al crear la tarea'); + this.toastr.error(this.translate.instant('errorAlCrearLaTarea')); } }); } @@ -313,7 +316,7 @@ export class CreateTaskComponent implements OnInit { data: { task: task } }).afterClosed().subscribe(result => { if (result) { - this.toastr.success('Tarea programada correctamente'); + this.toastr.success(this.translate.instant('tareaProgramadaCorrectamente')); } }); } @@ -334,7 +337,7 @@ export class CreateTaskComponent implements OnInit { data: { task: task } }).afterClosed().subscribe(result => { if (result) { - this.toastr.success('Tarea programada correctamente'); + this.toastr.success(this.translate.instant('tareaProgramadaCorrectamente')); } }); } diff --git a/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.html b/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.html index c079b2d..43cbed6 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.html +++ b/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.html @@ -26,7 +26,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.ts b/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.ts index 8cfe8af..8c7d97b 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/show-task-schedule/show-task-schedule.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {Client} from "../../../groups/model/model"; import {ToastrService} from "ngx-toastr"; @@ -15,6 +17,7 @@ import {DatePipe} from "@angular/common"; styleUrl: './show-task-schedule.component.css' }) export class ShowTaskScheduleComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; dataSource = new MatTableDataSource([]); length = 0; @@ -26,13 +29,13 @@ export class ShowTaskScheduleComponent implements OnInit{ datePipe: DatePipe = new DatePipe('es-ES'); columns = [ - { columnDef: 'id', header: 'ID', cell: (schedule: any) => schedule.id }, - { columnDef: 'recurrenceType', header: 'Tipo de Programación', cell: (schedule: any) => this.getRecurrenceTypeDisplay(schedule) }, - { columnDef: 'executionTime', header: 'Hora de ejecución', cell: (schedule: any) => this.formatExecutionTimeForDisplay(schedule.executionTime) }, - { columnDef: 'nextExecution', header: 'Próxima ejecución', cell: (schedule: any) => this.calculateNextExecution(schedule) }, - { columnDef: 'daysOfWeek', header: 'Días de la semana', cell: (schedule: any) => this.formatDaysOfWeek(schedule.recurrenceDetails?.daysOfWeek) }, - { columnDef: 'months', header: 'Meses', cell: (schedule: any) => this.formatMonths(schedule.recurrenceDetails?.months) }, - { columnDef: 'enabled', header: 'Estado', cell: (schedule: any) => schedule.enabled } + { columnDef: 'id', header: 'id', cell: (schedule: any) => schedule.id }, + { columnDef: 'recurrenceType', header: 'tipoDeProgramacion', cell: (schedule: any) => this.getRecurrenceTypeDisplay(schedule) }, + { columnDef: 'executionTime', header: 'horaDeEjecucion', cell: (schedule: any) => this.formatExecutionTimeForDisplay(schedule.executionTime) }, + { columnDef: 'nextExecution', header: 'proximaEjecucion', cell: (schedule: any) => this.calculateNextExecution(schedule) }, + { columnDef: 'daysOfWeek', header: 'diasDeLaSemana', cell: (schedule: any) => this.formatDaysOfWeek(schedule.recurrenceDetails?.daysOfWeek) }, + { columnDef: 'months', header: 'meses', cell: (schedule: any) => this.formatMonths(schedule.recurrenceDetails?.months) }, + { columnDef: 'enabled', header: 'estado', cell: (schedule: any) => schedule.enabled } ]; displayedColumns: string[] = ['id', 'recurrenceType', 'executionTime', 'nextExecution', 'daysOfWeek', 'months', 'enabled', 'actions']; @@ -67,7 +70,7 @@ export class ShowTaskScheduleComponent implements OnInit{ }, (error) => { this.loading = false; - this.toastService.error('Error al cargar las programaciones'); + this.toastService.error(this.translate.instant('errorAlCargarLasProgramaciones')); } ); } @@ -79,7 +82,7 @@ export class ShowTaskScheduleComponent implements OnInit{ }).afterClosed().subscribe(result => { if (result) { this.loadData(); - this.toastService.success('Programación creada correctamente'); + this.toastService.success(this.translate.instant('programacionCreadaCorrectamente')); } }); } @@ -91,7 +94,7 @@ export class ShowTaskScheduleComponent implements OnInit{ }).afterClosed().subscribe(result => { if (result) { this.loadData(); - this.toastService.success('Programación actualizada correctamente'); + this.toastService.success(this.translate.instant('programacionActualizadaCorrectamente')); } }); } @@ -106,7 +109,7 @@ export class ShowTaskScheduleComponent implements OnInit{ if (result) { this.http.delete(`${this.baseUrl}${schedule['@id']}`).subscribe( () => { - this.toastService.success('Programación eliminada correctamente'); + this.toastService.success(this.translate.instant('programacionEliminadaCorrectamente')); this.loadData(); }, (error) => { @@ -317,7 +320,7 @@ export class ShowTaskScheduleComponent implements OnInit{ if (schedule.recurrenceType === 'none') { return { type: 'none', - label: 'Ejecución única', + label : this.translate.instant('ejecucionUnica'), icon: 'event', color: 'primary', details: schedule.executionDate ? diff --git a/ogWebconsole/src/app/components/commands/commands-task/show-task-script/show-task-script.component.ts b/ogWebconsole/src/app/components/commands/commands-task/show-task-script/show-task-script.component.ts index 7622307..f3419ce 100644 --- a/ogWebconsole/src/app/components/commands/commands-task/show-task-script/show-task-script.component.ts +++ b/ogWebconsole/src/app/components/commands/commands-task/show-task-script/show-task-script.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {ToastrService} from "ngx-toastr"; import {HttpClient} from "@angular/common/http"; @@ -15,6 +17,7 @@ import {ViewParametersModalComponent} from "./view-parameters-modal/view-paramet styleUrl: './show-task-script.component.css' }) export class ShowTaskScriptComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; dataSource = new MatTableDataSource([]); length = 0; @@ -25,26 +28,26 @@ export class ShowTaskScriptComponent implements OnInit{ filters: { [key: string]: string } = {}; columns = [ - { columnDef: 'id', header: 'ID', cell: (item: any) => item.id }, - { columnDef: 'order', header: 'Orden', cell: (item: any) => item.order }, - { columnDef: 'type', header: 'Tipo', cell: (item: any) => item.type }, - { columnDef: 'parameters', header: 'Parámetros', cell: (item: any) => item.parameters }, - { columnDef: 'content', header: 'Contenido', cell: (item: any) => item.content }, + { columnDef: 'id', header: 'id', cell: (item: any) => item.id }, + { columnDef: 'order', header: 'orden', cell: (item: any) => item.order }, + { columnDef: 'type', header: 'tipo', cell: (item: any) => item.type }, + { columnDef: 'parameters', header: 'parametros', cell: (item: any) => item.parameters }, + { columnDef: 'content', header: 'contenido', cell: (item: any) => item.content }, ]; displayedColumns: string[] = ['order', 'type', 'content', 'parameters', 'actions']; typeLabels: { [key: string]: { label: string, icon: string } } = { - 'partition-and-format': { label: 'Particionar y formatear', icon: 'storage' }, - 'partition-assistant': { label: 'Asistente de particionado', icon: 'storage' }, - 'deploy-image': { label: 'Desplegar imagen', icon: 'cloud_download' }, - 'create-image': { label: 'Crear imagen', icon: 'cloud_upload' }, - 'run-script': { label: 'Ejecutar script', icon: 'code' }, + 'partition-and-format': { label : this.translate.instant('particionarYFormatear'), icon: 'storage' }, + 'partition-assistant': { label : this.translate.instant('asistenteDeParticionado'), icon: 'storage' }, + 'deploy-image': { label : this.translate.instant('desplegarImagen'), icon: 'cloud_download' }, + 'create-image': { label : this.translate.instant('crearImagen'), icon: 'cloud_upload' }, + 'run-script': { label : this.translate.instant('ejecutarScript'), icon: 'code' }, 'reboot': { label: 'Reiniciar', icon: 'restart_alt' }, 'shutdown': { label: 'Apagar', icon: 'power_off' }, 'poweron': { label: 'Encender', icon: 'power' }, 'power-on': { label: 'Encender', icon: 'power' }, - 'login': { label: 'Iniciar sesión', icon: 'login' }, + 'login': { label : this.translate.instant('iniciarSesion'), icon: 'login' }, }; getTypeDisplay(type: string): { label: string, icon: string } { @@ -94,7 +97,7 @@ export class ShowTaskScriptComponent implements OnInit{ if (result) { this.http.delete(`${this.baseUrl}${schedule['@id']}`).subscribe( () => { - this.toastService.success('Eliminado correctamente'); + this.toastService.success(this.translate.instant('eliminadoCorrectamente')); this.loadData(); }, (error) => { 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 6aa5914..e4dc285 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/commands.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/commands.component.html @@ -26,7 +26,7 @@
- + + + +
{{ column.header }} {{ column.header | translate }} {{ column.cell(command) }} diff --git a/ogWebconsole/src/app/components/commands/main-commands/commands.component.ts b/ogWebconsole/src/app/components/commands/main-commands/commands.component.ts index 4993b29..95492ad 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/commands.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/commands.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { MatDialog } from '@angular/material/dialog'; @@ -16,6 +18,7 @@ import { JoyrideService } from 'ngx-joyride'; styleUrls: ['./commands.component.css'] }) export class CommandsComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -29,22 +32,22 @@ export class CommandsComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (command: any) => `${command.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (command: any) => `${command.name}` }, { columnDef: 'readOnly', - header: 'Solo Lectura', + header: 'soloLectura', cell: (command: any) => `${command.readOnly}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (command: any) => `${this.datePipe.transform(command.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -69,7 +72,7 @@ export class CommandsComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); this.loading = false; } ); @@ -106,11 +109,11 @@ export class CommandsComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${command.uuid}`).subscribe({ next: () => { - this.toastService.success('Comando eliminado con éxito'); + this.toastService.success(this.translate.instant('comandoEliminadoConExito')); this.search(); }, error: (error) => { - console.error('Error al eliminar el comando:', error); + console.error(this.translate.instant('errorAlEliminarElComando'), error); } }); } diff --git a/ogWebconsole/src/app/components/commands/main-commands/create-command/create-command.component.ts b/ogWebconsole/src/app/components/commands/main-commands/create-command/create-command.component.ts index a5f890b..9701f28 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/create-command/create-command.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/create-command/create-command.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; @@ -12,6 +14,7 @@ import { ConfigService } from "@services/config.service"; styleUrls: ['./create-command.component.css'] }) export class CreateCommandComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; createCommandForm: FormGroup; commandId: string | null = null; @@ -56,7 +59,7 @@ export class CreateCommandComponent implements OnInit{ this.commandId = response['@id']; }, error: (err) => { - console.error('Error fetching remote calendar:', err); + console.error(this.translate.instant('errorFetchingRemoteCalendar'), err); } }); } @@ -81,7 +84,7 @@ export class CreateCommandComponent implements OnInit{ if (this.commandId) { this.http.put(`${this.baseUrl}${this.commandId}`, payload).subscribe( (response) => { - this.toastService.success('Comando editado correctamente'); + this.toastService.success(this.translate.instant('comandoEditadoCorrectamente')); this.dialogRef.close(); }, (error) => { @@ -91,7 +94,7 @@ export class CreateCommandComponent implements OnInit{ } else { this.http.post(`${this.baseUrl}/commands`, payload).subscribe( (response) => { - this.toastService.success('Comando añadido correctamente'); + this.toastService.success(this.translate.instant('comandoAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { diff --git a/ogWebconsole/src/app/components/commands/main-commands/data.service.ts b/ogWebconsole/src/app/components/commands/main-commands/data.service.ts index 2333b9d..37cd131 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/data.service.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { ConfigService } from '@services/config.service'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; @@ -8,6 +10,7 @@ import { catchError, map } from 'rxjs/operators'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -34,7 +37,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); return throwError(error); }) ); @@ -50,7 +53,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching user group', error); + console.error(this.translate.instant('errorFetchingUserGroup'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/commands/main-commands/detail-command/command-detail.component.ts b/ogWebconsole/src/app/components/commands/main-commands/detail-command/command-detail.component.ts index f665de9..233e039 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/detail-command/command-detail.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/detail-command/command-detail.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./command-detail.component.css'] }) export class CommandDetailComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; form!: FormGroup; clients: any[] = []; @@ -56,7 +59,7 @@ export class CommandDetailComponent implements OnInit { dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Comando editado'); + this.toastService.success(this.translate.instant('comandoEditado')); this.data.command = result; } }); diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.html b/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.html index 3e52dde..e5af2c8 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.html @@ -68,7 +68,7 @@ - {{ column.header }} {{ column.header | translate }} {{ column.cell(image) }} diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.ts index 835326d..1f2bea0 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/boot-so-partition/boot-so-partition.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; import { MatTableDataSource } from "@angular/material/table"; @@ -11,6 +13,7 @@ import { ToastrService } from "ngx-toastr"; styleUrl: './boot-so-partition.component.css' }) export class BootSoPartitionComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; selectedPartition: any = null; dataSource = new MatTableDataSource(); @@ -24,32 +27,32 @@ export class BootSoPartitionComponent implements OnInit { columns = [ { columnDef: 'diskNumber', - header: 'Disco', + header: 'disco', cell: (partition: any) => partition.diskNumber }, { columnDef: 'partitionNumber', - header: 'Particion', + header: 'particion', cell: (partition: any) => partition.partitionNumber }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (partition: any) => `${partition.size} MB` }, { columnDef: 'partitionCode', - header: 'Tipo de partición', + header: 'tipoDeParticion', cell: (partition: any) => partition.partitionCode }, { columnDef: 'filesystem', - header: 'Sistema de ficheros', + header: 'sistemaDeFicheros', cell: (partition: any) => partition.filesystem }, { columnDef: 'operativeSystem', - header: 'SO', + header: 'so', cell: (partition: any) => partition.operativeSystem?.name } ]; @@ -92,7 +95,7 @@ export class BootSoPartitionComponent implements OnInit { } }, (error) => { - console.error('Error al cargar los datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarLosDatos1'), error); } ); } @@ -133,7 +136,7 @@ export class BootSoPartitionComponent implements OnInit { partition: this.selectedPartition['@id'] }).subscribe( response => { - this.toastService.success('Cliente actualizado correctamente'); + this.toastService.success(this.translate.instant('clienteActualizadoCorrectamente')); this.dialogRef.close(); this.loading = false; }, diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts index 98c76d3..409c932 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/execute-command.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Input, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Router } from "@angular/router"; @@ -15,6 +17,7 @@ import {SoftwareProfilePartitionComponent} from "./software-profile-partition/so styleUrls: ['./execute-command.component.css'] }) export class ExecuteCommandComponent implements OnInit { + public translate = inject(TranslateService); @Input() runScriptContext: any = null; @Input() clientState: string = 'off'; @Input() clientData: any[] = []; @@ -197,7 +200,7 @@ export class ExecuteCommandComponent implements OnInit { clients: this.clientData.map((client: any) => client['@id']) }).subscribe( response => { - this.toastService.success('Cliente actualizado correctamente'); + this.toastService.success(this.translate.instant('clienteActualizadoCorrectamente')); }, error => { this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente'); @@ -210,7 +213,7 @@ export class ExecuteCommandComponent implements OnInit { clients: this.clientData.map((client: any) => client['@id']) }).subscribe( response => { - this.toastService.success('Petición de refresco enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeRefrescoEnviadaCorrectamente')); }, error => { this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente'); @@ -237,7 +240,7 @@ export class ExecuteCommandComponent implements OnInit { dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Petición de arranque de SO enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeArranqueDeSo')); } }); } @@ -261,14 +264,14 @@ export class ExecuteCommandComponent implements OnInit { dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Petición de borrado de caché de imagen enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeBorradoDeCache')); } }); } hardwareInventory(): void { if (this.clientData.length === 0) { - this.toastService.error('No hay clientes seleccionados'); + this.toastService.error(this.translate.instant('noHayClientesSeleccionados')); return; } @@ -278,7 +281,7 @@ export class ExecuteCommandComponent implements OnInit { clients: this.clientData.map((client: any) => client['@id']) }).subscribe( response => { - this.toastService.success('Inventario de hardware actualizado correctamente'); + this.toastService.success(this.translate.instant('inventarioDeHardwareActualizadoCorrectamente')); }, error => { this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente'); @@ -288,7 +291,7 @@ export class ExecuteCommandComponent implements OnInit { softwareInventory(): void { if (this.clientData.length === 0) { - this.toastService.error('No hay clientes seleccionados'); + this.toastService.error(this.translate.instant('noHayClientesSeleccionados')); return; } @@ -320,7 +323,7 @@ export class ExecuteCommandComponent implements OnInit { clients: this.clientData.map((client: any) => client['@id']) }).subscribe( response => { - this.toastService.success('Petición de encendido enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeEncendidoEnviadaCorrectamente')); }, error => { this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente'); @@ -333,7 +336,7 @@ export class ExecuteCommandComponent implements OnInit { clients: this.clientData.map((client: any) => client['@id']) }).subscribe( response => { - this.toastService.success('Petición de apagado enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeApagadoEnviadaCorrectamente')); }, error => { this.toastService.error(error.error['hydra:description'] || 'Error de conexión con el cliente'); @@ -404,7 +407,7 @@ export class ExecuteCommandComponent implements OnInit { deleteClientLease(): void { if (this.clientData.length === 0) { - this.toastService.error('No hay clientes seleccionados'); + this.toastService.error(this.translate.instant('noHayClientesSeleccionados')); return; } @@ -415,11 +418,11 @@ export class ExecuteCommandComponent implements OnInit { Promise.allSettled(requests).then(results => { const errors = results.filter(r => r.status === 'rejected'); if (errors.length === 0) { - this.toastService.success('Lease(s) DHCP eliminada(s) correctamente'); + this.toastService.success(this.translate.instant('leasesDhcpEliminadasCorrectamente')); } else if (errors.length < results.length) { this.toastService.warning(`${results.length - errors.length} lease(s) eliminada(s), ${errors.length} con error`); } else { - this.toastService.error('Error al eliminar las leases DHCP'); + this.toastService.error(this.translate.instant('errorAlEliminarLasLeases')); } }); } diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.html b/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.html index 72af607..460fb65 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.html @@ -68,7 +68,7 @@ - {{ column.header }} {{ column.header | translate }} {{ column.cell(image) }} diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.ts index c650a3b..8487568 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/remove-cache-image/remove-cache-image.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {ConfigService} from "@services/config.service"; @@ -11,6 +13,7 @@ import {ToastrService} from "ngx-toastr"; styleUrl: './remove-cache-image.component.css' }) export class RemoveCacheImageComponent { + public translate = inject(TranslateService); baseUrl: string; selectedPartition: any = null; dataSource = new MatTableDataSource(); @@ -24,32 +27,32 @@ export class RemoveCacheImageComponent { columns = [ { columnDef: 'diskNumber', - header: 'Disco', + header: 'disco', cell: (partition: any) => partition.diskNumber }, { columnDef: 'partitionNumber', - header: 'Particion', + header: 'particion', cell: (partition: any) => partition.partitionNumber }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (partition: any) => `${partition.size} MB` }, { columnDef: 'partitionCode', - header: 'Tipo de partición', + header: 'tipoDeParticion', cell: (partition: any) => partition.partitionCode }, { columnDef: 'filesystem', - header: 'Sistema de ficheros', + header: 'sistemaDeFicheros', cell: (partition: any) => partition.filesystem }, { columnDef: 'operativeSystem', - header: 'SO', + header: 'so', cell: (partition: any) => partition.operativeSystem?.name } ]; @@ -100,7 +103,7 @@ export class RemoveCacheImageComponent { } }, (error) => { - console.error('Error al cargar los datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarLosDatos1'), error); } ); } @@ -141,7 +144,7 @@ export class RemoveCacheImageComponent { partition: this.selectedPartition['@id'] }).subscribe( response => { - this.toastService.success('Cliente actualizado correctamente'); + this.toastService.success(this.translate.instant('clienteActualizadoCorrectamente')); this.dialogRef.close(); this.loading = false; }, diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html index a2b471c..62d6435 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html @@ -20,7 +20,7 @@ - {{ column.header }} {{ column.header | translate }} {{ column.cell(image) }} diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts index 100593f..5737a3f 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {ConfigService} from "@services/config.service"; @@ -11,6 +13,7 @@ import {ToastrService} from "ngx-toastr"; styleUrl: './software-profile-partition.component.css' }) export class SoftwareProfilePartitionComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; selectedPartition: any = null; dataSource = new MatTableDataSource(); @@ -24,32 +27,32 @@ export class SoftwareProfilePartitionComponent implements OnInit{ columns = [ { columnDef: 'diskNumber', - header: 'Disco', + header: 'disco', cell: (partition: any) => partition.diskNumber }, { columnDef: 'partitionNumber', - header: 'Particion', + header: 'particion', cell: (partition: any) => partition.partitionNumber }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (partition: any) => `${partition.size} MB` }, { columnDef: 'partitionCode', - header: 'Tipo de partición', + header: 'tipoDeParticion', cell: (partition: any) => partition.partitionCode }, { columnDef: 'filesystem', - header: 'Sistema de ficheros', + header: 'sistemaDeFicheros', cell: (partition: any) => partition.filesystem }, { columnDef: 'operativeSystem', - header: 'SO', + header: 'so', cell: (partition: any) => partition.operativeSystem?.name } ]; @@ -80,7 +83,7 @@ export class SoftwareProfilePartitionComponent implements OnInit{ } }, (error) => { - console.error('Error al cargar los datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarLosDatos1'), error); } ); } @@ -96,7 +99,7 @@ export class SoftwareProfilePartitionComponent implements OnInit{ partition: this.selectedPartition['@id'], }).subscribe( response => { - this.toastService.success('Inventario de software actualizado correctamente'); + this.toastService.success(this.translate.instant('inventarioDeSoftwareActualizadoCorrectamente')); this.dialogRef.close(response); }, error => { diff --git a/ogWebconsole/src/app/components/global-status/global-status.component.ts b/ogWebconsole/src/app/components/global-status/global-status.component.ts index ca4f2c1..2a061be 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/global-status.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { ConfigService } from '@services/config.service'; @@ -9,6 +11,7 @@ import { ToastrService } from "ngx-toastr"; styleUrl: './global-status.component.css' }) export class GlobalStatusComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = false; loadingDhcps: boolean = false; @@ -81,7 +84,7 @@ export class GlobalStatusComponent implements OnInit { const timeoutId = setTimeout(() => { if (!hasError) { - this.toastService.error('Error al sincronizar las subredes: tiempo de espera agotado'); + this.toastService.error(this.translate.instant('errorAlSincronizarLasSubredes')); hasError = true; } }, 5000); @@ -92,7 +95,7 @@ export class GlobalStatusComponent implements OnInit { pending--; if (pending === 0 && !hasError) { clearTimeout(timeoutId); - this.toastService.success('Sincronización de subredes de servidores DHCP exitosa'); + this.toastService.success(this.translate.instant('sincronizacionDeSubredesDeServidores')); } }, error: (error) => { @@ -106,7 +109,7 @@ export class GlobalStatusComponent implements OnInit { }); }); }, error => { - console.error('Error fetching DHCP servers for subnet sync', error); + console.error(this.translate.instant('errorFetchingDhcpServersFor'), error); }); } @@ -118,7 +121,7 @@ export class GlobalStatusComponent implements OnInit { const timeoutId = setTimeout(() => { if (!hasError) { - this.toastService.error('Error al sincronizar las plantillas Pxe: tiempo de espera agotado'); + this.toastService.error(this.translate.instant('errorAlSincronizarLasPlantillas')); hasError = true; } }, 5000); @@ -129,7 +132,7 @@ export class GlobalStatusComponent implements OnInit { pending--; if (pending === 0 && !hasError) { clearTimeout(timeoutId); - this.toastService.success('Sincronización de plantillas Pxe exitosa'); + this.toastService.success(this.translate.instant('sincronizacionDePlantillasPxeExitosa')); } }, error: (error) => { @@ -152,7 +155,7 @@ export class GlobalStatusComponent implements OnInit { const timeoutId = setTimeout(() => { if (!hasError) { - this.toastService.error('Error al sincronizar imagenes ogLive: tiempo de espera agotado'); + this.toastService.error(this.translate.instant('errorAlSincronizarImagenesOglive')); hasError = true; } }, 5000); @@ -163,7 +166,7 @@ export class GlobalStatusComponent implements OnInit { pending--; if (pending === 0 && !hasError) { clearTimeout(timeoutId); - this.toastService.success('Sincronización con ogLives completada'); + this.toastService.success(this.translate.instant('sincronizacionConOglivesCompletada')); } }, error: (error) => { @@ -190,7 +193,7 @@ export class GlobalStatusComponent implements OnInit { this.repositories = []; if (showLoading) this.loadingRepositories = false; this.checkOverallLoading(); - this.toastService.error('Error al cargar la lista de repositorios'); + this.toastService.error(this.translate.instant('errorAlCargarLaLista2')); } }); } @@ -213,7 +216,7 @@ export class GlobalStatusComponent implements OnInit { this.bootServers = []; if (showLoading) this.loadingBootServers = false; this.checkOverallLoading(); - this.toastService.error('Error al cargar la lista de Servidores de Boot'); + this.toastService.error(this.translate.instant('errorAlCargarLaLista1')); } }); } @@ -230,7 +233,7 @@ export class GlobalStatusComponent implements OnInit { this.dhcps = []; if (showLoading) this.loadingDhcps = false; this.checkOverallLoading(); - this.toastService.error('Error al cargar la lista de Dhcps'); + this.toastService.error(this.translate.instant('errorAlCargarLaLista')); } }); } @@ -250,7 +253,7 @@ export class GlobalStatusComponent implements OnInit { this.loadDhcps(true); this.loadRepositories(true); this.syncSubnets(); - this.toastService.success('Datos actualizados correctamente'); + this.toastService.success(this.translate.instant('datosActualizadosCorrectamente')); } updateLastUpdateTime(): void { diff --git a/ogWebconsole/src/app/components/global-status/ogboot-status/ogboot-status.component.ts b/ogWebconsole/src/app/components/global-status/ogboot-status/ogboot-status.component.ts index df837c2..2683046 100644 --- a/ogWebconsole/src/app/components/global-status/ogboot-status/ogboot-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/ogboot-status/ogboot-status.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Input } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ConfigService } from '@services/config.service'; @@ -10,6 +12,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; styleUrl: './ogboot-status.component.css' }) export class GlobalOgbootStatusComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loadingBootServers: boolean = false; @@ -117,9 +120,9 @@ export class GlobalOgbootStatusComponent implements OnInit { this.loadBootServerStatus(bootServerUuid, (errorOccurred: boolean) => { this.errorBootServers[bootServerUuid] = errorOccurred; if (!errorOccurred) { - this.toastService.success('Estado del servidor de boot actualizado correctamente'); + this.toastService.success(this.translate.instant('estadoDelServidorDeBoot')); } else { - this.toastService.error('Error al cargar el estado del servidor de boot'); + this.toastService.error(this.translate.instant('errorAlCargarElEstado2')); } }); } diff --git a/ogWebconsole/src/app/components/global-status/ogdhcp-status/ogdhcp-status.component.ts b/ogWebconsole/src/app/components/global-status/ogdhcp-status/ogdhcp-status.component.ts index 2581aa2..de3ad74 100644 --- a/ogWebconsole/src/app/components/global-status/ogdhcp-status/ogdhcp-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/ogdhcp-status/ogdhcp-status.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Input } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ConfigService } from '@services/config.service'; @@ -10,6 +12,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; styleUrl: './ogdhcp-status.component.css' }) export class OgdhcpStatusComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loadingDhcps: boolean = false; @@ -120,9 +123,9 @@ export class OgdhcpStatusComponent implements OnInit { this.loadDhcpStatus(dhcpUuid, (errorOccurred: boolean) => { this.errorDhcps[dhcpUuid] = errorOccurred; if (!errorOccurred) { - this.toastService.success('Estado del dhcp actualizado correctamente'); + this.toastService.success(this.translate.instant('estadoDelDhcpActualizadoCorrectamente')); } else { - this.toastService.error('Error al cargar el estado del dhcp'); + this.toastService.error(this.translate.instant('errorAlCargarElEstado')); } }); } diff --git a/ogWebconsole/src/app/components/global-status/ogrepository-status/ogrepository-status.component.ts b/ogWebconsole/src/app/components/global-status/ogrepository-status/ogrepository-status.component.ts index 4e6e42c..df77be8 100644 --- a/ogWebconsole/src/app/components/global-status/ogrepository-status/ogrepository-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/ogrepository-status/ogrepository-status.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Input } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ConfigService } from '@services/config.service'; @@ -10,6 +12,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; styleUrl: './ogrepository-status.component.css' }) export class OgrepositoryStatusComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = false; @@ -119,9 +122,9 @@ export class OgrepositoryStatusComponent implements OnInit { this.loadRepositoryStatus(repositoryUuid, (errorOccurred: boolean) => { this.errorRepositories[repositoryUuid] = errorOccurred; if (!errorOccurred) { - this.toastService.success('Estado del repositorio actualizado correctamente'); + this.toastService.success(this.translate.instant('estadoDelRepositorioActualizadoCorrectamente')); } else { - this.toastService.error('Error al cargar el estado del repositorio'); + this.toastService.error(this.translate.instant('errorAlCargarElEstado1')); } }); } 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 41eb953..2eb5f5e 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 @@ -41,7 +41,7 @@
- +
{{ column.header }} {{ column.header | translate }} {{ column.cell(image) }} diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts index a9ce00f..e41608b 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.ts @@ -1,4 +1,6 @@ -import {Component, EventEmitter, OnInit, Output, ViewChild, ElementRef} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, EventEmitter, OnInit, Output, ViewChild, ElementRef } from '@angular/core'; import { HttpClient } from "@angular/common/http"; import { ToastrService } from "ngx-toastr"; import { ActivatedRoute, Router } from "@angular/router"; @@ -17,6 +19,7 @@ import {CreateTaskComponent} from "../../../../commands/commands-task/create-tas styleUrl: './create-image.component.css' }) export class CreateClientImageComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; @Output() dataChange = new EventEmitter(); @ViewChild('partitionSection', { static: false }) partitionSection!: ElementRef; @@ -69,27 +72,27 @@ export class CreateClientImageComponent implements OnInit{ columns = [ { columnDef: 'partitionNumber', - header: 'Particion', + header: 'particion', cell: (partition: any) => partition.partitionNumber }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (partition: any) => `${partition.size} MB` }, { columnDef: 'partitionCode', - header: 'Tipo de partición', + header: 'tipoDeParticion', cell: (partition: any) => partition.partitionCode }, { columnDef: 'filesystem', - header: 'Sistema de ficheros', + header: 'sistemaDeFicheros', cell: (partition: any) => partition.filesystem }, { columnDef: 'operativeSystem', - header: 'SO', + header: 'so', cell: (partition: any) => partition.operativeSystem?.name } ]; @@ -139,7 +142,7 @@ export class CreateClientImageComponent implements OnInit{ } }, (error) => { - console.error('Error al cargar los datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarLosDatos1'), error); } ); } @@ -155,7 +158,7 @@ export class CreateClientImageComponent implements OnInit{ this.images = response['hydra:member']; }, (error) => { - console.error('Error al cargar las imágenes:', error); + console.error(this.translate.instant('errorAlCargarLasImagenes3'), error); } ); } @@ -186,7 +189,7 @@ export class CreateClientImageComponent implements OnInit{ this.checkRepositoryExists(); }, (error) => { - console.error('Error al cargar los repositorios git:', error); + console.error(this.translate.instant('errorAlCargarLosRepositorios2'), error); this.loadingGitRepositories = false; } ); @@ -201,7 +204,7 @@ export class CreateClientImageComponent implements OnInit{ this.loadingGitImageRepositories = false; }, (error) => { - console.error('Error al cargar las imágenes de repositorio git:', error); + console.error(this.translate.instant('errorAlCargarLasImagenes'), error); this.loadingGitImageRepositories = false; } ); @@ -237,8 +240,8 @@ export class CreateClientImageComponent implements OnInit{ } }, error => { - console.error('Error fetching branches', error); - this.toastService.error('Error al cargar las ramas del repositorio'); + console.error(this.translate.instant('errorFetchingBranches'), error); + this.toastService.error(this.translate.instant('errorAlCargarLasRamas1')); this.loadingBranches = false; } ); @@ -261,7 +264,7 @@ export class CreateClientImageComponent implements OnInit{ dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Rama creada correctamente'); + this.toastService.success(this.translate.instant('ramaCreadaCorrectamente')); this.destinationBranch = result.branchName || result; this.loadBranches(); } @@ -270,7 +273,7 @@ export class CreateClientImageComponent implements OnInit{ } if (!this.selectedGitRepository) { - this.toastService.error('Debe seleccionar un repositorio primero'); + this.toastService.error(this.translate.instant('debeSeleccionarUnRepositorioPrimero')); return; } @@ -285,7 +288,7 @@ export class CreateClientImageComponent implements OnInit{ dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Rama creada correctamente'); + this.toastService.success(this.translate.instant('ramaCreadaCorrectamente')); this.destinationBranch = result.branchName || result; this.loadBranches(); } @@ -319,9 +322,9 @@ export class CreateClientImageComponent implements OnInit{ this.loadingExistingImages = false; }, (error) => { - console.error('Error al cargar las imágenes existentes:', error); + console.error(this.translate.instant('errorAlCargarLasImagenes2'), error); this.loadingExistingImages = false; - this.toastService.error('Error al cargar las imágenes existentes'); + this.toastService.error(this.translate.instant('errorAlCargarLasImagenes1')); } ); } @@ -347,18 +350,18 @@ export class CreateClientImageComponent implements OnInit{ save(): void { if (!this.selectedPartition) { - this.toastService.error('Debes seleccionar una partición'); + this.toastService.error(this.translate.instant('debesSeleccionarUnaParticion')); return; } if (this.imageType === 'monolithic') { if (this.monolithicAction === 'create' && !this.name) { - this.toastService.error('Debes introducir un nombre canónico para la imagen'); + this.toastService.error(this.translate.instant('debesIntroducirUnNombreCanonico')); return; } if (this.monolithicAction === 'update' && !this.selectedImage) { - this.toastService.error('Debes seleccionar una imagen para actualizar'); + this.toastService.error(this.translate.instant('debesSeleccionarUnaImagenPara')); return; } } @@ -572,8 +575,8 @@ export class CreateClientImageComponent implements OnInit{ } }, error: (error) => { - console.error('Error al cargar datos de Git:', error); - this.toastService.error('Error al cargar información de Git'); + console.error(this.translate.instant('errorAlCargarDatosDe'), error); + this.toastService.error(this.translate.instant('errorAlCargarInformacionDe')); this.loadingGitData = false; } }); @@ -603,7 +606,7 @@ export class CreateClientImageComponent implements OnInit{ this.loadingBranches = false; }, error => { - console.error('Error fetching branches for Git data', error); + console.error(this.translate.instant('errorFetchingBranchesForGit'), error); this.loadingBranches = false; } ); @@ -643,7 +646,7 @@ export class CreateClientImageComponent implements OnInit{ let scope = 'clients'; if (!this.client) { - this.toastService.error('No se ha cargado la información del cliente'); + this.toastService.error(this.translate.instant('noSeHaCargadoLa')); return; } @@ -663,7 +666,7 @@ export class CreateClientImageComponent implements OnInit{ dialogRef.afterClosed().subscribe((result: any) => { if (result) { if (!this.selectedPartition) { - this.toastService.error('Debe seleccionar una partición'); + this.toastService.error(this.translate.instant('debeSeleccionarUnaParticion')); return; } @@ -699,7 +702,7 @@ export class CreateClientImageComponent implements OnInit{ type: 'create-image', }).subscribe({ next: () => { - this.toastService.success('Tarea de creación de imagen programada con éxito'); + this.toastService.success(this.translate.instant('tareaDeCreacionDeImagen')); }, error: (error) => { this.toastService.error(error.error['hydra:description'] || 'Error al programar la tarea'); diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-repository-modal/create-repository-modal.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-repository-modal/create-repository-modal.component.ts index 9fae2af..c37be1a 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-repository-modal/create-repository-modal.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-repository-modal/create-repository-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-repository-modal.component.css' }) export class CreateRepositoryModalComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; repositoryForm: FormGroup; loading: boolean = false; @@ -45,7 +48,7 @@ export class CreateRepositoryModalComponent implements OnInit { this.http.post(`${this.baseUrl}/git-repositories`, payload).subscribe({ next: (response) => { - this.toastService.success('Repositorio creado correctamente'); + this.toastService.success(this.translate.instant('repositorioCreadoCorrectamente')); this.dialogRef.close(response); }, error: (error) => { @@ -54,7 +57,7 @@ export class CreateRepositoryModalComponent implements OnInit { } }); } else { - this.toastService.error('Por favor, complete todos los campos requeridos'); + this.toastService.error(this.translate.instant('porFavorCompleteTodosLos')); } } diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts index d42aeaf..28179a4 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/deploy-image/deploy-image.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { SelectionModel } from "@angular/cdk/collections"; @@ -16,6 +18,7 @@ import { QueueConfirmationModalComponent } from "../../../../../shared/queue-con styleUrl: './deploy-image.component.css' }) export class DeployImageComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; @Output() dataChange = new EventEmitter(); @@ -75,22 +78,22 @@ export class DeployImageComponent implements OnInit { columns = [ { columnDef: 'partitionNumber', - header: 'Partición', + header: 'particion1', cell: (partition: any) => `${partition.partitionNumber}` }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (partition: any) => `${partition.size} MB` }, { columnDef: 'filesystem', - header: 'Sistema de ficheros', + header: 'sistemaDeFicheros', cell: (partition: any) => `${partition.filesystem}` }, { columnDef: 'operativeSystem', - header: 'SO', + header: 'so', cell: (partition: any) => `${partition.operativeSystem?.name}` } ]; @@ -229,7 +232,7 @@ export class DeployImageComponent implements OnInit { this.loadImages(); }, (error) => { - console.error('Error al cargar las particiones:', error); + console.error(this.translate.instant('errorAlCargarLasParticiones'), error); } ); } @@ -261,7 +264,7 @@ export class DeployImageComponent implements OnInit { this.images = response?.['hydra:member'] || []; }, (error) => { - console.error('Error al cargar las imágenes:', error); + console.error(this.translate.instant('errorAlCargarLasImagenes3'), error); } ); } @@ -350,27 +353,27 @@ export class DeployImageComponent implements OnInit { const needsPartition = this.deployMode !== 'update-cache'; if (!this.selectedClients.length) { - this.toastService.error('Debe seleccionar al menos un cliente'); + this.toastService.error(this.translate.instant('debeSeleccionarAlMenosUn')); return; } if (!this.selectedImage && this.imageType !== 'git') { - this.toastService.error('Debe seleccionar una imagen'); + this.toastService.error(this.translate.instant('debeSeleccionarUnaImagen')); return; } if (!this.selectedMethod && this.imageType !== 'git') { - this.toastService.error('Debe seleccionar un método'); + this.toastService.error(this.translate.instant('debeSeleccionarUnMetodo')); return; } if (needsPartition && !this.selectedPartition) { - this.toastService.error('Debe seleccionar una partición'); + this.toastService.error(this.translate.instant('debeSeleccionarUnaParticion')); return; } if (this.imageType === 'git' && !this.selectedCommit) { - this.toastService.error('Debe seleccionar un commit'); + this.toastService.error(this.translate.instant('debeSeleccionarUnCommit')); return; } @@ -381,7 +384,7 @@ export class DeployImageComponent implements OnInit { backdropClass: 'non-clickable-backdrop' }); - this.toastService.info('Preparando petición de despliegue'); + this.toastService.info(this.translate.instant('preparandoPeticionDeDespliegue')); dialogRef.afterClosed().subscribe(result => { if (result !== undefined) { @@ -428,7 +431,7 @@ export class DeployImageComponent implements OnInit { this.http.post(url, payload) .subscribe({ next: (response) => { - this.toastService.success('Petición de despliegue enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeDespliegueEnviadaCorrectamente')); this.loading = false; this.router.navigate(['/commands-logs']); }, @@ -573,7 +576,7 @@ export class DeployImageComponent implements OnInit { type: 'deploy-image', }).subscribe({ next: () => { - this.toastService.success('Script añadido con éxito a la tarea'); + this.toastService.success(this.translate.instant('scriptAnadidoConExitoA')); }, error: (error) => { this.toastService.error(error.error['hydra:description']); @@ -632,7 +635,7 @@ export class DeployImageComponent implements OnInit { } }, error => { - this.toastService.error('Error al cargar los repositorios git'); + this.toastService.error(this.translate.instant('errorAlCargarLosRepositorios1')); this.loadingRepositories = false; } ); @@ -662,7 +665,7 @@ export class DeployImageComponent implements OnInit { } }, error => { - this.toastService.error('Error al cargar las ramas'); + this.toastService.error(this.translate.instant('errorAlCargarLasRamas')); this.loadingBranches = false; } ); @@ -694,7 +697,7 @@ export class DeployImageComponent implements OnInit { } }, error => { - this.toastService.error('Error al cargar los commits'); + this.toastService.error(this.translate.instant('errorAlCargarLosCommits')); this.loadingCommits = false; } ); diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts index a0e196a..faa5c97 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts @@ -1,4 +1,6 @@ -import {Component, EventEmitter, Inject, Input, OnInit, Output, AfterViewInit, OnDestroy, ViewChild, ElementRef, HostListener} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, EventEmitter, Inject, Input, OnInit, Output, AfterViewInit, OnDestroy, ViewChild, ElementRef, HostListener } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ToastrService } from 'ngx-toastr'; import {ActivatedRoute, Router} from "@angular/router"; @@ -32,6 +34,7 @@ interface Partition { styleUrls: ['./partition-assistant.component.css'] }) export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDestroy{ + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @Output() dataChange = new EventEmitter(); @@ -190,7 +193,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes this.initializeDisks(); }, (error) => { - console.error('Error al cargar los datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarLosDatos1'), error); } ); } @@ -412,7 +415,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes this.resizeChart(); }, 100); } else { - this.toastService.error('No hay suficiente espacio libre en el disco para crear una nueva partición.'); + this.toastService.error(this.translate.instant('noHaySuficienteEspacioLibre')); } } } @@ -457,7 +460,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes } if (!this.selectedDisk) { - this.toastService.error('No se ha seleccionado un disco.'); + this.toastService.error(this.translate.instant('noSeHaSeleccionadoUn')); return; } @@ -466,14 +469,14 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes .reduce((sum: any, partition: any) => sum + partition.size, 0); if (totalPartitionSize > this.selectedDisk.totalDiskSize) { - this.toastService.error('El tamaño total de las particiones en el disco seleccionado excede el tamaño total del disco.'); + this.toastService.error(this.translate.instant('elTamanoTotalDeLas')); return; } const modifiedPartitions = this.selectedDisk.partitions.filter((partition: { removed: any; format: any; }) => !partition.removed || partition.format); if (modifiedPartitions.length === 0) { - this.toastService.info('No hay cambios para guardar en el disco seleccionado.'); + this.toastService.info(this.translate.instant('noHayCambiosParaGuardar')); return; } @@ -507,13 +510,13 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes this.http.post(this.apiUrl, bulkPayload).subscribe( (response) => { - this.toastService.success('Particiones creadas exitosamente para el disco seleccionado.'); + this.toastService.success(this.translate.instant('particionesCreadasExitosamenteParaEl')); this.loading = false; this.router.navigate(['/commands-logs']); }, (error) => { this.loading = false; - this.toastService.error('Error al crear las particiones.'); + this.toastService.error(this.translate.instant('errorAlCrearLasParticiones')); } ); } @@ -680,7 +683,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes if (modifiedPartitions.length === 0) { this.loading = false; - this.toastService.info('No hay cambios para guardar en el disco seleccionado.'); + this.toastService.info(this.translate.instant('noHayCambiosParaGuardar')); return; } @@ -711,7 +714,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes type: 'partition-assistant', }).subscribe({ next: () => { - this.toastService.success('Script añadido con éxito a la tarea'); + this.toastService.success(this.translate.instant('scriptAnadidoConExitoA')); }, error: (error) => { this.toastService.error(error.error['hydra:description']); @@ -723,7 +726,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes generateInstructions(): void { if (!this.selectedModelClient || !this.selectedDisk) { - this.toastService.error('Selecciona un cliente modelo y un disco.'); + this.toastService.error(this.translate.instant('seleccionaUnClienteModeloY')); return; } @@ -777,8 +780,8 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes copyInstructions(): void { if (!this.generatedInstructions) { return; } navigator.clipboard?.writeText(this.generatedInstructions) - .then(() => this.toastService.success('Script copiado al portapapeles')) - .catch(() => this.toastService.error('No se pudo copiar el script.')); + .then(() => this.toastService.success(this.translate.instant('scriptCopiadoAlPortapapeles'))) + .catch(() => this.toastService.error(this.translate.instant('noSePudoCopiarEl'))); } @@ -837,7 +840,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes }); console.log('Scroll hacia botón ejecutar completado'); } else { - console.error('No se encontró el botón execute-button'); + console.error(this.translate.instant('noSeEncontroElBoton')); } } diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.html b/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.html index c2e8e77..e050c59 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.html @@ -125,7 +125,7 @@ [(ngModel)]="newScript" (ngModelChange)="onNewScriptChange()" rows="8" - placeholder="{{'bashScriptBoilerplate'|translate}}" + [placeholder]="'bashScriptBoilerplate'|translate" class="script-textarea"> {{ 'writeShellCommandsHint' | translate }} diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.ts index 2366286..e1a56f5 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/run-script-assistant.component.ts @@ -1,4 +1,6 @@ -import {Component, EventEmitter, OnInit, Output} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, EventEmitter, OnInit, Output } from '@angular/core'; import { SelectionModel } from "@angular/cdk/collections"; import { HttpClient } from "@angular/common/http"; import { ToastrService } from "ngx-toastr"; @@ -15,6 +17,7 @@ import {QueueConfirmationModalComponent} from "../../../../../shared/queue-confi styleUrl: './run-script-assistant.component.css' }) export class RunScriptAssistantComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; @Output() dataChange = new EventEmitter(); @@ -96,7 +99,7 @@ export class RunScriptAssistantComponent implements OnInit{ saveNewScript() { if (!this.newScript.trim()) { - this.toastService.error('Debe ingresar un script antes de guardar.'); + this.toastService.error(this.translate.instant('debeIngresarUnScriptAntes')); return; } const dialogRef = this.dialog.open(SaveScriptComponent, { @@ -106,7 +109,7 @@ export class RunScriptAssistantComponent implements OnInit{ dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Script guardado correctamente'); + this.toastService.success(this.translate.instant('scriptGuardadoCorrectamente')); } }); } @@ -205,13 +208,13 @@ export class RunScriptAssistantComponent implements OnInit{ runAsAdmin: this.runAsAdmin }).subscribe( response => { - this.toastService.success('Script ejecutado correctamente'); + this.toastService.success(this.translate.instant('scriptEjecutadoCorrectamente')); this.dataChange.emit(); this.router.navigate(['/commands-logs']); this.loading = false; }, error => { - this.toastService.error('Error al ejecutar el script'); + this.toastService.error(this.translate.instant('errorAlEjecutarElScript')); this.loading = false; } ); @@ -258,7 +261,7 @@ export class RunScriptAssistantComponent implements OnInit{ type: 'run-script', }).subscribe({ next: () => { - this.toastService.success('Script añadido con éxito a la tarea'); + this.toastService.success(this.translate.instant('scriptAnadidoConExitoA')); }, error: (error) => { this.toastService.error(error.error['hydra:description']); diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/save-script/save-script.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/save-script/save-script.component.ts index 2fde430..e11c502 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/save-script/save-script.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/run-script-assistant/save-script/save-script.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject } from '@angular/core'; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {FormBuilder, Validators} from "@angular/forms"; import {HttpClient} from "@angular/common/http"; @@ -12,6 +14,7 @@ import {DataService} from "../../../../../commands/main-commands/data.service"; styleUrl: './save-script.component.css' }) export class SaveScriptComponent { + public translate = inject(TranslateService); commandName: string = ''; baseUrl: string; @@ -36,7 +39,7 @@ export class SaveScriptComponent { this.http.post(`${this.baseUrl}/commands`, payload).subscribe( (response) => { - this.toastService.success('Comando añadido correctamente'); + this.toastService.success(this.translate.instant('comandoAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts index 53f8144..fabbec2 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, OnDestroy, ViewChild, QueryList, ViewChildren, ChangeDetectorRef } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Router } from '@angular/router'; @@ -48,6 +50,7 @@ enum NodeType { styleUrls: ['./groups.component.css'], }) export class GroupsComponent implements OnInit, OnDestroy { + public translate = inject(TranslateService); @ViewChildren(MatMenuTrigger) menuTriggers!: QueryList; isSmallScreen: boolean = false; baseUrl: string; @@ -283,7 +286,7 @@ export class GroupsComponent implements OnInit, OnDestroy { // this.savedFilterNames = data.map((filter: { name: string; uuid: string; }) => [filter.name, filter.uuid]); // }, // (error) => { - // console.error('Error fetching filters:', error); + // console.error(this.translate.instant('errorFetchingFilters1'), error); // } // ) // ); @@ -297,7 +300,7 @@ export class GroupsComponent implements OnInit, OnDestroy { this.savedFilterNames = data.map((filter: { name: string; uuid: string; }) => [filter.name, filter.uuid]); }, (error) => { - console.error('Error fetching filters:', error); + console.error(this.translate.instant('errorFetchingFilters1'), error); } ) ); @@ -350,8 +353,8 @@ export class GroupsComponent implements OnInit, OnDestroy { } }, error: (error) => { - console.error('Error fetching organizational units', error); - this.toastr.error('Ocurrió un error al cargar las unidades organizativas'); + console.error(this.translate.instant('errorFetchingOrganizationalUnits'), error); + this.toastr.error(this.translate.instant('ocurrioUnErrorAlCargar')); }, }); } @@ -561,7 +564,7 @@ export class GroupsComponent implements OnInit, OnDestroy { console.log('Nodo padre encontrado para actualización:', parentNode); this.refreshData(parentNode.uuid); } else { - console.error('No se encontró el nodo padre después de la creación masiva.'); + console.error(this.translate.instant('noSeEncontroElNodo')); } } this.loading = false; @@ -635,7 +638,7 @@ export class GroupsComponent implements OnInit, OnDestroy { } }, error: (error) => { - console.error('Error deleting entity:', error); + console.error(this.translate.instant('errorDeletingEntity'), error); const entityType = type === NodeType.Client ? 'cliente' : 'entidad'; this.toastr.error(`Error al eliminar el ${entityType}`); }, @@ -675,7 +678,7 @@ export class GroupsComponent implements OnInit, OnDestroy { }); }, (error) => { - console.error('Error fetching room data:', error); + console.error(this.translate.instant('errorFetchingRoomData'), error); } ) ); @@ -685,7 +688,7 @@ export class GroupsComponent implements OnInit, OnDestroy { executeCommand(command: Command, selectedNode: TreeNode | null): void { this.loading = true; if (!selectedNode) { - this.toastr.error('No hay un nodo seleccionado.'); + this.toastr.error(this.translate.instant('noHayUnNodoSeleccionado')); return; } else { this.toastr.success(`Ejecutando comando: ${command.name} en ${selectedNode.name}`); @@ -834,7 +837,7 @@ export class GroupsComponent implements OnInit, OnDestroy { this.subscriptions.add( this.http.post(`${this.baseUrl}${client['@id']}/agent/status`, {}).subscribe( () => { - this.toastr.success('Cliente actualizado correctamente'); + this.toastr.success(this.translate.instant('clienteActualizadoCorrectamente')); this.syncingClientIds.delete(client.uuid); this.refreshData(parentNodeId) }, @@ -869,12 +872,12 @@ export class GroupsComponent implements OnInit, OnDestroy { }); this.arrayClients = this.selectedClients.data; this.calculateLocalStats(); - this.toastr.success('Estado del aula actualizado'); + this.toastr.success(this.translate.instant('estadoDelAulaActualizado')); }, error: () => { this.isCheckingNodeStatus = false; this.selectedClients.data.forEach(c => c.uuid && this.syncingClientIds.delete(c.uuid)); - this.toastr.error('Error al comprobar el estado del aula'); + this.toastr.error(this.translate.instant('errorAlComprobarElEstado')); }, }) ); @@ -1054,14 +1057,14 @@ export class GroupsComponent implements OnInit, OnDestroy { `); } } else { - this.toastr.error('No se puede acceder a los logs: IP del cliente no disponible', 'Error'); + this.toastr.error(this.translate.instant('noSePuedeAccederA'), 'Error'); } } 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'); + this.toastr.error(this.translate.instant('noSePuedeAccederA1'), 'Error'); return; } @@ -1088,7 +1091,7 @@ export class GroupsComponent implements OnInit, OnDestroy { const allClients = response['hydra:member'] || []; if (allClients.length === 0) { - this.toastr.warning('Esta unidad organizativa no tiene clientes'); + this.toastr.warning(this.translate.instant('estaUnidadOrganizativaNoTiene')); return; } @@ -1113,8 +1116,8 @@ export class GroupsComponent implements OnInit, OnDestroy { }); }, error: (error) => { - console.error('Error al obtener los clientes de la unidad organizativa:', error); - this.toastr.error('Error al cargar los clientes de la unidad organizativa'); + console.error(this.translate.instant('errorAlObtenerLosClientes1'), error); + this.toastr.error(this.translate.instant('errorAlCargarLosClientes')); this.loading = false; } }); @@ -1135,7 +1138,7 @@ export class GroupsComponent implements OnInit, OnDestroy { refreshClientData(): void { this.fetchClientsForNode(this.selectedNode); - this.toastr.success('Datos actualizados', 'Éxito'); + this.toastr.success(this.translate.instant('datosActualizados'), 'Éxito'); } exportToCSV(): void { @@ -1164,7 +1167,7 @@ export class GroupsComponent implements OnInit, OnDestroy { link.click(); document.body.removeChild(link); - this.toastr.success('Archivo CSV exportado correctamente', 'Éxito'); + this.toastr.success(this.translate.instant('archivoCsvExportadoCorrectamente'), 'Éxito'); } private calculateLocalStats(): void { @@ -1318,7 +1321,7 @@ export class GroupsComponent implements OnInit, OnDestroy { event.stopPropagation(); if (this.selection.selected.length === 0) { - this.toastr.warning('No hay clientes seleccionados para eliminar'); + this.toastr.warning(this.translate.instant('noHayClientesSeleccionadosPara')); return; } @@ -1355,8 +1358,8 @@ export class GroupsComponent implements OnInit, OnDestroy { }, error: (error) => { this.loading = false; - console.error('Error deleting multiple clients:', error); - this.toastr.error('Error al eliminar los clientes seleccionados'); + console.error(this.translate.instant('errorDeletingMultipleClients1'), error); + this.toastr.error(this.translate.instant('errorAlEliminarLosClientes')); } }); } diff --git a/ogWebconsole/src/app/components/groups/services/data.service.ts b/ogWebconsole/src/app/components/groups/services/data.service.ts index ff2698b..ab2fb96 100644 --- a/ogWebconsole/src/app/components/groups/services/data.service.ts +++ b/ogWebconsole/src/app/components/groups/services/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import {HttpClient, HttpParams} from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -9,6 +11,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -35,7 +38,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching unidades organizativas', error); + console.error(this.translate.instant('errorFetchingUnidadesOrganizativas'), error); return throwError(error); }) ); @@ -51,7 +54,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching children', error); + console.error(this.translate.instant('errorFetchingChildren'), error); return throwError(error); }) ); @@ -67,7 +70,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching clients', error); + console.error(this.translate.instant('errorFetchingClients'), error); return throwError(error); }) ); @@ -84,7 +87,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching clients', error); + console.error(this.translate.instant('errorFetchingClients'), error); return throwError(error); }) ); @@ -101,7 +104,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching clients', error); + console.error(this.translate.instant('errorFetchingClients'), error); return throwError(error); }) ); @@ -118,7 +121,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching clients', error); + console.error(this.translate.instant('errorFetchingClients'), error); return throwError(error); }) ); @@ -132,7 +135,7 @@ export class DataService { console.log('DELETE URL:', url); // Depuración return this.http.delete(url).pipe( catchError(error => { - console.error('Error deleting element', error); + console.error(this.translate.instant('errorDeletingElement'), error); return throwError(error); }) ); @@ -144,7 +147,7 @@ export class DataService { // @ts-ignore return this.http.post(url).pipe( catchError(error => { - console.error('Error deleting element', error); + console.error(this.translate.instant('errorDeletingElement'), error); return throwError(error); }) ); @@ -185,7 +188,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching data', error); + console.error(this.translate.instant('errorFetchingData'), error); return throwError(error); }) ); @@ -201,7 +204,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching filters', error); + console.error(this.translate.instant('errorFetchingFilters'), error); return throwError(error); }) ); @@ -219,7 +222,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching filters', error); + console.error(this.translate.instant('errorFetchingFilters'), error); return throwError(error); }) ); @@ -229,7 +232,7 @@ export class DataService { const url = `${this.baseUrl}/organizational-units/${id}`; return this.http.get(url).pipe( catchError(error => { - console.error('Error fetching organizational unit', error); + console.error(this.translate.instant('errorFetchingOrganizationalUnit'), error); return throwError(error); }) ); @@ -255,7 +258,7 @@ export class DataService { return this.http.post(url, body).pipe( catchError(error => { - console.error('Error deleting multiple clients', error); + console.error(this.translate.instant('errorDeletingMultipleClients'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/groups/shared/change-parent/change-parent.component.ts b/ogWebconsole/src/app/components/groups/shared/change-parent/change-parent.component.ts index 95a3256..16c231f 100644 --- a/ogWebconsole/src/app/components/groups/shared/change-parent/change-parent.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/change-parent/change-parent.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {HttpClient} from "@angular/common/http"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {ToastrService} from "ngx-toastr"; @@ -11,6 +13,7 @@ import {ConfigService} from "@services/config.service"; styleUrl: './change-parent.component.css' }) export class ChangeParentComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = true; units: any[] = []; @@ -38,7 +41,7 @@ export class ChangeParentComponent implements OnInit { this.units = response['hydra:member']; this.loading = false; }, - error => console.error('Error fetching organizational units:', error) + error => console.error(this.translate.instant('errorFetchingOrganizationalUnits1'), error) ); } @@ -48,7 +51,7 @@ export class ChangeParentComponent implements OnInit { organizationalUnit: this.newOU['@id'] }).subscribe({ next: (response) => { - this.toastService.success('Parent changed successfully'); + this.toastService.success(this.translate.instant('parentChangedSuccessfully')); this.dialogRef.close(true); }, error: error => { diff --git a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts index 2bc4d9a..584541a 100644 --- a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Input, OnInit, OnChanges } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ClientViewComponent } from "../client-view/client-view.component"; @@ -17,6 +19,7 @@ interface GroupedClients { styleUrls: ['./classroom-view.component.css'] }) export class ClassroomViewComponent implements OnInit, OnChanges { + public translate = inject(TranslateService); baseUrl: string; @Input() clients: any[] = []; @Input() pcInTable: number = 5; @@ -93,7 +96,7 @@ export class ClassroomViewComponent implements OnInit, OnChanges { this.http.patch(url, payload).subscribe(response => { this.openSnackBar(false, 'Plano actualizado!'); }, error => { - console.error('Error al actualizar cliente:', error); + console.error(this.translate.instant('errorAlActualizarCliente1'), error); this.openSnackBar(true, error); }); }); @@ -103,8 +106,8 @@ export class ClassroomViewComponent implements OnInit, OnChanges { openSnackBar(isError: boolean, message: string) { if (isError) { - this.toastService.error(' Error al actualizar cliente: ' + message, 'Error'); + this.toastService.error(this.translate.instant('errorAlActualizarCliente') + message, 'Error'); } else - this.toastService.success('Cliente actualizado!', 'Éxito'); + this.toastService.success(this.translate.instant('clienteActualizado'), 'Éxito'); } } diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html index 54044e2..d4f72e1 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.html @@ -60,7 +60,7 @@ @for (column of columns; track column.columnDef) { - + +
{{ column.header }} {{ column.header | translate }} @if (column.columnDef !== 'size' && column.columnDef !== 'operativeSystem') { {{ column.cell(image) }} diff --git a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts index 055ec00..bcf01a9 100644 --- a/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/client-details/client-details.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; import { Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @@ -20,6 +22,7 @@ interface ClientInfo { styleUrl: './client-details.component.css' }) export class ClientDetailsComponent { + public translate = inject(TranslateService); baseUrl: string; @ViewChild('assistantContainer') assistantContainer!: ElementRef; clientUuid: string; @@ -43,32 +46,32 @@ export class ClientDetailsComponent { columns = [ { columnDef: 'partition', - header: 'Partición', + header: 'particion1', cell: (partition: any) => `${partition.partitionNumber}` }, { columnDef: 'partitionCode', - header: 'Tipo de partición', + header: 'tipoDeParticion', cell: (partition: any) => partition.partitionCode }, { columnDef: 'description', - header: 'Sistema de ficheros', + header: 'sistemaDeFicheros', cell: (partition: any) => partition.filesystem }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (partition: any) => `${(partition.size / 1024).toFixed(2)} GB` }, { columnDef: 'memoryUsage', - header: 'Uso', + header: 'uso', cell: (partition: any) => `${partition.memoryUsage}%` }, { columnDef: 'operativeSystem', - header: 'SO/Imagen', + header: 'soimagen', cell: (partition: any) => partition.operativeSystem?.name } ]; @@ -99,7 +102,7 @@ export class ClientDetailsComponent { this.loadPartitions(); this.loading = false; } else { - console.error('No se recibieron datos del cliente.'); + console.error(this.translate.instant('noSeRecibieronDatosDel')); } } @@ -190,7 +193,7 @@ export class ClientDetailsComponent { this.calculateDiskUsage(); }, error: error => { - console.error('Error al obtener las particiones:', error); + console.error(this.translate.instant('errorAlObtenerLasParticiones'), error); } }); } diff --git a/ogWebconsole/src/app/components/groups/shared/clients/create-multiple-client/create-multiple-client.component.ts b/ogWebconsole/src/app/components/groups/shared/clients/create-multiple-client/create-multiple-client.component.ts index c8eb724..8007062 100644 --- a/ogWebconsole/src/app/components/groups/shared/clients/create-multiple-client/create-multiple-client.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/clients/create-multiple-client/create-multiple-client.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit, Optional } from '@angular/core'; import { MatDialogRef } from "@angular/material/dialog"; import { HttpClient } from "@angular/common/http"; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-multiple-client.component.css' }) export class CreateMultipleClientComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string = this.configService.apiUrl; parentUnits: any[] = []; parentUnitsWithPaths: { id: string, name: string, path: string }[] = []; @@ -56,7 +59,7 @@ export class CreateMultipleClientComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching parent units:', error); + console.error(this.translate.instant('errorFetchingParentUnits'), error); this.loading = false; } ); @@ -91,10 +94,10 @@ export class CreateMultipleClientComponent implements OnInit { if (clients.length > 0) { this.uploadedClients = clients; - this.toastService.success('Archivo cargado correctamente, los datos están listos para enviarse.', 'Éxito'); + this.toastService.success(this.translate.instant('archivoCargadoCorrectamenteLosDatos'), 'Éxito'); this.showTextarea = false; } else { - this.toastService.error('No se encontraron datos válidos', 'Error'); + this.toastService.error(this.translate.instant('noSeEncontraronDatosValidos'), 'Error'); this.showTextarea = true; } }; @@ -117,10 +120,10 @@ export class CreateMultipleClientComponent implements OnInit { if (clients.length > 0) { this.uploadedClients = clients; - this.toastService.success('Datos cargados correctamente, los datos están listos para enviarse.', 'Éxito'); + this.toastService.success(this.translate.instant('datosCargadosCorrectamenteLosDatos'), 'Éxito'); this.showTextarea = false; } else { - this.toastService.error('No se encontraron datos válidos', 'Error'); + this.toastService.error(this.translate.instant('noSeEncontraronDatosValidos'), 'Error'); this.showTextarea = true; } } @@ -154,7 +157,7 @@ export class CreateMultipleClientComponent implements OnInit { ); }); } else { - this.toastService.error('No hay clientes cargados para añadir', 'Error'); + this.toastService.error(this.translate.instant('noHayClientesCargadosPara'), 'Error'); } } diff --git a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts index 34b141e..585bc2c 100644 --- a/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/clients/manage-client/manage-client.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./manage-client.component.css'] }) export class ManageClientComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; clientForm!: FormGroup; parentUnits: any[] = []; @@ -66,7 +69,7 @@ export class ManageClientComponent implements OnInit { this.loading = false; } }).catch(error => { - console.error('Error loading data:', error); + console.error(this.translate.instant('errorLoadingData'), error); this.loading = false; }); } @@ -122,7 +125,7 @@ export class ManageClientComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching parent units:', error); + console.error(this.translate.instant('errorFetchingParentUnits'), error); reject(error); } ); @@ -145,7 +148,7 @@ export class ManageClientComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching ogLives by server:', error); + console.error(this.translate.instant('errorFetchingOglivesByServer'), error); this.ogLives = []; resolve(); // resolve anyway so form doesn't block } @@ -163,7 +166,7 @@ export class ManageClientComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching PXE templates by server:', error); + console.error(this.translate.instant('errorFetchingPxeTemplatesBy'), error); this.templates = []; resolve(); } @@ -181,7 +184,7 @@ export class ManageClientComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching BootServers:', error); + console.error(this.translate.instant('errorFetchingBootservers'), error); reject(error); } ); @@ -212,7 +215,7 @@ export class ManageClientComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching menus:', error); + console.error(this.translate.instant('errorFetchingMenus1'), error); reject(error); } ); @@ -229,7 +232,7 @@ export class ManageClientComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching repositories:', error); + console.error(this.translate.instant('errorFetchingRepositories1'), error); reject(error); } ); @@ -313,7 +316,7 @@ export class ManageClientComponent implements OnInit { } }, error => { - console.error('Error al cargar datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarDatosDel'), error); reject(error); } ); @@ -331,17 +334,17 @@ export class ManageClientComponent implements OnInit { this.http.patch(putUrl, formData, { headers }).subscribe( response => { this.dialogRef.close({ success: true }); - this.toastService.success('Cliente actualizado exitosamente', 'Éxito'); + this.toastService.success(this.translate.instant('clienteActualizadoExitosamente'), 'Éxito'); }, error => { - console.error('Error al realizar PUT:', error); - this.toastService.error('Error al actualizar el cliente: ' + error.error['hydra:description'], 'Error'); + console.error(this.translate.instant('errorAlRealizarPut'), error); + this.toastService.error(this.translate.instant('errorAlActualizarElCliente') + error.error['hydra:description'], 'Error'); } ); } else { this.http.post(`${this.baseUrl}/clients`, formData).subscribe( (response) => { - this.toastService.success('Cliente creado exitosamente', 'Éxito'); + this.toastService.success(this.translate.instant('clienteCreadoExitosamente'), 'Éxito'); this.dialogRef.close({ success: true, client: response, @@ -354,7 +357,7 @@ export class ManageClientComponent implements OnInit { ); } } else { - this.toastService.error('Formulario inválido. Por favor, revise los campos obligatorios.', 'Error'); + this.toastService.error(this.translate.instant('formularioInvalidoPorFavorRevise'), 'Error'); } } diff --git a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html index c4bfcac..470ef10 100644 --- a/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html +++ b/ogWebconsole/src/app/components/groups/shared/disk-partition-selector/disk-partition-selector.component.html @@ -22,7 +22,7 @@ @for (column of columns; track column.columnDef) { - {{ column.header }} {{ column.header | translate }} @if (column.columnDef === 'size') {
diff --git a/ogWebconsole/src/app/components/groups/shared/execute-command-ou/execute-command-ou.component.ts b/ogWebconsole/src/app/components/groups/shared/execute-command-ou/execute-command-ou.component.ts index 87165a2..7098e39 100644 --- a/ogWebconsole/src/app/components/groups/shared/execute-command-ou/execute-command-ou.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/execute-command-ou/execute-command-ou.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./execute-command-ou.component.css'] }) export class ExecuteCommandOuComponent implements OnInit { + public translate = inject(TranslateService); form: FormGroup; clients: any[] = []; commands: any[] = []; @@ -46,7 +49,7 @@ export class ExecuteCommandOuComponent implements OnInit { const clientIds = this.clients.map(client => client.uuid); this.form.get('clientSelection')?.setValue(clientIds); }, - error => console.error('Error al cargar los clientes:', error) + error => console.error(this.translate.instant('errorAlCargarLosClientes1'), error) ); } @@ -65,7 +68,7 @@ export class ExecuteCommandOuComponent implements OnInit { response => { this.commands = response['hydra:member'] || []; }, - error => this.toastService.error('Error al cargar comandos:', error) + error => this.toastService.error(this.translate.instant('errorAlCargarComandos'), error) ); } @@ -74,7 +77,7 @@ export class ExecuteCommandOuComponent implements OnInit { response => { this.commandGroups = response['hydra:member'] || []; }, - error => this.toastService.error('Error al cargar grupos de comandos:', error) + error => this.toastService.error(this.translate.instant('errorAlCargarGruposDe'), error) ); } @@ -107,11 +110,11 @@ export class ExecuteCommandOuComponent implements OnInit { this.http.post(url, payload) .subscribe({ next: () => { - this.toastService.success('Comando ejecutado con éxito'); + this.toastService.success(this.translate.instant('comandoEjecutadoConExito')); this.dialogRef.close(true); }, error: (error) => { - this.toastService.error('Error al ejecutar el comando:', error); + this.toastService.error(this.translate.instant('errorAlEjecutarElComando'), error); this.dialogRef.close(false); } }); diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.ts index dc4bf33..915cb69 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/manage-organizational-unit/manage-organizational-unit.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; @@ -13,6 +15,7 @@ import { DeleteModalComponent } from '../../../../../shared/delete_modal/delete- styleUrls: ['./manage-organizational-unit.component.css'] }) export class ManageOrganizationalUnitComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; isLinear = true; generalFormGroup: FormGroup; @@ -128,7 +131,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { this.loading = false; } }).catch(error => { - console.error('Error loading data:', error); + console.error(this.translate.instant('errorLoadingData'), error); this.loading = false; }); } @@ -173,7 +176,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching parent units:', error); + console.error(this.translate.instant('errorFetchingParentUnits'), error); reject(error); } ); @@ -286,8 +289,8 @@ export class ManageOrganizationalUnitComponent implements OnInit { }, error => { - console.error('Error fetching data for edit:', error); - this.toastService.error('Error fetching data'); + console.error(this.translate.instant('errorFetchingDataForEdit'), error); + this.toastService.error(this.translate.instant('errorFetchingData')); reject(error); this.onNoClick(); } @@ -301,8 +304,8 @@ export class ManageOrganizationalUnitComponent implements OnInit { const confirmRef = this.dialog.open(DeleteModalComponent, { width: '400px', data: { - title: 'Propagar parámetros', - message: '¿Desea propagar los parámetros de red (ogLive, repositorio, menú, plantilla PXE, perfil hardware) a todos los clientes de esta unidad organizativa?', + title : this.translate.instant('propagarParametros'), + message : this.translate.instant('deseaPropagarLosParametrosDe'), confirmText: 'Sí, propagar', cancelText: 'No, solo guardar', } @@ -351,11 +354,11 @@ export class ManageOrganizationalUnitComponent implements OnInit { } else { this.unitAdded.emit(); this.dialogRef.close({ success: true }); - this.toastService.success('Editado exitosamente', 'Éxito'); + this.toastService.success(this.translate.instant('editadoExitosamente'), 'Éxito'); } }, error => { - console.error('Error al realizar PUT:', error); + console.error(this.translate.instant('errorAlRealizarPut'), error); const errorMessages = error.error['hydra:description'].split('\n'); errorMessages.forEach((message: string) => { const cleanedMessage = message.replace(/networkSettings\.(\w+):/, 'Error $1:'); @@ -371,10 +374,10 @@ export class ManageOrganizationalUnitComponent implements OnInit { response => { this.unitAdded.emit(response); this.dialogRef.close({ success: true }); - this.toastService.success('Creado exitosamente', 'Éxito'); + this.toastService.success(this.translate.instant('creadoExitosamente'), 'Éxito'); }, error => { - console.error('Error al realizar POST:', error); + console.error(this.translate.instant('errorAlRealizarPost'), error); const errorMessages = error.error['hydra:description'].split('\n'); errorMessages.forEach((message: string) => { const cleanedMessage = message.replace(/networkSettings\.(\w+):/, 'Error $1:'); @@ -393,13 +396,13 @@ export class ManageOrganizationalUnitComponent implements OnInit { () => { this.unitAdded.emit(); this.dialogRef.close({ success: true }); - this.toastService.success('Editado y parámetros propagados exitosamente', 'Éxito'); + this.toastService.success(this.translate.instant('editadoYParametrosPropagadosExitosamente'), 'Éxito'); }, error => { - console.error('Error al propagar parámetros:', error); + console.error(this.translate.instant('errorAlPropagarParametros'), error); this.unitAdded.emit(); this.dialogRef.close({ success: true }); - this.toastService.warning('Guardado, pero hubo un error al propagar los parámetros', 'Aviso'); + this.toastService.warning(this.translate.instant('guardadoPeroHuboUnError'), 'Aviso'); } ); } @@ -419,7 +422,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching BootServers:', error); + console.error(this.translate.instant('errorFetchingBootservers'), error); reject(error); } ); @@ -435,7 +438,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching ogLives by server:', error); + console.error(this.translate.instant('errorFetchingOglivesByServer'), error); this.ogLives = []; resolve(); } @@ -452,7 +455,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching PXE templates by server:', error); + console.error(this.translate.instant('errorFetchingPxeTemplatesBy'), error); this.pxeTemplates = []; resolve(); } @@ -481,7 +484,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching hardware profiles:', error); + console.error(this.translate.instant('errorFetchingHardwareProfiles'), error); reject(error); } ); @@ -500,7 +503,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching menus:', error); + console.error(this.translate.instant('errorFetchingMenus1'), error); reject(error); } ); @@ -517,7 +520,7 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error fetching ogLives:', error); + console.error(this.translate.instant('errorFetchingOglives'), error); reject(error); } ); @@ -533,8 +536,8 @@ export class ManageOrganizationalUnitComponent implements OnInit { resolve(); }, error => { - console.error('Error loading calendars', error); - this.toastService.error('Error loading current calendar'); + console.error(this.translate.instant('errorLoadingCalendars'), error); + this.toastService.error(this.translate.instant('errorLoadingCurrentCalendar')); reject(error); } ); diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts index ee02949..43f76bf 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; @@ -10,6 +12,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './show-organizational-unit.component.css' }) export class ShowOrganizationalUnitComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; displayedColumns: string[] = ['property', 'value']; currentCalendar: any; @@ -50,7 +53,7 @@ export class ShowOrganizationalUnitComponent implements OnInit { this.initializeData(); }, error => { - console.error('Error loading organizational unit', error); + console.error(this.translate.instant('errorLoadingOrganizationalUnit'), error); this.initializeData(); }); } @@ -63,7 +66,7 @@ export class ShowOrganizationalUnitComponent implements OnInit { this.initializeData(); }, error => { - console.error('Error loading current calendar', error); + console.error(this.translate.instant('errorLoadingCurrentCalendar'), error); this.initializeData(); } ); diff --git a/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.html b/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.html index f07ca7e..60133d5 100644 --- a/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.html +++ b/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.html @@ -11,7 +11,7 @@
- + diff --git a/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.ts b/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.ts index 00984da..9aab2bf 100644 --- a/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.ts +++ b/ogWebconsole/src/app/components/hardware-profile/hardware-collection-modal/hardware-collection-modal.component.ts @@ -14,22 +14,22 @@ export class HardwareCollectionModalComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (hardware: any) => hardware.id || hardware['@id']?.split('/').pop() || 'N/A' }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (hardware: any) => hardware.name || 'N/A' }, { columnDef: 'type', - header: 'Tipo', + header: 'tipo', cell: (hardware: any) => hardware.type || 'N/A' }, { columnDef: 'description', - header: 'Descripción', + header: 'descripcion', cell: (hardware: any) => hardware.description || 'N/A' } ]; diff --git a/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.html b/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.html index 7319929..b447a71 100644 --- a/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.html +++ b/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.html @@ -39,7 +39,7 @@
{{ column.header }} {{ column.header | translate }} {{ column.cell(hardware) }}
- +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.ts b/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.ts index f16f0dd..3ea8bc3 100644 --- a/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.ts +++ b/ogWebconsole/src/app/components/hardware-profile/hardware-profile.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -19,6 +21,7 @@ import { FormControl } from '@angular/forms'; styleUrl: './hardware-profile.component.css' }) export class HardwareProfileComponent { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -37,17 +40,17 @@ export class HardwareProfileComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (hardware: any) => `${hardware.id}`, }, { columnDef: 'description', - header: 'Descripción', + header: 'descripcion', cell: (hardware: any) => hardware.description }, { columnDef: 'client', - header: 'Cliente', + header: 'cliente', cell: (hardware: any) => hardware.client ? { name: hardware.client.name || 'N/A', ip: hardware.client.ip || 'N/A', @@ -56,7 +59,7 @@ export class HardwareProfileComponent { }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (hardware: any) => `${this.datePipe.transform(hardware.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -91,7 +94,7 @@ export class HardwareProfileComponent { this.length = data['hydra:totalItems']; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); } ); } @@ -142,10 +145,10 @@ export class HardwareProfileComponent { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Hardware deleted successfully'); + this.toastService.success(this.translate.instant('hardwareDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting hardware'); + this.toastService.error(this.translate.instant('errorDeletingHardware')); } }); } else { @@ -185,8 +188,8 @@ export class HardwareProfileComponent { this.openHardwareCollectionModal(hardwareProfile); }, error: (error) => { - console.error('Error fetching hardware profile details:', error); - this.toastService.error('Error al obtener los detalles del perfil de hardware'); + console.error(this.translate.instant('errorFetchingHardwareProfileDetails'), error); + this.toastService.error(this.translate.instant('errorAlObtenerLosDetalles')); } }); } diff --git a/ogWebconsole/src/app/components/hardware-type/hardware-type.component.html b/ogWebconsole/src/app/components/hardware-type/hardware-type.component.html index 1daa18f..8f3f93f 100644 --- a/ogWebconsole/src/app/components/hardware-type/hardware-type.component.html +++ b/ogWebconsole/src/app/components/hardware-type/hardware-type.component.html @@ -36,7 +36,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/hardware-type/hardware-type.component.ts b/ogWebconsole/src/app/components/hardware-type/hardware-type.component.ts index e615a0b..cc906cd 100644 --- a/ogWebconsole/src/app/components/hardware-type/hardware-type.component.ts +++ b/ogWebconsole/src/app/components/hardware-type/hardware-type.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -15,6 +17,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './hardware-type.component.css' }) export class HardwareTypeComponent { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -30,27 +33,27 @@ export class HardwareTypeComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (hardware: any) => `${hardware.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (hardware: any) => hardware.name }, { columnDef: 'code', - header: 'Código', + header: 'codigo', cell: (hardware: any) => hardware.code }, { columnDef: 'description', - header: 'Descripción', + header: 'descripcion', cell: (hardware: any) => hardware.description }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (hardware: any) => `${this.datePipe.transform(hardware.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -78,7 +81,7 @@ export class HardwareTypeComponent { this.length = data['hydra:totalItems']; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); } ); } @@ -96,10 +99,10 @@ export class HardwareTypeComponent { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Hardware deleted successfully'); + this.toastService.success(this.translate.instant('hardwareDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting hardware'); + this.toastService.error(this.translate.instant('errorDeletingHardware')); } }); } else { diff --git a/ogWebconsole/src/app/components/hardware/hardware.component.html b/ogWebconsole/src/app/components/hardware/hardware.component.html index 9a9e03b..92abc46 100644 --- a/ogWebconsole/src/app/components/hardware/hardware.component.html +++ b/ogWebconsole/src/app/components/hardware/hardware.component.html @@ -36,7 +36,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/hardware/hardware.component.ts b/ogWebconsole/src/app/components/hardware/hardware.component.ts index be906b3..0ac6ad9 100644 --- a/ogWebconsole/src/app/components/hardware/hardware.component.ts +++ b/ogWebconsole/src/app/components/hardware/hardware.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -16,6 +18,7 @@ import { CreateHardwareComponent } from './create-hardware/create-hardware.compo styleUrl: './hardware.component.css' }) export class HardwareComponent { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -31,22 +34,22 @@ export class HardwareComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (hardware: any) => `${hardware.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (hardware: any) => hardware.name }, { columnDef: 'type', - header: 'Tipo', + header: 'tipo', cell: (hardware: any) => hardware.type?.name || 'N/A' }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (hardware: any) => `${this.datePipe.transform(hardware.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -74,7 +77,7 @@ export class HardwareComponent { this.length = data['hydra:totalItems']; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); } ); } @@ -92,10 +95,10 @@ export class HardwareComponent { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Hardware deleted successfully'); + this.toastService.success(this.translate.instant('hardwareDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting hardware'); + this.toastService.error(this.translate.instant('errorDeletingHardware')); } }); } else { diff --git a/ogWebconsole/src/app/components/images/create-image/create-image.component.ts b/ogWebconsole/src/app/components/images/create-image/create-image.component.ts index 68aa01e..9f46486 100644 --- a/ogWebconsole/src/app/components/images/create-image/create-image.component.ts +++ b/ogWebconsole/src/app/components/images/create-image/create-image.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./create-image.component.css'] }) export class CreateImageComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; imageForm: FormGroup; imageId: string | null = null; @@ -72,7 +75,7 @@ export class CreateImageComponent implements OnInit { this.loading = false; }, error: (err) => { - console.error('Error fetching remote calendar:', err); + console.error(this.translate.instant('errorFetchingRemoteCalendar'), err); this.loading = false; } }); @@ -89,7 +92,7 @@ export class CreateImageComponent implements OnInit { this.softwareProfiles = response['hydra:member']; }, error: (error) => { - this.toastService.error('Error al obtener los perfiles de software'); + this.toastService.error(this.translate.instant('errorAlObtenerLosPerfiles')); } }); } @@ -101,7 +104,7 @@ export class CreateImageComponent implements OnInit { this.repositories = response['hydra:member']; }, error: (error) => { - this.toastService.error('Error al obtener los repositorios de imágenes'); + this.toastService.error(this.translate.instant('errorAlObtenerLosRepositorios')); } }); } @@ -120,7 +123,7 @@ export class CreateImageComponent implements OnInit { if (this.imageId) { this.http.put(`${this.baseUrl}${this.imageId}`, payload).subscribe( (response) => { - this.toastService.success('Imagen editada correctamente'); + this.toastService.success(this.translate.instant('imagenEditadaCorrectamente')); this.dialogRef.close(); }, (error) => { @@ -130,7 +133,7 @@ export class CreateImageComponent implements OnInit { } else { this.http.post(`${this.baseUrl}/images`, payload).subscribe( (response) => { - this.toastService.success('Imagen añadida correctamente'); + this.toastService.success(this.translate.instant('imagenAnadidaCorrectamente')); this.dialogRef.close(); }, (error) => { diff --git a/ogWebconsole/src/app/components/images/data.service.ts b/ogWebconsole/src/app/components/images/data.service.ts index 1a98166..1c297a2 100644 --- a/ogWebconsole/src/app/components/images/data.service.ts +++ b/ogWebconsole/src/app/components/images/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -31,7 +34,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); return throwError(error); }) ); @@ -47,7 +50,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching user group', error); + console.error(this.translate.instant('errorFetchingUserGroup'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/images/export-image/export-image.component.ts b/ogWebconsole/src/app/components/images/export-image/export-image.component.ts index ac21bac..64a4618 100644 --- a/ogWebconsole/src/app/components/images/export-image/export-image.component.ts +++ b/ogWebconsole/src/app/components/images/export-image/export-image.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { HttpClient } from "@angular/common/http"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './export-image.component.css' }) export class ExportImageComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = true; repositories: any[] = []; @@ -48,7 +51,7 @@ export class ExportImageComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching repositories:', error); + console.error(this.translate.instant('errorFetchingRepositories1'), error); this.loading = false; } ); @@ -60,14 +63,14 @@ export class ExportImageComponent implements OnInit { repositories: this.selectedRepositories }).subscribe({ next: (response) => { - this.toastService.success('Petición de exportación de imagen realizada correctamente'); + this.toastService.success(this.translate.instant('peticionDeExportacionDeImagen')); this.dialogRef.close(); this.loading = false; this.router.navigate(['/commands-logs']); }, error: error => { this.loading = false; - this.toastService.error('Error en la petición de exportación de imagen'); + this.toastService.error(this.translate.instant('errorEnLaPeticionDe')); } }); } diff --git a/ogWebconsole/src/app/components/images/images.component.html b/ogWebconsole/src/app/components/images/images.component.html index f618acd..bd922fd 100644 --- a/ogWebconsole/src/app/components/images/images.component.html +++ b/ogWebconsole/src/app/components/images/images.component.html @@ -30,7 +30,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/images/images.component.ts b/ogWebconsole/src/app/components/images/images.component.ts index 0f9fa4f..038c905 100644 --- a/ogWebconsole/src/app/components/images/images.component.ts +++ b/ogWebconsole/src/app/components/images/images.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Input, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; @@ -13,6 +15,7 @@ import { JoyrideService } from 'ngx-joyride'; styleUrls: ['./images.component.css'] }) export class ImagesComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -26,32 +29,32 @@ export class ImagesComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (image: any) => `${image.id}` }, { columnDef: 'name', - header: 'Nombre de imagen', + header: 'nombreDeImagen', cell: (image: any) => `${image.name}` }, { columnDef: 'imageRepositories', - header: 'Repositorios', + header: 'repositorios', cell: (image: any) => `${image.imageRepositories}` }, { columnDef: 'remotePc', - header: 'Remote Pc', + header: 'remotePc', cell: (image: any) => `${image.remotePc}` }, { columnDef: 'isGlobal', - header: 'Imagen Global', + header: 'imagenGlobal', cell: (image: any) => `${image.isGlobal}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (image: any) => `${this.datePipe.transform(image.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -85,7 +88,7 @@ export class ImagesComponent implements OnInit { this.search(); }, error => { - console.error('Error fetching image repositories', error); + console.error(this.translate.instant('errorFetchingImageRepositories'), error); } ) } @@ -109,7 +112,7 @@ export class ImagesComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching images', error); + console.error(this.translate.instant('errorFetchingImages'), error); this.loading = false; } ); diff --git a/ogWebconsole/src/app/components/menus/asset-manager-modal/asset-manager-modal.component.ts b/ogWebconsole/src/app/components/menus/asset-manager-modal/asset-manager-modal.component.ts index b95eeeb..c364c8d 100644 --- a/ogWebconsole/src/app/components/menus/asset-manager-modal/asset-manager-modal.component.ts +++ b/ogWebconsole/src/app/components/menus/asset-manager-modal/asset-manager-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef, MatDialog } from '@angular/material/dialog'; import { ToastrService } from 'ngx-toastr'; @@ -17,6 +19,7 @@ export interface AssetNode { styleUrls: ['./asset-manager-modal.component.css'] }) export class AssetManagerModalComponent implements OnInit { + public translate = inject(TranslateService); currentPath: string = ''; assets: AssetNode[] = []; isLoading: boolean = false; @@ -43,7 +46,7 @@ export class AssetManagerModalComponent implements OnInit { }, error: (err) => { this.isLoading = false; - this.toastService.error('Error al cargar la ruta actual.'); + this.toastService.error(this.translate.instant('errorAlCargarLaRuta')); console.error(err); // If we failed traversing down, fallback to root @@ -106,7 +109,7 @@ export class AssetManagerModalComponent implements OnInit { this.isLoading = true; this.dataService.deleteAsset(path).subscribe({ next: (res) => { - this.toastService.success('Elemento eliminado correctamente.'); + this.toastService.success(this.translate.instant('elementoEliminadoCorrectamente')); this.loadAssets(); }, error: (err) => { @@ -124,7 +127,7 @@ export class AssetManagerModalComponent implements OnInit { navigator.clipboard.writeText(fullUrl).then(() => { this.toastService.info(`Enlace copiado: ${fullUrl}`); }).catch(err => { - console.error('Error al copiar al portapapeles', err); + console.error(this.translate.instant('errorAlCopiarAlPortapapeles'), err); }); } diff --git a/ogWebconsole/src/app/components/menus/create-menu/create-menu.component.ts b/ogWebconsole/src/app/components/menus/create-menu/create-menu.component.ts index bf04d47..d54e78e 100644 --- a/ogWebconsole/src/app/components/menus/create-menu/create-menu.component.ts +++ b/ogWebconsole/src/app/components/menus/create-menu/create-menu.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -13,6 +15,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-menu.component.css' }) export class CreateMenuComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; menuForm: FormGroup; menuId: string | null = null; @@ -83,7 +86,7 @@ export class CreateMenuComponent implements OnInit { } this.htmlEditorContent = new TextDecoder('utf-8').decode(bytes); } catch (e) { - console.error('Failed to decode previous fileContent Base64', e); + console.error(this.translate.instant('failedToDecodePreviousFilecontent'), e); this.htmlEditorContent = ''; } this.isEditingHtml = true; @@ -96,7 +99,7 @@ export class CreateMenuComponent implements OnInit { this.isEditingHtml = true; }, error: (err) => { - this.toastService.error('No se pudo descargar el HTML/Twig original del menú para editarlo.'); + this.toastService.error(this.translate.instant('noSePudoDescargarEl')); console.error(err); } }); @@ -125,18 +128,18 @@ export class CreateMenuComponent implements OnInit { this.isEditingHtml = false; const dataUrl = `data:text/html;base64,${renderedBase64}`; this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(dataUrl); - this.toastService.success('Vista previa generada. Pulsa Guardar para aplicar la plantilla remota permanentemente.'); + this.toastService.success(this.translate.instant('vistaPreviaGeneradaPulsaGuardar')); }, error: (err) => { - console.error('Failed to preview generated HTML', err); + console.error(this.translate.instant('failedToPreviewGeneratedHtml'), err); const msg = err.error?.message || 'Error compilando la plantilla Twig.'; this.toastService.error(msg); } }); } catch (e) { - console.error('Failed to encode updated HTML to Base64', e); - this.toastService.error('Hubo un problema procesando los caracteres especiales del HTML.'); + console.error(this.translate.instant('failedToEncodeUpdatedHtml'), e); + this.toastService.error(this.translate.instant('huboUnProblemaProcesandoLos')); } } } @@ -166,7 +169,7 @@ export class CreateMenuComponent implements OnInit { this.updateSafeUrl() }, error: (err) => { - console.error('Error fetching remote calendar:', err); + console.error(this.translate.instant('errorFetchingRemoteCalendar'), err); } }); } @@ -187,23 +190,23 @@ export class CreateMenuComponent implements OnInit { if (this.menuId) { this.http.put(`${this.baseUrl}${this.menuId}`, payload).subscribe( (response) => { - this.toastService.success('Menu editado correctamente'); + this.toastService.success(this.translate.instant('menuEditadoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al editar la imagen', error); + console.error(this.translate.instant('errorAlEditarLaImagen'), error); } ); } else { this.http.post(`${this.baseUrl}/menus`, payload).subscribe( (response) => { - this.toastService.success('Menu añadido correctamente'); + this.toastService.success(this.translate.instant('menuAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al añadir el menu', error); + console.error(this.translate.instant('errorAlAnadirElMenu'), error); } ); } diff --git a/ogWebconsole/src/app/components/menus/data.service.ts b/ogWebconsole/src/app/components/menus/data.service.ts index b61dfe0..46b10d4 100644 --- a/ogWebconsole/src/app/components/menus/data.service.ts +++ b/ogWebconsole/src/app/components/menus/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { ConfigService } from '@services/config.service'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; @@ -8,6 +10,7 @@ import { catchError, map } from 'rxjs/operators'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -20,7 +23,7 @@ export class DataService { const url = `${this.baseUrl}/menu-raw/${publicUrl}`; return this.http.get(url, { responseType: 'text' }).pipe( catchError(error => { - console.error('Error fetching raw menu template', error); + console.error(this.translate.instant('errorFetchingRawMenuTemplate'), error); return throwError(() => error); }) ); @@ -30,7 +33,7 @@ export class DataService { const url = `${this.baseUrl}/menu-preview`; return this.http.post(url, { templateBase64: base64Template }, { responseType: 'text' }).pipe( catchError(error => { - console.error('Error previewing menu template', error); + console.error(this.translate.instant('errorPreviewingMenuTemplate'), error); return throwError(() => error); }) ); @@ -51,7 +54,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); return throwError(() => error); }) ); @@ -67,7 +70,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching menus', error); + console.error(this.translate.instant('errorFetchingMenus'), error); return throwError(() => error); }) ); @@ -77,7 +80,7 @@ export class DataService { const params = new HttpParams().set('path', path); return this.http.get(`${this.baseUrl}/ogassets/list`, { params }).pipe( catchError(error => { - console.error('Error fetching assets', error); + console.error(this.translate.instant('errorFetchingAssets'), error); return throwError(() => error); }) ); @@ -91,7 +94,7 @@ export class DataService { return this.http.post(`${this.baseUrl}/ogassets/upload`, formData).pipe( catchError(error => { - console.error('Error uploading assets', error); + console.error(this.translate.instant('errorUploadingAssets'), error); return throwError(() => error); }) ); @@ -102,7 +105,7 @@ export class DataService { body: { path } }).pipe( catchError(error => { - console.error('Error deleting asset', error); + console.error(this.translate.instant('errorDeletingAsset'), error); return throwError(() => error); }) ); diff --git a/ogWebconsole/src/app/components/menus/menus.component.html b/ogWebconsole/src/app/components/menus/menus.component.html index cc1510c..386d944 100644 --- a/ogWebconsole/src/app/components/menus/menus.component.html +++ b/ogWebconsole/src/app/components/menus/menus.component.html @@ -25,7 +25,7 @@ - +
{{ column.header }} {{ column.header | translate }} {{ column.cell(menu) }} diff --git a/ogWebconsole/src/app/components/menus/menus.component.ts b/ogWebconsole/src/app/components/menus/menus.component.ts index a223f48..8bc44d5 100644 --- a/ogWebconsole/src/app/components/menus/menus.component.ts +++ b/ogWebconsole/src/app/components/menus/menus.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -17,6 +19,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './menus.component.css' }) export class MenusComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -29,32 +32,32 @@ export class MenusComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (menu: any) => `${menu.id}` }, { columnDef: 'name', - header: 'Nombre de menú', + header: 'nombreDeMenu', cell: (menu: any) => `${menu.name}` }, { columnDef: 'publicUrl', - header: 'Url pública', + header: 'urlPublica', cell: (menu: any) => `${this.baseUrl}/menu/${menu.publicUrl}` }, { columnDef: 'isDefault', - header: 'Por defecto', + header: 'porDefecto', cell: (menu: any) => `${menu.isDefault}` }, { columnDef: 'resolution', - header: 'Resolución', + header: 'resolucion', cell: (menu: any) => `${menu.resolution}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (menu: any) => `${this.datePipe.transform(menu.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -106,7 +109,7 @@ export class MenusComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching images', error); + console.error(this.translate.instant('errorFetchingImages'), error); this.loading = false; } ); @@ -129,11 +132,11 @@ export class MenusComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${menu.uuid}`).subscribe({ next: () => { - this.toastService.success('Menu eliminado con éxito'); + this.toastService.success(this.translate.instant('menuEliminadoConExito')); this.search(); }, error: (error) => { - console.error('Error al eliminar el menú:', error); + console.error(this.translate.instant('errorAlEliminarElMenu'), error); } }); } diff --git a/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.html b/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.html index 8db2cb7..3ecf566 100644 --- a/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.html +++ b/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.html @@ -35,7 +35,7 @@ @for (column of columns; track column.columnDef) { - + diff --git a/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.ts b/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.ts index e75e83e..0e2f5d7 100644 --- a/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.ts +++ b/ogWebconsole/src/app/components/ogboot/boot-servers/boot-servers.component.ts @@ -1,4 +1,6 @@ -import {Component, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {DatePipe} from "@angular/common"; import {MatDialog} from "@angular/material/dialog"; @@ -17,6 +19,7 @@ import { forkJoin } from 'rxjs'; styleUrl: './boot-servers.component.css' }) export class BootServersComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -29,32 +32,32 @@ export class BootServersComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (server: any) => `${server.id}` }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (server: any) => server.name }, { columnDef: 'ip', - header: 'Ip', + header: 'ip', cell: (server: any) => server.ip }, { columnDef: 'apiPort', - header: 'Puerto API', + header: 'puertoApi', cell: (server: any) => server.apiPort }, { columnDef: 'pxePort', - header: 'Puerto PXE', + header: 'puertoPxe', cell: (server: any) => server.pxePort }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (server: any) => `${this.datePipe.transform(server.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -123,12 +126,12 @@ export class BootServersComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${server.uuid}`).subscribe({ next: () => { - this.toastService.success('Servidor eliminado con éxito'); + this.toastService.success(this.translate.instant('servidorEliminadoConExito')); this.search(); }, error: (error) => { - console.error('Error al eliminar servidor:', error); - this.toastService.error('Error al eliminar el servidor'); + console.error(this.translate.instant('errorAlEliminarServidor'), error); + this.toastService.error(this.translate.instant('errorAlEliminarElServidor')); } }); } @@ -159,13 +162,13 @@ export class BootServersComponent implements OnInit { forkJoin(syncRequests).subscribe({ next: () => { - this.toastService.success('Sincronización completada con éxito'); + this.toastService.success(this.translate.instant('sincronizacionCompletadaConExito')); this.loading = false; this.search(); }, error: (error: any) => { - console.error('Error durante la sincronización:', error); - this.toastService.error('Error durante la sincronización'); + console.error(this.translate.instant('errorDuranteLaSincronizacion1'), error); + this.toastService.error(this.translate.instant('errorDuranteLaSincronizacion')); this.loading = false; } }); diff --git a/ogWebconsole/src/app/components/ogboot/manage-boot-server/manage-boot-server.component.ts b/ogWebconsole/src/app/components/ogboot/manage-boot-server/manage-boot-server.component.ts index 14664fd..067a6e9 100644 --- a/ogWebconsole/src/app/components/ogboot/manage-boot-server/manage-boot-server.component.ts +++ b/ogWebconsole/src/app/components/ogboot/manage-boot-server/manage-boot-server.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -11,6 +13,7 @@ import { ConfigService } from "@services/config.service"; styleUrl: './manage-boot-server.component.css' }) export class ManageBootServerComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; bootServerForm: FormGroup; serverId: string | null = null; @@ -52,8 +55,8 @@ export class ManageBootServerComponent implements OnInit { this.serverId = response['@id']; }, error: (err) => { - console.error('Error fetching boot server:', err); - this.toastService.error('Error cargando los datos del servidor'); + console.error(this.translate.instant('errorFetchingBootServer'), err); + this.toastService.error(this.translate.instant('errorCargandoLosDatosDel')); } }); } @@ -70,7 +73,7 @@ export class ManageBootServerComponent implements OnInit { if (this.serverId) { this.http.put(`${this.baseUrl}${this.serverId}`, payload).subscribe({ next: () => { - this.toastService.success('Servidor Boot actualizado correctamente'); + this.toastService.success(this.translate.instant('servidorBootActualizadoCorrectamente')); this.dialogRef.close(true); }, error: (error) => { @@ -80,7 +83,7 @@ export class ManageBootServerComponent implements OnInit { } else { this.http.post(`${this.baseUrl}/boot-servers`, payload).subscribe({ next: () => { - this.toastService.success('Servidor Boot añadido correctamente'); + this.toastService.success(this.translate.instant('servidorBootAnadidoCorrectamente')); this.dialogRef.close(true); }, error: (error) => { diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/data.service.ts b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/data.service.ts index 5ee707f..dd3c759 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/data.service.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import {HttpClient, HttpParams} from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { DataService as TemplateDataService } from './../pxe/data.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string = this.configService.apiUrl; private apiUrl = `${this.baseUrl}/pxe-boot-files?page=1&itemsPerPage=1000`; @@ -28,7 +31,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching images', error); + console.error(this.translate.instant('errorFetchingImages'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts index 08c2edd..292de72 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Input } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; @@ -16,6 +18,7 @@ import { forkJoin } from 'rxjs'; styleUrls: ['./pxe-boot-files.component.css'] }) export class PxeBootFilesComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; availableOrganizationalUnits: any[] = []; @@ -80,7 +83,7 @@ export class PxeBootFilesComponent implements OnInit { } }, error => { - console.error('Error fetching BootServers:', error); + console.error(this.translate.instant('errorFetchingBootservers'), error); } ); } @@ -96,7 +99,7 @@ export class PxeBootFilesComponent implements OnInit { response => { this.units = response['hydra:member']; }, - error => console.error('Error fetching organizational units:', error) + error => console.error(this.translate.instant('errorFetchingOrganizationalUnits1'), error) ); } @@ -108,7 +111,7 @@ export class PxeBootFilesComponent implements OnInit { this.length = response['hydra:totalItems']; }, error => { - this.toastService.error('Error al cargar las plantillas'); + this.toastService.error(this.translate.instant('errorAlCargarLasPlantillas')); } ); } @@ -124,7 +127,7 @@ export class PxeBootFilesComponent implements OnInit { response => { this.dataSource.data = response['hydra:member']; }, - error => console.error('Error fetching child units:', error) + error => console.error(this.translate.instant('errorFetchingChildUnits'), error) ); } @@ -149,8 +152,8 @@ export class PxeBootFilesComponent implements OnInit { const dialogRef = this.dialog.open(DeleteModalComponent, { width: '500px', data: { - title: 'Confirmar migración de servidores', - message: 'Se han detectado ordenadores asociados a otro servidor de boot. ¿Desea moverlos al servidor actual? (Si rechaza, solo se actualizarán los ordenadores que ya pertenecen al servidor actual)', + title : this.translate.instant('confirmarMigracionDeServidores'), + message : this.translate.instant('seHanDetectadoOrdenadoresAsociados'), confirmText: 'Mover y Guardar', cancelText: 'Solo de este servidor' } @@ -186,7 +189,7 @@ export class PxeBootFilesComponent implements OnInit { const templateIds = Object.keys(groupedByTemplate); if (templateIds.length === 0) { - this.toastService.info('No hay cambios pendientes de realizar'); + this.toastService.info(this.translate.instant('noHayCambiosPendientesDe')); return; } diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts index a8f0ea2..409ab52 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; @@ -10,6 +12,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./create-image.component.css'] }) export class CreatePXEImageComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; downloads: any[] = []; selectedDownload: any; @@ -46,7 +49,7 @@ export class CreatePXEImageComponent implements OnInit { this.loading = false; }, error: (error) => { - console.error('Error fetching downloads:', error); + console.error(this.translate.instant('errorFetchingDownloads'), error); this.loading = false; this.toastService.error(error.error['hydra:description'] || 'Error fetching downloads'); } @@ -66,7 +69,7 @@ export class CreatePXEImageComponent implements OnInit { this.http.patch(`${this.baseUrl}/og-lives/${this.imageId}`, payload) .subscribe({ next: (response) => { - this.toastService.success('Image updated successfully'); + this.toastService.success(this.translate.instant('imageUpdatedSuccessfully')); this.dialogRef.close(true); }, error: (error) => { @@ -78,7 +81,7 @@ export class CreatePXEImageComponent implements OnInit { this.http.post(`${this.baseUrl}/og-lives`, payload) .subscribe({ next: (response) => { - this.toastService.success('Image created successfully'); + this.toastService.success(this.translate.instant('imageCreatedSuccessfully')); this.dialogRef.close(true); }, error: (error) => { diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/data.service.ts b/ogWebconsole/src/app/components/ogboot/pxe-images/data.service.ts index 9ec266f..cd1ec30 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/data.service.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -28,7 +31,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching images', error); + console.error(this.translate.instant('errorFetchingImages'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html index ac10ada..54eef58 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html @@ -73,7 +73,7 @@ @for (column of columns; track column.columnDef) { - + +
{{ column.header }} {{ column.header | translate }} {{ column.cell(server) }} {{ column.header }}{{ column.header | translate }} @if (column.columnDef === 'isDefault') { diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts index d799d86..2340712 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, signal, Input } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; @@ -21,6 +23,7 @@ import { ActivatedRoute } from '@angular/router'; styleUrls: ['./pxe-images.component.css'] }) export class PXEimagesComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; images: { downloadUrl: string; name: string; uuid: string }[] = []; @@ -41,27 +44,27 @@ export class PXEimagesComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (user: any) => `${user.id}` }, { columnDef: 'name', - header: 'Og Live', + header: 'ogLive', cell: (user: any) => `${user.name}` }, { columnDef: 'isDefault', - header: 'Imagen por defecto', + header: 'imagenPorDefecto', cell: (user: any) => `${user.isDefault}` }, { columnDef: 'status', - header: 'Estado', + header: 'estado', cell: (image: any) => `${image.status}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (user: any) => `${this.datePipe.transform(user.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -106,7 +109,7 @@ export class PXEimagesComponent implements OnInit { } }, error => { - console.error('Error fetching BootServers:', error); + console.error(this.translate.instant('errorFetchingBootservers'), error); } ); } @@ -145,7 +148,7 @@ export class PXEimagesComponent implements OnInit { getStatusLabel(status: string): { label: string; class: string } { const statusMap: { [key: string]: { label: string; class: string } } = { active: { label: 'Instalada', class: 'status-active' }, - inactive: { label: 'Sin instalar', class: 'status-inactive' }, + inactive: { label : this.translate.instant('sinInstalar'), class: 'status-inactive' }, pending: { label: 'Instalando...', class: 'status-installing' }, failed: { label: 'Fallido', class: 'status-failed' } }; @@ -159,7 +162,7 @@ export class PXEimagesComponent implements OnInit { case 'set-default': this.http.post(`${this.apiUrl}/server/${image.uuid}/set-default`, {}).subscribe({ next: () => { - this.toastService.success('Petición de cambio de imagen enviada'); + this.toastService.success(this.translate.instant('peticionDeCambioDeImagen')); this.search(); }, error: (error) => { @@ -171,7 +174,7 @@ export class PXEimagesComponent implements OnInit { case 'install': this.http.post(`${this.apiUrl}/server/${image.uuid}/install`, {}).subscribe({ next: () => { - this.toastService.success('Petición de instalación enviada'); + this.toastService.success(this.translate.instant('peticionDeInstalacionEnviada')); this.search(); }, error: (error) => { @@ -183,7 +186,7 @@ export class PXEimagesComponent implements OnInit { case 'uninstall': this.http.post(`${this.apiUrl}/server/${image.uuid}/uninstall`, {}).subscribe({ next: () => { - this.toastService.success('Petición de desinstalación enviada'); + this.toastService.success(this.translate.instant('peticionDeDesinstalacionEnviada')); this.search(); }, error: (error) => { @@ -193,7 +196,7 @@ export class PXEimagesComponent implements OnInit { }); break; default: - console.error('Acción no soportada:', action); + console.error(this.translate.instant('accionNoSoportada'), action); break; } } @@ -211,7 +214,7 @@ export class PXEimagesComponent implements OnInit { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('oG Live deleted successfully'); + this.toastService.success(this.translate.instant('ogLiveDeletedSuccessfully')); }, error: (error) => { this.toastService.error(error.error['hydra:description']); @@ -258,7 +261,7 @@ export class PXEimagesComponent implements OnInit { }, error => { this.toastService.error(error.error['hydra:description']); - console.error('Error al cargar la información del alert', error); + console.error(this.translate.instant('errorAlCargarLaInformacion'), error); this.loading = false; } ); diff --git a/ogWebconsole/src/app/components/ogboot/pxe/data.service.ts b/ogWebconsole/src/app/components/ogboot/pxe/data.service.ts index 8bd5637..ec080e6 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/data.service.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; @@ -9,6 +11,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -29,7 +32,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching pxe templates', error); + console.error(this.translate.instant('errorFetchingPxeTemplates'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/ogboot/pxe/manage-pxeTemplate/create-pxe-template.component.ts b/ogWebconsole/src/app/components/ogboot/pxe/manage-pxeTemplate/create-pxe-template.component.ts index 7af63e6..edc7ace 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/manage-pxeTemplate/create-pxe-template.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe/manage-pxeTemplate/create-pxe-template.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./create-pxe-template.component.css'] }) export class CreatePxeTemplateComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; templateForm!: FormGroup; previewContent: string = ''; @@ -91,7 +94,7 @@ export class CreatePxeTemplateComponent implements OnInit { this.clients = data['hydra:member']; }, error: error => { - console.error('Error al obtener los clientes PXE:', error); + console.error(this.translate.instant('errorAlObtenerLosClientes'), error); } }); } @@ -110,7 +113,7 @@ export class CreatePxeTemplateComponent implements OnInit { this.http.post(`${this.baseUrl}/pxe-templates`, payload).subscribe({ next: data => { - this.toastService.success('Plantilla PXE creada exitosamente'); + this.toastService.success(this.translate.instant('plantillaPxeCreadaExitosamente')); this.dialogRef.close(true); }, error: error => { @@ -129,7 +132,7 @@ export class CreatePxeTemplateComponent implements OnInit { this.http.patch(`${this.baseUrl}/pxe-templates/${this.data.uuid}`, payload).subscribe({ next: data => { - this.toastService.success('Plantilla PXE actualizada exitosamente'); + this.toastService.success(this.translate.instant('plantillaPxeActualizadaExitosamente')); this.dialogRef.close(true); }, error: error => { diff --git a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html index ee2ec87..b943666 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html @@ -55,7 +55,7 @@ @for (column of columns; track column.columnDef) { - {{ column.header }}{{ column.header | translate }} @if (column.columnDef === 'synchronized') { diff --git a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.ts b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.ts index 47307be..22a1272 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.ts @@ -1,5 +1,7 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; -import {Component, OnInit, Input} from '@angular/core'; +import {Component, OnInit, Input } from '@angular/core'; import { CreatePxeTemplateComponent } from './manage-pxeTemplate/create-pxe-template.component'; import { MatDialog } from '@angular/material/dialog'; import { MatTableDataSource } from '@angular/material/table'; @@ -20,6 +22,7 @@ import { ActivatedRoute } from '@angular/router'; styleUrls: ['./pxe.component.css'] }) export class PxeComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; pxeTemplates: any[] = []; @@ -42,27 +45,27 @@ export class PxeComponent implements OnInit{ columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (user: any) => `${user.id}` }, { columnDef: 'name', - header: 'Nombre de la plantilla', + header: 'nombreDeLaPlantilla', cell: (user: any) => user.name }, { columnDef: 'synchronized', - header: 'Sincronizado', + header: 'sincronizado', cell: (user: any) => user.synchronized }, { columnDef: 'isDefault', - header: 'Plantilla por defecto', + header: 'plantillaPorDefecto', cell: (user: any) => user.isDefault }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (user: any) => this.datePipe.transform(user.createdAt, 'dd/MM/yyyy hh:mm:ss') } ]; @@ -107,7 +110,7 @@ export class PxeComponent implements OnInit{ } }, error => { - console.error('Error fetching BootServers:', error); + console.error(this.translate.instant('errorFetchingBootservers'), error); } ); } @@ -166,7 +169,7 @@ export class PxeComponent implements OnInit{ if (result) { this.http.post(`${this.apiUrl}/server/${image.uuid}/delete`, {}).subscribe({ next: (response) => { - this.toastService.success('Plantilla eliminada exitosamente'); + this.toastService.success(this.translate.instant('plantillaEliminadaExitosamente')); if (response && response.warning) { this.toastService.info(response.warning, 'Información', { timeOut: 8000 }); } @@ -180,7 +183,7 @@ export class PxeComponent implements OnInit{ }) break; default: - console.error('Acción no soportada:', action); + console.error(this.translate.instant('accionNoSoportada'), action); break; } } @@ -211,7 +214,7 @@ export class PxeComponent implements OnInit{ }, error => { this.toastService.error(error.error['hydra:description']); - console.error('Error al cargar la información del alert', error); + console.error(this.translate.instant('errorAlCargarLaInformacion'), error); } ); } diff --git a/ogWebconsole/src/app/components/ogdhcp/add-clients-to-subnet/add-clients-to-subnet.component.ts b/ogWebconsole/src/app/components/ogdhcp/add-clients-to-subnet/add-clients-to-subnet.component.ts index aaa8e8e..c4bb1ef 100644 --- a/ogWebconsole/src/app/components/ogdhcp/add-clients-to-subnet/add-clients-to-subnet.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/add-clients-to-subnet/add-clients-to-subnet.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./add-clients-to-subnet.component.css'] }) export class AddClientsToSubnetComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; units: any[] = []; clients: any[] = []; @@ -43,7 +46,7 @@ export class AddClientsToSubnetComponent implements OnInit { this.units = response['hydra:member']; this.loading = false; }, - error => console.error('Error fetching organizational units:', error) + error => console.error(this.translate.instant('errorFetchingOrganizationalUnits1'), error) ); } @@ -52,7 +55,7 @@ export class AddClientsToSubnetComponent implements OnInit { response => { this.clients = response['hydra:member']; }, - error => console.error('Error fetching child units:', error) + error => console.error(this.translate.instant('errorFetchingChildUnits'), error) ); } diff --git a/ogWebconsole/src/app/components/ogdhcp/create-subnet/create-subnet.component.ts b/ogWebconsole/src/app/components/ogdhcp/create-subnet/create-subnet.component.ts index 59f7828..d48a3b1 100644 --- a/ogWebconsole/src/app/components/ogdhcp/create-subnet/create-subnet.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/create-subnet/create-subnet.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./create-subnet.component.css'] }) export class CreateSubnetComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; subnetForm: FormGroup; isEditMode: boolean = false; @@ -63,7 +66,7 @@ export class CreateSubnetComponent implements OnInit { save(): void { if (this.subnetForm.invalid) { - this.toastService.error('Por favor, revisa los campos del formulario'); + this.toastService.error(this.translate.instant('porFavorRevisaLosCampos')); return; } @@ -76,7 +79,7 @@ export class CreateSubnetComponent implements OnInit { if (!this.isEditMode) { this.http.post(`${this.baseUrl}/subnets`, payload).subscribe({ next: () => { - this.toastService.success('Configuración de red añadida exitosamente'); + this.toastService.success(this.translate.instant('configuracionDeRedAnadidaExitosamente')); this.dialogRef.close(); }, error: (error) => { @@ -86,7 +89,7 @@ export class CreateSubnetComponent implements OnInit { } else { this.http.patch(`${this.baseUrl}/subnets/${this.subnetId}`, payload).subscribe({ next: () => { - this.toastService.success('Configuración de red actualizada exitosamente'); + this.toastService.success(this.translate.instant('configuracionDeRedActualizadaExitosamente')); this.dialogRef.close(); }, error: (error) => { diff --git a/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.html b/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.html index 8e91cf7..c8fa3ee 100644 --- a/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.html @@ -35,7 +35,7 @@ @for (column of columns; track column.columnDef) { - + +
{{ column.header }} {{ column.header | translate }} @if (column.columnDef !== 'subnets') { {{ column.cell(server) }} diff --git a/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.ts b/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.ts index 8d76e64..ce86745 100644 --- a/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/dhcp-servers/dhcp-servers.component.ts @@ -1,4 +1,6 @@ -import {Component, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {DatePipe} from "@angular/common"; import {MatDialog} from "@angular/material/dialog"; @@ -16,6 +18,7 @@ import {ManageDhcpServerComponent} from "../manage-dhcp-server/manage-dhcp-serve styleUrl: './dhcp-servers.component.css' }) export class DhcpServersComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -28,32 +31,32 @@ export class DhcpServersComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (server: any) => `${server.id}` }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (server: any) => server.name }, { columnDef: 'ip', - header: 'Ip', + header: 'ip', cell: (server: any) => server.ip }, { columnDef: 'apiPort', - header: 'Puerto API', + header: 'puertoApi', cell: (server: any) => server.apiPort }, { columnDef: 'subnets', - header: 'Subredes', + header: 'subredes', cell: (server: any) => server.subnets }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (server: any) => `${this.datePipe.transform(server.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -122,12 +125,12 @@ export class DhcpServersComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${server.uuid}`).subscribe({ next: () => { - this.toastService.success('Servidor eliminado con éxito'); + this.toastService.success(this.translate.instant('servidorEliminadoConExito')); this.search(); }, error: (error) => { - console.error('Error al eliminar servidor:', error); - this.toastService.error('Error al eliminar el servidor'); + console.error(this.translate.instant('errorAlEliminarServidor'), error); + this.toastService.error(this.translate.instant('errorAlEliminarElServidor')); } }); } diff --git a/ogWebconsole/src/app/components/ogdhcp/manage-dhcp-server/manage-dhcp-server.component.ts b/ogWebconsole/src/app/components/ogdhcp/manage-dhcp-server/manage-dhcp-server.component.ts index dbf7185..b07d172 100644 --- a/ogWebconsole/src/app/components/ogdhcp/manage-dhcp-server/manage-dhcp-server.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/manage-dhcp-server/manage-dhcp-server.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -11,6 +13,7 @@ import { ConfigService } from "@services/config.service"; styleUrl: './manage-dhcp-server.component.css' }) export class ManageDhcpServerComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; dhcpServerForm: FormGroup; serverId: string | null = null; @@ -51,8 +54,8 @@ export class ManageDhcpServerComponent implements OnInit { this.serverId = response['@id']; }, error: (err) => { - console.error('Error fetching dhcp server:', err); - this.toastService.error('Error cargando los datos'); + console.error(this.translate.instant('errorFetchingDhcpServer'), err); + this.toastService.error(this.translate.instant('errorCargandoLosDatos')); } }); } @@ -68,7 +71,7 @@ export class ManageDhcpServerComponent implements OnInit { if (this.serverId) { this.http.put(`${this.baseUrl}${this.serverId}`, payload).subscribe({ next: () => { - this.toastService.success('Servidor DHCP actualizado correctamente'); + this.toastService.success(this.translate.instant('servidorDhcpActualizadoCorrectamente')); this.dialogRef.close(true); }, error: (error) => { @@ -78,7 +81,7 @@ export class ManageDhcpServerComponent implements OnInit { } else { this.http.post(`${this.baseUrl}/dhcp-servers`, payload).subscribe({ next: () => { - this.toastService.success('Servidor DHCP añadido correctamente'); + this.toastService.success(this.translate.instant('servidorDhcpAnadidoCorrectamente')); this.dialogRef.close(true); }, error: (error) => { diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.html b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.html index 9f92000..37f758c 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.html @@ -48,7 +48,7 @@ text="Visualiza y administra las subredes listadas según los filtros aplicados."> @for (column of columns; track column.columnDef) { - {{ column.header }} {{ column.header | translate }} @if (column.columnDef === 'synchronized') { diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.ts b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.ts index 8c7162a..0e9c571 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, ViewChild } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource } from '@angular/material/table'; @@ -40,6 +42,7 @@ export interface Subnet { styleUrls: ['./og-dhcp-subnets.component.css'] }) export class OgDhcpSubnetsComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; displayedColumns: string[] = ['id', 'name', 'netmask', 'ipAddress', 'synchronized', 'serverId', 'clients', 'actions']; dataSource = new MatTableDataSource([]); @@ -56,13 +59,13 @@ export class OgDhcpSubnetsComponent implements OnInit { @ViewChild(MatPaginator) paginator: MatPaginator | undefined; columns = [ - { columnDef: 'id', header: 'ID', cell: (subnet: Subnet) => subnet.id }, - { columnDef: 'name', header: 'Name', cell: (subnet: Subnet) => subnet.name }, - { columnDef: 'netmask', header: 'Netmask', cell: (subnet: Subnet) => subnet.netmask }, - { columnDef: 'ipAddress', header: 'IP Address', cell: (subnet: Subnet) => subnet.ipAddress }, - { columnDef: 'synchronized', header: 'Sincronizado', cell: (subnet: Subnet) => `${subnet.synchronized}` }, - { columnDef: 'serverId', header: 'Id Servidor DHCP', cell: (subnet: Subnet) => subnet.serverId }, - { columnDef: 'clients', header: 'Lista de clientes', cell: (subnet: Subnet) => `${subnet.clients}` }, + { columnDef: 'id', header: 'id', cell: (subnet: Subnet) => subnet.id }, + { columnDef: 'name', header: 'name', cell: (subnet: Subnet) => subnet.name }, + { columnDef: 'netmask', header: 'netmask', cell: (subnet: Subnet) => subnet.netmask }, + { columnDef: 'ipAddress', header: 'ipAddress', cell: (subnet: Subnet) => subnet.ipAddress }, + { columnDef: 'synchronized', header: 'sincronizado', cell: (subnet: Subnet) => `${subnet.synchronized}` }, + { columnDef: 'serverId', header: 'idServidorDhcp', cell: (subnet: Subnet) => subnet.serverId }, + { columnDef: 'clients', header: 'listaDeClientes', cell: (subnet: Subnet) => `${subnet.clients}` }, ]; private apiUrl: string; @@ -91,7 +94,7 @@ export class OgDhcpSubnetsComponent implements OnInit { this.serverName = response.name; }, error: () => { - console.error('No se pudo resolver el nombre del servidor DHCP'); + console.error(this.translate.instant('noSePudoResolverEl')); } }); } @@ -135,11 +138,11 @@ export class OgDhcpSubnetsComponent implements OnInit { case 'get': this.http.post(`${this.baseUrl}/og-dhcp/server/${subnet.uuid}/get`, {}).subscribe({ next: () => { - this.toastService.success('Subred sincronizada con servidor'); + this.toastService.success(this.translate.instant('subredSincronizadaConServidor')); this.loadSubnets() }, error: (error) => { - console.error('Error al crear subred en servidor', error); + console.error(this.translate.instant('errorAlCrearSubredEn'), error); this.toastService.error(error.error['hydra:description']); } }); @@ -147,11 +150,11 @@ export class OgDhcpSubnetsComponent implements OnInit { case 'post': this.http.post(`${this.baseUrl}/og-dhcp/server/${subnet.uuid}/post`, {}).subscribe({ next: () => { - this.toastService.success('Petición de instalación enviada'); + this.toastService.success(this.translate.instant('peticionDeInstalacionEnviada')); this.loadSubnets() }, error: (error) => { - console.error('Error al crear subred en servidor', error); + console.error(this.translate.instant('errorAlCrearSubredEn'), error); this.toastService.error(error.error['hydra:description']); } }); @@ -159,11 +162,11 @@ export class OgDhcpSubnetsComponent implements OnInit { case 'put': this.http.put(`${this.baseUrl}/og-dhcp/server/${subnet.uuid}/put`, {}).subscribe({ next: () => { - this.toastService.success('Petición de actualizacion enviada'); + this.toastService.success(this.translate.instant('peticionDeActualizacionEnviada')); this.loadSubnets(); }, error: (error) => { - console.error('Error al actualizar la subred en el servidor', error); + console.error(this.translate.instant('errorAlActualizarLaSubred'), error); this.toastService.error(error.error['hydra:description']); } }); @@ -178,11 +181,11 @@ export class OgDhcpSubnetsComponent implements OnInit { if (result) { this.http.delete(`${this.baseUrl}/og-dhcp/server/${subnet.uuid}/delete`, {}).subscribe({ next: () => { - this.toastService.success('Subred eliminada exitosamente'); + this.toastService.success(this.translate.instant('subredEliminadaExitosamente')); this.loadSubnets(); }, error: (error) => { - console.error('Error al eliminar la subred', error); + console.error(this.translate.instant('errorAlEliminarLaSubred'), error); this.toastService.error(error.error['hydra:description']); } }); @@ -190,7 +193,7 @@ export class OgDhcpSubnetsComponent implements OnInit { }) break; default: - console.error('Acción no soportada:', action); + console.error(this.translate.instant('accionNoSoportada'), action); break; } } @@ -221,12 +224,12 @@ export class OgDhcpSubnetsComponent implements OnInit { if (this.serverId) { return this.http.post(`${this.baseUrl}/dhcp-servers/${this.serverId}/get-collection`, {}); } - return of({message: 'Seleccione un servidor DHCP para consultar el estado'}); + return of({message : this.translate.instant('seleccioneUnServidorDhcpPara')}); } syncSubnets(): void { if (!this.serverId) { - this.toastService.error('Debe seleccionar un servidor DHCP para sincronizar'); + this.toastService.error(this.translate.instant('debeSeleccionarUnServidorDhcp')); return; } @@ -252,7 +255,7 @@ export class OgDhcpSubnetsComponent implements OnInit { this.loadSubnets(); }, error: (error) => { - console.error('Error al sincronizar subredes', error); + console.error(this.translate.instant('errorAlSincronizarSubredes'), error); this.toastService.error(error.error?.['hydra:description'] || 'Error al sincronizar subredes'); this.loading = false; } @@ -276,7 +279,7 @@ export class OgDhcpSubnetsComponent implements OnInit { }, error => { this.toastService.error(error.error['hydra:description']); - console.error('Error al cargar la información del alert', error); + console.error(this.translate.instant('errorAlCargarLaInformacion'), error); this.loading = false; } ); @@ -306,7 +309,7 @@ export class OgDhcpSubnetsComponent implements OnInit { if (result) { this.http.delete(`${this.baseUrl}/og-dhcp/server/${subnet.uuid}/delete-leases`, {}).subscribe({ next: () => { - this.toastService.success('Leases de la subred eliminadas correctamente'); + this.toastService.success(this.translate.instant('leasesDeLaSubredEliminadas')); }, error: (error) => { this.toastService.error(error.error?.['hydra:description'] || 'Error al eliminar leases de la subred'); diff --git a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html index 4ebf3c3..20e681c 100644 --- a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html @@ -55,7 +55,7 @@ - +
{{ column.header }} {{ column.header | translate }} Client Icon diff --git a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts index 82640b8..c6298ff 100644 --- a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { ToastrService } from "ngx-toastr"; import { HttpClient } from "@angular/common/http"; @@ -13,6 +15,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './show-clients.component.css' }) export class ShowClientsComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; dataSource = new MatTableDataSource([]); length = 0; @@ -33,13 +36,13 @@ export class ShowClientsComponent implements OnInit { ]; columns = [ - { columnDef: 'id', header: 'ID', cell: (client: Client) => client.id }, - { columnDef: 'status', header: 'Estado', cell: (client: Client) => client.status }, - { columnDef: 'name', header: 'Name', cell: (client: Client) => client.name }, - { columnDef: 'ip', header: 'Ip', cell: (client: Client) => client.ip }, - { columnDef: 'mac', header: 'Mac', cell: (client: Client) => client.mac }, - { columnDef: 'organizationalUnit', header: 'Ruta', cell: (client: Client) => client.organizationalUnit }, - { columnDef: 'ogLive', header: 'OgLive', cell: (client: Client) => client.ogLive?.date }, + { columnDef: 'id', header: 'id', cell: (client: Client) => client.id }, + { columnDef: 'status', header: 'estado', cell: (client: Client) => client.status }, + { columnDef: 'name', header: 'name', cell: (client: Client) => client.name }, + { columnDef: 'ip', header: 'ip', cell: (client: Client) => client.ip }, + { columnDef: 'mac', header: 'mac', cell: (client: Client) => client.mac }, + { columnDef: 'organizationalUnit', header: 'ruta', cell: (client: Client) => client.organizationalUnit }, + { columnDef: 'ogLive', header: 'oglive', cell: (client: Client) => client.ogLive?.date }, ]; displayedColumns: string[] = ['id', 'status', 'name', 'ip', 'mac', 'organizationalUnit', 'ogLive', 'actions']; @@ -85,7 +88,7 @@ export class ShowClientsComponent implements OnInit { if (result) { this.http.delete(`${this.baseUrl}/og-dhcp/server/${this.data.subnetUuid}/delete-lease/${client.uuid}`, {}).subscribe({ next: () => { - this.toastService.success('Lease del cliente eliminada correctamente'); + this.toastService.success(this.translate.instant('leaseDelClienteEliminadaCorrectamente')); }, error: (error) => { this.toastService.error(error.error?.['hydra:description'] || 'Error al eliminar lease del cliente'); @@ -105,7 +108,7 @@ export class ShowClientsComponent implements OnInit { if (result) { this.http.delete(`${this.baseUrl}/og-dhcp/server/${this.data.subnetUuid}/delete-host/${client.uuid}`, {}).subscribe({ next: () => { - this.toastService.success('Cliente eliminado exitosamente de la red'); + this.toastService.success(this.translate.instant('clienteEliminadoExitosamenteDeLa')); this.loadData() }, error: (error) => { diff --git a/ogWebconsole/src/app/components/ogdhcp/sync-subnet-dialog/sync-subnet-dialog.component.ts b/ogWebconsole/src/app/components/ogdhcp/sync-subnet-dialog/sync-subnet-dialog.component.ts index 1f976ab..a859023 100644 --- a/ogWebconsole/src/app/components/ogdhcp/sync-subnet-dialog/sync-subnet-dialog.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/sync-subnet-dialog/sync-subnet-dialog.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; @@ -10,6 +12,7 @@ import { ToastrService } from 'ngx-toastr'; styleUrls: ['./sync-subnet-dialog.component.css'] }) export class SyncSubnetDialogComponent implements OnInit { + public translate = inject(TranslateService); organizationalUnits: any[] = []; selectedOuUuid: string | null = null; loading: boolean = false; @@ -38,7 +41,7 @@ export class SyncSubnetDialogComponent implements OnInit { this.loading = false; }, error: (error) => { - this.toastService.error('Error cargando las Unidades Organizativas'); + this.toastService.error(this.translate.instant('errorCargandoLasUnidadesOrganizativas')); this.loading = false; } }); diff --git a/ogWebconsole/src/app/components/operative-system/create-operative-system/create-operative-system.component.ts b/ogWebconsole/src/app/components/operative-system/create-operative-system/create-operative-system.component.ts index 0a8d4df..62e45e2 100644 --- a/ogWebconsole/src/app/components/operative-system/create-operative-system/create-operative-system.component.ts +++ b/ogWebconsole/src/app/components/operative-system/create-operative-system/create-operative-system.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -12,6 +14,7 @@ import { ConfigService } from "@services/config.service"; styleUrl: './create-operative-system.component.css' }) export class CreateOperativeSystemComponent { + public translate = inject(TranslateService); baseUrl: string; formGroup: FormGroup; operativeSystemId: string | null = null; @@ -47,7 +50,7 @@ export class CreateOperativeSystemComponent { this.operativeSystemId = response['@id']; }, error: (err) => { - console.error('Error fetching software:', err); + console.error(this.translate.instant('errorFetchingSoftware'), err); } }); } @@ -67,23 +70,23 @@ export class CreateOperativeSystemComponent { if (this.operativeSystemId) { this.http.put(`${this.baseUrl}${this.operativeSystemId}`, payload).subscribe( (response) => { - this.toastService.success('Sistema operativo editado correctamente'); + this.toastService.success(this.translate.instant('sistemaOperativoEditadoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al editar el sistema operativo', error); + console.error(this.translate.instant('errorAlEditarElSistema'), error); } ); } else { this.http.post(`${this.baseUrl}/operative-systems`, payload).subscribe( (response) => { - this.toastService.success('Sistema operativo añadido correctamente'); + this.toastService.success(this.translate.instant('sistemaOperativoAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al añadir sistema operativo', error); + console.error(this.translate.instant('errorAlAnadirSistemaOperativo'), error); } ); } diff --git a/ogWebconsole/src/app/components/operative-system/operative-system.component.html b/ogWebconsole/src/app/components/operative-system/operative-system.component.html index dfe6b2a..1af4d67 100644 --- a/ogWebconsole/src/app/components/operative-system/operative-system.component.html +++ b/ogWebconsole/src/app/components/operative-system/operative-system.component.html @@ -27,7 +27,7 @@ - +
{{ column.header }} {{ column.header | translate }} {{ column.cell(image) }} diff --git a/ogWebconsole/src/app/components/operative-system/operative-system.component.ts b/ogWebconsole/src/app/components/operative-system/operative-system.component.ts index 5066707..9438368 100644 --- a/ogWebconsole/src/app/components/operative-system/operative-system.component.ts +++ b/ogWebconsole/src/app/components/operative-system/operative-system.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -17,6 +19,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './operative-system.component.css' }) export class OperativeSystemComponent { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; images: { downloadUrl: string; name: string; uuid: string }[] = []; @@ -33,17 +36,17 @@ export class OperativeSystemComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (operativeSystem: any) => `${operativeSystem.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (operativeSystem: any) => `${operativeSystem.name}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (operativeSystem: any) => `${this.datePipe.transform(operativeSystem.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -81,7 +84,7 @@ export class OperativeSystemComponent { this.length = data['hydra:totalItems']; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); } ); } @@ -110,10 +113,10 @@ export class OperativeSystemComponent { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Operative System deleted'); + this.toastService.success(this.translate.instant('operativeSystemDeleted')); }, error: (error) => { - this.toastService.error('Error deleting operative system'); + this.toastService.error(this.translate.instant('errorDeletingOperativeSystem')); } }); } else { diff --git a/ogWebconsole/src/app/components/repositories/backup-image/backup-image.component.ts b/ogWebconsole/src/app/components/repositories/backup-image/backup-image.component.ts index d721940..8a68cad 100644 --- a/ogWebconsole/src/app/components/repositories/backup-image/backup-image.component.ts +++ b/ogWebconsole/src/app/components/repositories/backup-image/backup-image.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { HttpClient } from "@angular/common/http"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; @@ -12,6 +14,7 @@ import { ConfigService } from "@services/config.service"; styleUrl: './backup-image.component.css' }) export class BackupImageComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = false; form!: FormGroup; @@ -42,14 +45,14 @@ export class BackupImageComponent implements OnInit { repoIp: this.form.value.repoIp }).subscribe({ next: (response) => { - this.toastService.success('Peticion de backup de imagen enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeBackupDeImagen')); this.dialogRef.close(); this.loading = false; this.router.navigate(['/commands-logs']); }, error: error => { this.loading = false; - this.toastService.error('Error al realizar la petición de backup de imagen'); + this.toastService.error(this.translate.instant('errorAlRealizarLaPeticion')); } }); } diff --git a/ogWebconsole/src/app/components/repositories/convert-image-to-virtual/convert-image-to-virtual.component.ts b/ogWebconsole/src/app/components/repositories/convert-image-to-virtual/convert-image-to-virtual.component.ts index a01c77f..366973e 100644 --- a/ogWebconsole/src/app/components/repositories/convert-image-to-virtual/convert-image-to-virtual.component.ts +++ b/ogWebconsole/src/app/components/repositories/convert-image-to-virtual/convert-image-to-virtual.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {HttpClient} from "@angular/common/http"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {ToastrService} from "ngx-toastr"; @@ -11,6 +13,7 @@ import {ConfigService} from "@services/config.service"; styleUrl: './convert-image-to-virtual.component.css' }) export class ConvertImageToVirtualComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = false; extension: string = ''; @@ -35,7 +38,7 @@ export class ConvertImageToVirtualComponent implements OnInit { extension: this.extension }).subscribe({ next: (response) => { - this.toastService.success('Peticion de conversion de imagen enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeConversionDeImagen')); this.dialogRef.close(true); this.loading = false; this.router.navigate(['/commands-logs']); diff --git a/ogWebconsole/src/app/components/repositories/convert-image/convert-image.component.ts b/ogWebconsole/src/app/components/repositories/convert-image/convert-image.component.ts index a5950f9..f408179 100644 --- a/ogWebconsole/src/app/components/repositories/convert-image/convert-image.component.ts +++ b/ogWebconsole/src/app/components/repositories/convert-image/convert-image.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import { HttpClient } from "@angular/common/http"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; import { ToastrService } from "ngx-toastr"; @@ -11,6 +13,7 @@ import { ConfigService } from "@services/config.service"; styleUrl: './convert-image.component.css' }) export class ConvertImageComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; loading: boolean = false; imageName: string = ''; @@ -37,7 +40,7 @@ export class ConvertImageComponent implements OnInit{ filesystem: this.filesystem }).subscribe({ next: (response) => { - this.toastService.success('Peticion de conversion de imagen enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeConversionDeImagen')); this.dialogRef.close(true); this.loading = false; this.router.navigate(['/commands-logs']); diff --git a/ogWebconsole/src/app/components/repositories/edit-image/edit-image.component.ts b/ogWebconsole/src/app/components/repositories/edit-image/edit-image.component.ts index f15c851..83d7676 100644 --- a/ogWebconsole/src/app/components/repositories/edit-image/edit-image.component.ts +++ b/ogWebconsole/src/app/components/repositories/edit-image/edit-image.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import {HttpClient} from "@angular/common/http"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {ToastrService} from "ngx-toastr"; @@ -12,6 +14,7 @@ import {FormBuilder, FormGroup} from "@angular/forms"; styleUrl: './edit-image.component.css' }) export class EditImageComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; loading: boolean = true; imageForm: FormGroup; @@ -55,7 +58,7 @@ export class EditImageComponent implements OnInit{ this.http.put(`${this.baseUrl}${this.data.image['@id']}`, payload).subscribe({ next: (response) => { - this.toastService.success('Image updated successfully'); + this.toastService.success(this.translate.instant('imageUpdatedSuccessfully')); this.dialogRef.close(true); }, error: error => { diff --git a/ogWebconsole/src/app/components/repositories/import-image/import-image.component.ts b/ogWebconsole/src/app/components/repositories/import-image/import-image.component.ts index 589f2bb..9bb0f3a 100644 --- a/ogWebconsole/src/app/components/repositories/import-image/import-image.component.ts +++ b/ogWebconsole/src/app/components/repositories/import-image/import-image.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { HttpClient } from "@angular/common/http"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './import-image.component.css' }) export class ImportImageComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; loading: boolean = false; imageName: string = ''; @@ -36,7 +39,7 @@ export class ImportImageComponent implements OnInit { name: this.imageName }).subscribe({ next: (response) => { - this.toastService.success('Peticion de importacion de imagen enviada correctamente'); + this.toastService.success(this.translate.instant('peticionDeImportacionDeImagen')); this.dialogRef.close(true); this.loading = false; this.router.navigate(['/commands-logs']); diff --git a/ogWebconsole/src/app/components/repositories/main-repository-view/main-repository-view.component.ts b/ogWebconsole/src/app/components/repositories/main-repository-view/main-repository-view.component.ts index a3c5d30..f034e28 100644 --- a/ogWebconsole/src/app/components/repositories/main-repository-view/main-repository-view.component.ts +++ b/ogWebconsole/src/app/components/repositories/main-repository-view/main-repository-view.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -17,6 +19,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './main-repository-view.component.css' }) export class MainRepositoryViewComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; repositoryForm: FormGroup; @@ -48,37 +51,37 @@ export class MainRepositoryViewComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (image: any) => `${image.id}` }, { columnDef: 'name', - header: 'Nombre de imagen', + header: 'nombreDeImagen', cell: (image: any) => `${image.name}` }, { columnDef: 'imageRepository', - header: 'Repositorio', + header: 'repositorio', cell: (image: any) => `${image.imageRepository?.name}` }, { columnDef: 'remotePc', - header: 'Remote Pc', + header: 'remotePc', cell: (image: any) => `${image.remotePc}` }, { columnDef: 'created', - header: 'Creado en repositorio', + header: 'creadoEnRepositorio', cell: (image: any) => `${image.created}` }, { columnDef: 'imageFullsum', - header: 'Fullsum', + header: 'fullsum', cell: (image: any) => `${image.imageFullsum}` }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (image: any) => `${this.datePipe.transform(image.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -120,7 +123,7 @@ export class MainRepositoryViewComponent implements OnInit { }); }, (error) => { - console.error('Error al cargar los datos del cliente:', error); + console.error(this.translate.instant('errorAlCargarLosDatos1'), error); } ); } @@ -135,21 +138,21 @@ export class MainRepositoryViewComponent implements OnInit { if (this.repositoryId) { this.http.put(`${this.baseUrl}/image-repositories/${this.repositoryId}`, payload).subscribe( (response) => { - this.toastService.success('Imagen editada correctamente'); + this.toastService.success(this.translate.instant('imagenEditadaCorrectamente')); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al editar la imagen', error); + console.error(this.translate.instant('errorAlEditarLaImagen'), error); } ); } else { this.http.post(`${this.baseUrl}/image-repositories`, payload).subscribe( (response) => { - this.toastService.success('Imagen añadida correctamente'); + this.toastService.success(this.translate.instant('imagenAnadidaCorrectamente')); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al añadir la imagen', error); + console.error(this.translate.instant('errorAlAnadirLaImagen'), error); } ); } @@ -159,7 +162,7 @@ export class MainRepositoryViewComponent implements OnInit { this.loading = true; this.http.get(`${this.baseUrl}/image-repositories/server/${this.repositoryId}/status`).subscribe(data => { if (!data.success) { - this.toastService.error('Error al obtener el estado del servidor'); + this.toastService.error(this.translate.instant('errorAlObtenerElEstado')); this.loading = false; this.status = false; return; @@ -211,11 +214,11 @@ export class MainRepositoryViewComponent implements OnInit { syncRepository() { this.http.post(`${this.baseUrl}/image-repositories/server/${this.repositoryId}/sync`, {}) .subscribe(response => { - this.toastService.success('Sincronización completada'); + this.toastService.success(this.translate.instant('sincronizacionCompletada')); this.load() }, error => { - console.error('Error al sincronizar', error); - this.toastService.error('Error al sincronizar'); + console.error(this.translate.instant('errorAlSincronizar'), error); + this.toastService.error(this.translate.instant('errorAlSincronizar')); }); } @@ -232,7 +235,7 @@ export class MainRepositoryViewComponent implements OnInit { }); }, error => { - console.error('Error al cargar la información del alert', error); + console.error(this.translate.instant('errorAlCargarLaInformacion'), error); } ); } diff --git a/ogWebconsole/src/app/components/repositories/manage-repository/manage-repository.component.ts b/ogWebconsole/src/app/components/repositories/manage-repository/manage-repository.component.ts index 189cdac..9af2e2a 100644 --- a/ogWebconsole/src/app/components/repositories/manage-repository/manage-repository.component.ts +++ b/ogWebconsole/src/app/components/repositories/manage-repository/manage-repository.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; @@ -12,6 +14,7 @@ import { ConfigService } from "@services/config.service"; styleUrl: './manage-repository.component.css' }) export class ManageRepositoryComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; imageForm: FormGroup; repositoryId: string | null = null; @@ -55,7 +58,7 @@ export class ManageRepositoryComponent implements OnInit { this.repositoryId = response['@id']; }, error: (err) => { - console.error('Error fetching remote calendar:', err); + console.error(this.translate.instant('errorFetchingRemoteCalendar'), err); } }); } @@ -72,7 +75,7 @@ export class ManageRepositoryComponent implements OnInit { if (this.repositoryId) { this.http.put(`${this.baseUrl}${this.repositoryId}`, payload).subscribe( (response) => { - this.toastService.success('Repositorio editada correctamente'); + this.toastService.success(this.translate.instant('repositorioEditadaCorrectamente')); this.dialogRef.close(true); }, (error) => { @@ -82,7 +85,7 @@ export class ManageRepositoryComponent implements OnInit { } else { this.http.post(`${this.baseUrl}/image-repositories`, payload).subscribe( (response) => { - this.toastService.success('Repositorio añadido correctamente'); + this.toastService.success(this.translate.instant('repositorioAnadidoCorrectamente')); this.dialogRef.close(true); }, (error) => { diff --git a/ogWebconsole/src/app/components/repositories/rename-image/rename-image.component.ts b/ogWebconsole/src/app/components/repositories/rename-image/rename-image.component.ts index 9557357..52c7fe8 100644 --- a/ogWebconsole/src/app/components/repositories/rename-image/rename-image.component.ts +++ b/ogWebconsole/src/app/components/repositories/rename-image/rename-image.component.ts @@ -1,4 +1,6 @@ -import {Component, EventEmitter, Inject, OnInit, Output} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, EventEmitter, Inject, OnInit, Output } from '@angular/core'; import {HttpClient} from "@angular/common/http"; import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; import {ToastrService} from "ngx-toastr"; @@ -11,6 +13,7 @@ import {ConfigService} from "@services/config.service"; styleUrl: './rename-image.component.css' }) export class RenameImageComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; loading: boolean = true; name: string = ''; @@ -36,7 +39,7 @@ export class RenameImageComponent implements OnInit{ newName: this.name }).subscribe({ next: (response) => { - this.toastService.success('Imagen renombrada correctamente'); + this.toastService.success(this.translate.instant('imagenRenombradaCorrectamente')); this.dialogRef.close(true); }, error: error => { diff --git a/ogWebconsole/src/app/components/repositories/repositories.component.html b/ogWebconsole/src/app/components/repositories/repositories.component.html index 4652b4d..4c5dc6e 100644 --- a/ogWebconsole/src/app/components/repositories/repositories.component.html +++ b/ogWebconsole/src/app/components/repositories/repositories.component.html @@ -37,7 +37,7 @@ - +
{{ column.header }} {{ column.header | translate }} {{ column.cell(repository) }} diff --git a/ogWebconsole/src/app/components/repositories/repositories.component.ts b/ogWebconsole/src/app/components/repositories/repositories.component.ts index d4803ea..6cc54d8 100644 --- a/ogWebconsole/src/app/components/repositories/repositories.component.ts +++ b/ogWebconsole/src/app/components/repositories/repositories.component.ts @@ -1,4 +1,6 @@ -import {Component, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {DatePipe} from "@angular/common"; import {MatDialog} from "@angular/material/dialog"; @@ -19,6 +21,7 @@ import {ManageRepositoryComponent} from "./manage-repository/manage-repository.c styleUrl: './repositories.component.css' }) export class RepositoriesComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -31,32 +34,32 @@ export class RepositoriesComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (repository: any) => `${repository.id}` }, { columnDef: 'name', - header: 'Nombre de repositorio', + header: 'nombreDeRepositorio', cell: (repository: any) => repository.name }, { columnDef: 'user', - header: 'Usuario', + header: 'usuario', cell: (repository: any) => `${repository.user?? 'opengnsys'}` }, { columnDef: 'ip', - header: 'Ip', + header: 'ip', cell: (repository: any) => repository.ip }, { columnDef: 'images', - header: 'Gestionar imágenes', + header: 'gestionarImagenes', cell: (repository: any) => repository.images }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (repository: any) => `${this.datePipe.transform(repository.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -126,11 +129,11 @@ export class RepositoriesComponent implements OnInit { if (result) { this.http.delete(`${this.apiUrl}/${command.uuid}`).subscribe({ next: () => { - this.toastService.success('Imagen eliminada con éxito'); + this.toastService.success(this.translate.instant('imagenEliminadaConExito')); this.search(); }, error: (error) => { - console.error('Error al eliminar la imagen:', error); + console.error(this.translate.instant('errorAlEliminarLaImagen'), error); } }); } diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/backup-repository-modal/backup-repository-modal.component.ts b/ogWebconsole/src/app/components/repositories/show-git-images/backup-repository-modal/backup-repository-modal.component.ts index 93f7faa..f564111 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/backup-repository-modal/backup-repository-modal.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-git-images/backup-repository-modal/backup-repository-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './backup-repository-modal.component.css' }) export class BackupRepositoryModalComponent { + public translate = inject(TranslateService); backupForm: FormGroup; loading: boolean = false; baseUrl: string; @@ -47,7 +50,7 @@ export class BackupRepositoryModalComponent { this.http.post(url, payload).subscribe({ next: (response) => { - this.toastService.success('Backup iniciado correctamente'); + this.toastService.success(this.translate.instant('backupIniciadoCorrectamente')); this.dialogRef.close(response); }, error: (error) => { @@ -56,7 +59,7 @@ export class BackupRepositoryModalComponent { } }); } else { - this.toastService.error('Por favor, complete todos los campos requeridos correctamente'); + this.toastService.error(this.translate.instant('porFavorCompleteTodosLos1')); } } diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/create-branch-modal/create-branch-modal.component.ts b/ogWebconsole/src/app/components/repositories/show-git-images/create-branch-modal/create-branch-modal.component.ts index ce8f72f..4f09dc8 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/create-branch-modal/create-branch-modal.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-git-images/create-branch-modal/create-branch-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-branch-modal.component.css' }) export class CreateBranchModalComponent { + public translate = inject(TranslateService); branchForm: FormGroup; loading: boolean = false; baseUrl: string; @@ -42,7 +45,7 @@ export class CreateBranchModalComponent { this.http.post(url, payload).subscribe({ next: (response) => { - this.toastService.success('Rama creada correctamente'); + this.toastService.success(this.translate.instant('ramaCreadaCorrectamente')); this.dialogRef.close(response); }, error: (error) => { @@ -51,7 +54,7 @@ export class CreateBranchModalComponent { } }); } else { - this.toastService.error('Por favor, complete todos los campos requeridos'); + this.toastService.error(this.translate.instant('porFavorCompleteTodosLos')); } } diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/create-tag-modal/create-tag-modal.component.ts b/ogWebconsole/src/app/components/repositories/show-git-images/create-tag-modal/create-tag-modal.component.ts index 3ed3f55..067116e 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/create-tag-modal/create-tag-modal.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-git-images/create-tag-modal/create-tag-modal.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; @@ -11,6 +13,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-tag-modal.component.css' }) export class CreateTagModalComponent { + public translate = inject(TranslateService); tagForm: FormGroup; loading: boolean = false; baseUrl: string; @@ -44,7 +47,7 @@ export class CreateTagModalComponent { this.http.post(url, payload).subscribe({ next: (response) => { - this.toastService.success('Tag creado correctamente'); + this.toastService.success(this.translate.instant('tagCreadoCorrectamente')); this.dialogRef.close(response); }, error: (error) => { @@ -53,7 +56,7 @@ export class CreateTagModalComponent { } }); } else { - this.toastService.error('Por favor, complete todos los campos requeridos'); + this.toastService.error(this.translate.instant('porFavorCompleteTodosLos')); } } diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html index 5335a29..2c036cb 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html +++ b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html @@ -51,7 +51,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts index d640fb6..c8d2f51 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, isDevMode, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, isDevMode, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {DatePipe} from "@angular/common"; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; @@ -19,6 +21,7 @@ import {DeleteModalComponent} from "../../../shared/delete_modal/delete-modal/de styleUrl: './show-git-images.component.css' }) export class ShowGitCommitsComponent implements OnInit{ + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -42,27 +45,27 @@ export class ShowGitCommitsComponent implements OnInit{ columns = [ { columnDef: 'hexsha', - header: 'Commit ID', + header: 'commitId', cell: (commit: any) => commit.hexsha }, { columnDef: 'message', - header: 'Mensaje del commit', + header: 'mensajeDelCommit', cell: (commit: any) => commit.message }, { columnDef: 'committed_date', - header: 'Fecha del commit', + header: 'fechaDelCommit', cell: (commit: any) => `${this.datePipe.transform(commit.committed_date * 1000, 'dd/MM/yyyy hh:mm:ss')}` }, { columnDef: 'size', - header: 'Tamaño', + header: 'tamano', cell: (commit: any) => `${commit.size} bytes` }, { columnDef: 'stats_total', - header: 'Estadísticas', + header: 'estadisticas', cell: (commit: any) => { if (commit.stats_total) { return `+${commit.stats_total.insertions} -${commit.stats_total.deletions} (${commit.stats_total.files} archivos)`; @@ -72,7 +75,7 @@ export class ShowGitCommitsComponent implements OnInit{ }, { columnDef: 'tags', - header: 'Tags', + header: 'tags', cell: (commit: any) => commit.tags?.length > 0 ? commit.tags.join(', ') : 'Sin tags' } ]; @@ -110,8 +113,8 @@ export class ShowGitCommitsComponent implements OnInit{ } }, error => { - console.error('Error fetching repositories', error); - this.toastService.error('Error al cargar los repositorios'); + console.error(this.translate.instant('errorFetchingRepositories'), error); + this.toastService.error(this.translate.instant('errorAlCargarLosRepositorios')); this.loadingRepositories = false; } ); @@ -142,8 +145,8 @@ export class ShowGitCommitsComponent implements OnInit{ } }, error => { - console.error('Error fetching branches', error); - this.toastService.error('Error al cargar las ramas del repositorio'); + console.error(this.translate.instant('errorFetchingBranches'), error); + this.toastService.error(this.translate.instant('errorAlCargarLasRamas1')); this.loadingBranches = false; } ); @@ -172,8 +175,8 @@ export class ShowGitCommitsComponent implements OnInit{ this.loading = false; }, error => { - console.error('Error fetching commits', error); - this.toastService.error('Error al cargar los commits'); + console.error(this.translate.instant('errorFetchingCommits'), error); + this.toastService.error(this.translate.instant('errorAlCargarLosCommits')); this.loading = false; } ); @@ -191,7 +194,7 @@ export class ShowGitCommitsComponent implements OnInit{ this.dialog.open(ServerInfoDialogComponent, { width: '800px', data: { - title: 'Detalles del Commit', + title : this.translate.instant('detallesDelCommit'), content: { 'Commit ID': commit.hexsha, 'Mensaje': commit.message, @@ -207,7 +210,7 @@ export class ShowGitCommitsComponent implements OnInit{ break; case 'copy-commit-id': navigator.clipboard.writeText(commit.hexsha).then(() => { - this.toastService.success('Commit ID copiado al portapapeles'); + this.toastService.success(this.translate.instant('commitIdCopiadoAlPortapapeles')); }); break; case 'create-tag': @@ -217,7 +220,7 @@ export class ShowGitCommitsComponent implements OnInit{ this.openCreateBranchDialog(commit); break; default: - console.error('Acción no soportada:', action); + console.error(this.translate.instant('accionNoSoportada'), action); break; } } @@ -244,7 +247,7 @@ export class ShowGitCommitsComponent implements OnInit{ this.dialog.open(ServerInfoDialogComponent, { width: '800px', data: { - title: 'Información del Repositorio', + title : this.translate.instant('informacionDelRepositorio'), content: { 'Nombre del repositorio': this.selectedRepository || 'No seleccionado', 'UUID del repositorio': this.data.repositoryUuid, @@ -277,7 +280,7 @@ export class ShowGitCommitsComponent implements OnInit{ openBackupDialog() { if (!this.selectedRepository) { - this.toastService.warning('Por favor, selecciona un repositorio primero'); + this.toastService.warning(this.translate.instant('porFavorSeleccionaUnRepositorio')); return; } @@ -291,7 +294,7 @@ export class ShowGitCommitsComponent implements OnInit{ dialogRef.afterClosed().subscribe(result => { if (result) { - this.toastService.success('Backup iniciado correctamente'); + this.toastService.success(this.translate.instant('backupIniciadoCorrectamente')); } }); } @@ -320,7 +323,7 @@ export class ShowGitCommitsComponent implements OnInit{ deleteRepository(): void { if (!this.selectedRepository) { - this.toastService.warning('Por favor, selecciona un repositorio primero'); + this.toastService.warning(this.translate.instant('porFavorSeleccionaUnRepositorio')); return; } @@ -328,8 +331,8 @@ export class ShowGitCommitsComponent implements OnInit{ width: '400px', data: { name: this.selectedRepository, - title: 'Eliminar Repositorio', - message: '¿Estás seguro que deseas eliminar este repositorio? Esta acción no se puede deshacer.', + title : this.translate.instant('eliminarRepositorio'), + message : this.translate.instant('estasSeguroQueDeseasEliminar'), confirmText: 'Eliminar', cancelText: 'Cancelar' } @@ -340,12 +343,12 @@ export class ShowGitCommitsComponent implements OnInit{ const payload = { repositoryName: this.selectedRepository }; this.http.post(`${this.baseUrl}/image-repositories/server/git/${this.data.repositoryUuid}/delete`, payload).subscribe({ next: () => { - this.toastService.success('Repositorio eliminado con éxito'); + this.toastService.success(this.translate.instant('repositorioEliminadoConExito')); this.dialogRef.close(true); }, error: (error) => { - console.error('Error al eliminar el repositorio:', error); - this.toastService.error('Error al eliminar el repositorio'); + console.error(this.translate.instant('errorAlEliminarElRepositorio1'), error); + this.toastService.error(this.translate.instant('errorAlEliminarElRepositorio')); } }); } diff --git a/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html b/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html index 40ed9f6..c4eb7b1 100644 --- a/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html +++ b/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html @@ -46,7 +46,7 @@ - +
{{ column.header }} {{ column.header | translate }}
diff --git a/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.ts b/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.ts index 4ca9eab..f15ebaf 100644 --- a/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.ts @@ -1,4 +1,6 @@ -import {Component, Inject, Input, isDevMode, OnInit} from '@angular/core'; +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import {Component, Inject, Input, isDevMode, OnInit } from '@angular/core'; import {MatTableDataSource} from "@angular/material/table"; import {DatePipe} from "@angular/common"; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; @@ -24,6 +26,7 @@ import {RenameImageComponent} from "../rename-image/rename-image.component"; styleUrl: './show-monolitic-images.component.css' }) export class ShowMonoliticImagesComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -38,42 +41,42 @@ export class ShowMonoliticImagesComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'Id', + header: 'id1', cell: (image: any) => `${image.id}` }, { columnDef: 'name', - header: 'Nombre de imagen', + header: 'nombreDeImagen', cell: (image: any) => image.name }, { columnDef: 'version', - header: 'Version', + header: 'version', cell: (image: any) => `${image.version ? image.version : '0'}` }, { columnDef: 'isGlobal', - header: 'Imagen global', + header: 'imagenGlobal1', cell: (image: any) => image.image?.isGlobal }, { columnDef: 'status', - header: 'Estado', + header: 'estado', cell: (image: any) => image.status }, { columnDef: 'datasize', - header: 'Tamaño', + header: 'tamano', cell: (image: any) => this.formatSize(image.datasize) }, { columnDef: 'description', - header: 'Descripción', + header: 'descripcion', cell: (image: any) => image.description }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (image: any) => `${this.datePipe.transform(image.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; @@ -108,7 +111,7 @@ export class ShowMonoliticImagesComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching image repositories', error); + console.error(this.translate.instant('errorFetchingImageRepositories'), error); this.loading = false; this.toastService.error(error.error['hydra:description'] || 'Error al cargar las imágenes del repositorio'); } @@ -203,7 +206,7 @@ export class ShowMonoliticImagesComponent implements OnInit { case 'get-aux': this.http.post(`${this.baseUrl}/image-image-repositories/server/${image.uuid}/create-aux-files`, {}).subscribe({ next: (message) => { - this.toastService.success('Petición de creación de archivos auxiliares enviada'); + this.toastService.success(this.translate.instant('peticionDeCreacionDeArchivos')); this.loadData() }, error: (error) => { @@ -221,11 +224,11 @@ export class ShowMonoliticImagesComponent implements OnInit { dialogRef.afterClosed().subscribe((result) => { this.http.delete(`${this.baseUrl}${image['@id']}`).subscribe({ next: () => { - this.toastService.success('Image deleted successfully'); + this.toastService.success(this.translate.instant('imageDeletedSuccessfully')); this.loadData() }, error: (error) => { - this.toastService.error('Error deleting image'); + this.toastService.error(this.translate.instant('errorDeletingImage')); } }); }); @@ -234,7 +237,7 @@ export class ShowMonoliticImagesComponent implements OnInit { { repository: `/image-repositories/${this.data.repositoryUuid}` }) .subscribe({ next: () => { - this.toastService.success('Petición de eliminación de la papelera temporal enviada'); + this.toastService.success(this.translate.instant('peticionDeEliminacionDeLa')); this.loadData() }, error: (error) => { @@ -252,7 +255,7 @@ export class ShowMonoliticImagesComponent implements OnInit { if (result) { this.http.post(`${this.baseUrl}/image-image-repositories/server/${image.uuid}/delete-permanent`, {}).subscribe({ next: () => { - this.toastService.success('Petición de eliminación de la papelera temporal enviada'); + this.toastService.success(this.translate.instant('peticionDeEliminacionDeLa')); this.loadData() }, error: (error) => { @@ -277,7 +280,7 @@ export class ShowMonoliticImagesComponent implements OnInit { case 'recover': this.http.post(`${this.baseUrl}/image-image-repositories/server/${image.uuid}/recover`, {}).subscribe({ next: () => { - this.toastService.success('Petición de recuperación de la imagen enviada'); + this.toastService.success(this.translate.instant('peticionDeRecuperacionDeLa')); this.loadData() }, error: (error) => { @@ -316,13 +319,13 @@ export class ShowMonoliticImagesComponent implements OnInit { this.http.post(`${this.baseUrl}/image-image-repositories/server/${image.uuid}/transfer-global`, { }).subscribe({ next: (response) => { - this.toastService.success('Petición de exportación de imagen realizada correctamente'); + this.toastService.success(this.translate.instant('peticionDeExportacionDeImagen')); this.loading = false; this.router.navigate(['/commands-logs']); }, error: error => { this.loading = false; - this.toastService.error('Error en la petición de exportación de imagen'); + this.toastService.error(this.translate.instant('errorEnLaPeticionDe')); } }); break; @@ -373,7 +376,7 @@ export class ShowMonoliticImagesComponent implements OnInit { }); break; default: - console.error('Acción no soportada:', action); + console.error(this.translate.instant('accionNoSoportada'), action); break; } } @@ -402,11 +405,11 @@ export class ShowMonoliticImagesComponent implements OnInit { syncRepository() { this.http.post(`${this.baseUrl}/image-repositories/server/${this.data.repositoryUuid}/sync`, {}) .subscribe(response => { - this.toastService.success('Sincronización completada'); + this.toastService.success(this.translate.instant('sincronizacionCompletada')); this.loadData() }, error => { - console.error('Error al sincronizar', error); - this.toastService.error('Error al sincronizar'); + console.error(this.translate.instant('errorAlSincronizar'), error); + this.toastService.error(this.translate.instant('errorAlSincronizar')); }); } @@ -423,7 +426,7 @@ export class ShowMonoliticImagesComponent implements OnInit { this.loading = false; }, error => { - console.error('Error al cargar la información del alert', error); + console.error(this.translate.instant('errorAlCargarLaInformacion'), error); this.toastService.error(error.error['hydra:description']); this.loading = false; } diff --git a/ogWebconsole/src/app/components/software-profile/create-software-profile/create-software-profile.component.ts b/ogWebconsole/src/app/components/software-profile/create-software-profile/create-software-profile.component.ts index bf8937b..65783e8 100644 --- a/ogWebconsole/src/app/components/software-profile/create-software-profile/create-software-profile.component.ts +++ b/ogWebconsole/src/app/components/software-profile/create-software-profile/create-software-profile.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; @@ -15,6 +17,7 @@ import { ConfigService } from '@services/config.service'; styleUrls: ['./create-software-profile.component.css'] }) export class CreateSoftwareProfileComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; formGroup: FormGroup; @@ -79,7 +82,7 @@ export class CreateSoftwareProfileComponent implements OnInit { this.softwareCollection = response['hydra:member']; }, error => { - console.error('Error fetching software:', error); + console.error(this.translate.instant('errorFetchingSoftware'), error); } ); } @@ -90,7 +93,7 @@ export class CreateSoftwareProfileComponent implements OnInit { this.organizationalUnits = response['hydra:member']; }, error => { - console.error('Error fetching organizational units:', error); + console.error(this.translate.instant('errorFetchingOrganizationalUnits1'), error); } ); } @@ -101,7 +104,7 @@ export class CreateSoftwareProfileComponent implements OnInit { this.operativeSystems = response['hydra:member']; }, error => { - console.error('Error fetching operative systems:', error); + console.error(this.translate.instant('errorFetchingOperativeSystems'), error); } ); } @@ -152,23 +155,23 @@ export class CreateSoftwareProfileComponent implements OnInit { if (this.softwareProfileId) { this.http.put(`${this.baseUrl}${this.softwareProfileId}`, payload).subscribe( () => { - this.toastService.success('Software editado correctamente'); + this.toastService.success(this.translate.instant('softwareEditadoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error.error['hydra:description']); - console.error('Error al editar el software', error); + console.error(this.translate.instant('errorAlEditarElSoftware'), error); } ); } else { this.http.post(`${this.apiUrl}`, payload).subscribe( () => { - this.toastService.success('Software añadido correctamente'); + this.toastService.success(this.translate.instant('softwareAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error.error['hydra:description']); - console.error('Error al añadir software', error); + console.error(this.translate.instant('errorAlAnadirSoftware'), error); } ); } diff --git a/ogWebconsole/src/app/components/software-profile/data.service.ts b/ogWebconsole/src/app/components/software-profile/data.service.ts index e7456a5..f85f3b4 100644 --- a/ogWebconsole/src/app/components/software-profile/data.service.ts +++ b/ogWebconsole/src/app/components/software-profile/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -28,7 +31,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching remote calendars', error); + console.error(this.translate.instant('errorFetchingRemoteCalendars'), error); return throwError(error); }) ); @@ -45,7 +48,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching calendar', error); + console.error(this.translate.instant('errorFetchingCalendar'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/software-profile/software-profile.component.html b/ogWebconsole/src/app/components/software-profile/software-profile.component.html index eac64c3..353d0af 100644 --- a/ogWebconsole/src/app/components/software-profile/software-profile.component.html +++ b/ogWebconsole/src/app/components/software-profile/software-profile.component.html @@ -25,7 +25,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/software-profile/software-profile.component.ts b/ogWebconsole/src/app/components/software-profile/software-profile.component.ts index 2237669..d5358ad 100644 --- a/ogWebconsole/src/app/components/software-profile/software-profile.component.ts +++ b/ogWebconsole/src/app/components/software-profile/software-profile.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -17,6 +19,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './software-profile.component.css' }) export class SoftwareProfileComponent { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; images: { downloadUrl: string; name: string; uuid: string }[] = []; @@ -33,22 +36,22 @@ export class SoftwareProfileComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (software: any) => `${software.id}`, }, { columnDef: 'description', - header: 'Descripción', + header: 'descripcion', cell: (software: any) => software.description }, { columnDef: 'operativeSystem', - header: 'Sistema Operativo', + header: 'sistemaOperativo', cell: (software: any) => software.operativeSystem?.name }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (software: any) => `${this.datePipe.transform(software.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -87,7 +90,7 @@ export class SoftwareProfileComponent { this.length = data['hydra:totalItems']; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); } ); } @@ -116,10 +119,10 @@ export class SoftwareProfileComponent { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Software deleted successfully'); + this.toastService.success(this.translate.instant('softwareDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting calendar'); + this.toastService.error(this.translate.instant('errorDeletingCalendar')); } }); } else { diff --git a/ogWebconsole/src/app/components/software/create-software/create-software.component.ts b/ogWebconsole/src/app/components/software/create-software/create-software.component.ts index a6f09fa..36b43b5 100644 --- a/ogWebconsole/src/app/components/software/create-software/create-software.component.ts +++ b/ogWebconsole/src/app/components/software/create-software/create-software.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { HttpClient } from "@angular/common/http"; @@ -12,6 +14,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './create-software.component.css' }) export class CreateSoftwareComponent { + public translate = inject(TranslateService); baseUrl: string; formGroup: FormGroup; private apiUrl: string; @@ -53,7 +56,7 @@ export class CreateSoftwareComponent { this.softwareId = response['@id']; }, error: (err) => { - console.error('Error fetching software:', err); + console.error(this.translate.instant('errorFetchingSoftware'), err); } }); } @@ -75,23 +78,23 @@ export class CreateSoftwareComponent { if (this.softwareId) { this.http.put(`${this.baseUrl}${this.softwareId}`, payload).subscribe( (response) => { - this.toastService.success('Software editado correctamente'); + this.toastService.success(this.translate.instant('softwareEditadoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al editar el comando', error); + console.error(this.translate.instant('errorAlEditarElComando'), error); } ); } else { this.http.post(`${this.baseUrl}/software`, payload).subscribe( (response) => { - this.toastService.success('Software añadido correctamente'); + this.toastService.success(this.translate.instant('softwareAnadidoCorrectamente')); this.dialogRef.close(); }, (error) => { this.toastService.error(error['error']['hydra:description']); - console.error('Error al añadir comando', error); + console.error(this.translate.instant('errorAlAnadirComando'), error); } ); } diff --git a/ogWebconsole/src/app/components/software/data.service.ts b/ogWebconsole/src/app/components/software/data.service.ts index f1f2295..539b313 100644 --- a/ogWebconsole/src/app/components/software/data.service.ts +++ b/ogWebconsole/src/app/components/software/data.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -8,6 +10,7 @@ import { ConfigService } from '@services/config.service'; providedIn: 'root' }) export class DataService { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; @@ -28,7 +31,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching remote calendars', error); + console.error(this.translate.instant('errorFetchingRemoteCalendars'), error); return throwError(error); }) ); @@ -44,7 +47,7 @@ export class DataService { } }), catchError(error => { - console.error('Error fetching calendar', error); + console.error(this.translate.instant('errorFetchingCalendar'), error); return throwError(error); }) ); diff --git a/ogWebconsole/src/app/components/software/software.component.html b/ogWebconsole/src/app/components/software/software.component.html index d17390b..3eeef2a 100644 --- a/ogWebconsole/src/app/components/software/software.component.html +++ b/ogWebconsole/src/app/components/software/software.component.html @@ -34,7 +34,7 @@ - +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/software/software.component.ts b/ogWebconsole/src/app/components/software/software.component.ts index 60e0ec8..c6bfc80 100644 --- a/ogWebconsole/src/app/components/software/software.component.ts +++ b/ogWebconsole/src/app/components/software/software.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, signal } from '@angular/core'; import { MatTableDataSource } from "@angular/material/table"; import { DatePipe } from "@angular/common"; @@ -17,6 +19,7 @@ import { ConfigService } from '@services/config.service'; styleUrl: './software.component.css' }) export class SoftwareComponent { + public translate = inject(TranslateService); baseUrl: string; private apiUrl: string; images: { downloadUrl: string; name: string; uuid: string }[] = []; @@ -33,22 +36,22 @@ export class SoftwareComponent { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (software: any) => `${software.id}`, }, { columnDef: 'name', - header: 'Nombre', + header: 'nombre', cell: (software: any) => software.name }, { columnDef: 'type', - header: 'Tipo', + header: 'tipo', cell: (software: any) => software.type }, { columnDef: 'createdAt', - header: 'Fecha de creación', + header: 'fechaDeCreacion', cell: (software: any) => `${this.datePipe.transform(software.createdAt, 'dd/MM/yyyy hh:mm:ss')}`, } ]; @@ -87,7 +90,7 @@ export class SoftwareComponent { this.length = data['hydra:totalItems']; }, (error) => { - console.error('Error fetching commands', error); + console.error(this.translate.instant('errorFetchingCommands'), error); } ); } @@ -116,10 +119,10 @@ export class SoftwareComponent { this.http.delete(apiUrl).subscribe({ next: () => { this.search(); - this.toastService.success('Software deleted successfully'); + this.toastService.success(this.translate.instant('softwareDeletedSuccessfully')); }, error: (error) => { - this.toastService.error('Error deleting calendar'); + this.toastService.error(this.translate.instant('errorDeletingCalendar')); } }); } else { diff --git a/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.html b/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.html index a856a7c..9b79203 100644 --- a/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.html +++ b/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.html @@ -53,7 +53,7 @@
- +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.ts b/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.ts index e176810..2d5a624 100644 --- a/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.ts +++ b/ogWebconsole/src/app/components/task-logs/client-pending-tasks/client-pending-tasks.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; @@ -19,6 +21,7 @@ import { DeleteModalComponent } from 'src/app/shared/delete_modal/delete-modal/d styleUrls: ['./client-pending-tasks.component.css'] }) export class ClientPendingTasksComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; mercureUrl: string; traces: any[] = []; @@ -34,27 +37,27 @@ export class ClientPendingTasksComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (trace: any) => `${trace.id}`, }, { columnDef: 'command', - header: 'Comando', + header: 'comando', cell: (trace: any) => trace.command }, { columnDef: 'status', - header: 'Estado', + header: 'estado', cell: (trace: any) => trace.status }, { columnDef: 'executedAt', - header: 'Ejecución', + header: 'ejecucion', cell: (trace: any) => this.datePipe.transform(trace.executedAt, 'dd/MM/yyyy hh:mm:ss'), }, { columnDef: 'finishedAt', - header: 'Finalización', + header: 'finalizacion', cell: (trace: any) => this.datePipe.transform(trace.finishedAt, 'dd/MM/yyyy hh:mm:ss'), }, ]; @@ -88,7 +91,7 @@ export class ClientPendingTasksComponent implements OnInit { if (this.data.isOrganizationalUnit) { this.columns.splice(2, 0, { columnDef: 'client', - header: 'Cliente', + header: 'cliente', cell: (trace: any) => trace.client?.name || 'N/A' }); this.displayedColumns = [...this.columns.map(column => column.columnDef), 'information']; @@ -165,7 +168,7 @@ export class ClientPendingTasksComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching traces', error); + console.error(this.translate.instant('errorFetchingTraces'), error); this.loading = false; } ); @@ -191,7 +194,7 @@ export class ClientPendingTasksComponent implements OnInit { cancelTrace(trace: any): void { if (trace.status !== 'pending' && trace.status !== 'in-progress') { - this.toastService.warning('Solo se pueden cancelar trazas pendientes o en ejecución', 'Advertencia'); + this.toastService.warning(this.translate.instant('soloSePuedenCancelarTrazas'), 'Advertencia'); return; } @@ -205,23 +208,23 @@ export class ClientPendingTasksComponent implements OnInit { jobId: trace.jobId }).subscribe({ next: () => { - this.toastService.success('Tarea cancelada correctamente'); + this.toastService.success(this.translate.instant('tareaCanceladaCorrectamente')); this.loadTraces(); }, error: (error) => { this.toastService.error(error.error['hydra:description'] || 'Error al cancelar la tarea'); - console.error('Error cancelling in-progress trace:', error); + console.error(this.translate.instant('errorCancellingInprogressTrace'), error); } }); } else { this.http.post(`${this.baseUrl}/traces/server/${trace.uuid}/cancel`, {}).subscribe({ next: () => { - this.toastService.success('Tarea cancelada correctamente'); + this.toastService.success(this.translate.instant('tareaCanceladaCorrectamente')); this.loadTraces(); }, error: (error) => { this.toastService.error(error.error['hydra:description'] || 'Error al cancelar la tarea'); - console.error('Error cancelling pending trace:', error); + console.error(this.translate.instant('errorCancellingPendingTrace'), error); } }); } @@ -288,7 +291,7 @@ export class ClientPendingTasksComponent implements OnInit { clearAllActions(): void { if (this.traces.length === 0) { - this.toastService.warning('No hay acciones para limpiar'); + this.toastService.warning(this.translate.instant('noHayAccionesParaLimpiar')); return; } @@ -297,7 +300,7 @@ export class ClientPendingTasksComponent implements OnInit { width: '400px', data: { name: `Todas las acciones mostradas (${this.traces.length} acciones)`, - message: '¿Estás seguro de que quieres cancelar todas las acciones mostradas?' + message : this.translate.instant('estasSeguroDeQueQuieres') }, }).afterClosed().subscribe((result) => { if (result) { @@ -314,8 +317,8 @@ export class ClientPendingTasksComponent implements OnInit { this.loadTraces(); // Recargar las trazas }, error: (error) => { - console.error('Error al cancelar las acciones:', error); - this.toastService.error('Error al cancelar las acciones'); + console.error(this.translate.instant('errorAlCancelarLasAcciones1'), error); + this.toastService.error(this.translate.instant('errorAlCancelarLasAcciones')); this.loadTraces(); // Recargar las trazas para mostrar el estado actual }, complete: () => { diff --git a/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.html b/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.html index ad4a56b..84a568f 100644 --- a/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.html +++ b/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.html @@ -72,7 +72,7 @@
- +
{{ column.header }} {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts b/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts index 7962969..7d6e1af 100644 --- a/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts +++ b/ogWebconsole/src/app/components/task-logs/client-task-logs/client-task-logs.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; import { HttpClient, HttpParams } from '@angular/common/http'; @@ -21,6 +23,7 @@ import { COMMAND_TYPES } from 'src/app/shared/constants/command-types'; styleUrls: ['./client-task-logs.component.css'] }) export class ClientTaskLogsComponent implements OnInit { + public translate = inject(TranslateService); baseUrl: string; mercureUrl: string; traces: any[] = []; @@ -46,27 +49,27 @@ export class ClientTaskLogsComponent implements OnInit { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (trace: any) => `${trace.id}`, }, { columnDef: 'command', - header: 'Comando', + header: 'comando', cell: (trace: any) => trace.command }, { columnDef: 'status', - header: 'Estado', + header: 'estado', cell: (trace: any) => trace.status }, { columnDef: 'executedAt', - header: 'Ejecución', + header: 'ejecucion', cell: (trace: any) => this.datePipe.transform(trace.executedAt, 'dd/MM/yyyy hh:mm:ss'), }, { columnDef: 'finishedAt', - header: 'Finalización', + header: 'finalizacion', cell: (trace: any) => this.datePipe.transform(trace.finishedAt, 'dd/MM/yyyy hh:mm:ss'), }, ]; @@ -153,7 +156,7 @@ export class ClientTaskLogsComponent implements OnInit { } if (start && end && start > end) { - this.toastService.warning('La fecha de inicio no puede ser mayor que la fecha de fin'); + this.toastService.warning(this.translate.instant('laFechaDeInicioNo')); return; } this.loadTraces(); @@ -176,7 +179,7 @@ export class ClientTaskLogsComponent implements OnInit { cancelTrace(trace: any): void { if (trace.status !== 'pending' && trace.status !== 'in-progress') { - this.toastService.warning('Solo se pueden cancelar trazas pendientes o en ejecución', 'Advertencia'); + this.toastService.warning(this.translate.instant('soloSePuedenCancelarTrazas'), 'Advertencia'); return; } @@ -190,23 +193,23 @@ export class ClientTaskLogsComponent implements OnInit { job_id: trace.jobId }).subscribe({ next: () => { - this.toastService.success('Tarea cancelada correctamente'); + this.toastService.success(this.translate.instant('tareaCanceladaCorrectamente')); this.loadTraces(); }, error: (error) => { this.toastService.error(error.error['hydra:description'] || 'Error al cancelar la tarea'); - console.error('Error cancelling in-progress trace:', error); + console.error(this.translate.instant('errorCancellingInprogressTrace'), error); } }); } else { this.http.post(`${this.baseUrl}/traces/server/${trace.uuid}/cancel`, {}).subscribe({ next: () => { - this.toastService.success('Tarea cancelada correctamente'); + this.toastService.success(this.translate.instant('tareaCanceladaCorrectamente')); this.loadTraces(); }, error: (error) => { this.toastService.error(error.error['hydra:description'] || 'Error al cancelar la tarea'); - console.error('Error cancelling pending trace:', error); + console.error(this.translate.instant('errorCancellingPendingTrace'), error); } }); } @@ -245,7 +248,7 @@ export class ClientTaskLogsComponent implements OnInit { this.loading = false; }, (error) => { - console.error('Error fetching client traces', error); + console.error(this.translate.instant('errorFetchingClientTraces'), error); this.loading = false; } ); @@ -259,7 +262,7 @@ export class ClientTaskLogsComponent implements OnInit { this.loading = false; }, error => { - console.error('Error fetching commands:', error); + console.error(this.translate.instant('errorFetchingCommands1'), error); this.loading = false; } ); diff --git a/ogWebconsole/src/app/components/task-logs/task-logs.component.html b/ogWebconsole/src/app/components/task-logs/task-logs.component.html index 5355a10..cac7433 100644 --- a/ogWebconsole/src/app/components/task-logs/task-logs.component.html +++ b/ogWebconsole/src/app/components/task-logs/task-logs.component.html @@ -234,7 +234,7 @@
- {{ column.header }} + {{ column.header | translate }} diff --git a/ogWebconsole/src/app/components/task-logs/task-logs.component.ts b/ogWebconsole/src/app/components/task-logs/task-logs.component.ts index a8012e2..5e2d49d 100644 --- a/ogWebconsole/src/app/components/task-logs/task-logs.component.ts +++ b/ogWebconsole/src/app/components/task-logs/task-logs.component.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { ChangeDetectorRef, Component, OnInit, OnDestroy } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, forkJoin } from 'rxjs'; @@ -21,6 +23,7 @@ import { COMMAND_TYPES } from '../../shared/constants/command-types'; styleUrls: ['./task-logs.component.css'] }) export class TaskLogsComponent implements OnInit, OnDestroy { + public translate = inject(TranslateService); baseUrl: string; mercureUrl: string; traces: any[] = []; @@ -73,37 +76,37 @@ export class TaskLogsComponent implements OnInit, OnDestroy { columns = [ { columnDef: 'id', - header: 'ID', + header: 'id', cell: (trace: any) => `${trace.id}`, sortable: true }, { columnDef: 'command', - header: 'Comando', + header: 'comando', cell: (trace: any) => trace.command, sortable: true }, { columnDef: 'client', - header: 'Cliente', + header: 'cliente', cell: (trace: any) => trace.client?.name, sortable: true }, { columnDef: 'status', - header: 'Estado', + header: 'estado', cell: (trace: any) => trace.status, sortable: true }, { columnDef: 'executedAt', - header: 'Ejecución', + header: 'ejecucion', cell: (trace: any) => this.datePipe.transform(trace.executedAt, 'dd/MM/yyyy hh:mm:ss'), sortable: true }, { columnDef: 'finishedAt', - header: 'Finalización', + header: 'finalizacion', cell: (trace: any) => this.datePipe.transform(trace.finishedAt, 'dd/MM/yyyy hh:mm:ss'), sortable: true }, @@ -169,7 +172,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { refreshData(): void { this.loadTraces(); - this.toastService.success('Datos actualizados', 'Éxito'); + this.toastService.success(this.translate.instant('datosActualizados'), 'Éxito'); } selectTrace(trace: any): void { @@ -274,19 +277,19 @@ export class TaskLogsComponent implements OnInit, OnDestroy { link.click(); document.body.removeChild(link); - this.toastService.success('Archivo CSV exportado correctamente', 'Éxito'); + this.toastService.success(this.translate.instant('archivoCsvExportadoCorrectamente'), 'Éxito'); } cancelTrace(trace: any): void { if (trace.status !== 'pending' && trace.status !== 'in-progress') { - this.toastService.warning('Solo se pueden cancelar trazas pendientes o en ejecución', 'Advertencia'); + this.toastService.warning(this.translate.instant('soloSePuedenCancelarTrazas'), 'Advertencia'); return; } const dialogRef = this.dialog.open(DeleteModalComponent, { width: '400px', data: { - title: 'Cancelar Traza', + title : this.translate.instant('cancelarTraza'), message: `¿Estás seguro de que quieres cancelar la traza #${trace.id}?`, confirmText: 'Cancelar', cancelText: 'No cancelar' @@ -300,24 +303,24 @@ export class TaskLogsComponent implements OnInit, OnDestroy { jobId: trace.jobId }).subscribe( () => { - this.toastService.success('Traza cancelada correctamente', 'Éxito'); + this.toastService.success(this.translate.instant('trazaCanceladaCorrectamente'), 'Éxito'); this.loadTraces(); this.loadTotalStats(); }, (error) => { - this.toastService.error('Error al cancelar la traza', 'Error'); + this.toastService.error(this.translate.instant('errorAlCancelarLaTraza'), 'Error'); } ); } else { this.http.post(`${this.baseUrl}/traces/cancel-multiple`, {traces: [trace['@id']]}).subscribe( () => { - this.toastService.success('Traza cancelada correctamente', 'Éxito'); + this.toastService.success(this.translate.instant('trazaCanceladaCorrectamente'), 'Éxito'); this.loadTraces(); this.loadTotalStats(); }, (error) => { - console.error('Error cancelling pending trace:', error); - this.toastService.error('Error al cancelar la traza', 'Error'); + console.error(this.translate.instant('errorCancellingPendingTrace'), error); + this.toastService.error(this.translate.instant('errorAlCancelarLaTraza'), 'Error'); } ); } @@ -327,14 +330,14 @@ export class TaskLogsComponent implements OnInit, OnDestroy { markTraceAsSuccess(trace: any): void { if (trace.status !== 'in-progress') { - this.toastService.warning('Solo se pueden marcar como exitosas las trazas en progreso', 'Advertencia'); + this.toastService.warning(this.translate.instant('soloSePuedenMarcarComo'), 'Advertencia'); return; } const dialogRef = this.dialog.open(DeleteModalComponent, { width: '400px', data: { - title: 'Marcar Traza como Exitosa', + title : this.translate.instant('marcarTrazaComoExitosa'), message: `¿Estás seguro de que quieres marcar la traza #${trace.id} como exitosa?`, confirmText: 'Marcar como Exitosa', cancelText: 'Cancelar' @@ -346,13 +349,13 @@ export class TaskLogsComponent implements OnInit, OnDestroy { this.loading = true; this.http.post(`${this.baseUrl}${trace['@id']}/mark-as-success`, {}).subscribe( () => { - this.toastService.success('Traza marcada como exitosa correctamente', 'Éxito'); + this.toastService.success(this.translate.instant('trazaMarcadaComoExitosaCorrectamente'), 'Éxito'); this.loadTraces(); this.loadTotalStats(); }, (error) => { - console.error('Error marking trace as success:', error); - this.toastService.error('Error al marcar la traza como exitosa', 'Error'); + console.error(this.translate.instant('errorMarkingTraceAsSuccess'), error); + this.toastService.error(this.translate.instant('errorAlMarcarLaTraza'), 'Error'); this.loading = false; } ); @@ -437,7 +440,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { `); } } else { - this.toastService.error('No se puede acceder a los logs: IP del cliente no disponible', 'Error'); + this.toastService.error(this.translate.instant('noSePuedeAccederA'), 'Error'); } } @@ -474,7 +477,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { } }, (error) => { - console.error('Error fetching traces', error); + console.error(this.translate.instant('errorFetchingTraces'), error); this.loading = false; } ); @@ -488,7 +491,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { this.loading = false; }, error => { - console.error('Error fetching commands:', error); + console.error(this.translate.instant('errorFetchingCommands1'), error); this.loading = false; } ); @@ -502,7 +505,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { this.loading = false; }, error => { - console.error('Error fetching clients:', error); + console.error(this.translate.instant('errorFetchingClients1'), error); this.loading = false; } ); @@ -543,7 +546,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { }; }, error => { - console.error('Error fetching stats by status:', error); + console.error(this.translate.instant('errorFetchingStatsByStatus'), error); const todayString = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); this.totalStats = { total: this.length, @@ -595,7 +598,7 @@ export class TaskLogsComponent implements OnInit, OnDestroy { } if (start && end && start > end) { - this.toastService.warning('La fecha de inicio no puede ser mayor que la fecha de fin'); + this.toastService.warning(this.translate.instant('laFechaDeInicioNo')); return; } this.loadTraces(); diff --git a/ogWebconsole/src/app/core/services/custom.interceptor.ts b/ogWebconsole/src/app/core/services/custom.interceptor.ts index 69768b2..bd86947 100644 --- a/ogWebconsole/src/app/core/services/custom.interceptor.ts +++ b/ogWebconsole/src/app/core/services/custom.interceptor.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; @@ -6,6 +8,7 @@ import { Router } from '@angular/router'; @Injectable() export class CustomInterceptor implements HttpInterceptor { + public translate = inject(TranslateService); constructor(private router: Router) { } intercept(req: HttpRequest, next: HttpHandler): Observable> { @@ -41,7 +44,7 @@ export class CustomInterceptor implements HttpInterceptor { catchError((error: HttpErrorResponse) => { if (error.status === 401) { this.router.navigate(['/auth/login']).then(r => { - console.error('Error 401, redirect to login page'); + console.error(this.translate.instant('error401RedirectToLogin')); }); } return throwError(() => error); diff --git a/ogWebconsole/src/app/services/auth.service.ts b/ogWebconsole/src/app/services/auth.service.ts index 80d820c..92b7b4c 100644 --- a/ogWebconsole/src/app/services/auth.service.ts +++ b/ogWebconsole/src/app/services/auth.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { jwtDecode } from 'jwt-decode'; @@ -20,6 +22,7 @@ interface JwtPayload { @Injectable({ providedIn: 'root' }) export class AuthService { + public translate = inject(TranslateService); private tokenPayload: JwtPayload | null = null; constructor(private router: Router) { @@ -33,7 +36,7 @@ export class AuthService { try { this.tokenPayload = jwtDecode(token); } catch (e) { - console.error('Error decoding JWT', e); + console.error(this.translate.instant('errorDecodingJwt'), e); this.tokenPayload = null; } } diff --git a/ogWebconsole/src/app/services/config.service.ts b/ogWebconsole/src/app/services/config.service.ts index fa4072d..445af98 100644 --- a/ogWebconsole/src/app/services/config.service.ts +++ b/ogWebconsole/src/app/services/config.service.ts @@ -1,3 +1,5 @@ +import { inject } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { catchError } from 'rxjs/operators'; @@ -7,6 +9,7 @@ import { of } from 'rxjs'; providedIn: 'root' }) export class ConfigService { + public translate = inject(TranslateService); private config: any; constructor(private http: HttpClient) {} @@ -14,7 +17,7 @@ export class ConfigService { loadConfig() { return this.http.get('assets/config.json').pipe( catchError((error) => { - console.error('Error loading config.json', error); + console.error(this.translate.instant('errorLoadingConfigjson'), error); return of({}); }) ).toPromise().then(config => { diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 5ddc832..6205919 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -502,7 +502,7 @@ "TOOLTIP_DHCP_SERVERS": "Manage and register DHCP servers", "boot": "Boot", "TOOLTIP_BOOT": "Configure and manage boot options", - "ogLive": "OgLive", + "ogLive": "Og Live", "viewInfoStepText": "View information about the OgLive server", "TOOLTIP_PXE_IMAGES": "View available PXE boot images", "pxeTemplates": "PXE Templates", @@ -564,7 +564,7 @@ "CpuUsage": "CPU Usage", "processes": "Processes", "usedPercentageLabel": "Used", - "errorLoadingData": "Error fetching data. Service not available", + "errorLoadingData": "Error loading data:", "repository": "Repository", "addRepository": "Add repository", "addRepositoryStepText": "Click to add a new repository.", @@ -1190,5 +1190,479 @@ "forReservationFrom": "for reservation from", "saveFiltersDialogWorks": "save-filters-dialog works!", "showDetailsWorks": "show-details works!", - "queueActionsForFailedPcs": "Do you want to queue actions for PCs that cannot execute?" + "queueActionsForFailedPcs": "Do you want to queue actions for PCs that cannot execute?", + "errorAlActualizarCliente": "Error al updating client:", + "accionNoSoportada": "Acción not soportada:", + "archivoCsvExportadoCorrectamente": "File CSV exportado successfully", + "archivoCargadoCorrectamenteLosDatos": "File cargado , the data están listos para enviarse. successfully", + "asistenteDeParticionado": "Asistente de particionado", + "backupIniciadoCorrectamente": "Backup started successfully", + "calendarCreatedSuccessfully": "Calendar created successfully", + "calendarDeletedSuccessfully": "Calendar deleted successfully", + "calendarRuleCreatedSuccessfully": "Calendar rule created successfully", + "calendarRuleUpdatedSuccessfully": "Calendar rule updated successfully", + "calendarUpdatedSuccessfully": "Calendar updated successfully", + "calendariosSincronizadosCorrectamente": "Calendarios sincronizados successfully", + "cancelarTraza": "Cancelling Trace", + "cliente": "Client", + "clienteActualizadoCorrectamente": "Client updated successfully", + "clienteActualizadoExitosamente": "Client updated successfully", + "clienteActualizado": "Client updated!", + "clienteCreadoExitosamente": "Client created successfully", + "clienteEliminadoExitosamenteDeLa": "Client deleted de the network successfully", + "clientesPorPagina": "Clientes por página", + "comando": "Command", + "comandoAnadidoCorrectamente": "Command añadido successfully", + "comandoEditado": "Command edited", + "comandoEditadoCorrectamente": "Command edited successfully", + "comandoEjecutadoConExito": "Command executed con éxito", + "comandoEliminadoConExito": "Command deleted con éxito", + "commitIdCopiadoAlPortapapeles": "Commit ID copiado al portapapeles", + "configuracionDeRedActualizadaExitosamente": "Configuración de network actualizada successfully", + "configuracionDeRedAnadidaExitosamente": "Configuración de network añadida successfully", + "confirmarMigracionDeServidores": "Confirmar migración de servidores", + "contenido": "Contenido", + "contrasenaCambiadaConExito": "Contraseña cambiada con éxito", + "creadoEnRepositorio": "Created en repository", + "creadoExitosamente": "Created successfully", + "creadoPor": "Created por", + "crearImagen": "Creating image", + "codigo": "Código", + "datosActualizados": "Data actualizados", + "datosActualizadosCorrectamente": "Data actualizados successfully", + "datosCargadosCorrectamenteLosDatos": "Data cargados , the data están listos para enviarse. successfully", + "debeEspecificarFechaDeInicio": "Must especificar date de inicio y date de fin", + "debeIngresarUnScript": "Must ingresar a script", + "debeIngresarUnScriptAntes": "Must ingresar a script antes de saving.", + "debeSeleccionarAlMenosUn": "Must select al menos a client", + "debeSeleccionarAlMenosUn1": "Must select al menos a día de the semana", + "debeSeleccionarAlMenosUn2": "Must select al menos a mes", + "debeSeleccionarUnCommit": "Must select a commit", + "debeSeleccionarUnMetodo": "Must select a método", + "debeSeleccionarUnRepositorioPrimero": "Must select a repository primero", + "debeSeleccionarUnScript": "Must select a script", + "debeSeleccionarUnServidorDhcp": "Must select a server DHCP para sincronizar", + "debeSeleccionarUnaImagen": "Must select a image", + "debeSeleccionarUnaParticion": "Must select a partición", + "debeSeleccionarUnaUnidadOrganizativa": "Must select a unidad organizativa", + "debesIntroducirUnNombreCanonico": "Debes introducir a name canónico para the image", + "debesIntroducirUnOrdenDe": "Debes introducir a orden de ejecución válido (mayor que 0).", + "debesSeleccionarUnaImagenPara": "Debes select a image para updating", + "debesSeleccionarUnaParticion": "Debes select a partición", + "debesSeleccionarUnaTareaExistente": "Debes select a task existente.", + "descripcion": "Descripción", + "desplegarImagen": "Desplegar image", + "detallesDelCommit": "Details del Commit", + "disco": "Disco", + "diasDeLaSemana": "Días de the semana", + "editadoExitosamente": "Edited successfully", + "editadoYParametrosPropagadosExitosamente": "Edited y parámetros propagados successfully", + "ejecucion": "Ejecución", + "ejecucionUnica": "Ejecución única", + "ejecutarScript": "Ejecutar script", + "elTamanoTotalDeLas": "The tamaño total de the partitions en the disco seleccionado excede the tamaño total del disco.", + "elementoEliminadoCorrectamente": "Elemento deleted . successfully", + "eliminadoCorrectamente": "Deleted successfully", + "eliminarRepositorio": "Deleting Repository", + "error401RedirectToLogin": "Error 401, redirect to login page", + "errorActualizandoElGrupoDe": "Error actualizando the group de comandos", + "errorAlActualizarCliente1": "Error al updating client:", + "errorAlActualizarElCliente": "Error al updating the client:", + "errorAlActualizarElGrupo": "Error al updating the group de comandos", + "errorAlActualizarLaSubred": "Error al updating the subnet en the server", + "errorAlActualizarLaTarea": "Error al updating the task", + "errorAlAnadirComando": "Error al añadir command", + "errorAlAnadirElMenu": "Error al añadir the menu", + "errorAlAnadirLaImagen": "Error al añadir the image", + "errorAlAnadirRol": "Error al añadir role", + "errorAlAnadirRol1": "Error al añadir role:", + "errorAlAnadirSistemaOperativo": "Error al añadir system operative", + "errorAlAnadirSoftware": "Error al añadir software", + "errorAlCancelarLaTraza": "Error al cancelling the trace", + "errorAlCancelarLasAcciones": "Error al cancelling the acciones", + "errorAlCancelarLasAcciones1": "Error al cancelling the acciones:", + "errorAlCargarComandos": "Error al loading comandos:", + "errorAlCargarDatosDe": "Error al loading data de Git:", + "errorAlCargarDatosDel": "Error al loading data del client:", + "errorAlCargarElEstado": "Error al loading the status del dhcp", + "errorAlCargarElEstado1": "Error al loading the status del repository", + "errorAlCargarElEstado2": "Error al loading the status del server de boot", + "errorAlCargarGruposDe": "Error al loading groups de comandos:", + "errorAlCargarInformacionDe": "Error al loading información de Git", + "errorAlCargarLaInformacion": "Error al loading the información del alert", + "errorAlCargarLaLista": "Error al loading the lista de Dhcps", + "errorAlCargarLaLista1": "Error al loading the lista de Servidores de Boot", + "errorAlCargarLaLista2": "Error al loading the lista de repositories", + "errorAlCargarLaRuta": "Error al loading the ruta actual.", + "errorAlCargarLasImagenes": "Error al loading the imágenes de repository git:", + "errorAlCargarLasImagenes1": "Error al loading the imágenes existentes", + "errorAlCargarLasImagenes2": "Error al loading the imágenes existentes:", + "errorAlCargarLasImagenes3": "Error al loading the imágenes:", + "errorAlCargarLasParticiones": "Error al loading the partitions:", + "errorAlCargarLasPlantillas": "Error al loading the templates", + "errorAlCargarLasProgramaciones": "Error al loading the programaciones", + "errorAlCargarLasRamas": "Error al loading the ramas", + "errorAlCargarLasRamas1": "Error al loading the ramas del repository", + "errorAlCargarLasTareas": "Error al loading the tareas existentes", + "errorAlCargarLasUnidades": "Error al loading the units organizacionales", + "errorAlCargarLosClientes": "Error al loading the clientes de the unidad organizativa", + "errorAlCargarLosClientes1": "Error al loading the clientes:", + "errorAlCargarLosComandos": "Error al loading the comandos individuales", + "errorAlCargarLosCommits": "Error al loading the commits", + "errorAlCargarLosDatos": "Error al loading the data de the task", + "errorAlCargarLosDatos1": "Error al loading the data del client:", + "errorAlCargarLosGrupos": "Error al loading the groups de comandos", + "errorAlCargarLosRepositorios": "Error al loading the repositories", + "errorAlCargarLosRepositorios1": "Error al loading the repositories git", + "errorAlCargarLosRepositorios2": "Error al loading the repositories git:", + "errorAlComprobarElEstado": "Error al comprobar the status del classroom", + "errorAlCopiarAlPortapapeles": "Error al copiar al portapapeles", + "errorAlCrearElGrupo": "Error al creating the group de comandos", + "errorAlCrearLaTarea": "Error al creating the task", + "errorAlCrearLasParticiones": "Error al creating the partitions.", + "errorAlCrearSubredEn": "Error al creating subnet en server", + "errorAlEditarElComando": "Error al editing the command", + "errorAlEditarElRol": "Error al editing the role", + "errorAlEditarElRol1": "Error al editing the role:", + "errorAlEditarElSistema": "Error al editing the system operative", + "errorAlEditarElSoftware": "Error al editing the software", + "errorAlEditarLaImagen": "Error al editing the image", + "errorAlEjecutarElComando": "Error al ejecutar the command:", + "errorAlEjecutarElScript": "Error al ejecutar the script", + "errorAlEliminarElComando": "Error al deleting the command:", + "errorAlEliminarElGrupo": "Error al deleting the group de comandos:", + "errorAlEliminarElMenu": "Error al deleting the menú:", + "errorAlEliminarElRepositorio": "Error al deleting the repository", + "errorAlEliminarElRepositorio1": "Error al deleting the repository:", + "errorAlEliminarElServidor": "Error al deleting the server", + "errorAlEliminarLaImagen": "Error al deleting the image:", + "errorAlEliminarLaSubred": "Error al deleting the subnet", + "errorAlEliminarLaTarea": "Error al deleting the task:", + "errorAlEliminarLasLeases": "Error al deleting the leases DHCP", + "errorAlEliminarLosClientes": "Error al deleting the clientes seleccionados", + "errorAlEliminarServidor": "Error al deleting server:", + "errorAlFiltrarLasUnidades": "Error al filtrar the units organizacionales", + "errorAlGuardarLasVariables": "Error al saving the variables de entorno:", + "errorAlMarcarLaTraza": "Error al marcar the trace as successful", + "errorAlObtenerElEstado": "Error al fetching the status del server", + "errorAlObtenerLasParticiones": "Error al fetching the partitions:", + "errorAlObtenerLosClientes": "Error al fetching the clientes PXE:", + "errorAlObtenerLosClientes1": "Error al fetching the clientes de the unidad organizativa:", + "errorAlObtenerLosDetalles": "Error al fetching the details del profile de hardware", + "errorAlObtenerLosPerfiles": "Error al fetching the perfiles de software", + "errorAlObtenerLosRepositorios": "Error al fetching the repositories de imágenes", + "errorAlPropagarParametros": "Error al propagar parámetros:", + "errorAlRealizarPost": "Error al performing POST:", + "errorAlRealizarPut": "Error al performing PUT:", + "errorAlRealizarLaPeticion": "Error al performing the petición de backup de image", + "errorAlSincronizar": "Error al sincronizar", + "errorAlSincronizarImagenesOglive": "Error al sincronizar imagenes ogLive: tiempo de espera agotado", + "errorAlSincronizarLasPlantillas": "Error al sincronizar the templates Pxe: tiempo de espera agotado", + "errorAlSincronizarLasSubredes": "Error al sincronizar the subnets: tiempo de espera agotado", + "errorAlSincronizarSubredes": "Error al sincronizar subnets", + "errorCancellingInprogressTrace": "Error cancelling in-progress trace:", + "errorCancellingPendingTrace": "Error cancelling pending trace:", + "errorCargandoLasUnidadesOrganizativas": "Error cargando the Units Organizational", + "errorCargandoLosDatos": "Error cargando the data", + "errorCargandoLosDatosDel": "Error cargando the data del server", + "errorChangingPassword": "Error changing password:", + "errorCreandoElGrupoDe": "Error creando the group de comandos", + "errorDecodingJwt": "Error decoding JWT", + "errorDeletingAsset": "Error deleting asset", + "errorDeletingCalendar": "Error deleting calendar", + "errorDeletingElement": "Error deleting element", + "errorDeletingEntity": "Error deleting entity:", + "errorDeletingHardware": "Error deleting hardware", + "errorDeletingImage": "Error deleting image", + "errorDeletingMultipleClients": "Error deleting multiple clients", + "errorDeletingMultipleClients1": "Error deleting multiple clients:", + "errorDeletingOperativeSystem": "Error deleting operative system", + "errorDeletingRole": "Error deleting role:", + "errorDeletingUser": "Error deleting user:", + "errorDuranteLaSincronizacion": "Error durante the sincronización", + "errorDuranteLaSincronizacion1": "Error durante the sincronización:", + "errorEjecutandoGrupoDeComandos": "Error ejecutando group de comandos:", + "errorEnLaPeticionDe": "Error en the petición de exportación de image", + "errorFetchingBootservers": "Error fetching BootServers:", + "errorFetchingDhcpServersFor": "Error fetching DHCP servers for subnet sync", + "errorFetchingPxeTemplatesBy": "Error fetching PXE templates by server:", + "errorFetchingAssets": "Error fetching assets", + "errorFetchingAvailableCommands": "Error fetching available commands", + "errorFetchingBootServer": "Error fetching boot server:", + "errorFetchingBranches": "Error fetching branches", + "errorFetchingBranchesForGit": "Error fetching branches for Git data", + "errorFetchingCalendar": "Error fetching calendar", + "errorFetchingCalendars": "Error fetching calendars", + "errorFetchingChildUnits": "Error fetching child units:", + "errorFetchingChildren": "Error fetching children", + "errorFetchingClientTraces": "Error fetching client traces", + "errorFetchingClients": "Error fetching clients", + "errorFetchingClients1": "Error fetching clients:", + "errorFetchingCommandGroups": "Error fetching command groups", + "errorFetchingCommands": "Error fetching commands", + "errorFetchingCommands1": "Error fetching commands:", + "errorFetchingCommits": "Error fetching commits", + "errorFetchingData": "Error fetching data", + "errorFetchingDataForEdit": "Error fetching data for edit:", + "errorFetchingDhcpServer": "Error fetching dhcp server:", + "errorFetchingDownloads": "Error fetching downloads:", + "errorFetchingFilters": "Error fetching filters", + "errorFetchingFilters1": "Error fetching filters:", + "errorFetchingHardwareProfileDetails": "Error fetching hardware profile details:", + "errorFetchingHardwareProfiles": "Error fetching hardware profiles:", + "errorFetchingImageRepositories": "Error fetching image repositories", + "errorFetchingImages": "Error fetching images", + "errorFetchingMenus": "Error fetching menus", + "errorFetchingMenus1": "Error fetching menus:", + "errorFetchingOglivesByServer": "Error fetching ogLives by server:", + "errorFetchingOglives": "Error fetching ogLives:", + "errorFetchingOperativeSystems": "Error fetching operative systems:", + "errorFetchingOrganizationalUnit": "Error fetching organizational unit", + "errorFetchingOrganizationalUnits": "Error fetching organizational units", + "errorFetchingOrganizationalUnits1": "Error fetching organizational units:", + "errorFetchingParentUnits": "Error fetching parent units:", + "errorFetchingPxeTemplates": "Error fetching pxe templates", + "errorFetchingRawMenuTemplate": "Error fetching raw menu template", + "errorFetchingRemoteCalendar": "Error fetching remote calendar:", + "errorFetchingRemoteCalendars": "Error fetching remote calendars", + "errorFetchingRepositories": "Error fetching repositories", + "errorFetchingRepositories1": "Error fetching repositories:", + "errorFetchingRoles": "Error fetching roles", + "errorFetchingRoomData": "Error fetching room data:", + "errorFetchingSoftware": "Error fetching software:", + "errorFetchingStatsByStatus": "Error fetching stats by status:", + "errorFetchingTasks": "Error fetching tasks", + "errorFetchingTraces": "Error fetching traces", + "errorFetchingUnidadesOrganizativas": "Error fetching units organizational", + "errorFetchingUserGroup": "Error fetching user group", + "errorFetchingUserGroups": "Error fetching user groups", + "errorFetchingUser": "Error fetching user:", + "errorFetchingUsers": "Error fetching users", + "errorLoadingCalendars": "Error loading calendars", + "errorLoadingConfigjson": "Error loading config.json", + "errorLoadingCurrentCalendar": "Error loading current calendar", + "errorLoadingOrganizationalUnit": "Error loading organizational unit", + "errorLoadingScheduleData": "Error loading schedule data", + "errorMarkingTraceAsSuccess": "Error marking trace as success:", + "errorPreviewingMenuTemplate": "Error previewing menu template", + "errorUploadingAssets": "Error uploading assets", + "estaUnidadOrganizativaNoTiene": "Esta unidad organizativa not tiene clientes", + "estado": "Status", + "estadoDelAulaActualizado": "Status del classroom updated", + "estadoDelDhcpActualizadoCorrectamente": "Status del dhcp updated successfully", + "estadoDelRepositorioActualizadoCorrectamente": "Status del repository updated successfully", + "estadoDelServidorDeBoot": "Status del server de boot updated successfully", + "estadisticas": "Estadísticas", + "failedToDecodePreviousFilecontent": "Failed to decode previous fileContent Base64", + "failedToEncodeUpdatedHtml": "Failed to encode updated HTML to Base64", + "failedToPreviewGeneratedHtml": "Failed to preview generated HTML", + "fechaDeCreacion": "Date de creación", + "fechaDelCommit": "Date del commit", + "finalizacion": "Finalización", + "formIsInvalid": "Form is invalid", + "formularioInvalidoPorFavorRevise": "Formulario inválido. Por favor, revise the campos obligatorios.", + "fullsum": "Fullsum", + "gestionarImagenes": "Gestionar imágenes", + "gestiones": "Gestiones", + "grupoDeComandosActualizadoCon": "Group de comandos updated con éxito", + "grupoDeComandosCreadoCon": "Group de comandos created con éxito", + "grupoDeComandosEjecutadoExitosamente": "Group de comandos executed successfully", + "grupoDeComandosEliminadoCon": "Group de comandos deleted con éxito", + "guardadoPeroHuboUnError": "Saved, pero hubo a Error al propagar the parámetros", + "hardwareDeletedSuccessfully": "Hardware deleted successfully", + "horaDeEjecucion": "Time de ejecución", + "huboUnProblemaProcesandoLos": "Hubo a problema procesando the caracteres especiales del HTML.", + "id": "ID", + "ipAddress": "IP Address", + "id1": "Id", + "idServidorDhcp": "Id Server DHCP", + "imageCreatedSuccessfully": "Image created successfully", + "imageDeletedSuccessfully": "Image deleted successfully", + "imageUpdatedSuccessfully": "Image updated successfully", + "imagenGlobal": "Image Global", + "imagenAnadidaCorrectamente": "Image añadida successfully", + "imagenEditadaCorrectamente": "Image editada successfully", + "imagenEliminadaConExito": "Image eliminada con éxito", + "imagenGlobal1": "Image global", + "imagenPorDefecto": "Image por defecto", + "imagenRenombradaCorrectamente": "Image renombrada successfully", + "informacionDelRepositorio": "Información del Repository", + "iniciarSesion": "Iniciar sesión", + "inventarioDeHardwareActualizadoCorrectamente": "Inventario de hardware updated successfully", + "inventarioDeSoftwareActualizadoCorrectamente": "Inventario de software updated successfully", + "ip": "Ip", + "laFechaDeFinDebe": "The date de fin must ser posterior a the date de inicio", + "laFechaDeInicioNo": "The date de inicio not puede ser mayor que the date de fin", + "leaseDelClienteEliminadaCorrectamente": "Lease del client eliminada successfully", + "leasesDhcpEliminadasCorrectamente": "Lease(s) DHCP eliminada(s) successfully", + "leasesDeLaSubredEliminadas": "Leases de the subnet eliminadas successfully", + "listaDeClientes": "Lista de clientes", + "listaDeComandos": "Lista de comandos", + "mac": "Mac", + "marcarTrazaComoExitosa": "Marcar Trace as Successful", + "mensajeDelCommit": "Mensaje del commit", + "menuAnadidoCorrectamente": "Menu añadido successfully", + "menuEditadoCorrectamente": "Menu edited successfully", + "menuEliminadoConExito": "Menu deleted con éxito", + "meses": "Meses", + "netmask": "Netmask", + "noHayAccionesParaLimpiar": "Not hay acciones para limpiar", + "noHayCambiosParaGuardar": "Not hay cambios para saving en the disco seleccionado.", + "noHayCambiosPendientesDe": "Not hay cambios pendientes de performing", + "noHayClientesCargadosPara": "Not hay clientes cargados para añadir", + "noHayClientesPreseleccionadosPara": "Not hay clientes pre-seleccionados para este ámbito", + "noHayClientesSeleccionados": "Not hay clientes seleccionados", + "noHayClientesSeleccionadosPara": "Not hay clientes seleccionados para deleting", + "noHaySuficienteEspacioLibre": "Not hay suficiente espacio libre en the disco para creating a nueva partición.", + "noHayUnNodoSeleccionado": "Not hay a nodo seleccionado.", + "noSeEncontraronDatosValidos": "Not se encontraron data válidos", + "noSeEncontroElBoton": "Not se encontró the botón execute-button", + "noSeEncontroElNodo": "Not se encontró the nodo padre después de the creación masiva.", + "noSeHaCargadoLa": "Not se ha cargado the información del client", + "noSeHaSeleccionadoUn": "Not se ha seleccionado a disco.", + "noSePudieronCargarLas": "Not se pudieron loading the variables de entorno.", + "noSePudoCopiarEl": "Not se pudo copiar the script.", + "noSePudoDescargarEl": "Not se pudo descargar the HTML/Twig original del menú para editarlo.", + "noSePudoResolverEl": "Not se pudo resolver the name del server DHCP", + "noSePuedeAccederA": "Not se puede acceder a the logs: IP del client not disponible", + "noSePuedeAccederA1": "Not se puede acceder a the logs: MAC del client not disponible", + "noSeRecibieronDatosDel": "Not se recibieron data del client.", + "nombre": "Name", + "nombreDeUsuario": "Name de User", + "nombreDeImagen": "Name de image", + "nombreDeLaPlantilla": "Name de the template", + "nombreDeMenu": "Name de menú", + "nombreDeRepositorio": "Name de repository", + "nombreDeTarea": "Name de task", + "nDeReglas": "Nº de reglas", + "ocurrioUnErrorAlCargar": "Ocurrió a Error al loading the units organizational", + "oglive": "OgLive", + "operativeSystemDeleted": "Operative System deleted", + "orden": "Orden", + "parentChangedSuccessfully": "Parent changed successfully", + "particion": "Partition", + "particionarYFormatear": "Particionar y formatear", + "particionesCreadasExitosamenteParaEl": "Partitions creadas para the disco seleccionado. successfully", + "particion1": "Partición", + "parametros": "Parámetros", + "permisos": "Permissions", + "peticionDeBackupDeImagen": "Peticion de backup de image sent successfully", + "peticionDeConversionDeImagen": "Peticion de conversion de image sent successfully", + "peticionDeImportacionDeImagen": "Peticion de importacion de image sent successfully", + "peticionDeActualizacionEnviada": "Petición de actualizacion sent", + "peticionDeApagadoEnviadaCorrectamente": "Petición de apagado sent successfully", + "peticionDeArranqueDeSo": "Petición de arranque de SO sent successfully", + "peticionDeBorradoDeCache": "Petición de borrado de caché de image sent successfully", + "peticionDeCambioDeImagen": "Petición de cambio de image sent", + "peticionDeCreacionDeArchivos": "Petición de creación de files auxiliares sent", + "peticionDeDesinstalacionEnviada": "Petición de desinstalación sent", + "peticionDeDespliegueEnviadaCorrectamente": "Petición de deploy sent successfully", + "peticionDeEliminacionDeLa": "Petición de eliminación de the papelera temporal sent", + "peticionDeEncendidoEnviadaCorrectamente": "Petición de encendido sent successfully", + "peticionDeExportacionDeImagen": "Petición de exportación de image realizada successfully", + "peticionDeInstalacionEnviada": "Petición de instalación sent", + "peticionDeRecuperacionDeLa": "Petición de recuperación de the image sent", + "peticionDeRefrescoEnviadaCorrectamente": "Petición de refresco sent successfully", + "plantillaPxeActualizadaExitosamente": "Template PXE actualizada successfully", + "plantillaPxeCreadaExitosamente": "Template PXE creada successfully", + "plantillaEliminadaExitosamente": "Template eliminada successfully", + "plantillaPorDefecto": "Template por defecto", + "porDefecto": "Por defecto", + "porFavorCompleteTodosLos": "Por favor, complete todos the campos requeridos", + "porFavorCompleteTodosLos1": "Por favor, complete todos the campos requeridos successfully", + "porFavorRelleneTodosLos": "Por favor, rellene todos the campos obligatorios", + "porFavorRevisaLosCampos": "Por favor, revisa the campos del formulario", + "porFavorSeleccionaUnRepositorio": "Por favor, selecciona a repository primero", + "preparandoPeticionDeDespliegue": "Preparando petición de deploy", + "programacionDeTareaActualizadaCon": "Programacion de task actualizada con éxito", + "programacionDeTareaCreadaCon": "Programacion de task creada con éxito", + "programacionActualizadaCorrectamente": "Programación actualizada successfully", + "programacionCreadaCorrectamente": "Programación creada successfully", + "programacionEliminadaCorrectamente": "Programación eliminada successfully", + "propagarParametros": "Propagar parámetros", + "proximaEjecucion": "Próxima ejecución", + "puertoApi": "Puerto API", + "puertoPxe": "Puerto PXE", + "ramaCreadaCorrectamente": "Rama creada successfully", + "remotePc": "Remote Pc", + "repeticionPersonalizada": "Repetición personalizada", + "repositorio": "Repository", + "repositorioAnadidoCorrectamente": "Repository añadido successfully", + "repositorioCreadoCorrectamente": "Repository created successfully", + "repositorioEditadaCorrectamente": "Repository editada successfully", + "repositorioEliminadoConExito": "Repository deleted con éxito", + "repositorios": "Repositories", + "resolucion": "Resolución", + "rolActualizadoCorrectamente": "Role updated successfully", + "rolAnadidoCorrectamente": "Role añadido successfully", + "roleDeletedSuccessfully": "Role deleted successfully", + "roles": "Roles", + "ruta": "Ruta", + "so": "SO", + "soimagen": "SO/Image", + "scriptAnadidoConExitoA": "Script añadido con éxito a the task", + "scriptCopiadoAlPortapapeles": "Script copiado al portapapeles", + "scriptEjecutadoCorrectamente": "Script executed successfully", + "scriptGuardadoCorrectamente": "Script saved successfully", + "seHanDetectadoOrdenadoresAsociados": "Se han detectado ordenadores asociados a otro server de boot. ¿Desea moverlos al server actual? (Si rechaza, solo se updatingán the ordenadores que ya pertenecen al server actual)", + "seleccionaUnClienteModeloY": "Selecciona a client modelo y a disco.", + "seleccioneUnServidorDhcpPara": "Seleccione a server DHCP para consultar the status", + "servidorBootActualizadoCorrectamente": "Server Boot updated successfully", + "servidorBootAnadidoCorrectamente": "Server Boot añadido successfully", + "servidorDhcpActualizadoCorrectamente": "Server DHCP updated successfully", + "servidorDhcpAnadidoCorrectamente": "Server DHCP añadido successfully", + "servidorEliminadoConExito": "Server deleted con éxito", + "sinInstalar": "Sin instalar", + "sinRepeticion": "Sin repetición", + "sincronizacionCompletada": "Sincronización completed", + "sincronizacionCompletadaConExito": "Sincronización completed con éxito", + "sincronizacionConOglivesCompletada": "Sincronización con ogLives completed", + "sincronizacionDePlantillasPxeExitosa": "Sincronización de templates Pxe successful", + "sincronizacionDeSubredesDeServidores": "Sincronización de subnets de servidores DHCP successful", + "sincronizado": "Synchronized", + "sistemaOperativo": "System Operative", + "sistemaDeFicheros": "System de ficheros", + "sistemaOperativoAnadidoCorrectamente": "System operative añadido successfully", + "sistemaOperativoEditadoCorrectamente": "System operative edited successfully", + "softwareAnadidoCorrectamente": "Software añadido successfully", + "softwareDeletedSuccessfully": "Software deleted successfully", + "softwareEditadoCorrectamente": "Software edited successfully", + "soloLectura": "Solo Lectura", + "soloSePuedenCancelarTrazas": "Solo se pueden cancelling trazas pendientes o en ejecución", + "soloSePuedenMarcarComo": "Solo se pueden marcar as exitosas the trazas en progreso", + "subredEliminadaExitosamente": "Subnet eliminada successfully", + "subredSincronizadaConServidor": "Subnet sincronizada con server", + "subredes": "Subnets", + "tagCreadoCorrectamente": "Tag created successfully", + "tags": "Tags", + "tamano": "Tamaño", + "tareaActualizadaConExito": "Task actualizada con éxito", + "tareaCanceladaCorrectamente": "Task cancelled successfully", + "tareaCreadaConExito": "Task creada con éxito", + "tareaDeCreacionDeImagen": "Task de creación de image scheduled con éxito", + "tareaEliminadaConExito": "Task eliminada con éxito", + "tareaProgramadaCorrectamente": "Task scheduled successfully", + "tipo": "Type", + "tipoDeProgramacion": "Type de Programación", + "tipoDeAccionNoReconocido": "Type de acción not reconocido", + "tipoDeParticion": "Type de partición", + "trazaCanceladaCorrectamente": "Trace cancelled successfully", + "trazaMarcadaComoExitosaCorrectamente": "Trace marked as successful successfully", + "unidadOrganizativa": "Unidad Organizativa", + "unidadesOrganizacionalesPermitidas": "Units Organizacionales Permitidas", + "urlPublica": "Url pública", + "userDeletedSuccessfully": "User deleted successfully", + "uso": "Uso", + "usuario": "User", + "usuarioAnadidoCorrectamente": "User añadido successfully", + "usuarioEditadoCorrectamente": "User edited successfully", + "variablesDeEntornoGuardadasCorrectamente": "Variables de entorno guardadas . successfully", + "version": "Version", + "vistaDeGrupos": "Vista de Groups", + "vistaPreviaGeneradaPulsaGuardar": "Vista previa generada. Pulsa Saving para aplicar the template remota permanentemente.", + "ogLiveDeletedSuccessfully": "OG Live deleted successfully", + "deseaPropagarLosParametrosDe": "¿Desea propagar the parámetros de network (ogLive, repository, menú, template PXE, profile hardware) a todos the clientes de esta unidad organizativa?", + "estasSeguroDeQueQuieres": "¿Estás seguro de que quieres cancelling todas the acciones mostradas?", + "estasSeguroQueDeseasEliminar": "¿Estás seguro que deseas deleting este repository? Esta acción not se puede deshacer.", + "ambito": "Ámbito" } \ No newline at end of file diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index 84f7651..20d8f95 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -44,7 +44,7 @@ "remotePcStatusAvailable": "Disponible para Remote PC", "parameters": "Parámetros", "labelRoleName": "Nombre", - "runScript": "Ejecutar Script", + "runScript": "Ejecutar script", "sectionTitlePermissions": "Permisos:", "checkboxSuperAdmin": "Super Admin", "checkboxOrgAdmin": "Admin de Unidad Organizativa", @@ -84,7 +84,7 @@ "commandGroupDetailsTitle": "Detalles del Grupo de Comandos", "createdBy": "Creado por", "groupId": "ID del Grupo", - "creationDate": "Fecha de Creación", + "creationDate": "Fecha de creación", "includedCommands": "Comandos Incluidos", "nameColumn": "Nombre", "selectClients": "Selecciona los clientes:", @@ -502,7 +502,6 @@ "TOOLTIP_DHCP_SERVERS": "Gestionar y registrar servidores DHCP", "boot": "Boot", "TOOLTIP_BOOT": "Configurar y administrar opciones de arranque", - "ogLive": "OgLive", "viewInfoStepText": "Accede a información y opciones en la API de OgBoot.", "TOOLTIP_PXE_IMAGES": "Ver imágenes disponibles para arranque PXE", "pxeTemplates": "Plantillas PXE", @@ -549,7 +548,6 @@ "clients": "Clientes", "sync": "Sincronizar", "viewDetails": "Ver detalles", - "name": "Nombre", "maintenance": "Mantenimiento", "subnet": "Subred", "parent": "Padre", @@ -564,7 +562,6 @@ "CpuUsage": "Uso de CPU", "processes": "Procesos", "usedPercentageLabel": "Usado", - "errorLoadingData": "Error al cargar los datos. Servicio inactivo", "repository": "Repositorio", "addRepository": "Añadir repositorio", "addRepositoryStepText": "Haz clic para añadir un nuevo repositorio.", @@ -643,7 +640,7 @@ "viewInput": "Ver entrada", "viewOutput": "Ver salida", "deleteTrace": "Eliminar traza", - "cancelTrace": "Cancelar traza", + "cancelTrace": "Cancelar Traza", "enterClientName": "Por favor, ingrese el nombre del cliente", "organizationalUnits": "Unidades Organizacionales", "totalEquipments": "Total de Equipos", @@ -781,7 +778,6 @@ "labelClients": "Clientes", "clientsPerPage": "Clientes por página", "commandComments": "Comentarios del comando", - "commitId": "Commit ID", "commitIdLabel": "Commit ID:", "completedSuccessfully": "Completado con éxito", "configurationTitle": "Configuración", @@ -1116,7 +1112,7 @@ "syncDatabase": "Sincronizar base de datos", "syncServer": "Sincronizar servidor", "syncAll": "Sincronizar todo", - "fileSystem": "Sistema de archivos", + "fileSystem": "Sistema de ficheros", "fileSystemAlt": "Sistema de ficheros", "operativeSystem": "Sistema operativo", "onlySubnets": "Solo Subredes", @@ -1135,7 +1131,7 @@ "maxWaitTime": "Tiempo máx. espera", "labelType": "Tipo", "imageType": "Tipo de imagen", - "partitionType": "Tipo partición", + "partitionType": "Tipo de partición", "labelTotal": "Total", "labelTotalColon": "Total:", "transferImage": "Transferir imagen", @@ -1194,5 +1190,479 @@ "forReservationFrom": "para reserva desde el", "saveFiltersDialogWorks": "save-filters-dialog works!", "showDetailsWorks": "show-details works!", - "queueActionsForFailedPcs": "¿Quieres que se encolen las acciones para cuyos PCs no se pueda ejecutar?" + "queueActionsForFailedPcs": "¿Quieres que se encolen las acciones para cuyos PCs no se pueda ejecutar?", + "errorAlActualizarCliente": "Error al updating client:", + "accionNoSoportada": "Acción not soportada:", + "archivoCsvExportadoCorrectamente": "File CSV exportado successfully", + "archivoCargadoCorrectamenteLosDatos": "File cargado , the data están listos para enviarse. successfully", + "asistenteDeParticionado": "Asistente de particionado", + "backupIniciadoCorrectamente": "Backup started successfully", + "calendarCreatedSuccessfully": "Calendar created successfully", + "calendarDeletedSuccessfully": "Calendar deleted successfully", + "calendarRuleCreatedSuccessfully": "Calendar rule created successfully", + "calendarRuleUpdatedSuccessfully": "Calendar rule updated successfully", + "calendarUpdatedSuccessfully": "Calendar updated successfully", + "calendariosSincronizadosCorrectamente": "Calendarios sincronizados successfully", + "cancelarTraza": "Cancelling Trace", + "cliente": "Client", + "clienteActualizadoCorrectamente": "Client updated successfully", + "clienteActualizadoExitosamente": "Client updated successfully", + "clienteActualizado": "Client updated!", + "clienteCreadoExitosamente": "Client created successfully", + "clienteEliminadoExitosamenteDeLa": "Client deleted de the network successfully", + "clientesPorPagina": "Clientes por página", + "comando": "Command", + "comandoAnadidoCorrectamente": "Command añadido successfully", + "comandoEditado": "Command edited", + "comandoEditadoCorrectamente": "Command edited successfully", + "comandoEjecutadoConExito": "Command executed con éxito", + "comandoEliminadoConExito": "Command deleted con éxito", + "commitIdCopiadoAlPortapapeles": "Commit ID copiado al portapapeles", + "configuracionDeRedActualizadaExitosamente": "Configuración de network actualizada successfully", + "configuracionDeRedAnadidaExitosamente": "Configuración de network añadida successfully", + "confirmarMigracionDeServidores": "Confirmar migración de servidores", + "contenido": "Contenido", + "contrasenaCambiadaConExito": "Contraseña cambiada con éxito", + "creadoEnRepositorio": "Created en repository", + "creadoExitosamente": "Created successfully", + "creadoPor": "Created por", + "crearImagen": "Creating image", + "codigo": "Código", + "datosActualizados": "Data actualizados", + "datosActualizadosCorrectamente": "Data actualizados successfully", + "datosCargadosCorrectamenteLosDatos": "Data cargados , the data están listos para enviarse. successfully", + "debeEspecificarFechaDeInicio": "Must especificar date de inicio y date de fin", + "debeIngresarUnScript": "Must ingresar a script", + "debeIngresarUnScriptAntes": "Must ingresar a script antes de saving.", + "debeSeleccionarAlMenosUn": "Must select al menos a client", + "debeSeleccionarAlMenosUn1": "Must select al menos a día de the semana", + "debeSeleccionarAlMenosUn2": "Must select al menos a mes", + "debeSeleccionarUnCommit": "Must select a commit", + "debeSeleccionarUnMetodo": "Must select a método", + "debeSeleccionarUnRepositorioPrimero": "Must select a repository primero", + "debeSeleccionarUnScript": "Must select a script", + "debeSeleccionarUnServidorDhcp": "Must select a server DHCP para sincronizar", + "debeSeleccionarUnaImagen": "Must select a image", + "debeSeleccionarUnaParticion": "Must select a partición", + "debeSeleccionarUnaUnidadOrganizativa": "Must select a unidad organizativa", + "debesIntroducirUnNombreCanonico": "Debes introducir a name canónico para the image", + "debesIntroducirUnOrdenDe": "Debes introducir a orden de ejecución válido (mayor que 0).", + "debesSeleccionarUnaImagenPara": "Debes select a image para updating", + "debesSeleccionarUnaParticion": "Debes select a partición", + "debesSeleccionarUnaTareaExistente": "Debes select a task existente.", + "descripcion": "Descripción", + "desplegarImagen": "Desplegar image", + "detallesDelCommit": "Details del Commit", + "disco": "Disco", + "diasDeLaSemana": "Días de the semana", + "editadoExitosamente": "Edited successfully", + "editadoYParametrosPropagadosExitosamente": "Edited y parámetros propagados successfully", + "ejecucion": "Ejecución", + "ejecucionUnica": "Ejecución única", + "ejecutarScript": "Ejecutar script", + "elTamanoTotalDeLas": "The tamaño total de the partitions en the disco seleccionado excede the tamaño total del disco.", + "elementoEliminadoCorrectamente": "Elemento deleted . successfully", + "eliminadoCorrectamente": "Deleted successfully", + "eliminarRepositorio": "Deleting Repository", + "error401RedirectToLogin": "Error 401, redirect to login page", + "errorActualizandoElGrupoDe": "Error actualizando the group de comandos", + "errorAlActualizarCliente1": "Error al updating client:", + "errorAlActualizarElCliente": "Error al updating the client:", + "errorAlActualizarElGrupo": "Error al updating the group de comandos", + "errorAlActualizarLaSubred": "Error al updating the subnet en the server", + "errorAlActualizarLaTarea": "Error al updating the task", + "errorAlAnadirComando": "Error al añadir command", + "errorAlAnadirElMenu": "Error al añadir the menu", + "errorAlAnadirLaImagen": "Error al añadir the image", + "errorAlAnadirRol": "Error al añadir role", + "errorAlAnadirRol1": "Error al añadir role:", + "errorAlAnadirSistemaOperativo": "Error al añadir system operative", + "errorAlAnadirSoftware": "Error al añadir software", + "errorAlCancelarLaTraza": "Error al cancelling the trace", + "errorAlCancelarLasAcciones": "Error al cancelling the acciones", + "errorAlCancelarLasAcciones1": "Error al cancelling the acciones:", + "errorAlCargarComandos": "Error al loading comandos:", + "errorAlCargarDatosDe": "Error al loading data de Git:", + "errorAlCargarDatosDel": "Error al loading data del client:", + "errorAlCargarElEstado": "Error al loading the status del dhcp", + "errorAlCargarElEstado1": "Error al loading the status del repository", + "errorAlCargarElEstado2": "Error al loading the status del server de boot", + "errorAlCargarGruposDe": "Error al loading groups de comandos:", + "errorAlCargarInformacionDe": "Error al loading información de Git", + "errorAlCargarLaInformacion": "Error al loading the información del alert", + "errorAlCargarLaLista": "Error al loading the lista de Dhcps", + "errorAlCargarLaLista1": "Error al loading the lista de Servidores de Boot", + "errorAlCargarLaLista2": "Error al loading the lista de repositories", + "errorAlCargarLaRuta": "Error al loading the ruta actual.", + "errorAlCargarLasImagenes": "Error al loading the imágenes de repository git:", + "errorAlCargarLasImagenes1": "Error al loading the imágenes existentes", + "errorAlCargarLasImagenes2": "Error al loading the imágenes existentes:", + "errorAlCargarLasImagenes3": "Error al loading the imágenes:", + "errorAlCargarLasParticiones": "Error al loading the partitions:", + "errorAlCargarLasPlantillas": "Error al loading the templates", + "errorAlCargarLasProgramaciones": "Error al loading the programaciones", + "errorAlCargarLasRamas": "Error al loading the ramas", + "errorAlCargarLasRamas1": "Error al loading the ramas del repository", + "errorAlCargarLasTareas": "Error al loading the tareas existentes", + "errorAlCargarLasUnidades": "Error al loading the units organizacionales", + "errorAlCargarLosClientes": "Error al loading the clientes de the unidad organizativa", + "errorAlCargarLosClientes1": "Error al loading the clientes:", + "errorAlCargarLosComandos": "Error al loading the comandos individuales", + "errorAlCargarLosCommits": "Error al loading the commits", + "errorAlCargarLosDatos": "Error al loading the data de the task", + "errorAlCargarLosDatos1": "Error al loading the data del client:", + "errorAlCargarLosGrupos": "Error al loading the groups de comandos", + "errorAlCargarLosRepositorios": "Error al loading the repositories", + "errorAlCargarLosRepositorios1": "Error al loading the repositories git", + "errorAlCargarLosRepositorios2": "Error al loading the repositories git:", + "errorAlComprobarElEstado": "Error al comprobar the status del classroom", + "errorAlCopiarAlPortapapeles": "Error al copiar al portapapeles", + "errorAlCrearElGrupo": "Error al creating the group de comandos", + "errorAlCrearLaTarea": "Error al creating the task", + "errorAlCrearLasParticiones": "Error al creating the partitions.", + "errorAlCrearSubredEn": "Error al creating subnet en server", + "errorAlEditarElComando": "Error al editing the command", + "errorAlEditarElRol": "Error al editing the role", + "errorAlEditarElRol1": "Error al editing the role:", + "errorAlEditarElSistema": "Error al editing the system operative", + "errorAlEditarElSoftware": "Error al editing the software", + "errorAlEditarLaImagen": "Error al editing the image", + "errorAlEjecutarElComando": "Error al ejecutar the command:", + "errorAlEjecutarElScript": "Error al ejecutar the script", + "errorAlEliminarElComando": "Error al deleting the command:", + "errorAlEliminarElGrupo": "Error al deleting the group de comandos:", + "errorAlEliminarElMenu": "Error al deleting the menú:", + "errorAlEliminarElRepositorio": "Error al deleting the repository", + "errorAlEliminarElRepositorio1": "Error al deleting the repository:", + "errorAlEliminarElServidor": "Error al deleting the server", + "errorAlEliminarLaImagen": "Error al deleting the image:", + "errorAlEliminarLaSubred": "Error al deleting the subnet", + "errorAlEliminarLaTarea": "Error al deleting the task:", + "errorAlEliminarLasLeases": "Error al deleting the leases DHCP", + "errorAlEliminarLosClientes": "Error al deleting the clientes seleccionados", + "errorAlEliminarServidor": "Error al deleting server:", + "errorAlFiltrarLasUnidades": "Error al filtrar the units organizacionales", + "errorAlGuardarLasVariables": "Error al saving the variables de entorno:", + "errorAlMarcarLaTraza": "Error al marcar the trace as successful", + "errorAlObtenerElEstado": "Error al fetching the status del server", + "errorAlObtenerLasParticiones": "Error al fetching the partitions:", + "errorAlObtenerLosClientes": "Error al fetching the clientes PXE:", + "errorAlObtenerLosClientes1": "Error al fetching the clientes de the unidad organizativa:", + "errorAlObtenerLosDetalles": "Error al fetching the details del profile de hardware", + "errorAlObtenerLosPerfiles": "Error al fetching the perfiles de software", + "errorAlObtenerLosRepositorios": "Error al fetching the repositories de imágenes", + "errorAlPropagarParametros": "Error al propagar parámetros:", + "errorAlRealizarPost": "Error al performing POST:", + "errorAlRealizarPut": "Error al performing PUT:", + "errorAlRealizarLaPeticion": "Error al performing the petición de backup de image", + "errorAlSincronizar": "Error al sincronizar", + "errorAlSincronizarImagenesOglive": "Error al sincronizar imagenes ogLive: tiempo de espera agotado", + "errorAlSincronizarLasPlantillas": "Error al sincronizar the templates Pxe: tiempo de espera agotado", + "errorAlSincronizarLasSubredes": "Error al sincronizar the subnets: tiempo de espera agotado", + "errorAlSincronizarSubredes": "Error al sincronizar subnets", + "errorCancellingInprogressTrace": "Error cancelling in-progress trace:", + "errorCancellingPendingTrace": "Error cancelling pending trace:", + "errorCargandoLasUnidadesOrganizativas": "Error cargando the Units Organizational", + "errorCargandoLosDatos": "Error cargando the data", + "errorCargandoLosDatosDel": "Error cargando the data del server", + "errorChangingPassword": "Error changing password:", + "errorCreandoElGrupoDe": "Error creando the group de comandos", + "errorDecodingJwt": "Error decoding JWT", + "errorDeletingAsset": "Error deleting asset", + "errorDeletingCalendar": "Error deleting calendar", + "errorDeletingElement": "Error deleting element", + "errorDeletingEntity": "Error deleting entity:", + "errorDeletingHardware": "Error deleting hardware", + "errorDeletingImage": "Error deleting image", + "errorDeletingMultipleClients": "Error deleting multiple clients", + "errorDeletingMultipleClients1": "Error deleting multiple clients:", + "errorDeletingOperativeSystem": "Error deleting operative system", + "errorDeletingRole": "Error deleting role:", + "errorDeletingUser": "Error deleting user:", + "errorDuranteLaSincronizacion": "Error durante the sincronización", + "errorDuranteLaSincronizacion1": "Error durante the sincronización:", + "errorEjecutandoGrupoDeComandos": "Error ejecutando group de comandos:", + "errorEnLaPeticionDe": "Error en the petición de exportación de image", + "errorFetchingBootservers": "Error fetching BootServers:", + "errorFetchingDhcpServersFor": "Error fetching DHCP servers for subnet sync", + "errorFetchingPxeTemplatesBy": "Error fetching PXE templates by server:", + "errorFetchingAssets": "Error fetching assets", + "errorFetchingAvailableCommands": "Error fetching available commands", + "errorFetchingBootServer": "Error fetching boot server:", + "errorFetchingBranches": "Error fetching branches", + "errorFetchingBranchesForGit": "Error fetching branches for Git data", + "errorFetchingCalendar": "Error fetching calendar", + "errorFetchingCalendars": "Error fetching calendars", + "errorFetchingChildUnits": "Error fetching child units:", + "errorFetchingChildren": "Error fetching children", + "errorFetchingClientTraces": "Error fetching client traces", + "errorFetchingClients": "Error fetching clients", + "errorFetchingClients1": "Error fetching clients:", + "errorFetchingCommandGroups": "Error fetching command groups", + "errorFetchingCommands": "Error fetching commands", + "errorFetchingCommands1": "Error fetching commands:", + "errorFetchingCommits": "Error fetching commits", + "errorFetchingData": "Error fetching data", + "errorFetchingDataForEdit": "Error fetching data for edit:", + "errorFetchingDhcpServer": "Error fetching dhcp server:", + "errorFetchingDownloads": "Error fetching downloads:", + "errorFetchingFilters": "Error fetching filters", + "errorFetchingFilters1": "Error fetching filters:", + "errorFetchingHardwareProfileDetails": "Error fetching hardware profile details:", + "errorFetchingHardwareProfiles": "Error fetching hardware profiles:", + "errorFetchingImageRepositories": "Error fetching image repositories", + "errorFetchingImages": "Error fetching images", + "errorFetchingMenus": "Error fetching menus", + "errorFetchingMenus1": "Error fetching menus:", + "errorFetchingOglivesByServer": "Error fetching ogLives by server:", + "errorFetchingOglives": "Error fetching ogLives:", + "errorFetchingOperativeSystems": "Error fetching operative systems:", + "errorFetchingOrganizationalUnit": "Error fetching organizational unit", + "errorFetchingOrganizationalUnits": "Error fetching organizational units", + "errorFetchingOrganizationalUnits1": "Error fetching organizational units:", + "errorFetchingParentUnits": "Error fetching parent units:", + "errorFetchingPxeTemplates": "Error fetching pxe templates", + "errorFetchingRawMenuTemplate": "Error fetching raw menu template", + "errorFetchingRemoteCalendar": "Error fetching remote calendar:", + "errorFetchingRemoteCalendars": "Error fetching remote calendars", + "errorFetchingRepositories": "Error fetching repositories", + "errorFetchingRepositories1": "Error fetching repositories:", + "errorFetchingRoles": "Error fetching roles", + "errorFetchingRoomData": "Error fetching room data:", + "errorFetchingSoftware": "Error fetching software:", + "errorFetchingStatsByStatus": "Error fetching stats by status:", + "errorFetchingTasks": "Error fetching tasks", + "errorFetchingTraces": "Error fetching traces", + "errorFetchingUnidadesOrganizativas": "Error fetching units organizational", + "errorFetchingUserGroup": "Error fetching user group", + "errorFetchingUserGroups": "Error fetching user groups", + "errorFetchingUser": "Error fetching user:", + "errorFetchingUsers": "Error fetching users", + "errorLoadingCalendars": "Error loading calendars", + "errorLoadingConfigjson": "Error loading config.json", + "errorLoadingCurrentCalendar": "Error loading current calendar", + "errorLoadingOrganizationalUnit": "Error loading organizational unit", + "errorLoadingScheduleData": "Error loading schedule data", + "errorMarkingTraceAsSuccess": "Error marking trace as success:", + "errorPreviewingMenuTemplate": "Error previewing menu template", + "errorUploadingAssets": "Error uploading assets", + "estaUnidadOrganizativaNoTiene": "Esta unidad organizativa not tiene clientes", + "estado": "Status", + "estadoDelAulaActualizado": "Status del classroom updated", + "estadoDelDhcpActualizadoCorrectamente": "Status del dhcp updated successfully", + "estadoDelRepositorioActualizadoCorrectamente": "Status del repository updated successfully", + "estadoDelServidorDeBoot": "Status del server de boot updated successfully", + "estadisticas": "Estadísticas", + "failedToDecodePreviousFilecontent": "Failed to decode previous fileContent Base64", + "failedToEncodeUpdatedHtml": "Failed to encode updated HTML to Base64", + "failedToPreviewGeneratedHtml": "Failed to preview generated HTML", + "fechaDeCreacion": "Date de creación", + "fechaDelCommit": "Date del commit", + "finalizacion": "Finalización", + "formIsInvalid": "Form is invalid", + "formularioInvalidoPorFavorRevise": "Formulario inválido. Por favor, revise the campos obligatorios.", + "fullsum": "Fullsum", + "gestionarImagenes": "Gestionar imágenes", + "gestiones": "Gestiones", + "grupoDeComandosActualizadoCon": "Group de comandos updated con éxito", + "grupoDeComandosCreadoCon": "Group de comandos created con éxito", + "grupoDeComandosEjecutadoExitosamente": "Group de comandos executed successfully", + "grupoDeComandosEliminadoCon": "Group de comandos deleted con éxito", + "guardadoPeroHuboUnError": "Saved, pero hubo a Error al propagar the parámetros", + "hardwareDeletedSuccessfully": "Hardware deleted successfully", + "horaDeEjecucion": "Time de ejecución", + "huboUnProblemaProcesandoLos": "Hubo a problema procesando the caracteres especiales del HTML.", + "id": "ID", + "ipAddress": "IP Address", + "id1": "Id", + "idServidorDhcp": "Id Server DHCP", + "imageCreatedSuccessfully": "Image created successfully", + "imageDeletedSuccessfully": "Image deleted successfully", + "imageUpdatedSuccessfully": "Image updated successfully", + "imagenGlobal": "Image Global", + "imagenAnadidaCorrectamente": "Image añadida successfully", + "imagenEditadaCorrectamente": "Image editada successfully", + "imagenEliminadaConExito": "Image eliminada con éxito", + "imagenGlobal1": "Image global", + "imagenPorDefecto": "Image por defecto", + "imagenRenombradaCorrectamente": "Image renombrada successfully", + "informacionDelRepositorio": "Información del Repository", + "iniciarSesion": "Iniciar sesión", + "inventarioDeHardwareActualizadoCorrectamente": "Inventario de hardware updated successfully", + "inventarioDeSoftwareActualizadoCorrectamente": "Inventario de software updated successfully", + "ip": "Ip", + "laFechaDeFinDebe": "The date de fin must ser posterior a the date de inicio", + "laFechaDeInicioNo": "The date de inicio not puede ser mayor que the date de fin", + "leaseDelClienteEliminadaCorrectamente": "Lease del client eliminada successfully", + "leasesDhcpEliminadasCorrectamente": "Lease(s) DHCP eliminada(s) successfully", + "leasesDeLaSubredEliminadas": "Leases de the subnet eliminadas successfully", + "listaDeClientes": "Lista de clientes", + "listaDeComandos": "Lista de comandos", + "mac": "Mac", + "marcarTrazaComoExitosa": "Marcar Trace as Successful", + "mensajeDelCommit": "Mensaje del commit", + "menuAnadidoCorrectamente": "Menu añadido successfully", + "menuEditadoCorrectamente": "Menu edited successfully", + "menuEliminadoConExito": "Menu deleted con éxito", + "meses": "Meses", + "netmask": "Netmask", + "noHayAccionesParaLimpiar": "Not hay acciones para limpiar", + "noHayCambiosParaGuardar": "Not hay cambios para saving en the disco seleccionado.", + "noHayCambiosPendientesDe": "Not hay cambios pendientes de performing", + "noHayClientesCargadosPara": "Not hay clientes cargados para añadir", + "noHayClientesPreseleccionadosPara": "Not hay clientes pre-seleccionados para este ámbito", + "noHayClientesSeleccionados": "Not hay clientes seleccionados", + "noHayClientesSeleccionadosPara": "Not hay clientes seleccionados para deleting", + "noHaySuficienteEspacioLibre": "Not hay suficiente espacio libre en the disco para creating a nueva partición.", + "noHayUnNodoSeleccionado": "Not hay a nodo seleccionado.", + "noSeEncontraronDatosValidos": "Not se encontraron data válidos", + "noSeEncontroElBoton": "Not se encontró the botón execute-button", + "noSeEncontroElNodo": "Not se encontró the nodo padre después de the creación masiva.", + "noSeHaCargadoLa": "Not se ha cargado the información del client", + "noSeHaSeleccionadoUn": "Not se ha seleccionado a disco.", + "noSePudieronCargarLas": "Not se pudieron loading the variables de entorno.", + "noSePudoCopiarEl": "Not se pudo copiar the script.", + "noSePudoDescargarEl": "Not se pudo descargar the HTML/Twig original del menú para editarlo.", + "noSePudoResolverEl": "Not se pudo resolver the name del server DHCP", + "noSePuedeAccederA": "Not se puede acceder a the logs: IP del client not disponible", + "noSePuedeAccederA1": "Not se puede acceder a the logs: MAC del client not disponible", + "noSeRecibieronDatosDel": "Not se recibieron data del client.", + "nombre": "Name", + "nombreDeUsuario": "Name de User", + "nombreDeImagen": "Name de image", + "nombreDeLaPlantilla": "Name de the template", + "nombreDeMenu": "Name de menú", + "nombreDeRepositorio": "Name de repository", + "nombreDeTarea": "Name de task", + "nDeReglas": "Nº de reglas", + "ocurrioUnErrorAlCargar": "Ocurrió a Error al loading the units organizational", + "oglive": "OgLive", + "operativeSystemDeleted": "Operative System deleted", + "orden": "Orden", + "parentChangedSuccessfully": "Parent changed successfully", + "particion": "Partition", + "particionarYFormatear": "Particionar y formatear", + "particionesCreadasExitosamenteParaEl": "Partitions creadas para the disco seleccionado. successfully", + "particion1": "Partición", + "parametros": "Parámetros", + "permisos": "Permissions", + "peticionDeBackupDeImagen": "Peticion de backup de image sent successfully", + "peticionDeConversionDeImagen": "Peticion de conversion de image sent successfully", + "peticionDeImportacionDeImagen": "Peticion de importacion de image sent successfully", + "peticionDeActualizacionEnviada": "Petición de actualizacion sent", + "peticionDeApagadoEnviadaCorrectamente": "Petición de apagado sent successfully", + "peticionDeArranqueDeSo": "Petición de arranque de SO sent successfully", + "peticionDeBorradoDeCache": "Petición de borrado de caché de image sent successfully", + "peticionDeCambioDeImagen": "Petición de cambio de image sent", + "peticionDeCreacionDeArchivos": "Petición de creación de files auxiliares sent", + "peticionDeDesinstalacionEnviada": "Petición de desinstalación sent", + "peticionDeDespliegueEnviadaCorrectamente": "Petición de deploy sent successfully", + "peticionDeEliminacionDeLa": "Petición de eliminación de the papelera temporal sent", + "peticionDeEncendidoEnviadaCorrectamente": "Petición de encendido sent successfully", + "peticionDeExportacionDeImagen": "Petición de exportación de image realizada successfully", + "peticionDeInstalacionEnviada": "Petición de instalación sent", + "peticionDeRecuperacionDeLa": "Petición de recuperación de the image sent", + "peticionDeRefrescoEnviadaCorrectamente": "Petición de refresco sent successfully", + "plantillaPxeActualizadaExitosamente": "Template PXE actualizada successfully", + "plantillaPxeCreadaExitosamente": "Template PXE creada successfully", + "plantillaEliminadaExitosamente": "Template eliminada successfully", + "plantillaPorDefecto": "Template por defecto", + "porDefecto": "Por defecto", + "porFavorCompleteTodosLos": "Por favor, complete todos the campos requeridos", + "porFavorCompleteTodosLos1": "Por favor, complete todos the campos requeridos successfully", + "porFavorRelleneTodosLos": "Por favor, rellene todos the campos obligatorios", + "porFavorRevisaLosCampos": "Por favor, revisa the campos del formulario", + "porFavorSeleccionaUnRepositorio": "Por favor, selecciona a repository primero", + "preparandoPeticionDeDespliegue": "Preparando petición de deploy", + "programacionDeTareaActualizadaCon": "Programacion de task actualizada con éxito", + "programacionDeTareaCreadaCon": "Programacion de task creada con éxito", + "programacionActualizadaCorrectamente": "Programación actualizada successfully", + "programacionCreadaCorrectamente": "Programación creada successfully", + "programacionEliminadaCorrectamente": "Programación eliminada successfully", + "propagarParametros": "Propagar parámetros", + "proximaEjecucion": "Próxima ejecución", + "puertoApi": "Puerto API", + "puertoPxe": "Puerto PXE", + "ramaCreadaCorrectamente": "Rama creada successfully", + "remotePc": "Remote Pc", + "repeticionPersonalizada": "Repetición personalizada", + "repositorio": "Repository", + "repositorioAnadidoCorrectamente": "Repository añadido successfully", + "repositorioCreadoCorrectamente": "Repository created successfully", + "repositorioEditadaCorrectamente": "Repository editada successfully", + "repositorioEliminadoConExito": "Repository deleted con éxito", + "repositorios": "Repositories", + "resolucion": "Resolución", + "rolActualizadoCorrectamente": "Role updated successfully", + "rolAnadidoCorrectamente": "Role añadido successfully", + "roleDeletedSuccessfully": "Role deleted successfully", + "roles": "Roles", + "ruta": "Ruta", + "so": "SO", + "soimagen": "SO/Image", + "scriptAnadidoConExitoA": "Script añadido con éxito a the task", + "scriptCopiadoAlPortapapeles": "Script copiado al portapapeles", + "scriptEjecutadoCorrectamente": "Script executed successfully", + "scriptGuardadoCorrectamente": "Script saved successfully", + "seHanDetectadoOrdenadoresAsociados": "Se han detectado ordenadores asociados a otro server de boot. ¿Desea moverlos al server actual? (Si rechaza, solo se updatingán the ordenadores que ya pertenecen al server actual)", + "seleccionaUnClienteModeloY": "Selecciona a client modelo y a disco.", + "seleccioneUnServidorDhcpPara": "Seleccione a server DHCP para consultar the status", + "servidorBootActualizadoCorrectamente": "Server Boot updated successfully", + "servidorBootAnadidoCorrectamente": "Server Boot añadido successfully", + "servidorDhcpActualizadoCorrectamente": "Server DHCP updated successfully", + "servidorDhcpAnadidoCorrectamente": "Server DHCP añadido successfully", + "servidorEliminadoConExito": "Server deleted con éxito", + "sinInstalar": "Sin instalar", + "sinRepeticion": "Sin repetición", + "sincronizacionCompletada": "Sincronización completed", + "sincronizacionCompletadaConExito": "Sincronización completed con éxito", + "sincronizacionConOglivesCompletada": "Sincronización con ogLives completed", + "sincronizacionDePlantillasPxeExitosa": "Sincronización de templates Pxe successful", + "sincronizacionDeSubredesDeServidores": "Sincronización de subnets de servidores DHCP successful", + "sincronizado": "Synchronized", + "sistemaOperativo": "System Operative", + "sistemaDeFicheros": "System de ficheros", + "sistemaOperativoAnadidoCorrectamente": "System operative añadido successfully", + "sistemaOperativoEditadoCorrectamente": "System operative edited successfully", + "softwareAnadidoCorrectamente": "Software añadido successfully", + "softwareDeletedSuccessfully": "Software deleted successfully", + "softwareEditadoCorrectamente": "Software edited successfully", + "soloLectura": "Solo Lectura", + "soloSePuedenCancelarTrazas": "Solo se pueden cancelling trazas pendientes o en ejecución", + "soloSePuedenMarcarComo": "Solo se pueden marcar as exitosas the trazas en progreso", + "subredEliminadaExitosamente": "Subnet eliminada successfully", + "subredSincronizadaConServidor": "Subnet sincronizada con server", + "subredes": "Subnets", + "tagCreadoCorrectamente": "Tag created successfully", + "tags": "Tags", + "tamano": "Tamaño", + "tareaActualizadaConExito": "Task actualizada con éxito", + "tareaCanceladaCorrectamente": "Task cancelled successfully", + "tareaCreadaConExito": "Task creada con éxito", + "tareaDeCreacionDeImagen": "Task de creación de image scheduled con éxito", + "tareaEliminadaConExito": "Task eliminada con éxito", + "tareaProgramadaCorrectamente": "Task scheduled successfully", + "tipo": "Type", + "tipoDeProgramacion": "Type de Programación", + "tipoDeAccionNoReconocido": "Type de acción not reconocido", + "tipoDeParticion": "Type de partición", + "trazaCanceladaCorrectamente": "Trace cancelled successfully", + "trazaMarcadaComoExitosaCorrectamente": "Trace marked as successful successfully", + "unidadOrganizativa": "Unidad Organizativa", + "unidadesOrganizacionalesPermitidas": "Units Organizacionales Permitidas", + "urlPublica": "Url pública", + "userDeletedSuccessfully": "User deleted successfully", + "uso": "Uso", + "usuario": "User", + "usuarioAnadidoCorrectamente": "User añadido successfully", + "usuarioEditadoCorrectamente": "User edited successfully", + "variablesDeEntornoGuardadasCorrectamente": "Variables de entorno guardadas . successfully", + "version": "Version", + "vistaDeGrupos": "Vista de Groups", + "vistaPreviaGeneradaPulsaGuardar": "Vista previa generada. Pulsa Saving para aplicar the template remota permanentemente.", + "ogLiveDeletedSuccessfully": "OG Live deleted successfully", + "deseaPropagarLosParametrosDe": "¿Desea propagar the parámetros de network (ogLive, repository, menú, template PXE, profile hardware) a todos the clientes de esta unidad organizativa?", + "estasSeguroDeQueQuieres": "¿Estás seguro de que quieres cancelling todas the acciones mostradas?", + "estasSeguroQueDeseasEliminar": "¿Estás seguro que deseas deleting este repository? Esta acción not se puede deshacer.", + "ambito": "Ámbito" } \ No newline at end of file