Compare commits
4 Commits
2f6b50a299
...
ee150386ff
Author | SHA1 | Date |
---|---|---|
|
ee150386ff | |
|
59a34db01d | |
|
b0b1fc929a | |
|
441fba19e3 |
|
@ -1,4 +1,9 @@
|
||||||
# Changelog
|
# 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
|
## [0.23.3] - 2025-09-10
|
||||||
### Improved
|
### Improved
|
||||||
- Se han realizado mejoras sobre la funcionalidad de tareas programadas.
|
- Se han realizado mejoras sobre la funcionalidad de tareas programadas.
|
||||||
|
|
|
@ -131,9 +131,7 @@ export class DeployImageComponent implements OnInit{
|
||||||
});
|
});
|
||||||
this.clientId = this.clientData?.length ? this.clientData[0]['@id'] : null;
|
this.clientId = this.clientData?.length ? this.clientData[0]['@id'] : null;
|
||||||
this.clientData.forEach((client: { selected: boolean; status: string}) => { client.selected = true; });
|
this.clientData.forEach((client: { selected: boolean; status: string}) => { client.selected = true; });
|
||||||
|
|
||||||
this.selectedClients = this.clientData.filter((client: { selected: boolean; status: string}) => client.selected);
|
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;
|
this.selectedModelClient = this.clientData.find((client: { selected: boolean; status: string}) => client.selected) || null;
|
||||||
|
|
||||||
if (this.selectedModelClient) {
|
if (this.selectedModelClient) {
|
||||||
|
@ -289,8 +287,7 @@ export class DeployImageComponent implements OnInit{
|
||||||
}
|
}
|
||||||
|
|
||||||
save(): void {
|
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) {
|
if (!this.selectedClients.length) {
|
||||||
this.toastService.error('Debe seleccionar al menos un cliente');
|
this.toastService.error('Debe seleccionar al menos un cliente');
|
||||||
return;
|
return;
|
||||||
|
@ -340,18 +337,10 @@ export class DeployImageComponent implements OnInit{
|
||||||
repositoryName: this.selectedGitRepository,
|
repositoryName: this.selectedGitRepository,
|
||||||
branch: this.selectedBranch,
|
branch: this.selectedBranch,
|
||||||
hexsha: this.selectedCommit.hexsha,
|
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`;
|
url = `${this.baseUrl}/git-repositories/deploy-image`;
|
||||||
} else {
|
} else {
|
||||||
payload = {
|
payload = {
|
||||||
|
@ -367,18 +356,10 @@ export class DeployImageComponent implements OnInit{
|
||||||
maxTime: this.mcastMaxTime,
|
maxTime: this.mcastMaxTime,
|
||||||
maxClients: this.mcastMaxClients,
|
maxClients: this.mcastMaxClients,
|
||||||
type: this.imageType,
|
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`;
|
url = `${this.baseUrl}/image-image-repositories/${this.selectedImage.uuid}/deploy-image`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,8 +424,6 @@ export class DeployImageComponent implements OnInit{
|
||||||
|
|
||||||
|
|
||||||
openScheduleModal(): void {
|
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 scope = this.runScriptContext?.type || 'clients';
|
||||||
let selectedClients = null;
|
let selectedClients = null;
|
||||||
|
|
||||||
|
@ -452,7 +431,6 @@ export class DeployImageComponent implements OnInit{
|
||||||
this.updateSelectedClients();
|
this.updateSelectedClients();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determinar si es un contexto organizacional
|
|
||||||
const isOrganizationalContext = this.runScriptContext?.type &&
|
const isOrganizationalContext = this.runScriptContext?.type &&
|
||||||
['organizational-unit', 'classroom', 'classrooms-group', 'clients-group'].includes(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; }) => {
|
dialogRef.afterClosed().subscribe((result: { [x: string]: any; }) => {
|
||||||
console.log(result);
|
|
||||||
if (result) {
|
if (result) {
|
||||||
const basePayload: any = {
|
const basePayload: any = {
|
||||||
method: this.selectedMethod,
|
method: this.selectedMethod,
|
||||||
|
@ -484,7 +461,8 @@ export class DeployImageComponent implements OnInit{
|
||||||
partitionNumber: this.selectedPartition.partitionNumber,
|
partitionNumber: this.selectedPartition.partitionNumber,
|
||||||
imageName: this.selectedImage.name,
|
imageName: this.selectedImage.name,
|
||||||
imageUuid: this.selectedImage.uuid,
|
imageUuid: this.selectedImage.uuid,
|
||||||
type: this.imageType
|
type: this.imageType,
|
||||||
|
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.selectedMethod === 'p2p' && this.p2pMode) {
|
if (this.selectedMethod === 'p2p' && this.p2pMode) {
|
||||||
|
|
|
@ -267,7 +267,6 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
|
||||||
});
|
});
|
||||||
|
|
||||||
disksMap.forEach((disk, diskNumber) => {
|
disksMap.forEach((disk, diskNumber) => {
|
||||||
console.log(this.selectedModelClient?.firmwareType);
|
|
||||||
const isUEFI = this.selectedModelClient?.firmwareType === 'UEFI';
|
const isUEFI = this.selectedModelClient?.firmwareType === 'UEFI';
|
||||||
const hasNoPartitions = disk.partitions.length === 0;
|
const hasNoPartitions = disk.partitions.length === 0;
|
||||||
|
|
||||||
|
@ -490,18 +489,10 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
|
||||||
|
|
||||||
const bulkPayload: any = {
|
const bulkPayload: any = {
|
||||||
partitions: newPartitions,
|
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(
|
this.http.post(this.apiUrl, bulkPayload).subscribe(
|
||||||
(response) => {
|
(response) => {
|
||||||
this.toastService.success('Particiones creadas exitosamente para el disco seleccionado.');
|
this.toastService.success('Particiones creadas exitosamente para el disco seleccionado.');
|
||||||
|
|
|
@ -195,7 +195,7 @@ export class RunScriptAssistantComponent implements OnInit{
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result !== undefined) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.http.post(`${this.baseUrl}/commands/run-script`, {
|
this.http.post(`${this.baseUrl}/commands/run-script`, {
|
||||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||||
|
|
Loading…
Reference in New Issue