refs #2754. Deploy bug fixed
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
parent
2d9c66919a
commit
e31eda7d2f
|
|
@ -445,23 +445,50 @@ export class DeployImageComponent implements OnInit{
|
|||
|
||||
dialogRef.afterClosed().subscribe((result: { [x: string]: any; }) => {
|
||||
if (result !== undefined) {
|
||||
const payload = {
|
||||
const basePayload: any = {
|
||||
method: this.selectedMethod,
|
||||
diskNumber: this.selectedPartition.diskNumber,
|
||||
partitionNumber: this.selectedPartition.partitionNumber,
|
||||
p2pMode: this.selectedMethod === 'p2p' ? this.p2pMode : null,
|
||||
p2pTime: this.selectedMethod === 'p2p' && this.p2pMode === 'seeder' ? this.p2pTime : null,
|
||||
mcastIp: this.selectedMethod === 'udpcast' ? this.mcastIp : null,
|
||||
mcastPort: this.selectedMethod === 'udpcast' ? this.mcastPort : null,
|
||||
mcastMode: this.selectedMethod === 'udpcast' ? this.mcastMode : null,
|
||||
mcastSpeed: this.selectedMethod === 'udpcast' ? this.mcastSpeed : null,
|
||||
maxTime: this.selectedMethod === 'udpcast' ? this.mcastMaxTime : null,
|
||||
maxClients: this.selectedMethod === 'udpcast' ? this.mcastMaxClients : null,
|
||||
imageName: this.selectedImage.name,
|
||||
imageUuid: this.selectedImage.uuid,
|
||||
type: this.imageType
|
||||
};
|
||||
|
||||
if (this.selectedMethod === 'p2p' && this.p2pMode) {
|
||||
basePayload['p2pMode'] = this.p2pMode;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'p2p' && this.p2pMode === 'seeder' && this.p2pTime) {
|
||||
basePayload['p2pTime'] = this.p2pTime;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'udpcast' || this.selectedMethod === 'udpcast-direct' && this.mcastIp) {
|
||||
basePayload['mcastIp'] = this.mcastIp;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'udpcast' || this.selectedMethod === 'udpcast-direct' && this.mcastPort) {
|
||||
basePayload['mcastPort'] = this.mcastPort;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'udpcast' || this.selectedMethod === 'udpcast-direct' && this.mcastMode) {
|
||||
basePayload['mcastMode'] = this.mcastMode;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'udpcast' || this.selectedMethod === 'udpcast-direct' && this.mcastSpeed) {
|
||||
basePayload['mcastSpeed'] = this.mcastSpeed;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'udpcast' || this.selectedMethod === 'udpcast-direct' && this.mcastMaxTime) {
|
||||
basePayload['maxTime'] = this.mcastMaxTime;
|
||||
}
|
||||
|
||||
if (this.selectedMethod === 'udpcast' || this.selectedMethod === 'udpcast-direct' && this.mcastMaxClients) {
|
||||
basePayload['maxClients'] = this.mcastMaxClients;
|
||||
}
|
||||
|
||||
this.http.post(`${this.baseUrl}/command-task-scripts`, {
|
||||
commandTask: result['taskId'] ? result['taskId']['@id'] : result['@id'],
|
||||
parameters: payload,
|
||||
parameters: basePayload,
|
||||
order: result['executionOrder'] || 1,
|
||||
type: 'deploy-image',
|
||||
}).subscribe({
|
||||
|
|
|
|||
Loading…
Reference in New Issue