• R/O
  • HTTP
  • SSH
  • HTTPS

zephyr: Commit

This repository is for zephyr, which is implemented for a GUI of Eos.


Commit MetaInfo

Revisiond9391cd78853ea63a3f5818b20291fe274628c25 (tree)
Time2016-02-29 16:29:56
Authorhimetani_cafe <fumifumi@yasu...>
Commiterhimetani_cafe

Log Message

Create console area computed from CSS style pixels

Change Summary

Incremental Difference

--- a/front-end/app/scripts/directives/Command.ts
+++ b/front-end/app/scripts/directives/Command.ts
@@ -45,7 +45,7 @@ namespace app.directives {
4545
4646 export class CommandController {
4747
48- public static $inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
48+ public static $inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4949
5050 // From parent directive bindToController property
5151 private index: string;
@@ -64,7 +64,12 @@ namespace app.directives {
6464 private dirs: any;
6565 private messages: any;
6666
67- constructor(private APIEndPoint: services.APIEndPoint, private $scope: ng.IScope, private MyModal: services.MyModal, private WebSocket: services.WebSocket) {
67+ constructor(private APIEndPoint: services.APIEndPoint,
68+ private $scope: ng.IScope,
69+ private MyModal: services.MyModal,
70+ private WebSocket: services.WebSocket,
71+ private $window: ng.IWindowService
72+ ) {
6873 var controller = this;
6974
7075 // Get OptionControlFile and bind it to $scope.options
@@ -159,11 +164,22 @@ namespace app.directives {
159164 }
160165
161166 public debug() {
162- this.APIEndPoint
163- .debug()
164- .then((result) => {
165- console.log(result);
167+ var div = angular.element(this.$window.document).find("div");
168+ var consoleTag;
169+ var parametersTag;
170+ angular.forEach(div,function(v) {
171+ if(v.className === "panel-body console") {
172+ consoleTag = v;
173+ } else if(v.className === "row parameters-console") {
174+ parametersTag = v;
175+ }
166176 });
177+
178+ // Adjust console area from CSS styling positoning information
179+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px','')) - 150 + 'px';
180+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px','')) / 3 * 2 - 150 + 'px';
181+ consoleTag.style.height = consoleHeight;
182+ consoleTag.style.width = consoleWidth;
167183 }
168184
169185 public help() {
--- a/front-end/app/style.scss
+++ b/front-end/app/style.scss
@@ -12,13 +12,13 @@ $panel-bg: #eee;
1212 background-color: white;
1313 }
1414
15-.console-body {
15+.console {
1616 background-color: white;
1717 padding: 20px;
1818 height: 100%;
1919 }
2020
21-.console-body p {
21+.console p {
2222 font-family: 'Open Sans';
2323 }
2424
--- a/front-end/app/templates/command.html
+++ b/front-end/app/templates/command.html
@@ -25,9 +25,12 @@
2525 ng-click="ctrl.help()">
2626 Help
2727 </button>
28+ <button type="button" class="btn btn-default" ng-click="ctrl.debug()">
29+ debug
30+ </button>
2831 <hr align="left" style="width: 90%; height: 1px; background-color:#5cb85c;" />
2932 </div>
30- <div class="row">
33+ <div class="row parameters-console">
3134 <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
3235 <h4 class="open-sans">
3336 Parameters
@@ -53,7 +56,7 @@
5356 <div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">
5457 <h4 class="open-sans">Message from console</h4>
5558 <div class="panel pull-left">
56- <div class="panel-body console-body">
59+ <div class="panel-body console">
5760 <p ng-repeat="msg in ctrl.messages track by $index">{{msg}}</p>
5861 </div>
5962 </div>
--- a/front-end/dist/bundle.js
+++ b/front-end/dist/bundle.js
@@ -41185,11 +41185,12 @@
4118541185 })();
4118641186 directives.Command = Command;
4118741187 var CommandController = (function () {
41188- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
41188+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4118941189 this.APIEndPoint = APIEndPoint;
4119041190 this.$scope = $scope;
4119141191 this.MyModal = MyModal;
4119241192 this.WebSocket = WebSocket;
41193+ this.$window = $window;
4119341194 var controller = this;
4119441195 this.APIEndPoint
4119541196 .getOptionControlFile(this.name)
@@ -41268,11 +41269,21 @@
4126841269 });
4126941270 };
4127041271 CommandController.prototype.debug = function () {
41271- this.APIEndPoint
41272- .debug()
41273- .then(function (result) {
41274- console.log(result);
41272+ var div = angular.element(this.$window.document).find("div");
41273+ var consoleTag;
41274+ var parametersTag;
41275+ angular.forEach(div, function (v) {
41276+ if (v.className === "panel-body console") {
41277+ consoleTag = v;
41278+ }
41279+ else if (v.className === "row parameters-console") {
41280+ parametersTag = v;
41281+ }
4127541282 });
41283+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
41284+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
41285+ consoleTag.style.height = consoleHeight;
41286+ consoleTag.style.width = consoleWidth;
4127641287 };
4127741288 CommandController.prototype.help = function () {
4127841289 this.APIEndPoint
@@ -41281,7 +41292,7 @@
4128141292 console.log(result);
4128241293 });
4128341294 };
41284- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
41295+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4128541296 return CommandController;
4128641297 })();
4128741298 directives.CommandController = CommandController;
@@ -41826,11 +41837,12 @@
4182641837 })();
4182741838 directives.Command = Command;
4182841839 var CommandController = (function () {
41829- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
41840+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4183041841 this.APIEndPoint = APIEndPoint;
4183141842 this.$scope = $scope;
4183241843 this.MyModal = MyModal;
4183341844 this.WebSocket = WebSocket;
41845+ this.$window = $window;
4183441846 var controller = this;
4183541847 this.APIEndPoint
4183641848 .getOptionControlFile(this.name)
@@ -41909,11 +41921,21 @@
4190941921 });
4191041922 };
4191141923 CommandController.prototype.debug = function () {
41912- this.APIEndPoint
41913- .debug()
41914- .then(function (result) {
41915- console.log(result);
41924+ var div = angular.element(this.$window.document).find("div");
41925+ var consoleTag;
41926+ var parametersTag;
41927+ angular.forEach(div, function (v) {
41928+ if (v.className === "panel-body console") {
41929+ consoleTag = v;
41930+ }
41931+ else if (v.className === "row parameters-console") {
41932+ parametersTag = v;
41933+ }
4191641934 });
41935+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
41936+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
41937+ consoleTag.style.height = consoleHeight;
41938+ consoleTag.style.width = consoleWidth;
4191741939 };
4191841940 CommandController.prototype.help = function () {
4191941941 this.APIEndPoint
@@ -41922,7 +41944,7 @@
4192241944 console.log(result);
4192341945 });
4192441946 };
41925- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
41947+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4192641948 return CommandController;
4192741949 })();
4192841950 directives.CommandController = CommandController;
@@ -42467,11 +42489,12 @@
4246742489 })();
4246842490 directives.Command = Command;
4246942491 var CommandController = (function () {
42470- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
42492+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4247142493 this.APIEndPoint = APIEndPoint;
4247242494 this.$scope = $scope;
4247342495 this.MyModal = MyModal;
4247442496 this.WebSocket = WebSocket;
42497+ this.$window = $window;
4247542498 var controller = this;
4247642499 this.APIEndPoint
4247742500 .getOptionControlFile(this.name)
@@ -42550,11 +42573,21 @@
4255042573 });
4255142574 };
4255242575 CommandController.prototype.debug = function () {
42553- this.APIEndPoint
42554- .debug()
42555- .then(function (result) {
42556- console.log(result);
42576+ var div = angular.element(this.$window.document).find("div");
42577+ var consoleTag;
42578+ var parametersTag;
42579+ angular.forEach(div, function (v) {
42580+ if (v.className === "panel-body console") {
42581+ consoleTag = v;
42582+ }
42583+ else if (v.className === "row parameters-console") {
42584+ parametersTag = v;
42585+ }
4255742586 });
42587+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
42588+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
42589+ consoleTag.style.height = consoleHeight;
42590+ consoleTag.style.width = consoleWidth;
4255842591 };
4255942592 CommandController.prototype.help = function () {
4256042593 this.APIEndPoint
@@ -42563,7 +42596,7 @@
4256342596 console.log(result);
4256442597 });
4256542598 };
42566- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
42599+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4256742600 return CommandController;
4256842601 })();
4256942602 directives.CommandController = CommandController;
@@ -43108,11 +43141,12 @@
4310843141 })();
4310943142 directives.Command = Command;
4311043143 var CommandController = (function () {
43111- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
43144+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4311243145 this.APIEndPoint = APIEndPoint;
4311343146 this.$scope = $scope;
4311443147 this.MyModal = MyModal;
4311543148 this.WebSocket = WebSocket;
43149+ this.$window = $window;
4311643150 var controller = this;
4311743151 this.APIEndPoint
4311843152 .getOptionControlFile(this.name)
@@ -43191,11 +43225,21 @@
4319143225 });
4319243226 };
4319343227 CommandController.prototype.debug = function () {
43194- this.APIEndPoint
43195- .debug()
43196- .then(function (result) {
43197- console.log(result);
43228+ var div = angular.element(this.$window.document).find("div");
43229+ var consoleTag;
43230+ var parametersTag;
43231+ angular.forEach(div, function (v) {
43232+ if (v.className === "panel-body console") {
43233+ consoleTag = v;
43234+ }
43235+ else if (v.className === "row parameters-console") {
43236+ parametersTag = v;
43237+ }
4319843238 });
43239+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
43240+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
43241+ consoleTag.style.height = consoleHeight;
43242+ consoleTag.style.width = consoleWidth;
4319943243 };
4320043244 CommandController.prototype.help = function () {
4320143245 this.APIEndPoint
@@ -43204,7 +43248,7 @@
4320443248 console.log(result);
4320543249 });
4320643250 };
43207- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
43251+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4320843252 return CommandController;
4320943253 })();
4321043254 directives.CommandController = CommandController;
@@ -43749,11 +43793,12 @@
4374943793 })();
4375043794 directives.Command = Command;
4375143795 var CommandController = (function () {
43752- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
43796+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4375343797 this.APIEndPoint = APIEndPoint;
4375443798 this.$scope = $scope;
4375543799 this.MyModal = MyModal;
4375643800 this.WebSocket = WebSocket;
43801+ this.$window = $window;
4375743802 var controller = this;
4375843803 this.APIEndPoint
4375943804 .getOptionControlFile(this.name)
@@ -43832,11 +43877,21 @@
4383243877 });
4383343878 };
4383443879 CommandController.prototype.debug = function () {
43835- this.APIEndPoint
43836- .debug()
43837- .then(function (result) {
43838- console.log(result);
43880+ var div = angular.element(this.$window.document).find("div");
43881+ var consoleTag;
43882+ var parametersTag;
43883+ angular.forEach(div, function (v) {
43884+ if (v.className === "panel-body console") {
43885+ consoleTag = v;
43886+ }
43887+ else if (v.className === "row parameters-console") {
43888+ parametersTag = v;
43889+ }
4383943890 });
43891+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
43892+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
43893+ consoleTag.style.height = consoleHeight;
43894+ consoleTag.style.width = consoleWidth;
4384043895 };
4384143896 CommandController.prototype.help = function () {
4384243897 this.APIEndPoint
@@ -43845,7 +43900,7 @@
4384543900 console.log(result);
4384643901 });
4384743902 };
43848- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
43903+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4384943904 return CommandController;
4385043905 })();
4385143906 directives.CommandController = CommandController;
@@ -44390,11 +44445,12 @@
4439044445 })();
4439144446 directives.Command = Command;
4439244447 var CommandController = (function () {
44393- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
44448+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4439444449 this.APIEndPoint = APIEndPoint;
4439544450 this.$scope = $scope;
4439644451 this.MyModal = MyModal;
4439744452 this.WebSocket = WebSocket;
44453+ this.$window = $window;
4439844454 var controller = this;
4439944455 this.APIEndPoint
4440044456 .getOptionControlFile(this.name)
@@ -44473,11 +44529,21 @@
4447344529 });
4447444530 };
4447544531 CommandController.prototype.debug = function () {
44476- this.APIEndPoint
44477- .debug()
44478- .then(function (result) {
44479- console.log(result);
44532+ var div = angular.element(this.$window.document).find("div");
44533+ var consoleTag;
44534+ var parametersTag;
44535+ angular.forEach(div, function (v) {
44536+ if (v.className === "panel-body console") {
44537+ consoleTag = v;
44538+ }
44539+ else if (v.className === "row parameters-console") {
44540+ parametersTag = v;
44541+ }
4448044542 });
44543+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
44544+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
44545+ consoleTag.style.height = consoleHeight;
44546+ consoleTag.style.width = consoleWidth;
4448144547 };
4448244548 CommandController.prototype.help = function () {
4448344549 this.APIEndPoint
@@ -44486,7 +44552,7 @@
4448644552 console.log(result);
4448744553 });
4448844554 };
44489- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
44555+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4449044556 return CommandController;
4449144557 })();
4449244558 directives.CommandController = CommandController;
@@ -45031,11 +45097,12 @@
4503145097 })();
4503245098 directives.Command = Command;
4503345099 var CommandController = (function () {
45034- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
45100+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4503545101 this.APIEndPoint = APIEndPoint;
4503645102 this.$scope = $scope;
4503745103 this.MyModal = MyModal;
4503845104 this.WebSocket = WebSocket;
45105+ this.$window = $window;
4503945106 var controller = this;
4504045107 this.APIEndPoint
4504145108 .getOptionControlFile(this.name)
@@ -45114,11 +45181,21 @@
4511445181 });
4511545182 };
4511645183 CommandController.prototype.debug = function () {
45117- this.APIEndPoint
45118- .debug()
45119- .then(function (result) {
45120- console.log(result);
45184+ var div = angular.element(this.$window.document).find("div");
45185+ var consoleTag;
45186+ var parametersTag;
45187+ angular.forEach(div, function (v) {
45188+ if (v.className === "panel-body console") {
45189+ consoleTag = v;
45190+ }
45191+ else if (v.className === "row parameters-console") {
45192+ parametersTag = v;
45193+ }
4512145194 });
45195+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
45196+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
45197+ consoleTag.style.height = consoleHeight;
45198+ consoleTag.style.width = consoleWidth;
4512245199 };
4512345200 CommandController.prototype.help = function () {
4512445201 this.APIEndPoint
@@ -45127,7 +45204,7 @@
4512745204 console.log(result);
4512845205 });
4512945206 };
45130- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
45207+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4513145208 return CommandController;
4513245209 })();
4513345210 directives.CommandController = CommandController;
@@ -45672,11 +45749,12 @@
4567245749 })();
4567345750 directives.Command = Command;
4567445751 var CommandController = (function () {
45675- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
45752+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4567645753 this.APIEndPoint = APIEndPoint;
4567745754 this.$scope = $scope;
4567845755 this.MyModal = MyModal;
4567945756 this.WebSocket = WebSocket;
45757+ this.$window = $window;
4568045758 var controller = this;
4568145759 this.APIEndPoint
4568245760 .getOptionControlFile(this.name)
@@ -45755,11 +45833,21 @@
4575545833 });
4575645834 };
4575745835 CommandController.prototype.debug = function () {
45758- this.APIEndPoint
45759- .debug()
45760- .then(function (result) {
45761- console.log(result);
45836+ var div = angular.element(this.$window.document).find("div");
45837+ var consoleTag;
45838+ var parametersTag;
45839+ angular.forEach(div, function (v) {
45840+ if (v.className === "panel-body console") {
45841+ consoleTag = v;
45842+ }
45843+ else if (v.className === "row parameters-console") {
45844+ parametersTag = v;
45845+ }
4576245846 });
45847+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
45848+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
45849+ consoleTag.style.height = consoleHeight;
45850+ consoleTag.style.width = consoleWidth;
4576345851 };
4576445852 CommandController.prototype.help = function () {
4576545853 this.APIEndPoint
@@ -45768,7 +45856,7 @@
4576845856 console.log(result);
4576945857 });
4577045858 };
45771- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
45859+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4577245860 return CommandController;
4577345861 })();
4577445862 directives.CommandController = CommandController;
@@ -46313,11 +46401,12 @@
4631346401 })();
4631446402 directives.Command = Command;
4631546403 var CommandController = (function () {
46316- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
46404+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4631746405 this.APIEndPoint = APIEndPoint;
4631846406 this.$scope = $scope;
4631946407 this.MyModal = MyModal;
4632046408 this.WebSocket = WebSocket;
46409+ this.$window = $window;
4632146410 var controller = this;
4632246411 this.APIEndPoint
4632346412 .getOptionControlFile(this.name)
@@ -46396,11 +46485,21 @@
4639646485 });
4639746486 };
4639846487 CommandController.prototype.debug = function () {
46399- this.APIEndPoint
46400- .debug()
46401- .then(function (result) {
46402- console.log(result);
46488+ var div = angular.element(this.$window.document).find("div");
46489+ var consoleTag;
46490+ var parametersTag;
46491+ angular.forEach(div, function (v) {
46492+ if (v.className === "panel-body console") {
46493+ consoleTag = v;
46494+ }
46495+ else if (v.className === "row parameters-console") {
46496+ parametersTag = v;
46497+ }
4640346498 });
46499+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
46500+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
46501+ consoleTag.style.height = consoleHeight;
46502+ consoleTag.style.width = consoleWidth;
4640446503 };
4640546504 CommandController.prototype.help = function () {
4640646505 this.APIEndPoint
@@ -46409,7 +46508,7 @@
4640946508 console.log(result);
4641046509 });
4641146510 };
46412- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
46511+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4641346512 return CommandController;
4641446513 })();
4641546514 directives.CommandController = CommandController;
@@ -46954,11 +47053,12 @@
4695447053 })();
4695547054 directives.Command = Command;
4695647055 var CommandController = (function () {
46957- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
47056+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4695847057 this.APIEndPoint = APIEndPoint;
4695947058 this.$scope = $scope;
4696047059 this.MyModal = MyModal;
4696147060 this.WebSocket = WebSocket;
47061+ this.$window = $window;
4696247062 var controller = this;
4696347063 this.APIEndPoint
4696447064 .getOptionControlFile(this.name)
@@ -47037,11 +47137,21 @@
4703747137 });
4703847138 };
4703947139 CommandController.prototype.debug = function () {
47040- this.APIEndPoint
47041- .debug()
47042- .then(function (result) {
47043- console.log(result);
47140+ var div = angular.element(this.$window.document).find("div");
47141+ var consoleTag;
47142+ var parametersTag;
47143+ angular.forEach(div, function (v) {
47144+ if (v.className === "panel-body console") {
47145+ consoleTag = v;
47146+ }
47147+ else if (v.className === "row parameters-console") {
47148+ parametersTag = v;
47149+ }
4704447150 });
47151+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
47152+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
47153+ consoleTag.style.height = consoleHeight;
47154+ consoleTag.style.width = consoleWidth;
4704547155 };
4704647156 CommandController.prototype.help = function () {
4704747157 this.APIEndPoint
@@ -47050,7 +47160,7 @@
4705047160 console.log(result);
4705147161 });
4705247162 };
47053- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
47163+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4705447164 return CommandController;
4705547165 })();
4705647166 directives.CommandController = CommandController;
@@ -47595,11 +47705,12 @@
4759547705 })();
4759647706 directives.Command = Command;
4759747707 var CommandController = (function () {
47598- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
47708+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4759947709 this.APIEndPoint = APIEndPoint;
4760047710 this.$scope = $scope;
4760147711 this.MyModal = MyModal;
4760247712 this.WebSocket = WebSocket;
47713+ this.$window = $window;
4760347714 var controller = this;
4760447715 this.APIEndPoint
4760547716 .getOptionControlFile(this.name)
@@ -47678,11 +47789,21 @@
4767847789 });
4767947790 };
4768047791 CommandController.prototype.debug = function () {
47681- this.APIEndPoint
47682- .debug()
47683- .then(function (result) {
47684- console.log(result);
47792+ var div = angular.element(this.$window.document).find("div");
47793+ var consoleTag;
47794+ var parametersTag;
47795+ angular.forEach(div, function (v) {
47796+ if (v.className === "panel-body console") {
47797+ consoleTag = v;
47798+ }
47799+ else if (v.className === "row parameters-console") {
47800+ parametersTag = v;
47801+ }
4768547802 });
47803+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
47804+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
47805+ consoleTag.style.height = consoleHeight;
47806+ consoleTag.style.width = consoleWidth;
4768647807 };
4768747808 CommandController.prototype.help = function () {
4768847809 this.APIEndPoint
@@ -47691,7 +47812,7 @@
4769147812 console.log(result);
4769247813 });
4769347814 };
47694- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
47815+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4769547816 return CommandController;
4769647817 })();
4769747818 directives.CommandController = CommandController;
@@ -48236,11 +48357,12 @@
4823648357 })();
4823748358 directives.Command = Command;
4823848359 var CommandController = (function () {
48239- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
48360+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4824048361 this.APIEndPoint = APIEndPoint;
4824148362 this.$scope = $scope;
4824248363 this.MyModal = MyModal;
4824348364 this.WebSocket = WebSocket;
48365+ this.$window = $window;
4824448366 var controller = this;
4824548367 this.APIEndPoint
4824648368 .getOptionControlFile(this.name)
@@ -48319,11 +48441,21 @@
4831948441 });
4832048442 };
4832148443 CommandController.prototype.debug = function () {
48322- this.APIEndPoint
48323- .debug()
48324- .then(function (result) {
48325- console.log(result);
48444+ var div = angular.element(this.$window.document).find("div");
48445+ var consoleTag;
48446+ var parametersTag;
48447+ angular.forEach(div, function (v) {
48448+ if (v.className === "panel-body console") {
48449+ consoleTag = v;
48450+ }
48451+ else if (v.className === "row parameters-console") {
48452+ parametersTag = v;
48453+ }
4832648454 });
48455+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
48456+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
48457+ consoleTag.style.height = consoleHeight;
48458+ consoleTag.style.width = consoleWidth;
4832748459 };
4832848460 CommandController.prototype.help = function () {
4832948461 this.APIEndPoint
@@ -48332,7 +48464,7 @@
4833248464 console.log(result);
4833348465 });
4833448466 };
48335- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
48467+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4833648468 return CommandController;
4833748469 })();
4833848470 directives.CommandController = CommandController;
@@ -48877,11 +49009,12 @@
4887749009 })();
4887849010 directives.Command = Command;
4887949011 var CommandController = (function () {
48880- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
49012+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4888149013 this.APIEndPoint = APIEndPoint;
4888249014 this.$scope = $scope;
4888349015 this.MyModal = MyModal;
4888449016 this.WebSocket = WebSocket;
49017+ this.$window = $window;
4888549018 var controller = this;
4888649019 this.APIEndPoint
4888749020 .getOptionControlFile(this.name)
@@ -48960,11 +49093,21 @@
4896049093 });
4896149094 };
4896249095 CommandController.prototype.debug = function () {
48963- this.APIEndPoint
48964- .debug()
48965- .then(function (result) {
48966- console.log(result);
49096+ var div = angular.element(this.$window.document).find("div");
49097+ var consoleTag;
49098+ var parametersTag;
49099+ angular.forEach(div, function (v) {
49100+ if (v.className === "panel-body console") {
49101+ consoleTag = v;
49102+ }
49103+ else if (v.className === "row parameters-console") {
49104+ parametersTag = v;
49105+ }
4896749106 });
49107+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
49108+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
49109+ consoleTag.style.height = consoleHeight;
49110+ consoleTag.style.width = consoleWidth;
4896849111 };
4896949112 CommandController.prototype.help = function () {
4897049113 this.APIEndPoint
@@ -48973,7 +49116,7 @@
4897349116 console.log(result);
4897449117 });
4897549118 };
48976- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
49119+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4897749120 return CommandController;
4897849121 })();
4897949122 directives.CommandController = CommandController;
@@ -49518,11 +49661,12 @@
4951849661 })();
4951949662 directives.Command = Command;
4952049663 var CommandController = (function () {
49521- function CommandController(APIEndPoint, $scope, MyModal, WebSocket) {
49664+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
4952249665 this.APIEndPoint = APIEndPoint;
4952349666 this.$scope = $scope;
4952449667 this.MyModal = MyModal;
4952549668 this.WebSocket = WebSocket;
49669+ this.$window = $window;
4952649670 var controller = this;
4952749671 this.APIEndPoint
4952849672 .getOptionControlFile(this.name)
@@ -49601,11 +49745,21 @@
4960149745 });
4960249746 };
4960349747 CommandController.prototype.debug = function () {
49604- this.APIEndPoint
49605- .debug()
49606- .then(function (result) {
49607- console.log(result);
49748+ var div = angular.element(this.$window.document).find("div");
49749+ var consoleTag;
49750+ var parametersTag;
49751+ angular.forEach(div, function (v) {
49752+ if (v.className === "panel-body console") {
49753+ consoleTag = v;
49754+ }
49755+ else if (v.className === "row parameters-console") {
49756+ parametersTag = v;
49757+ }
4960849758 });
49759+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px', '')) - 150 + 'px';
49760+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px', '')) / 3 * 2 - 150 + 'px';
49761+ consoleTag.style.height = consoleHeight;
49762+ consoleTag.style.width = consoleWidth;
4960949763 };
4961049764 CommandController.prototype.help = function () {
4961149765 this.APIEndPoint
@@ -49614,7 +49768,7 @@
4961449768 console.log(result);
4961549769 });
4961649770 };
49617- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket'];
49771+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
4961849772 return CommandController;
4961949773 })();
4962049774 directives.CommandController = CommandController;
--- a/front-end/dist/css/style.css
+++ b/front-end/dist/css/style.css
@@ -8,12 +8,12 @@
88 .console-head {
99 background-color: white; }
1010
11-.console-body {
11+.console {
1212 background-color: white;
1313 padding: 20px;
1414 height: 100%; }
1515
16-.console-body p {
16+.console p {
1717 font-family: 'Open Sans'; }
1818
1919 .command {
--- a/front-end/dist/templates/command.html
+++ b/front-end/dist/templates/command.html
@@ -25,9 +25,12 @@
2525 ng-click="ctrl.help()">
2626 Help
2727 </button>
28+ <button type="button" class="btn btn-default" ng-click="ctrl.debug()">
29+ debug
30+ </button>
2831 <hr align="left" style="width: 90%; height: 1px; background-color:#5cb85c;" />
2932 </div>
30- <div class="row">
33+ <div class="row parameters-console">
3134 <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
3235 <h4 class="open-sans">
3336 Parameters
@@ -53,7 +56,7 @@
5356 <div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">
5457 <h4 class="open-sans">Message from console</h4>
5558 <div class="panel pull-left">
56- <div class="panel-body console-body">
59+ <div class="panel-body console">
5760 <p ng-repeat="msg in ctrl.messages track by $index">{{msg}}</p>
5861 </div>
5962 </div>
Show on old repository browser