X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=webapp%2Fsrc%2Fapp%2Fbuild%2Fbuild.component.ts;h=17e545f0c38dc1d5cebe765979f21e88a5fd09cd;hb=c53aef75b26a586bffa8ade44f8fb157d36566b7;hp=a1a965bfd1405e77e631b38a9b3953490299adb6;hpb=1f19bfa9fcf0903dab6e5675f055f23cba1357b7;p=src%2Fxds%2Fxds-server.git diff --git a/webapp/src/app/build/build.component.ts b/webapp/src/app/build/build.component.ts index a1a965b..17e545f 100644 --- a/webapp/src/app/build/build.component.ts +++ b/webapp/src/app/build/build.component.ts @@ -8,6 +8,7 @@ import 'rxjs/add/operator/startWith'; import { XDSServerService, ICmdOutput } from "../common/xdsserver.service"; import { ConfigService, IConfig, IProject } from "../common/config.service"; import { AlertService, IAlert } from "../common/alert.service"; +import { SdkService } from "../common/sdk.service"; @Component({ selector: 'build', @@ -32,13 +33,19 @@ export class BuildComponent implements OnInit, AfterViewChecked { private startTime: Map = new Map(); // I initialize the app component. - constructor(private configSvr: ConfigService, private sdkSvr: XDSServerService, - private fb: FormBuilder, private alertSvr: AlertService + constructor(private configSvr: ConfigService, + private xdsSvr: XDSServerService, + private fb: FormBuilder, + private alertSvr: AlertService, + private sdkSvr: SdkService ) { this.cmdOutput = ""; this.confValid = false; this.cmdInfo = ""; // TODO: to be remove (only for debug) - this.buildForm = fb.group({ subpath: this.subpathCtrl }); + this.buildForm = fb.group({ + subpath: this.subpathCtrl, + makeArgs: ["", Validators.nullValidator], + }); } ngOnInit() { @@ -54,12 +61,12 @@ export class BuildComponent implements OnInit, AfterViewChecked { }); // Command output data tunneling - this.sdkSvr.CmdOutput$.subscribe(data => { + this.xdsSvr.CmdOutput$.subscribe(data => { this.cmdOutput += data.stdout + "\n"; }); // Command exit - this.sdkSvr.CmdExit$.subscribe(exit => { + this.xdsSvr.CmdExit$.subscribe(exit => { if (this.startTime.has(exit.cmdID)) { this.cmdInfo = 'Last command duration: ' + this._computeTime(this.startTime.get(exit.cmdID)); this.startTime.delete(exit.cmdID); @@ -90,10 +97,14 @@ export class BuildComponent implements OnInit, AfterViewChecked { this.cmdOutput += this._outputHeader(); + let sdkid = this.sdkSvr.getCurrentId(); + + let cmdArgs = args ? args : this.buildForm.value.makeArgs; + let t0 = performance.now(); this.cmdInfo = 'Start build of ' + prjID + ' at ' + t0; - this.sdkSvr.make(prjID, this.buildForm.value.subpath, args) + this.xdsSvr.make(prjID, this.buildForm.value.subpath, cmdArgs, sdkid) .subscribe(res => { this.startTime.set(String(res.cmdID), t0); },