ref 2979. Deploy generate instructions

pull/97/head
Manuel Aranda Rosales 2026-07-14 10:44:18 +02:00
parent 9797b14038
commit 379886134d
1 changed files with 2 additions and 25 deletions

View File

@ -651,14 +651,6 @@ export class DeployImageComponent implements OnInit {
: this.buildMonolithicOgInstructions();
}
private getTargetClients(): any[] {
if (this.selectedClients.length) {
return this.selectedClients;
}
return this.selectedModelClient ? [this.selectedModelClient] : [];
}
private getProto(method: string | null): string {
switch (method) {
case 'uftp-direct':
@ -711,14 +703,7 @@ export class DeployImageComponent implements OnInit {
? ['updateCache', repo, `/${imgname}.img`, proto, protoOpt].filter(a => a !== '').join(' ')
: ['deployImage', repo, imgname, disk, par, proto, protoOpt].filter(a => a !== '').join(' ');
const clients = this.getTargetClients();
const targets = clients.length ? clients : [{ name: '<cliente>', ip: '<client-ip>' }];
return targets.map(client =>
`# Cliente ${client.name || client.ip} (${client.ip || '<client-ip>'})\n` +
`${scriptName} ${restaurarArgs}\n` +
` ↳ ${innerCommand}`
).join('\n\n');
return `${scriptName} ${restaurarArgs}\n ↳ ${innerCommand}`;
}
private buildGitOgInstructions(): string {
@ -729,16 +714,8 @@ export class DeployImageComponent implements OnInit {
const branch = this.selectedBranch || '<branch>';
const commit = this.selectedCommit?.hexsha || '<commit>';
const command =
`RestaurarImagenGit --disk ${disk} --partition ${par} --repository ${repo} ` +
return `RestaurarImagenGit --disk ${disk} --partition ${par} --repository ${repo} ` +
`--image-name ${imageName} --branch ${branch} --commit ${commit}`;
const clients = this.getTargetClients();
const targets = clients.length ? clients : [{ name: '<cliente>', ip: '<client-ip>' }];
return targets.map(client =>
`# Cliente ${client.name || client.ip} (${client.ip || '<client-ip>'})\n${command}`
).join('\n\n');
}