opcion para seleccionar sólo actualizar cache en una restauración de imagen
parent
3174f5695d
commit
a969dd5e78
|
|
@ -1,4 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.3.2] - 2026-04-13
|
||||||
|
### Added
|
||||||
|
- Añadida opción para restaurar sólo cache o cache y particion.
|
||||||
|
|
||||||
## [1.3.1] - 2026-04-09
|
## [1.3.1] - 2026-04-09
|
||||||
### Added
|
### Added
|
||||||
- Añadida información de la fecha de despliegue de una imagen en una particion.
|
- Añadida información de la fecha de despliegue de una imagen en una particion.
|
||||||
|
|
|
||||||
|
|
@ -708,11 +708,83 @@ table {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-hint mat-icon {
|
/* Deploy mode radio group */
|
||||||
color: #667eea;
|
.form-section-row {
|
||||||
font-size: 18px;
|
display: flex;
|
||||||
width: 18px;
|
align-items: flex-start;
|
||||||
height: 18px;
|
gap: 20px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 16px 20px;
|
||||||
|
background: #f7faff;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #e2e8ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.deploy-mode-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2c3e50;
|
||||||
|
min-width: 140px;
|
||||||
|
padding-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-label mat-icon {
|
||||||
|
color: #667eea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-radio-group {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-radio {
|
||||||
|
border: 2px solid #e2e8ff;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px 16px;
|
||||||
|
background: white;
|
||||||
|
transition: border-color 0.2s, box-shadow 0.2s;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-radio:has(.mat-radio-button-checked),
|
||||||
|
.deploy-mode-radio:hover {
|
||||||
|
border-color: #667eea;
|
||||||
|
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-option mat-icon {
|
||||||
|
color: #667eea;
|
||||||
|
font-size: 20px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-option div {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-option-title {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2c3e50;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deploy-mode-option-desc {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #6c757d;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,36 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Modo de despliegue: solo visible para métodos no-direct -->
|
||||||
|
@if (imageType === 'monolithic' && selectedMethod && !isDirectMethod()) {
|
||||||
|
<div class="form-section-row">
|
||||||
|
<div class="deploy-mode-label">
|
||||||
|
<mat-icon>cached</mat-icon>
|
||||||
|
<span>Modo de operación</span>
|
||||||
|
</div>
|
||||||
|
<mat-radio-group [(ngModel)]="deployMode" name="deployMode" class="deploy-mode-radio-group">
|
||||||
|
<mat-radio-button value="deploy" color="primary" class="deploy-mode-radio">
|
||||||
|
<div class="deploy-mode-option">
|
||||||
|
<mat-icon>storage</mat-icon>
|
||||||
|
<div>
|
||||||
|
<span class="deploy-mode-option-title">Despliegue completo</span>
|
||||||
|
<span class="deploy-mode-option-desc">Actualiza caché y restaura partición</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-radio-button>
|
||||||
|
<mat-radio-button value="update-cache" color="primary" class="deploy-mode-radio">
|
||||||
|
<div class="deploy-mode-option">
|
||||||
|
<mat-icon>download</mat-icon>
|
||||||
|
<div>
|
||||||
|
<span class="deploy-mode-option-title">Solo actualizar caché</span>
|
||||||
|
<span class="deploy-mode-option-desc">Descarga imagen sin restaurar partición</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
<div *ngIf="errorMessage" class="error-message">
|
<div *ngIf="errorMessage" class="error-message">
|
||||||
{{ errorMessage }}
|
{{ errorMessage }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ export class DeployImageComponent implements OnInit{
|
||||||
showInstructions: boolean = false;
|
showInstructions: boolean = false;
|
||||||
loadingCommits: boolean = false;
|
loadingCommits: boolean = false;
|
||||||
selectedGitRepository: string = '';
|
selectedGitRepository: string = '';
|
||||||
|
deployMode: string = 'deploy'; // 'deploy' | 'update-cache'
|
||||||
|
|
||||||
protected p2pModeOptions = [
|
protected p2pModeOptions = [
|
||||||
{ name: 'Leecher', value: 'leecher' },
|
{ name: 'Leecher', value: 'leecher' },
|
||||||
|
|
@ -354,6 +355,7 @@ export class DeployImageComponent implements OnInit{
|
||||||
type: this.imageType,
|
type: this.imageType,
|
||||||
queue: result,
|
queue: result,
|
||||||
clients: this.selectedClients.map((client: any) => client.uuid),
|
clients: this.selectedClients.map((client: any) => client.uuid),
|
||||||
|
deployMode: this.isDirectMethod() ? 'deploy' : this.deployMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
url = `${this.baseUrl}/image-image-repositories/${this.selectedImage.uuid}/deploy-image`;
|
url = `${this.baseUrl}/image-image-repositories/${this.selectedImage.uuid}/deploy-image`;
|
||||||
|
|
@ -418,6 +420,11 @@ export class DeployImageComponent implements OnInit{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isDirectMethod(): boolean {
|
||||||
|
return this.selectedMethod === 'unicast-direct' ||
|
||||||
|
this.selectedMethod === 'udpcast-direct';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
openScheduleModal(): void {
|
openScheduleModal(): void {
|
||||||
let scope = this.runScriptContext?.type || 'clients';
|
let scope = this.runScriptContext?.type || 'clients';
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@
|
||||||
<h3 class="disk-card-title">Disco {{ disk.diskNumber }}</h3>
|
<h3 class="disk-card-title">Disco {{ disk.diskNumber }}</h3>
|
||||||
<div class="disk-card-metrics-wrapper">
|
<div class="disk-card-metrics-wrapper">
|
||||||
<mat-chip class="disk-card-metrics-chip">
|
<mat-chip class="disk-card-metrics-chip">
|
||||||
Total: {{ disk.total.toFixed(2) }} GB | Usado: {{ (disk.used).toFixed(2) }} GB ({{ disk.percentage }}%)
|
Total: {{ disk.total.toFixed(2) }} GB | Usado: {{ (disk.used).toFixed(2) }} GB ({{
|
||||||
|
disk.percentage }}%)
|
||||||
</mat-chip>
|
</mat-chip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -79,7 +80,7 @@
|
||||||
<span>{{image.operativeSystem?.name }}</span>
|
<span>{{image.operativeSystem?.name }}</span>
|
||||||
<span class="image-name">{{ image.image?.name }}</span>
|
<span class="image-name">{{ image.image?.name }}</span>
|
||||||
@if (image.deployDate) {
|
@if (image.deployDate) {
|
||||||
<span class="image-date">Instalada el {{ image.deployDate | date:'dd/MM/yyyy HH:mm' }}</span>
|
<span class="image-date">Desplegada: {{ image.deployDate | date:'dd/MM/yyyy HH:mm' }}</span>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -91,7 +92,8 @@
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
|
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [hidden]="row.partitionNumber === 0"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;" [hidden]="row.partitionNumber === 0">
|
||||||
|
</tr>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
@ -99,14 +101,8 @@
|
||||||
|
|
||||||
<div class="charts-container disk-chart-container">
|
<div class="charts-container disk-chart-container">
|
||||||
<div class="disk-chart-wrapper">
|
<div class="disk-chart-wrapper">
|
||||||
<ngx-charts-pie-chart
|
<ngx-charts-pie-chart class="chart" [view]="[360, 230]" [results]="disk.chartData" [doughnut]="true"
|
||||||
class="chart"
|
[legend]="true" [legendPosition]="legendPosition" [legendTitle]="''">
|
||||||
[view]="[360, 230]"
|
|
||||||
[results]="disk.chartData"
|
|
||||||
[doughnut]="true"
|
|
||||||
[legend]="true"
|
|
||||||
[legendPosition]="legendPosition"
|
|
||||||
[legendTitle]="''">
|
|
||||||
</ngx-charts-pie-chart>
|
</ngx-charts-pie-chart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue