Compare commits

...

4 Commits

Author SHA1 Message Date
Manuel Aranda Rosales ee150386ff Merge pull request 'develop' (#46) from develop into main
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details
oggui-debian-package/pipeline/head This commit looks good Details
oggui-debian-package/pipeline/tag This commit looks good Details
Reviewed-on: #46
2025-09-22 15:29:01 +02:00
Manuel Aranda Rosales 59a34db01d Merge branch 'main' into develop
testing/ogGui-multibranch/pipeline/pr-main There was a failure building this commit Details
2025-09-22 15:27:44 +02:00
Manuel Aranda Rosales b0b1fc929a updated changelog
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details
testing/ogGui-multibranch/pipeline/pr-main There was a failure building this commit Details
2025-09-22 15:27:29 +02:00
Manuel Aranda Rosales 441fba19e3 refs #2820. Fixed bug in assistants
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details
2025-09-22 15:26:24 +02:00
4 changed files with 15 additions and 41 deletions

View File

@ -1,4 +1,9 @@
# Changelog
## [0.23.4] - 2025-09-22
### Fixed
- Se ha arreglado en error a la hora de mandar el ambito de ejecucion en lso asistentes
---
## [0.23.3] - 2025-09-10
### Improved
- Se han realizado mejoras sobre la funcionalidad de tareas programadas.

View File

@ -131,9 +131,7 @@ export class DeployImageComponent implements OnInit{
});
this.clientId = this.clientData?.length ? this.clientData[0]['@id'] : null;
this.clientData.forEach((client: { selected: boolean; status: string}) => { client.selected = true; });
this.selectedClients = this.clientData.filter((client: { selected: boolean; status: string}) => client.selected);
this.selectedModelClient = this.clientData.find((client: { selected: boolean; status: string}) => client.selected) || null;
if (this.selectedModelClient) {
@ -289,8 +287,7 @@ export class DeployImageComponent implements OnInit{
}
save(): void {
// Función para ejecutar inmediatamente el despliegue de imagen
// Maneja tanto contextos de clientes individuales como unidades organizacionales (aulas, grupos, etc.)
if (!this.selectedClients.length) {
this.toastService.error('Debe seleccionar al menos un cliente');
return;
@ -340,18 +337,10 @@ export class DeployImageComponent implements OnInit{
repositoryName: this.selectedGitRepository,
branch: this.selectedBranch,
hexsha: this.selectedCommit.hexsha,
queue: result
queue: result,
clients: this.selectedClients.map((client: any) => client.uuid),
};
// Determinar el ámbito correcto basado en runScriptContext
const isOrganizationalContext = this.runScriptContext?.type &&
['organizational-unit', 'classroom', 'classrooms-group', 'clients-group'].includes(this.runScriptContext.type);
if (isOrganizationalContext) {
payload.organizationalUnit = this.runScriptContext['@id'];
} else {
payload.clients = this.selectedClients.map((client: any) => client.uuid);
}
url = `${this.baseUrl}/git-repositories/deploy-image`;
} else {
payload = {
@ -367,18 +356,10 @@ export class DeployImageComponent implements OnInit{
maxTime: this.mcastMaxTime,
maxClients: this.mcastMaxClients,
type: this.imageType,
queue: result
queue: result,
clients: this.selectedClients.map((client: any) => client.uuid),
};
// Determinar el ámbito correcto basado en runScriptContext
const isOrganizationalContext = this.runScriptContext?.type &&
['organizational-unit', 'classroom', 'classrooms-group', 'clients-group'].includes(this.runScriptContext.type);
if (isOrganizationalContext) {
payload.organizationalUnit = this.runScriptContext['@id'];
} else {
payload.clients = this.selectedClients.map((client: any) => client.uuid);
}
url = `${this.baseUrl}/image-image-repositories/${this.selectedImage.uuid}/deploy-image`;
}
@ -443,8 +424,6 @@ export class DeployImageComponent implements OnInit{
openScheduleModal(): void {
// Función para programar la ejecución del despliegue de imagen
// Maneja tanto contextos de clientes individuales como unidades organizacionales (aulas, grupos, etc.)
let scope = this.runScriptContext?.type || 'clients';
let selectedClients = null;
@ -452,7 +431,6 @@ export class DeployImageComponent implements OnInit{
this.updateSelectedClients();
}
// Determinar si es un contexto organizacional
const isOrganizationalContext = this.runScriptContext?.type &&
['organizational-unit', 'classroom', 'classrooms-group', 'clients-group'].includes(this.runScriptContext.type);
@ -476,7 +454,6 @@ export class DeployImageComponent implements OnInit{
});
dialogRef.afterClosed().subscribe((result: { [x: string]: any; }) => {
console.log(result);
if (result) {
const basePayload: any = {
method: this.selectedMethod,
@ -484,7 +461,8 @@ export class DeployImageComponent implements OnInit{
partitionNumber: this.selectedPartition.partitionNumber,
imageName: this.selectedImage.name,
imageUuid: this.selectedImage.uuid,
type: this.imageType
type: this.imageType,
clients: this.selectedClients.map((client: any) => client.uuid),
};
if (this.selectedMethod === 'p2p' && this.p2pMode) {

View File

@ -267,7 +267,6 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
});
disksMap.forEach((disk, diskNumber) => {
console.log(this.selectedModelClient?.firmwareType);
const isUEFI = this.selectedModelClient?.firmwareType === 'UEFI';
const hasNoPartitions = disk.partitions.length === 0;
@ -490,18 +489,10 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
const bulkPayload: any = {
partitions: newPartitions,
queue: result
queue: result,
clients: this.selectedClients.map((client: any) => client.uuid),
};
const isOrganizationalContext = this.runScriptContext?.type &&
['organizational-unit', 'classroom', 'classrooms-group', 'clients-group'].includes(this.runScriptContext.type);
if (isOrganizationalContext) {
bulkPayload.organizationalUnit = this.runScriptContext['@id'];
} else {
bulkPayload.clients = this.selectedClients.map((client: any) => client.uuid);
}
this.http.post(this.apiUrl, bulkPayload).subscribe(
(response) => {
this.toastService.success('Particiones creadas exitosamente para el disco seleccionado.');

View File

@ -195,7 +195,7 @@ export class RunScriptAssistantComponent implements OnInit{
});
dialogRef.afterClosed().subscribe(result => {
if (result) {
if (result !== undefined) {
this.loading = true;
this.http.post(`${this.baseUrl}/commands/run-script`, {
clients: this.selectedClients.map((client: any) => client.uuid),