Fixed partition assistant #90
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,5 +1,15 @@
|
|||
# Changelog
|
||||
|
||||
## [1.5.9] - 2026-05-07
|
||||
### Fixed
|
||||
- Asistente de particionado: en discos GPT se elimina el límite de 4 particiones primarias, se oculta la opción de añadir partición lógica/extendida y se suprime el estilo visual de partición lógica (borde amarillo e icono └)
|
||||
### Added
|
||||
- En acciones programadas, la acción "Iniciar Sesión" ahora permite configurar disco y partición de arranque como parámetros
|
||||
|
||||
## [1.5.8] - 2026-05-06
|
||||
### Added
|
||||
- Añadido polling en la vista de logs de disco para refresco automático en tiempo real
|
||||
|
||||
## [1.5.7] - 2026-05-05
|
||||
### Fixed
|
||||
- Modificada vista para eliminar imagen de cache, se muestra la lista de ficheros de imagen contenida en la cache y se borra el fichero
|
||||
|
|
|
|||
|
|
@ -258,6 +258,11 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.half-width {
|
||||
width: calc(50% - 8px);
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.radio-row {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@
|
|||
<input matInput type="number" [(ngModel)]="executionOrder" min="0">
|
||||
</mat-form-field>
|
||||
|
||||
<!-- ========== SYSTEM CONTROL (power-on, shutdown, reboot, login) ========== -->
|
||||
<div *ngIf="selectedAction === 'power-on' || selectedAction === 'shutdown' || selectedAction === 'reboot' || selectedAction === 'login'"
|
||||
<!-- ========== SYSTEM CONTROL (power-on, shutdown, reboot) ========== -->
|
||||
<div *ngIf="selectedAction === 'power-on' || selectedAction === 'shutdown' || selectedAction === 'reboot'"
|
||||
class="form-section system-info">
|
||||
<div class="system-action-info">
|
||||
<mat-icon [style.color]="getSelectedCategoryColor()" class="big-icon">{{ getSelectedActionIcon() }}</mat-icon>
|
||||
|
|
@ -113,6 +113,21 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ========== LOGIN ========== -->
|
||||
<div *ngIf="selectedAction === 'login'" class="form-section">
|
||||
<div class="system-action-info" style="margin-bottom: 16px;">
|
||||
<mat-icon [style.color]="getSelectedCategoryColor()" class="big-icon">login</mat-icon>
|
||||
</div>
|
||||
<mat-form-field appearance="fill" class="half-width">
|
||||
<mat-label>{{ 'labelDisk' | translate }}</mat-label>
|
||||
<input matInput type="number" [(ngModel)]="loginDisk" min="1">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="fill" class="half-width">
|
||||
<mat-label>{{ 'partition' | translate }}</mat-label>
|
||||
<input matInput type="number" [(ngModel)]="loginPartition" min="1">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<!-- ========== RUN SCRIPT ========== -->
|
||||
<div *ngIf="selectedAction === 'run-script'" class="form-section">
|
||||
<div class="script-type-selector">
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ export class CreateTaskScriptComponent implements OnInit {
|
|||
|
||||
selectedCategory: string = '';
|
||||
selectedAction: string = '';
|
||||
loginDisk: number = 1;
|
||||
loginPartition: number = 1;
|
||||
|
||||
categories: ActionCategory[] = [
|
||||
{
|
||||
|
|
@ -238,11 +240,15 @@ export class CreateTaskScriptComponent implements OnInit {
|
|||
case 'power-on':
|
||||
case 'shutdown':
|
||||
case 'reboot':
|
||||
case 'login':
|
||||
type = this.selectedAction;
|
||||
content = this.selectedAction;
|
||||
break;
|
||||
|
||||
case 'login':
|
||||
type = 'login';
|
||||
content = 'login';
|
||||
break;
|
||||
|
||||
default:
|
||||
this.toastService.error(this.translate.instant('unrecognizedActionType'));
|
||||
return;
|
||||
|
|
@ -255,6 +261,10 @@ export class CreateTaskScriptComponent implements OnInit {
|
|||
type: type,
|
||||
};
|
||||
|
||||
if (this.selectedAction === 'login') {
|
||||
payload.parameters = { disk: this.loginDisk, partition: this.loginPartition };
|
||||
}
|
||||
|
||||
this.http.post(`${this.baseUrl}/command-task-scripts`, payload).subscribe({
|
||||
next: () => {
|
||||
this.toastService.success(this.translate.instant('actionAddedSuccess'));
|
||||
|
|
|
|||
|
|
@ -154,9 +154,9 @@
|
|||
<mat-menu #addPartitionMenu="matMenu">
|
||||
<button mat-menu-item (click)="addPrimaryPartition(selectedDisk.diskNumber)">
|
||||
<mat-icon>storage</mat-icon>
|
||||
<span>Partición normal <small>(1–4)</small></span>
|
||||
<span>Partición normal <small *ngIf="partitionCode !== 'GPT'">(1–4)</small></span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="addLogicalPartition(selectedDisk.diskNumber)">
|
||||
<button mat-menu-item *ngIf="partitionCode !== 'GPT'" (click)="addLogicalPartition(selectedDisk.diskNumber)">
|
||||
<mat-icon>account_tree</mat-icon>
|
||||
<span>Partición extendida <small>(5+)</small></span>
|
||||
</button>
|
||||
|
|
@ -201,11 +201,11 @@
|
|||
<tbody>
|
||||
<ng-container *ngFor="let partition of orderedPartitions; let j = index">
|
||||
<tr [ngClass]="{
|
||||
'extended-row': partition.partitionCode === 'EXTENDED',
|
||||
'logical-row': partition.partitionNumber >= 5
|
||||
'extended-row': partition.partitionCode === 'EXTENDED' && partitionCode !== 'GPT',
|
||||
'logical-row': partition.partitionNumber >= 5 && partitionCode !== 'GPT'
|
||||
}">
|
||||
<td>
|
||||
<span *ngIf="partition.partitionNumber >= 5" class="logical-indent">└</span>
|
||||
<span *ngIf="partition.partitionNumber >= 5 && partitionCode !== 'GPT'" class="logical-indent">└</span>
|
||||
{{ partition.partitionNumber }}
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -387,12 +387,15 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
|
|||
}
|
||||
|
||||
const activePrimary = disk.partitions.filter(p => !p.removed && p.partitionNumber < 5);
|
||||
if (activePrimary.length >= 4) {
|
||||
if (this.partitionCode !== 'GPT' && activePrimary.length >= 4) {
|
||||
this.toastService.error('No se pueden añadir más de 4 particiones primarias');
|
||||
return;
|
||||
}
|
||||
|
||||
const maxPrimary = activePrimary.length > 0 ? Math.max(...activePrimary.map(p => p.partitionNumber)) : 0;
|
||||
const allActive = disk.partitions.filter(p => !p.removed);
|
||||
const maxPrimary = this.partitionCode === 'GPT'
|
||||
? (allActive.length > 0 ? Math.max(...allActive.map(p => p.partitionNumber)) : 0)
|
||||
: (activePrimary.length > 0 ? Math.max(...activePrimary.map(p => p.partitionNumber)) : 0);
|
||||
const newNumber = maxPrimary + 1;
|
||||
|
||||
const isUEFI = this.selectedModelClient?.firmwareType === 'UEFI';
|
||||
|
|
@ -934,6 +937,7 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
|
|||
}
|
||||
|
||||
isLogicalPartition(partitions: Partition[], currentIndex: number): boolean {
|
||||
if (this.partitionCode === 'GPT') return false;
|
||||
return partitions[currentIndex]?.partitionNumber >= 5;
|
||||
}
|
||||
|
||||
|
|
@ -951,6 +955,9 @@ export class PartitionAssistantComponent implements OnInit, AfterViewInit, OnDes
|
|||
if (!this.selectedDisk) return [];
|
||||
const sortByNumber = (a: Partition, b: Partition) => a.partitionNumber - b.partitionNumber;
|
||||
const active: Partition[] = this.selectedDisk.partitions.filter((p: Partition) => !p.removed);
|
||||
if (this.partitionCode === 'GPT') {
|
||||
return active.sort(sortByNumber);
|
||||
}
|
||||
const primaries = active.filter((p: Partition) => p.partitionNumber < 5).sort(sortByNumber);
|
||||
const logicals = active.filter((p: Partition) => p.partitionNumber >= 5).sort(sortByNumber);
|
||||
const result: Partition[] = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue