Compare commits
No commits in common. "ee150386ff114e08c197ab411ad7ccb2342b3b31" and "2f6b50a299b9c1cbb119405c7c3d1c9daaf96508" have entirely different histories.
ee150386ff
...
2f6b50a299
|
@ -1,9 +1,4 @@
|
|||
# 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.
|
||||
|
|
|
@ -131,7 +131,9 @@ 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) {
|
||||
|
@ -287,7 +289,8 @@ 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;
|
||||
|
@ -337,10 +340,18 @@ export class DeployImageComponent implements OnInit{
|
|||
repositoryName: this.selectedGitRepository,
|
||||
branch: this.selectedBranch,
|
||||
hexsha: this.selectedCommit.hexsha,
|
||||
queue: result,
|
||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||
queue: result
|
||||
};
|
||||
|
||||
// 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 = {
|
||||
|
@ -356,10 +367,18 @@ export class DeployImageComponent implements OnInit{
|
|||
maxTime: this.mcastMaxTime,
|
||||
maxClients: this.mcastMaxClients,
|
||||
type: this.imageType,
|
||||
queue: result,
|
||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||
queue: result
|
||||
};
|
||||
|
||||
// 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`;
|
||||
}
|
||||
|
||||
|
@ -424,6 +443,8 @@ 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;
|
||||
|
||||
|
@ -431,6 +452,7 @@ 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);
|
||||
|
||||
|
@ -454,6 +476,7 @@ export class DeployImageComponent implements OnInit{
|
|||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((result: { [x: string]: any; }) => {
|
||||
console.log(result);
|
||||
if (result) {
|
||||
const basePayload: any = {
|
||||
method: this.selectedMethod,
|
||||
|
@ -461,8 +484,7 @@ export class DeployImageComponent implements OnInit{
|
|||
partitionNumber: this.selectedPartition.partitionNumber,
|
||||
imageName: this.selectedImage.name,
|
||||
imageUuid: this.selectedImage.uuid,
|
||||
type: this.imageType,
|
||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||
type: this.imageType
|
||||
};
|
||||
|
||||
if (this.selectedMethod === 'p2p' && this.p2pMode) {
|
||||
|
|
|
@ -267,6 +267,7 @@ 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;
|
||||
|
||||
|
@ -489,10 +490,18 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
|
|||
|
||||
const bulkPayload: any = {
|
||||
partitions: newPartitions,
|
||||
queue: result,
|
||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||
queue: result
|
||||
};
|
||||
|
||||
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.');
|
||||
|
|
|
@ -195,7 +195,7 @@ export class RunScriptAssistantComponent implements OnInit{
|
|||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
if (result !== undefined) {
|
||||
if (result) {
|
||||
this.loading = true;
|
||||
this.http.post(`${this.baseUrl}/commands/run-script`, {
|
||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||
|
|
Loading…
Reference in New Issue