ref 2979. Deploy generate instructions
parent
9797b14038
commit
379886134d
|
|
@ -651,14 +651,6 @@ export class DeployImageComponent implements OnInit {
|
||||||
: this.buildMonolithicOgInstructions();
|
: this.buildMonolithicOgInstructions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private getTargetClients(): any[] {
|
|
||||||
if (this.selectedClients.length) {
|
|
||||||
return this.selectedClients;
|
|
||||||
}
|
|
||||||
return this.selectedModelClient ? [this.selectedModelClient] : [];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private getProto(method: string | null): string {
|
private getProto(method: string | null): string {
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case 'uftp-direct':
|
case 'uftp-direct':
|
||||||
|
|
@ -711,14 +703,7 @@ export class DeployImageComponent implements OnInit {
|
||||||
? ['updateCache', repo, `/${imgname}.img`, proto, protoOpt].filter(a => a !== '').join(' ')
|
? ['updateCache', repo, `/${imgname}.img`, proto, protoOpt].filter(a => a !== '').join(' ')
|
||||||
: ['deployImage', repo, imgname, disk, par, proto, protoOpt].filter(a => a !== '').join(' ');
|
: ['deployImage', repo, imgname, disk, par, proto, protoOpt].filter(a => a !== '').join(' ');
|
||||||
|
|
||||||
const clients = this.getTargetClients();
|
return `${scriptName} ${restaurarArgs}\n ↳ ${innerCommand}`;
|
||||||
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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildGitOgInstructions(): string {
|
private buildGitOgInstructions(): string {
|
||||||
|
|
@ -729,16 +714,8 @@ export class DeployImageComponent implements OnInit {
|
||||||
const branch = this.selectedBranch || '<branch>';
|
const branch = this.selectedBranch || '<branch>';
|
||||||
const commit = this.selectedCommit?.hexsha || '<commit>';
|
const commit = this.selectedCommit?.hexsha || '<commit>';
|
||||||
|
|
||||||
const command =
|
return `RestaurarImagenGit --disk ${disk} --partition ${par} --repository ${repo} ` +
|
||||||
`RestaurarImagenGit --disk ${disk} --partition ${par} --repository ${repo} ` +
|
|
||||||
`--image-name ${imageName} --branch ${branch} --commit ${commit}`;
|
`--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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue