From: Sebastien Douheret Date: Sat, 27 May 2017 21:11:04 +0000 (+0200) Subject: Improved devel/build panel (support PreBuild/Build/Populate) X-Git-Tag: v0.0.1-alpha~7 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=eafe4283b476d1122be6920a7b5d78a94babdc91;p=src%2Fxds%2Fxds-server.git Improved devel/build panel (support PreBuild/Build/Populate) --- diff --git a/webapp/src/app/devel/build/build.component.css b/webapp/src/app/devel/build/build.component.css index 6784a9f..92f953e 100644 --- a/webapp/src/app/devel/build/build.component.css +++ b/webapp/src/app/devel/build/build.component.css @@ -25,6 +25,10 @@ border: none; } +.table-in-accordion>tbody>tr>th { + width: 30% +} + .btn-large { width: 10em; } diff --git a/webapp/src/app/devel/build/build.component.html b/webapp/src/app/devel/build/build.component.html index f4be204..7f85aa6 100644 --- a/webapp/src/app/devel/build/build.component.html +++ b/webapp/src/app/devel/build/build.component.html @@ -25,12 +25,45 @@ - Command arguments - - - - Env variables - + + + +
+ Advanced Settings + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Clean Command
Pre-Build Command
Build Command
Populate Command
Env variables
Args variables
+
+
+ @@ -38,6 +71,7 @@
+ diff --git a/webapp/src/app/devel/build/build.component.ts b/webapp/src/app/devel/build/build.component.ts index b7003b1..449c557 100644 --- a/webapp/src/app/devel/build/build.component.ts +++ b/webapp/src/app/devel/build/build.component.ts @@ -43,12 +43,28 @@ export class BuildComponent implements OnInit, AfterViewChecked { this.cmdInfo = ""; // TODO: to be remove (only for debug) this.buildForm = fb.group({ subpath: this.subpathCtrl, + cmdClean: ["", Validators.nullValidator], + cmdPrebuild: ["", Validators.nullValidator], + cmdBuild: ["", Validators.nullValidator], + cmdPopulate: ["", Validators.nullValidator], cmdArgs: ["", Validators.nullValidator], envVars: ["", Validators.nullValidator], }); } ngOnInit() { + // Set default settings + // TODO save & restore values from cookies + this.buildForm.patchValue({ + subpath: "", + cmdClean: "rm -rf build", + cmdPrebuild: "mkdir -p build && cd build && cmake ..", + cmdBuild: "cd build && make", + cmdPopulate: "cd build && make remote-target-populate", + cmdArgs: "", + envVars: "", + }); + // Command output data tunneling this.xdsSvr.CmdOutput$.subscribe(data => { this.cmdOutput += data.stdout + "\n"; @@ -69,7 +85,7 @@ export class BuildComponent implements OnInit, AfterViewChecked { this._scrollToBottom(); // only use for debug - this.debugEnable = (this.cookie.get("debug_build") !== ""); + this.debugEnable = (this.cookie.get("debug_build") === "1"); } ngAfterViewChecked() { @@ -80,9 +96,17 @@ export class BuildComponent implements OnInit, AfterViewChecked { this.cmdOutput = ''; } + clean() { + this._exec( + this.buildForm.value.cmdClean, + this.buildForm.value.subpath, + [], + this.buildForm.value.envVars); + } + preBuild() { this._exec( - "mkdir -p build && cd build && cmake ..", + this.buildForm.value.cmdPrebuild, this.buildForm.value.subpath, [], this.buildForm.value.envVars); @@ -90,16 +114,16 @@ export class BuildComponent implements OnInit, AfterViewChecked { build() { this._exec( - "cd build && make", + this.buildForm.value.cmdBuild, this.buildForm.value.subpath, - this.buildForm.value.cmdArgs, + [], this.buildForm.value.envVars ); } populate() { this._exec( - "SEB_TODO_script_populate", + this.buildForm.value.cmdPopulate, this.buildForm.value.subpath, [], // args this.buildForm.value.envVars diff --git a/webapp/src/app/devel/devel.component.html b/webapp/src/app/devel/devel.component.html index 5950f51..feac413 100644 --- a/webapp/src/app/devel/devel.component.html +++ b/webapp/src/app/devel/devel.component.html @@ -25,7 +25,8 @@
-
+ +