• R/O
  • HTTP
  • SSH
  • HTTPS

zephyr: Commit

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


Commit MetaInfo

Revision1b3154cb9ab48958f8fea50e39ac64b88ed1e4b6 (tree)
Time2016-03-13 17:30:22
Authorhimetani_cafe <fumifumi@yasu...>
Commiterhimetani_cafe

Log Message

[TMP] before create Console service

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', '$window'];
48+ public static $inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4949
5050 // From parent directive bindToController property
5151 private index: string;
@@ -68,127 +68,161 @@ namespace app.directives {
6868 private $scope: ng.IScope,
6969 private MyModal: services.MyModal,
7070 private WebSocket: services.WebSocket,
71- private $window: ng.IWindowService
71+ private $window: ng.IWindowService,
72+ private $rootScope: ng.IRootScopeService
7273 ) {
73- var controller = this;
74-
75- // Get OptionControlFile and bind it to $scope.options
76- this.APIEndPoint
77- //.getOptionControlFile('mrcImageNoiseAdd')
78- .getOptionControlFile(this.name)
79- .$promise
80- .then(function(result) {
81- controller.options = result.info;
82- });
83-
84- this.APIEndPoint
85- .getDirectories()
86- .$promise
87- .then(function(result) {
88- controller.dirs = result.info;
89- });
90-
91- this.heading = "[" + this.index + "]: dcdFilePrint";
92- this.isOpen = true;
93-
94- // When call add button at executeController, all accordion close.
95- this.$scope.$on('close', () => {
96- controller.isOpen = false;
97- });
98-
99- this.WebSocket.on('console', function(msg) {
100- console.log(msg);
101- var messages = msg.split('\n');
102- if(messages[0].substr(0,6) === 'Usage:') {
103- controller.messages = msg.split('\n');
104- }
105- });
106-
107- }
108-
109- public submit() {
110- var opt = [];
111- angular.forEach(this.options, (option) => {
112-
113- var obj = {
114- name: option.option,
115- arguments: []
116- };
117-
118- angular.forEach(option.arg, (arg) => {
119- if(arg.input) {
120- if(typeof arg.input === 'object') {
121- obj.arguments.push(arg.input.name);
122- } else {
123- obj.arguments.push(arg.input);
124- }
125- }
126- });
127-
128- if(obj.arguments.length > 0) {
129- opt.push(obj);
130- }
131- });
132-
133- var execObj = {
134- command: this.name,
135- workspace: this.workspace.fileId,
136- options: opt
137- };
138-
139- //console.log(JSON.stringify(execObj,null,'\t'));
140- this.APIEndPoint
141- .execute(JSON.stringify(execObj))
142- .then((result) => {
143- console.log(result);
144- })
145- }
146-
147- public removeMySelf(index:number) {
148- this.remove()(index,this.list);
149- }
150-
151- private reloadFiles() {
152- var fileId = this.workspace.fileId;
153- this.APIEndPoint
154- .getFiles(fileId)
155- .$promise
156- .then((result) => {
157- var status = result.status;
158- if(status === 'success') {
159- this.files = result.info;
160- } else {
161- console.log(result.message);
162- }
163- });
164- }
165-
166- public debug() {
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- }
176- });
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;
183- }
184-
185- public help() {
186- this.APIEndPoint
187- .help(this.name)
188- .then((result) => {
189- console.log(result);
190- });
191- }
74+ var controller = this;
75+
76+ // Get OptionControlFile and bind it to $scope.options
77+ this.APIEndPoint
78+ //.getOptionControlFile('mrcImageNoiseAdd')
79+ .getOptionControlFile(this.name)
80+ .$promise
81+ .then(function(result) {
82+ controller.options = result.info;
83+ });
84+
85+ this.APIEndPoint
86+ .getDirectories()
87+ .$promise
88+ .then(function(result) {
89+ controller.dirs = result.info;
90+ });
91+
92+ this.heading = "[" + this.index + "]: dcdFilePrint";
93+ this.isOpen = true;
94+
95+ // When call add button at executeController, all accordion close.
96+ this.$scope.$on('close', () => {
97+ controller.isOpen = false;
98+ });
99+
100+ /** Add EventHandler
101+ * ここではCommandディレクティブが受け取る可能性のあるイベントを登録する。
102+ * 例えば、コマンドのヘルプやEosコマンドの実行時のCLIの出力はWebSocketサービスで受け取るので、
103+ WebSocketサービスからこのCommandディレクティブに対してemitされたメッセージをこのイベントハンドラで受け取る。
104+
105+ イベントネームは生成されたCommandディレクティブにユニークなidをディレクティブが生成されるたびに生成し、
106+ Commandディレクティブが削除されるたびにそのイベントハンドラを破棄することとする。
107+ */
108+ function guid() {
109+ function s4() {
110+ return Math.floor((1 + Math.random()) * 0x10000)
111+ .toString(16)
112+ .substring(1);
113+ }
114+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
115+ s4() + '-' + s4() + s4() + s4();
116+ }
117+
118+ var uuid = guid();
119+
120+ /*
121+ this.WebSocket.add(uuid);
122+ this.$rootScope.on(uuid, function(msg) {
123+ console.log(msg);
124+ /*
125+ var messages = msg.split('\n');
126+ if(messages[0].substr(0,6) === 'Usage:') {
127+ controller.messages = msg.split('\n');
128+ }
129+ });
130+ */
131+ }
132+
133+ public submit() {
134+ var opt = [];
135+ angular.forEach(this.options, (option) => {
136+
137+ var obj = {
138+ name: option.option,
139+ arguments: []
140+ };
141+
142+ angular.forEach(option.arg, (arg) => {
143+ if(arg.input) {
144+ if(typeof arg.input === 'object') {
145+ obj.arguments.push(arg.input.name);
146+ } else {
147+ obj.arguments.push(arg.input);
148+ }
149+ }
150+ });
151+
152+ if(obj.arguments.length > 0) {
153+ opt.push(obj);
154+ }
155+ });
156+
157+ var execObj = {
158+ command: this.name,
159+ workspace: this.workspace.fileId,
160+ options: opt
161+ };
162+
163+ //console.log(JSON.stringify(execObj,null,'\t'));
164+ this.APIEndPoint
165+ .execute(JSON.stringify(execObj))
166+ .then((result) => {
167+ console.log(result);
168+ })
169+ }
170+
171+ public removeMySelf(index:number) {
172+ this.$scope.$destroy();
173+ this.remove()(index,this.list);
174+ }
175+
176+ private reloadFiles() {
177+ var fileId = this.workspace.fileId;
178+ this.APIEndPoint
179+ .getFiles(fileId)
180+ .$promise
181+ .then((result) => {
182+ var status = result.status;
183+ if(status === 'success') {
184+ this.files = result.info;
185+ } else {
186+ console.log(result.message);
187+ }
188+ });
189+ }
190+
191+ public debug() {
192+ console.log(this.$rootScope);
193+
194+ /* Create console area
195+ *
196+ */
197+
198+ var div = angular.element(this.$window.document).find("div");
199+ var consoleTag;
200+ var parametersTag;
201+ angular.forEach(div,function(v) {
202+ if(v.className === "panel-body console") {
203+ consoleTag = v;
204+ } else if(v.className === "row parameters-console") {
205+ parametersTag = v;
206+ }
207+ });
208+
209+ // Adjust console area from CSS styling positoning information
210+ var consoleHeight = parseInt(parametersTag.clientHeight.toString().replace('px','')) - 150 + 'px';
211+ var consoleWidth = parseInt(parametersTag.clientWidth.toString().replace('px','')) / 3 * 2 - 150 + 'px';
212+ consoleTag.style.height = consoleHeight;
213+ consoleTag.style.width = consoleWidth;
214+ /* Create console area
215+ *
216+ */
217+ }
218+
219+ public help() {
220+ this.APIEndPoint
221+ .help(this.name)
222+ .then((result) => {
223+ console.log(result);
224+ });
225+ }
192226
193227 }
194228 }
--- a/front-end/app/scripts/services/WebSocket.ts
+++ b/front-end/app/scripts/services/WebSocket.ts
@@ -2,8 +2,6 @@ namespace app.services{
22 export class WebSocket {
33 private socket: any;
44
5- //public static $inject = ['$rootScope'];
6-
75 constructor(private $rootScope: ng.IRootScopeService) {
86 this.socket = io.connect();
97 }
--- a/front-end/dist/bundle.js
+++ b/front-end/dist/bundle.js
@@ -41185,12 +41185,13 @@
4118541185 })();
4118641186 directives.Command = Command;
4118741187 var CommandController = (function () {
41188- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
41188+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4118941189 this.APIEndPoint = APIEndPoint;
4119041190 this.$scope = $scope;
4119141191 this.MyModal = MyModal;
4119241192 this.WebSocket = WebSocket;
4119341193 this.$window = $window;
41194+ this.$rootScope = $rootScope;
4119441195 var controller = this;
4119541196 this.APIEndPoint
4119641197 .getOptionControlFile(this.name)
@@ -41209,13 +41210,16 @@
4120941210 this.$scope.$on('close', function () {
4121041211 controller.isOpen = false;
4121141212 });
41212- this.WebSocket.on('console', function (msg) {
41213- console.log(msg);
41214- var messages = msg.split('\n');
41215- if (messages[0].substr(0, 6) === 'Usage:') {
41216- controller.messages = msg.split('\n');
41213+ function guid() {
41214+ function s4() {
41215+ return Math.floor((1 + Math.random()) * 0x10000)
41216+ .toString(16)
41217+ .substring(1);
4121741218 }
41218- });
41219+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
41220+ s4() + '-' + s4() + s4() + s4();
41221+ }
41222+ var uuid = guid();
4121941223 }
4122041224 CommandController.prototype.submit = function () {
4122141225 var opt = [];
@@ -41250,6 +41254,7 @@
4125041254 });
4125141255 };
4125241256 CommandController.prototype.removeMySelf = function (index) {
41257+ this.$scope.$destroy();
4125341258 this.remove()(index, this.list);
4125441259 };
4125541260 CommandController.prototype.reloadFiles = function () {
@@ -41269,6 +41274,7 @@
4126941274 });
4127041275 };
4127141276 CommandController.prototype.debug = function () {
41277+ console.log(this.$rootScope);
4127241278 var div = angular.element(this.$window.document).find("div");
4127341279 var consoleTag;
4127441280 var parametersTag;
@@ -41292,7 +41298,7 @@
4129241298 console.log(result);
4129341299 });
4129441300 };
41295- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
41301+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4129641302 return CommandController;
4129741303 })();
4129841304 directives.CommandController = CommandController;
@@ -41837,12 +41843,13 @@
4183741843 })();
4183841844 directives.Command = Command;
4183941845 var CommandController = (function () {
41840- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
41846+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4184141847 this.APIEndPoint = APIEndPoint;
4184241848 this.$scope = $scope;
4184341849 this.MyModal = MyModal;
4184441850 this.WebSocket = WebSocket;
4184541851 this.$window = $window;
41852+ this.$rootScope = $rootScope;
4184641853 var controller = this;
4184741854 this.APIEndPoint
4184841855 .getOptionControlFile(this.name)
@@ -41861,13 +41868,16 @@
4186141868 this.$scope.$on('close', function () {
4186241869 controller.isOpen = false;
4186341870 });
41864- this.WebSocket.on('console', function (msg) {
41865- console.log(msg);
41866- var messages = msg.split('\n');
41867- if (messages[0].substr(0, 6) === 'Usage:') {
41868- controller.messages = msg.split('\n');
41871+ function guid() {
41872+ function s4() {
41873+ return Math.floor((1 + Math.random()) * 0x10000)
41874+ .toString(16)
41875+ .substring(1);
4186941876 }
41870- });
41877+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
41878+ s4() + '-' + s4() + s4() + s4();
41879+ }
41880+ var uuid = guid();
4187141881 }
4187241882 CommandController.prototype.submit = function () {
4187341883 var opt = [];
@@ -41902,6 +41912,7 @@
4190241912 });
4190341913 };
4190441914 CommandController.prototype.removeMySelf = function (index) {
41915+ this.$scope.$destroy();
4190541916 this.remove()(index, this.list);
4190641917 };
4190741918 CommandController.prototype.reloadFiles = function () {
@@ -41921,6 +41932,7 @@
4192141932 });
4192241933 };
4192341934 CommandController.prototype.debug = function () {
41935+ console.log(this.$rootScope);
4192441936 var div = angular.element(this.$window.document).find("div");
4192541937 var consoleTag;
4192641938 var parametersTag;
@@ -41944,7 +41956,7 @@
4194441956 console.log(result);
4194541957 });
4194641958 };
41947- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
41959+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4194841960 return CommandController;
4194941961 })();
4195041962 directives.CommandController = CommandController;
@@ -42489,12 +42501,13 @@
4248942501 })();
4249042502 directives.Command = Command;
4249142503 var CommandController = (function () {
42492- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
42504+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4249342505 this.APIEndPoint = APIEndPoint;
4249442506 this.$scope = $scope;
4249542507 this.MyModal = MyModal;
4249642508 this.WebSocket = WebSocket;
4249742509 this.$window = $window;
42510+ this.$rootScope = $rootScope;
4249842511 var controller = this;
4249942512 this.APIEndPoint
4250042513 .getOptionControlFile(this.name)
@@ -42513,13 +42526,16 @@
4251342526 this.$scope.$on('close', function () {
4251442527 controller.isOpen = false;
4251542528 });
42516- this.WebSocket.on('console', function (msg) {
42517- console.log(msg);
42518- var messages = msg.split('\n');
42519- if (messages[0].substr(0, 6) === 'Usage:') {
42520- controller.messages = msg.split('\n');
42529+ function guid() {
42530+ function s4() {
42531+ return Math.floor((1 + Math.random()) * 0x10000)
42532+ .toString(16)
42533+ .substring(1);
4252142534 }
42522- });
42535+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
42536+ s4() + '-' + s4() + s4() + s4();
42537+ }
42538+ var uuid = guid();
4252342539 }
4252442540 CommandController.prototype.submit = function () {
4252542541 var opt = [];
@@ -42554,6 +42570,7 @@
4255442570 });
4255542571 };
4255642572 CommandController.prototype.removeMySelf = function (index) {
42573+ this.$scope.$destroy();
4255742574 this.remove()(index, this.list);
4255842575 };
4255942576 CommandController.prototype.reloadFiles = function () {
@@ -42573,6 +42590,7 @@
4257342590 });
4257442591 };
4257542592 CommandController.prototype.debug = function () {
42593+ console.log(this.$rootScope);
4257642594 var div = angular.element(this.$window.document).find("div");
4257742595 var consoleTag;
4257842596 var parametersTag;
@@ -42596,7 +42614,7 @@
4259642614 console.log(result);
4259742615 });
4259842616 };
42599- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
42617+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4260042618 return CommandController;
4260142619 })();
4260242620 directives.CommandController = CommandController;
@@ -43141,12 +43159,13 @@
4314143159 })();
4314243160 directives.Command = Command;
4314343161 var CommandController = (function () {
43144- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
43162+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4314543163 this.APIEndPoint = APIEndPoint;
4314643164 this.$scope = $scope;
4314743165 this.MyModal = MyModal;
4314843166 this.WebSocket = WebSocket;
4314943167 this.$window = $window;
43168+ this.$rootScope = $rootScope;
4315043169 var controller = this;
4315143170 this.APIEndPoint
4315243171 .getOptionControlFile(this.name)
@@ -43165,13 +43184,16 @@
4316543184 this.$scope.$on('close', function () {
4316643185 controller.isOpen = false;
4316743186 });
43168- this.WebSocket.on('console', function (msg) {
43169- console.log(msg);
43170- var messages = msg.split('\n');
43171- if (messages[0].substr(0, 6) === 'Usage:') {
43172- controller.messages = msg.split('\n');
43187+ function guid() {
43188+ function s4() {
43189+ return Math.floor((1 + Math.random()) * 0x10000)
43190+ .toString(16)
43191+ .substring(1);
4317343192 }
43174- });
43193+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
43194+ s4() + '-' + s4() + s4() + s4();
43195+ }
43196+ var uuid = guid();
4317543197 }
4317643198 CommandController.prototype.submit = function () {
4317743199 var opt = [];
@@ -43206,6 +43228,7 @@
4320643228 });
4320743229 };
4320843230 CommandController.prototype.removeMySelf = function (index) {
43231+ this.$scope.$destroy();
4320943232 this.remove()(index, this.list);
4321043233 };
4321143234 CommandController.prototype.reloadFiles = function () {
@@ -43225,6 +43248,7 @@
4322543248 });
4322643249 };
4322743250 CommandController.prototype.debug = function () {
43251+ console.log(this.$rootScope);
4322843252 var div = angular.element(this.$window.document).find("div");
4322943253 var consoleTag;
4323043254 var parametersTag;
@@ -43248,7 +43272,7 @@
4324843272 console.log(result);
4324943273 });
4325043274 };
43251- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
43275+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4325243276 return CommandController;
4325343277 })();
4325443278 directives.CommandController = CommandController;
@@ -43793,12 +43817,13 @@
4379343817 })();
4379443818 directives.Command = Command;
4379543819 var CommandController = (function () {
43796- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
43820+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4379743821 this.APIEndPoint = APIEndPoint;
4379843822 this.$scope = $scope;
4379943823 this.MyModal = MyModal;
4380043824 this.WebSocket = WebSocket;
4380143825 this.$window = $window;
43826+ this.$rootScope = $rootScope;
4380243827 var controller = this;
4380343828 this.APIEndPoint
4380443829 .getOptionControlFile(this.name)
@@ -43817,13 +43842,16 @@
4381743842 this.$scope.$on('close', function () {
4381843843 controller.isOpen = false;
4381943844 });
43820- this.WebSocket.on('console', function (msg) {
43821- console.log(msg);
43822- var messages = msg.split('\n');
43823- if (messages[0].substr(0, 6) === 'Usage:') {
43824- controller.messages = msg.split('\n');
43845+ function guid() {
43846+ function s4() {
43847+ return Math.floor((1 + Math.random()) * 0x10000)
43848+ .toString(16)
43849+ .substring(1);
4382543850 }
43826- });
43851+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
43852+ s4() + '-' + s4() + s4() + s4();
43853+ }
43854+ var uuid = guid();
4382743855 }
4382843856 CommandController.prototype.submit = function () {
4382943857 var opt = [];
@@ -43858,6 +43886,7 @@
4385843886 });
4385943887 };
4386043888 CommandController.prototype.removeMySelf = function (index) {
43889+ this.$scope.$destroy();
4386143890 this.remove()(index, this.list);
4386243891 };
4386343892 CommandController.prototype.reloadFiles = function () {
@@ -43877,6 +43906,7 @@
4387743906 });
4387843907 };
4387943908 CommandController.prototype.debug = function () {
43909+ console.log(this.$rootScope);
4388043910 var div = angular.element(this.$window.document).find("div");
4388143911 var consoleTag;
4388243912 var parametersTag;
@@ -43900,7 +43930,7 @@
4390043930 console.log(result);
4390143931 });
4390243932 };
43903- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
43933+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4390443934 return CommandController;
4390543935 })();
4390643936 directives.CommandController = CommandController;
@@ -44445,12 +44475,13 @@
4444544475 })();
4444644476 directives.Command = Command;
4444744477 var CommandController = (function () {
44448- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
44478+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4444944479 this.APIEndPoint = APIEndPoint;
4445044480 this.$scope = $scope;
4445144481 this.MyModal = MyModal;
4445244482 this.WebSocket = WebSocket;
4445344483 this.$window = $window;
44484+ this.$rootScope = $rootScope;
4445444485 var controller = this;
4445544486 this.APIEndPoint
4445644487 .getOptionControlFile(this.name)
@@ -44469,13 +44500,16 @@
4446944500 this.$scope.$on('close', function () {
4447044501 controller.isOpen = false;
4447144502 });
44472- this.WebSocket.on('console', function (msg) {
44473- console.log(msg);
44474- var messages = msg.split('\n');
44475- if (messages[0].substr(0, 6) === 'Usage:') {
44476- controller.messages = msg.split('\n');
44503+ function guid() {
44504+ function s4() {
44505+ return Math.floor((1 + Math.random()) * 0x10000)
44506+ .toString(16)
44507+ .substring(1);
4447744508 }
44478- });
44509+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
44510+ s4() + '-' + s4() + s4() + s4();
44511+ }
44512+ var uuid = guid();
4447944513 }
4448044514 CommandController.prototype.submit = function () {
4448144515 var opt = [];
@@ -44510,6 +44544,7 @@
4451044544 });
4451144545 };
4451244546 CommandController.prototype.removeMySelf = function (index) {
44547+ this.$scope.$destroy();
4451344548 this.remove()(index, this.list);
4451444549 };
4451544550 CommandController.prototype.reloadFiles = function () {
@@ -44529,6 +44564,7 @@
4452944564 });
4453044565 };
4453144566 CommandController.prototype.debug = function () {
44567+ console.log(this.$rootScope);
4453244568 var div = angular.element(this.$window.document).find("div");
4453344569 var consoleTag;
4453444570 var parametersTag;
@@ -44552,7 +44588,7 @@
4455244588 console.log(result);
4455344589 });
4455444590 };
44555- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
44591+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4455644592 return CommandController;
4455744593 })();
4455844594 directives.CommandController = CommandController;
@@ -45097,12 +45133,13 @@
4509745133 })();
4509845134 directives.Command = Command;
4509945135 var CommandController = (function () {
45100- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
45136+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4510145137 this.APIEndPoint = APIEndPoint;
4510245138 this.$scope = $scope;
4510345139 this.MyModal = MyModal;
4510445140 this.WebSocket = WebSocket;
4510545141 this.$window = $window;
45142+ this.$rootScope = $rootScope;
4510645143 var controller = this;
4510745144 this.APIEndPoint
4510845145 .getOptionControlFile(this.name)
@@ -45121,13 +45158,16 @@
4512145158 this.$scope.$on('close', function () {
4512245159 controller.isOpen = false;
4512345160 });
45124- this.WebSocket.on('console', function (msg) {
45125- console.log(msg);
45126- var messages = msg.split('\n');
45127- if (messages[0].substr(0, 6) === 'Usage:') {
45128- controller.messages = msg.split('\n');
45161+ function guid() {
45162+ function s4() {
45163+ return Math.floor((1 + Math.random()) * 0x10000)
45164+ .toString(16)
45165+ .substring(1);
4512945166 }
45130- });
45167+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
45168+ s4() + '-' + s4() + s4() + s4();
45169+ }
45170+ var uuid = guid();
4513145171 }
4513245172 CommandController.prototype.submit = function () {
4513345173 var opt = [];
@@ -45162,6 +45202,7 @@
4516245202 });
4516345203 };
4516445204 CommandController.prototype.removeMySelf = function (index) {
45205+ this.$scope.$destroy();
4516545206 this.remove()(index, this.list);
4516645207 };
4516745208 CommandController.prototype.reloadFiles = function () {
@@ -45181,6 +45222,7 @@
4518145222 });
4518245223 };
4518345224 CommandController.prototype.debug = function () {
45225+ console.log(this.$rootScope);
4518445226 var div = angular.element(this.$window.document).find("div");
4518545227 var consoleTag;
4518645228 var parametersTag;
@@ -45204,7 +45246,7 @@
4520445246 console.log(result);
4520545247 });
4520645248 };
45207- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
45249+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4520845250 return CommandController;
4520945251 })();
4521045252 directives.CommandController = CommandController;
@@ -45749,12 +45791,13 @@
4574945791 })();
4575045792 directives.Command = Command;
4575145793 var CommandController = (function () {
45752- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
45794+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4575345795 this.APIEndPoint = APIEndPoint;
4575445796 this.$scope = $scope;
4575545797 this.MyModal = MyModal;
4575645798 this.WebSocket = WebSocket;
4575745799 this.$window = $window;
45800+ this.$rootScope = $rootScope;
4575845801 var controller = this;
4575945802 this.APIEndPoint
4576045803 .getOptionControlFile(this.name)
@@ -45773,13 +45816,16 @@
4577345816 this.$scope.$on('close', function () {
4577445817 controller.isOpen = false;
4577545818 });
45776- this.WebSocket.on('console', function (msg) {
45777- console.log(msg);
45778- var messages = msg.split('\n');
45779- if (messages[0].substr(0, 6) === 'Usage:') {
45780- controller.messages = msg.split('\n');
45819+ function guid() {
45820+ function s4() {
45821+ return Math.floor((1 + Math.random()) * 0x10000)
45822+ .toString(16)
45823+ .substring(1);
4578145824 }
45782- });
45825+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
45826+ s4() + '-' + s4() + s4() + s4();
45827+ }
45828+ var uuid = guid();
4578345829 }
4578445830 CommandController.prototype.submit = function () {
4578545831 var opt = [];
@@ -45814,6 +45860,7 @@
4581445860 });
4581545861 };
4581645862 CommandController.prototype.removeMySelf = function (index) {
45863+ this.$scope.$destroy();
4581745864 this.remove()(index, this.list);
4581845865 };
4581945866 CommandController.prototype.reloadFiles = function () {
@@ -45833,6 +45880,7 @@
4583345880 });
4583445881 };
4583545882 CommandController.prototype.debug = function () {
45883+ console.log(this.$rootScope);
4583645884 var div = angular.element(this.$window.document).find("div");
4583745885 var consoleTag;
4583845886 var parametersTag;
@@ -45856,7 +45904,7 @@
4585645904 console.log(result);
4585745905 });
4585845906 };
45859- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
45907+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4586045908 return CommandController;
4586145909 })();
4586245910 directives.CommandController = CommandController;
@@ -46401,12 +46449,13 @@
4640146449 })();
4640246450 directives.Command = Command;
4640346451 var CommandController = (function () {
46404- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
46452+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4640546453 this.APIEndPoint = APIEndPoint;
4640646454 this.$scope = $scope;
4640746455 this.MyModal = MyModal;
4640846456 this.WebSocket = WebSocket;
4640946457 this.$window = $window;
46458+ this.$rootScope = $rootScope;
4641046459 var controller = this;
4641146460 this.APIEndPoint
4641246461 .getOptionControlFile(this.name)
@@ -46425,13 +46474,16 @@
4642546474 this.$scope.$on('close', function () {
4642646475 controller.isOpen = false;
4642746476 });
46428- this.WebSocket.on('console', function (msg) {
46429- console.log(msg);
46430- var messages = msg.split('\n');
46431- if (messages[0].substr(0, 6) === 'Usage:') {
46432- controller.messages = msg.split('\n');
46477+ function guid() {
46478+ function s4() {
46479+ return Math.floor((1 + Math.random()) * 0x10000)
46480+ .toString(16)
46481+ .substring(1);
4643346482 }
46434- });
46483+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
46484+ s4() + '-' + s4() + s4() + s4();
46485+ }
46486+ var uuid = guid();
4643546487 }
4643646488 CommandController.prototype.submit = function () {
4643746489 var opt = [];
@@ -46466,6 +46518,7 @@
4646646518 });
4646746519 };
4646846520 CommandController.prototype.removeMySelf = function (index) {
46521+ this.$scope.$destroy();
4646946522 this.remove()(index, this.list);
4647046523 };
4647146524 CommandController.prototype.reloadFiles = function () {
@@ -46485,6 +46538,7 @@
4648546538 });
4648646539 };
4648746540 CommandController.prototype.debug = function () {
46541+ console.log(this.$rootScope);
4648846542 var div = angular.element(this.$window.document).find("div");
4648946543 var consoleTag;
4649046544 var parametersTag;
@@ -46508,7 +46562,7 @@
4650846562 console.log(result);
4650946563 });
4651046564 };
46511- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
46565+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4651246566 return CommandController;
4651346567 })();
4651446568 directives.CommandController = CommandController;
@@ -47053,12 +47107,13 @@
4705347107 })();
4705447108 directives.Command = Command;
4705547109 var CommandController = (function () {
47056- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
47110+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4705747111 this.APIEndPoint = APIEndPoint;
4705847112 this.$scope = $scope;
4705947113 this.MyModal = MyModal;
4706047114 this.WebSocket = WebSocket;
4706147115 this.$window = $window;
47116+ this.$rootScope = $rootScope;
4706247117 var controller = this;
4706347118 this.APIEndPoint
4706447119 .getOptionControlFile(this.name)
@@ -47077,13 +47132,16 @@
4707747132 this.$scope.$on('close', function () {
4707847133 controller.isOpen = false;
4707947134 });
47080- this.WebSocket.on('console', function (msg) {
47081- console.log(msg);
47082- var messages = msg.split('\n');
47083- if (messages[0].substr(0, 6) === 'Usage:') {
47084- controller.messages = msg.split('\n');
47135+ function guid() {
47136+ function s4() {
47137+ return Math.floor((1 + Math.random()) * 0x10000)
47138+ .toString(16)
47139+ .substring(1);
4708547140 }
47086- });
47141+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
47142+ s4() + '-' + s4() + s4() + s4();
47143+ }
47144+ var uuid = guid();
4708747145 }
4708847146 CommandController.prototype.submit = function () {
4708947147 var opt = [];
@@ -47118,6 +47176,7 @@
4711847176 });
4711947177 };
4712047178 CommandController.prototype.removeMySelf = function (index) {
47179+ this.$scope.$destroy();
4712147180 this.remove()(index, this.list);
4712247181 };
4712347182 CommandController.prototype.reloadFiles = function () {
@@ -47137,6 +47196,7 @@
4713747196 });
4713847197 };
4713947198 CommandController.prototype.debug = function () {
47199+ console.log(this.$rootScope);
4714047200 var div = angular.element(this.$window.document).find("div");
4714147201 var consoleTag;
4714247202 var parametersTag;
@@ -47160,7 +47220,7 @@
4716047220 console.log(result);
4716147221 });
4716247222 };
47163- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
47223+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4716447224 return CommandController;
4716547225 })();
4716647226 directives.CommandController = CommandController;
@@ -47705,12 +47765,13 @@
4770547765 })();
4770647766 directives.Command = Command;
4770747767 var CommandController = (function () {
47708- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
47768+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4770947769 this.APIEndPoint = APIEndPoint;
4771047770 this.$scope = $scope;
4771147771 this.MyModal = MyModal;
4771247772 this.WebSocket = WebSocket;
4771347773 this.$window = $window;
47774+ this.$rootScope = $rootScope;
4771447775 var controller = this;
4771547776 this.APIEndPoint
4771647777 .getOptionControlFile(this.name)
@@ -47729,13 +47790,16 @@
4772947790 this.$scope.$on('close', function () {
4773047791 controller.isOpen = false;
4773147792 });
47732- this.WebSocket.on('console', function (msg) {
47733- console.log(msg);
47734- var messages = msg.split('\n');
47735- if (messages[0].substr(0, 6) === 'Usage:') {
47736- controller.messages = msg.split('\n');
47793+ function guid() {
47794+ function s4() {
47795+ return Math.floor((1 + Math.random()) * 0x10000)
47796+ .toString(16)
47797+ .substring(1);
4773747798 }
47738- });
47799+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
47800+ s4() + '-' + s4() + s4() + s4();
47801+ }
47802+ var uuid = guid();
4773947803 }
4774047804 CommandController.prototype.submit = function () {
4774147805 var opt = [];
@@ -47770,6 +47834,7 @@
4777047834 });
4777147835 };
4777247836 CommandController.prototype.removeMySelf = function (index) {
47837+ this.$scope.$destroy();
4777347838 this.remove()(index, this.list);
4777447839 };
4777547840 CommandController.prototype.reloadFiles = function () {
@@ -47789,6 +47854,7 @@
4778947854 });
4779047855 };
4779147856 CommandController.prototype.debug = function () {
47857+ console.log(this.$rootScope);
4779247858 var div = angular.element(this.$window.document).find("div");
4779347859 var consoleTag;
4779447860 var parametersTag;
@@ -47812,7 +47878,7 @@
4781247878 console.log(result);
4781347879 });
4781447880 };
47815- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
47881+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4781647882 return CommandController;
4781747883 })();
4781847884 directives.CommandController = CommandController;
@@ -48357,12 +48423,13 @@
4835748423 })();
4835848424 directives.Command = Command;
4835948425 var CommandController = (function () {
48360- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
48426+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4836148427 this.APIEndPoint = APIEndPoint;
4836248428 this.$scope = $scope;
4836348429 this.MyModal = MyModal;
4836448430 this.WebSocket = WebSocket;
4836548431 this.$window = $window;
48432+ this.$rootScope = $rootScope;
4836648433 var controller = this;
4836748434 this.APIEndPoint
4836848435 .getOptionControlFile(this.name)
@@ -48381,13 +48448,16 @@
4838148448 this.$scope.$on('close', function () {
4838248449 controller.isOpen = false;
4838348450 });
48384- this.WebSocket.on('console', function (msg) {
48385- console.log(msg);
48386- var messages = msg.split('\n');
48387- if (messages[0].substr(0, 6) === 'Usage:') {
48388- controller.messages = msg.split('\n');
48451+ function guid() {
48452+ function s4() {
48453+ return Math.floor((1 + Math.random()) * 0x10000)
48454+ .toString(16)
48455+ .substring(1);
4838948456 }
48390- });
48457+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
48458+ s4() + '-' + s4() + s4() + s4();
48459+ }
48460+ var uuid = guid();
4839148461 }
4839248462 CommandController.prototype.submit = function () {
4839348463 var opt = [];
@@ -48422,6 +48492,7 @@
4842248492 });
4842348493 };
4842448494 CommandController.prototype.removeMySelf = function (index) {
48495+ this.$scope.$destroy();
4842548496 this.remove()(index, this.list);
4842648497 };
4842748498 CommandController.prototype.reloadFiles = function () {
@@ -48441,6 +48512,7 @@
4844148512 });
4844248513 };
4844348514 CommandController.prototype.debug = function () {
48515+ console.log(this.$rootScope);
4844448516 var div = angular.element(this.$window.document).find("div");
4844548517 var consoleTag;
4844648518 var parametersTag;
@@ -48464,7 +48536,7 @@
4846448536 console.log(result);
4846548537 });
4846648538 };
48467- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
48539+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4846848540 return CommandController;
4846948541 })();
4847048542 directives.CommandController = CommandController;
@@ -49009,12 +49081,13 @@
4900949081 })();
4901049082 directives.Command = Command;
4901149083 var CommandController = (function () {
49012- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
49084+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4901349085 this.APIEndPoint = APIEndPoint;
4901449086 this.$scope = $scope;
4901549087 this.MyModal = MyModal;
4901649088 this.WebSocket = WebSocket;
4901749089 this.$window = $window;
49090+ this.$rootScope = $rootScope;
4901849091 var controller = this;
4901949092 this.APIEndPoint
4902049093 .getOptionControlFile(this.name)
@@ -49033,13 +49106,16 @@
4903349106 this.$scope.$on('close', function () {
4903449107 controller.isOpen = false;
4903549108 });
49036- this.WebSocket.on('console', function (msg) {
49037- console.log(msg);
49038- var messages = msg.split('\n');
49039- if (messages[0].substr(0, 6) === 'Usage:') {
49040- controller.messages = msg.split('\n');
49109+ function guid() {
49110+ function s4() {
49111+ return Math.floor((1 + Math.random()) * 0x10000)
49112+ .toString(16)
49113+ .substring(1);
4904149114 }
49042- });
49115+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
49116+ s4() + '-' + s4() + s4() + s4();
49117+ }
49118+ var uuid = guid();
4904349119 }
4904449120 CommandController.prototype.submit = function () {
4904549121 var opt = [];
@@ -49074,6 +49150,7 @@
4907449150 });
4907549151 };
4907649152 CommandController.prototype.removeMySelf = function (index) {
49153+ this.$scope.$destroy();
4907749154 this.remove()(index, this.list);
4907849155 };
4907949156 CommandController.prototype.reloadFiles = function () {
@@ -49093,6 +49170,7 @@
4909349170 });
4909449171 };
4909549172 CommandController.prototype.debug = function () {
49173+ console.log(this.$rootScope);
4909649174 var div = angular.element(this.$window.document).find("div");
4909749175 var consoleTag;
4909849176 var parametersTag;
@@ -49116,7 +49194,7 @@
4911649194 console.log(result);
4911749195 });
4911849196 };
49119- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
49197+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4912049198 return CommandController;
4912149199 })();
4912249200 directives.CommandController = CommandController;
@@ -49661,12 +49739,13 @@
4966149739 })();
4966249740 directives.Command = Command;
4966349741 var CommandController = (function () {
49664- function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window) {
49742+ function CommandController(APIEndPoint, $scope, MyModal, WebSocket, $window, $rootScope) {
4966549743 this.APIEndPoint = APIEndPoint;
4966649744 this.$scope = $scope;
4966749745 this.MyModal = MyModal;
4966849746 this.WebSocket = WebSocket;
4966949747 this.$window = $window;
49748+ this.$rootScope = $rootScope;
4967049749 var controller = this;
4967149750 this.APIEndPoint
4967249751 .getOptionControlFile(this.name)
@@ -49685,13 +49764,16 @@
4968549764 this.$scope.$on('close', function () {
4968649765 controller.isOpen = false;
4968749766 });
49688- this.WebSocket.on('console', function (msg) {
49689- console.log(msg);
49690- var messages = msg.split('\n');
49691- if (messages[0].substr(0, 6) === 'Usage:') {
49692- controller.messages = msg.split('\n');
49767+ function guid() {
49768+ function s4() {
49769+ return Math.floor((1 + Math.random()) * 0x10000)
49770+ .toString(16)
49771+ .substring(1);
4969349772 }
49694- });
49773+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
49774+ s4() + '-' + s4() + s4() + s4();
49775+ }
49776+ var uuid = guid();
4969549777 }
4969649778 CommandController.prototype.submit = function () {
4969749779 var opt = [];
@@ -49726,6 +49808,7 @@
4972649808 });
4972749809 };
4972849810 CommandController.prototype.removeMySelf = function (index) {
49811+ this.$scope.$destroy();
4972949812 this.remove()(index, this.list);
4973049813 };
4973149814 CommandController.prototype.reloadFiles = function () {
@@ -49745,6 +49828,7 @@
4974549828 });
4974649829 };
4974749830 CommandController.prototype.debug = function () {
49831+ console.log(this.$rootScope);
4974849832 var div = angular.element(this.$window.document).find("div");
4974949833 var consoleTag;
4975049834 var parametersTag;
@@ -49768,7 +49852,7 @@
4976849852 console.log(result);
4976949853 });
4977049854 };
49771- CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window'];
49855+ CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal', 'WebSocket', '$window', '$rootScope'];
4977249856 return CommandController;
4977349857 })();
4977449858 directives.CommandController = CommandController;
Show on old repository browser