• R/O
  • HTTP
  • SSH
  • HTTPS

zephyr: Commit

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


Commit MetaInfo

Revision75e92f56b8b15cbd0a49b62ae020b56740381da6 (tree)
Time2016-02-08 16:22:18
Authorhimetani_cafe <fumifumi@yasu...>
Commiterhimetani_cafe

Log Message

Create SelectCommand with Modal window
modified: front-end/app/scripts/App.ts
modified: front-end/app/scripts/controllers/Execution.ts
new file: front-end/app/scripts/controllers/SelectCommand.ts
modified: front-end/app/scripts/entry.ts
modified: front-end/app/scripts/reference.ts
modified: front-end/app/scripts/services/MyModal.ts
modified: front-end/app/templates/select-command.html
modified: front-end/dist/bundle.js
modified: front-end/dist/templates/select-command.html

Change Summary

Incremental Difference

--- a/front-end/app/scripts/App.ts
+++ b/front-end/app/scripts/App.ts
@@ -36,11 +36,13 @@ namespace app {
3636 });
3737
3838 zephyr.service('APIEndPoint', services.APIEndPoint);
39+ zephyr.controller('selectCommandController', controllers.SelectCommand);
3940 zephyr.service('MyModal', services.MyModal);
4041
4142 zephyr.controller('executionController', controllers.Execution);
4243 zephyr.controller('workspaceController', controllers.Workspace);
4344 zephyr.controller('historyController', controllers.History);
45+
4446 zephyr.controller('commandController', directives.CommandController);
4547 zephyr.controller('optionController', directives.OptionController);
4648 zephyr.controller('directoryController', directives.DirectoryController);
--- a/front-end/app/scripts/controllers/Execution.ts
+++ b/front-end/app/scripts/controllers/Execution.ts
@@ -16,6 +16,7 @@ namespace app.controllers {
1616 this.$scope.$broadcast('close');
1717
1818 // add <command> directive
19+ this.MyModal.selectCommand();
1920 this.commandInfoList.push(new declares.CommandInfo('mrcImageNoiseAdd'));
2021 }
2122
--- /dev/null
+++ b/front-end/app/scripts/controllers/SelectCommand.ts
@@ -0,0 +1,12 @@
1+namespace app.controllers {
2+ export class SelectCommand{
3+
4+ public page = "History";
5+
6+ public static $inject = ['$scope', 'APIEndPoint'];
7+
8+ constructor($scope: ng.IScope, private APIEndPOint: services.APIEndPoint) {
9+
10+ }
11+ }
12+}
--- a/front-end/app/scripts/entry.ts
+++ b/front-end/app/scripts/entry.ts
@@ -21,5 +21,6 @@ import './directives/Directory.ts';
2121 import './controllers/Execution.ts';
2222 import './controllers/Workspace.ts';
2323 import './controllers/History.ts';
24+import './controllers/SelectCommand.ts';
2425
2526 import './App.ts';
--- a/front-end/app/scripts/reference.ts
+++ b/front-end/app/scripts/reference.ts
@@ -13,4 +13,5 @@
1313 /// <reference path="./controllers/Execution.ts" />
1414 /// <reference path="./controllers/Workspace.ts" />
1515 /// <reference path="./controllers/History.ts" />
16+/// <reference path="./controllers/SelectCommand.ts" />
1617
--- a/front-end/app/scripts/services/MyModal.ts
+++ b/front-end/app/scripts/services/MyModal.ts
@@ -22,7 +22,16 @@ namespace app.services {
2222 this.modalOption.size = 'lg';
2323 }
2424 return this.$uibModal.open(this.modalOption);
25+
2526 //return modalName;
2627 }
28+
29+ public selectCommand(): ng.ui.bootstrap.IModalServiceInstance {
30+ this.modalOption.templateUrl = 'templates/select-command.html';
31+ this.modalOption.controller = 'selectCommandController';
32+ this.modalOption.size = 'lg';
33+ return this.$uibModal.open(this.modalOption);
34+ }
35+
2736 }
2837 }
--- a/front-end/app/templates/select-command.html
+++ b/front-end/app/templates/select-command.html
@@ -1 +1,38 @@
1-select command
1+<div class="modal-header">
2+ <h3>Select Command</h3>
3+</div>
4+
5+<div class="modal-body">
6+ <div class="row">
7+ <div class="col-md-8">
8+ <div class="btn-group"ng-repeat="tag in tags">
9+ <button type="button" class="btn btn-default btn-xs" ng-click="changeTag(tag)"><span class="glyphicon glyphicon-tag"></span>{{tag}}</button>
10+ </div>
11+ </div>
12+ <div class="col-md-4">
13+ <div class="input-group custom-search-form">
14+ <input type="text" class="form-control" placeholder="Search..." ng-model="searchText">
15+ <span class="input-group-btn">
16+ <button class="btn btn-default" type="button">
17+ <i class="fa fa-search"></i>
18+ </button>
19+ </span>
20+ </div>
21+ </div>
22+ </div>
23+</div>
24+
25+<div class="modal-footer">
26+ <div class="row">
27+ <!--<div ng-repeat="command in commands | filter:searchText |tagFilter:tag">-->
28+ <!-- <div ng-repeat="command in commands | filter:searchText | tagFilter:tag"> -->
29+ <div ng-repeat="command in commands | filter:searchText">
30+ <div class="col-md-6">
31+ <a class="pull-left" ng-click="selectCommand(command.name)" ng-if="$even">{{command.name}}</a>
32+ </div>
33+ <div class="col-md-6">
34+ <a class="pull-left" ng-click="selectCommand(command.name)" ng-if="$odd">{{command.name}}</a>
35+ </div>
36+ </div>
37+ </div>
38+</div>
--- a/front-end/dist/bundle.js
+++ b/front-end/dist/bundle.js
@@ -59,6 +59,7 @@
5959 __webpack_require__(16);
6060 __webpack_require__(17);
6161 __webpack_require__(18);
62+ __webpack_require__(19);
6263
6364
6465 /***/ },
@@ -41081,6 +41082,12 @@
4108141082 }
4108241083 return this.$uibModal.open(this.modalOption);
4108341084 };
41085+ MyModal.prototype.selectCommand = function () {
41086+ this.modalOption.templateUrl = 'templates/select-command.html';
41087+ this.modalOption.controller = 'selectCommandController';
41088+ this.modalOption.size = 'lg';
41089+ return this.$uibModal.open(this.modalOption);
41090+ };
4108441091 return MyModal;
4108541092 })();
4108641093 services.MyModal = MyModal;
@@ -41341,6 +41348,7 @@
4134141348 ;
4134241349 Execution.prototype.add = function () {
4134341350 this.$scope.$broadcast('close');
41351+ this.MyModal.selectCommand();
4134441352 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4134541353 };
4134641354 Execution.prototype.open = function () {
@@ -41406,6 +41414,21 @@
4140641414 })(app || (app = {}));
4140741415 var app;
4140841416 (function (app) {
41417+ var controllers;
41418+ (function (controllers) {
41419+ var SelectCommand = (function () {
41420+ function SelectCommand($scope, APIEndPOint) {
41421+ this.APIEndPOint = APIEndPOint;
41422+ this.page = "History";
41423+ }
41424+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
41425+ return SelectCommand;
41426+ })();
41427+ controllers.SelectCommand = SelectCommand;
41428+ })(controllers = app.controllers || (app.controllers = {}));
41429+ })(app || (app = {}));
41430+ var app;
41431+ (function (app) {
4140941432 'use strict';
4141041433 var appName = 'zephyr';
4141141434 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -41436,6 +41459,7 @@
4143641459 });
4143741460 });
4143841461 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
41462+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4143941463 app.zephyr.service('MyModal', app.services.MyModal);
4144041464 app.zephyr.controller('executionController', app.controllers.Execution);
4144141465 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -41537,6 +41561,12 @@
4153741561 }
4153841562 return this.$uibModal.open(this.modalOption);
4153941563 };
41564+ MyModal.prototype.selectCommand = function () {
41565+ this.modalOption.templateUrl = 'templates/select-command.html';
41566+ this.modalOption.controller = 'selectCommandController';
41567+ this.modalOption.size = 'lg';
41568+ return this.$uibModal.open(this.modalOption);
41569+ };
4154041570 return MyModal;
4154141571 })();
4154241572 services.MyModal = MyModal;
@@ -41797,6 +41827,7 @@
4179741827 ;
4179841828 Execution.prototype.add = function () {
4179941829 this.$scope.$broadcast('close');
41830+ this.MyModal.selectCommand();
4180041831 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4180141832 };
4180241833 Execution.prototype.open = function () {
@@ -41862,6 +41893,21 @@
4186241893 })(app || (app = {}));
4186341894 var app;
4186441895 (function (app) {
41896+ var controllers;
41897+ (function (controllers) {
41898+ var SelectCommand = (function () {
41899+ function SelectCommand($scope, APIEndPOint) {
41900+ this.APIEndPOint = APIEndPOint;
41901+ this.page = "History";
41902+ }
41903+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
41904+ return SelectCommand;
41905+ })();
41906+ controllers.SelectCommand = SelectCommand;
41907+ })(controllers = app.controllers || (app.controllers = {}));
41908+ })(app || (app = {}));
41909+ var app;
41910+ (function (app) {
4186541911 'use strict';
4186641912 var appName = 'zephyr';
4186741913 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -41892,6 +41938,7 @@
4189241938 });
4189341939 });
4189441940 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
41941+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4189541942 app.zephyr.service('MyModal', app.services.MyModal);
4189641943 app.zephyr.controller('executionController', app.controllers.Execution);
4189741944 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -41993,6 +42040,12 @@
4199342040 }
4199442041 return this.$uibModal.open(this.modalOption);
4199542042 };
42043+ MyModal.prototype.selectCommand = function () {
42044+ this.modalOption.templateUrl = 'templates/select-command.html';
42045+ this.modalOption.controller = 'selectCommandController';
42046+ this.modalOption.size = 'lg';
42047+ return this.$uibModal.open(this.modalOption);
42048+ };
4199642049 return MyModal;
4199742050 })();
4199842051 services.MyModal = MyModal;
@@ -42253,6 +42306,7 @@
4225342306 ;
4225442307 Execution.prototype.add = function () {
4225542308 this.$scope.$broadcast('close');
42309+ this.MyModal.selectCommand();
4225642310 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4225742311 };
4225842312 Execution.prototype.open = function () {
@@ -42318,6 +42372,21 @@
4231842372 })(app || (app = {}));
4231942373 var app;
4232042374 (function (app) {
42375+ var controllers;
42376+ (function (controllers) {
42377+ var SelectCommand = (function () {
42378+ function SelectCommand($scope, APIEndPOint) {
42379+ this.APIEndPOint = APIEndPOint;
42380+ this.page = "History";
42381+ }
42382+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
42383+ return SelectCommand;
42384+ })();
42385+ controllers.SelectCommand = SelectCommand;
42386+ })(controllers = app.controllers || (app.controllers = {}));
42387+ })(app || (app = {}));
42388+ var app;
42389+ (function (app) {
4232142390 'use strict';
4232242391 var appName = 'zephyr';
4232342392 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -42348,6 +42417,7 @@
4234842417 });
4234942418 });
4235042419 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
42420+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4235142421 app.zephyr.service('MyModal', app.services.MyModal);
4235242422 app.zephyr.controller('executionController', app.controllers.Execution);
4235342423 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -42449,6 +42519,12 @@
4244942519 }
4245042520 return this.$uibModal.open(this.modalOption);
4245142521 };
42522+ MyModal.prototype.selectCommand = function () {
42523+ this.modalOption.templateUrl = 'templates/select-command.html';
42524+ this.modalOption.controller = 'selectCommandController';
42525+ this.modalOption.size = 'lg';
42526+ return this.$uibModal.open(this.modalOption);
42527+ };
4245242528 return MyModal;
4245342529 })();
4245442530 services.MyModal = MyModal;
@@ -42709,6 +42785,7 @@
4270942785 ;
4271042786 Execution.prototype.add = function () {
4271142787 this.$scope.$broadcast('close');
42788+ this.MyModal.selectCommand();
4271242789 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4271342790 };
4271442791 Execution.prototype.open = function () {
@@ -42774,6 +42851,21 @@
4277442851 })(app || (app = {}));
4277542852 var app;
4277642853 (function (app) {
42854+ var controllers;
42855+ (function (controllers) {
42856+ var SelectCommand = (function () {
42857+ function SelectCommand($scope, APIEndPOint) {
42858+ this.APIEndPOint = APIEndPOint;
42859+ this.page = "History";
42860+ }
42861+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
42862+ return SelectCommand;
42863+ })();
42864+ controllers.SelectCommand = SelectCommand;
42865+ })(controllers = app.controllers || (app.controllers = {}));
42866+ })(app || (app = {}));
42867+ var app;
42868+ (function (app) {
4277742869 'use strict';
4277842870 var appName = 'zephyr';
4277942871 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -42804,6 +42896,7 @@
4280442896 });
4280542897 });
4280642898 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
42899+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4280742900 app.zephyr.service('MyModal', app.services.MyModal);
4280842901 app.zephyr.controller('executionController', app.controllers.Execution);
4280942902 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -42905,6 +42998,12 @@
4290542998 }
4290642999 return this.$uibModal.open(this.modalOption);
4290743000 };
43001+ MyModal.prototype.selectCommand = function () {
43002+ this.modalOption.templateUrl = 'templates/select-command.html';
43003+ this.modalOption.controller = 'selectCommandController';
43004+ this.modalOption.size = 'lg';
43005+ return this.$uibModal.open(this.modalOption);
43006+ };
4290843007 return MyModal;
4290943008 })();
4291043009 services.MyModal = MyModal;
@@ -43165,6 +43264,7 @@
4316543264 ;
4316643265 Execution.prototype.add = function () {
4316743266 this.$scope.$broadcast('close');
43267+ this.MyModal.selectCommand();
4316843268 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4316943269 };
4317043270 Execution.prototype.open = function () {
@@ -43230,6 +43330,21 @@
4323043330 })(app || (app = {}));
4323143331 var app;
4323243332 (function (app) {
43333+ var controllers;
43334+ (function (controllers) {
43335+ var SelectCommand = (function () {
43336+ function SelectCommand($scope, APIEndPOint) {
43337+ this.APIEndPOint = APIEndPOint;
43338+ this.page = "History";
43339+ }
43340+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
43341+ return SelectCommand;
43342+ })();
43343+ controllers.SelectCommand = SelectCommand;
43344+ })(controllers = app.controllers || (app.controllers = {}));
43345+ })(app || (app = {}));
43346+ var app;
43347+ (function (app) {
4323343348 'use strict';
4323443349 var appName = 'zephyr';
4323543350 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -43260,6 +43375,7 @@
4326043375 });
4326143376 });
4326243377 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
43378+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4326343379 app.zephyr.service('MyModal', app.services.MyModal);
4326443380 app.zephyr.controller('executionController', app.controllers.Execution);
4326543381 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -43361,6 +43477,12 @@
4336143477 }
4336243478 return this.$uibModal.open(this.modalOption);
4336343479 };
43480+ MyModal.prototype.selectCommand = function () {
43481+ this.modalOption.templateUrl = 'templates/select-command.html';
43482+ this.modalOption.controller = 'selectCommandController';
43483+ this.modalOption.size = 'lg';
43484+ return this.$uibModal.open(this.modalOption);
43485+ };
4336443486 return MyModal;
4336543487 })();
4336643488 services.MyModal = MyModal;
@@ -43621,6 +43743,7 @@
4362143743 ;
4362243744 Execution.prototype.add = function () {
4362343745 this.$scope.$broadcast('close');
43746+ this.MyModal.selectCommand();
4362443747 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4362543748 };
4362643749 Execution.prototype.open = function () {
@@ -43686,6 +43809,21 @@
4368643809 })(app || (app = {}));
4368743810 var app;
4368843811 (function (app) {
43812+ var controllers;
43813+ (function (controllers) {
43814+ var SelectCommand = (function () {
43815+ function SelectCommand($scope, APIEndPOint) {
43816+ this.APIEndPOint = APIEndPOint;
43817+ this.page = "History";
43818+ }
43819+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
43820+ return SelectCommand;
43821+ })();
43822+ controllers.SelectCommand = SelectCommand;
43823+ })(controllers = app.controllers || (app.controllers = {}));
43824+ })(app || (app = {}));
43825+ var app;
43826+ (function (app) {
4368943827 'use strict';
4369043828 var appName = 'zephyr';
4369143829 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -43716,6 +43854,7 @@
4371643854 });
4371743855 });
4371843856 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
43857+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4371943858 app.zephyr.service('MyModal', app.services.MyModal);
4372043859 app.zephyr.controller('executionController', app.controllers.Execution);
4372143860 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -43817,6 +43956,12 @@
4381743956 }
4381843957 return this.$uibModal.open(this.modalOption);
4381943958 };
43959+ MyModal.prototype.selectCommand = function () {
43960+ this.modalOption.templateUrl = 'templates/select-command.html';
43961+ this.modalOption.controller = 'selectCommandController';
43962+ this.modalOption.size = 'lg';
43963+ return this.$uibModal.open(this.modalOption);
43964+ };
4382043965 return MyModal;
4382143966 })();
4382243967 services.MyModal = MyModal;
@@ -44077,6 +44222,7 @@
4407744222 ;
4407844223 Execution.prototype.add = function () {
4407944224 this.$scope.$broadcast('close');
44225+ this.MyModal.selectCommand();
4408044226 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4408144227 };
4408244228 Execution.prototype.open = function () {
@@ -44142,6 +44288,21 @@
4414244288 })(app || (app = {}));
4414344289 var app;
4414444290 (function (app) {
44291+ var controllers;
44292+ (function (controllers) {
44293+ var SelectCommand = (function () {
44294+ function SelectCommand($scope, APIEndPOint) {
44295+ this.APIEndPOint = APIEndPOint;
44296+ this.page = "History";
44297+ }
44298+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
44299+ return SelectCommand;
44300+ })();
44301+ controllers.SelectCommand = SelectCommand;
44302+ })(controllers = app.controllers || (app.controllers = {}));
44303+ })(app || (app = {}));
44304+ var app;
44305+ (function (app) {
4414544306 'use strict';
4414644307 var appName = 'zephyr';
4414744308 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -44172,6 +44333,7 @@
4417244333 });
4417344334 });
4417444335 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
44336+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4417544337 app.zephyr.service('MyModal', app.services.MyModal);
4417644338 app.zephyr.controller('executionController', app.controllers.Execution);
4417744339 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -44273,6 +44435,12 @@
4427344435 }
4427444436 return this.$uibModal.open(this.modalOption);
4427544437 };
44438+ MyModal.prototype.selectCommand = function () {
44439+ this.modalOption.templateUrl = 'templates/select-command.html';
44440+ this.modalOption.controller = 'selectCommandController';
44441+ this.modalOption.size = 'lg';
44442+ return this.$uibModal.open(this.modalOption);
44443+ };
4427644444 return MyModal;
4427744445 })();
4427844446 services.MyModal = MyModal;
@@ -44533,6 +44701,7 @@
4453344701 ;
4453444702 Execution.prototype.add = function () {
4453544703 this.$scope.$broadcast('close');
44704+ this.MyModal.selectCommand();
4453644705 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4453744706 };
4453844707 Execution.prototype.open = function () {
@@ -44598,6 +44767,21 @@
4459844767 })(app || (app = {}));
4459944768 var app;
4460044769 (function (app) {
44770+ var controllers;
44771+ (function (controllers) {
44772+ var SelectCommand = (function () {
44773+ function SelectCommand($scope, APIEndPOint) {
44774+ this.APIEndPOint = APIEndPOint;
44775+ this.page = "History";
44776+ }
44777+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
44778+ return SelectCommand;
44779+ })();
44780+ controllers.SelectCommand = SelectCommand;
44781+ })(controllers = app.controllers || (app.controllers = {}));
44782+ })(app || (app = {}));
44783+ var app;
44784+ (function (app) {
4460144785 'use strict';
4460244786 var appName = 'zephyr';
4460344787 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -44628,6 +44812,7 @@
4462844812 });
4462944813 });
4463044814 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
44815+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4463144816 app.zephyr.service('MyModal', app.services.MyModal);
4463244817 app.zephyr.controller('executionController', app.controllers.Execution);
4463344818 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -44729,6 +44914,12 @@
4472944914 }
4473044915 return this.$uibModal.open(this.modalOption);
4473144916 };
44917+ MyModal.prototype.selectCommand = function () {
44918+ this.modalOption.templateUrl = 'templates/select-command.html';
44919+ this.modalOption.controller = 'selectCommandController';
44920+ this.modalOption.size = 'lg';
44921+ return this.$uibModal.open(this.modalOption);
44922+ };
4473244923 return MyModal;
4473344924 })();
4473444925 services.MyModal = MyModal;
@@ -44989,6 +45180,7 @@
4498945180 ;
4499045181 Execution.prototype.add = function () {
4499145182 this.$scope.$broadcast('close');
45183+ this.MyModal.selectCommand();
4499245184 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4499345185 };
4499445186 Execution.prototype.open = function () {
@@ -45054,6 +45246,21 @@
4505445246 })(app || (app = {}));
4505545247 var app;
4505645248 (function (app) {
45249+ var controllers;
45250+ (function (controllers) {
45251+ var SelectCommand = (function () {
45252+ function SelectCommand($scope, APIEndPOint) {
45253+ this.APIEndPOint = APIEndPOint;
45254+ this.page = "History";
45255+ }
45256+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
45257+ return SelectCommand;
45258+ })();
45259+ controllers.SelectCommand = SelectCommand;
45260+ })(controllers = app.controllers || (app.controllers = {}));
45261+ })(app || (app = {}));
45262+ var app;
45263+ (function (app) {
4505745264 'use strict';
4505845265 var appName = 'zephyr';
4505945266 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -45084,6 +45291,7 @@
4508445291 });
4508545292 });
4508645293 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
45294+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4508745295 app.zephyr.service('MyModal', app.services.MyModal);
4508845296 app.zephyr.controller('executionController', app.controllers.Execution);
4508945297 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -45185,6 +45393,12 @@
4518545393 }
4518645394 return this.$uibModal.open(this.modalOption);
4518745395 };
45396+ MyModal.prototype.selectCommand = function () {
45397+ this.modalOption.templateUrl = 'templates/select-command.html';
45398+ this.modalOption.controller = 'selectCommandController';
45399+ this.modalOption.size = 'lg';
45400+ return this.$uibModal.open(this.modalOption);
45401+ };
4518845402 return MyModal;
4518945403 })();
4519045404 services.MyModal = MyModal;
@@ -45445,6 +45659,7 @@
4544545659 ;
4544645660 Execution.prototype.add = function () {
4544745661 this.$scope.$broadcast('close');
45662+ this.MyModal.selectCommand();
4544845663 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4544945664 };
4545045665 Execution.prototype.open = function () {
@@ -45510,6 +45725,21 @@
4551045725 })(app || (app = {}));
4551145726 var app;
4551245727 (function (app) {
45728+ var controllers;
45729+ (function (controllers) {
45730+ var SelectCommand = (function () {
45731+ function SelectCommand($scope, APIEndPOint) {
45732+ this.APIEndPOint = APIEndPOint;
45733+ this.page = "History";
45734+ }
45735+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
45736+ return SelectCommand;
45737+ })();
45738+ controllers.SelectCommand = SelectCommand;
45739+ })(controllers = app.controllers || (app.controllers = {}));
45740+ })(app || (app = {}));
45741+ var app;
45742+ (function (app) {
4551345743 'use strict';
4551445744 var appName = 'zephyr';
4551545745 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -45540,6 +45770,7 @@
4554045770 });
4554145771 });
4554245772 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
45773+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4554345774 app.zephyr.service('MyModal', app.services.MyModal);
4554445775 app.zephyr.controller('executionController', app.controllers.Execution);
4554545776 app.zephyr.controller('workspaceController', app.controllers.Workspace);
@@ -45641,6 +45872,12 @@
4564145872 }
4564245873 return this.$uibModal.open(this.modalOption);
4564345874 };
45875+ MyModal.prototype.selectCommand = function () {
45876+ this.modalOption.templateUrl = 'templates/select-command.html';
45877+ this.modalOption.controller = 'selectCommandController';
45878+ this.modalOption.size = 'lg';
45879+ return this.$uibModal.open(this.modalOption);
45880+ };
4564445881 return MyModal;
4564545882 })();
4564645883 services.MyModal = MyModal;
@@ -45901,6 +46138,7 @@
4590146138 ;
4590246139 Execution.prototype.add = function () {
4590346140 this.$scope.$broadcast('close');
46141+ this.MyModal.selectCommand();
4590446142 this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
4590546143 };
4590646144 Execution.prototype.open = function () {
@@ -45966,6 +46204,500 @@
4596646204 })(app || (app = {}));
4596746205 var app;
4596846206 (function (app) {
46207+ var controllers;
46208+ (function (controllers) {
46209+ var SelectCommand = (function () {
46210+ function SelectCommand($scope, APIEndPOint) {
46211+ this.APIEndPOint = APIEndPOint;
46212+ this.page = "History";
46213+ }
46214+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
46215+ return SelectCommand;
46216+ })();
46217+ controllers.SelectCommand = SelectCommand;
46218+ })(controllers = app.controllers || (app.controllers = {}));
46219+ })(app || (app = {}));
46220+ var app;
46221+ (function (app) {
46222+ 'use strict';
46223+ var appName = 'zephyr';
46224+ app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
46225+ app.zephyr.config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
46226+ $urlRouterProvider.otherwise('/execution');
46227+ $locationProvider.html5Mode({
46228+ enabled: true,
46229+ requireBase: false
46230+ });
46231+ $stateProvider
46232+ .state('execution', {
46233+ url: '/execution',
46234+ templateUrl: 'templates/execution.html',
46235+ controller: 'executionController',
46236+ controllerAs: 'c'
46237+ })
46238+ .state('workspace', {
46239+ url: '/workspace',
46240+ templateUrl: 'templates/workspace.html',
46241+ controller: 'workspaceController',
46242+ controllerAs: 'c'
46243+ })
46244+ .state('history', {
46245+ url: '/history',
46246+ templateUrl: 'templates/history.html',
46247+ controller: 'historyController',
46248+ controllerAs: 'c'
46249+ });
46250+ });
46251+ app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
46252+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
46253+ app.zephyr.service('MyModal', app.services.MyModal);
46254+ app.zephyr.controller('executionController', app.controllers.Execution);
46255+ app.zephyr.controller('workspaceController', app.controllers.Workspace);
46256+ app.zephyr.controller('historyController', app.controllers.History);
46257+ app.zephyr.controller('commandController', app.directives.CommandController);
46258+ app.zephyr.controller('optionController', app.directives.OptionController);
46259+ app.zephyr.controller('directoryController', app.directives.DirectoryController);
46260+ app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory());
46261+ app.zephyr.directive('command', app.directives.Command.Factory());
46262+ app.zephyr.directive('option', app.directives.Option.Factory());
46263+ app.zephyr.directive('directory', app.directives.Directory.Factory());
46264+ })(app || (app = {}));
46265+
46266+
46267+/***/ },
46268+/* 19 */
46269+/***/ function(module, exports) {
46270+
46271+ var app;
46272+ (function (app) {
46273+ var declares;
46274+ (function (declares) {
46275+ var CommandInfo = (function () {
46276+ function CommandInfo(name) {
46277+ this.name = name;
46278+ }
46279+ return CommandInfo;
46280+ })();
46281+ declares.CommandInfo = CommandInfo;
46282+ })(declares = app.declares || (app.declares = {}));
46283+ })(app || (app = {}));
46284+ var app;
46285+ (function (app) {
46286+ var services;
46287+ (function (services) {
46288+ var APIEndPoint = (function () {
46289+ function APIEndPoint($resource, $http) {
46290+ this.$resource = $resource;
46291+ this.$http = $http;
46292+ }
46293+ APIEndPoint.prototype.resource = function (endPoint, data) {
46294+ var customAction = {
46295+ method: 'GET',
46296+ isArray: false
46297+ };
46298+ var execute = {
46299+ method: 'POST',
46300+ headers: { 'Content-Type': undefined, enctype: 'multipart/form-data' }
46301+ };
46302+ return this.$resource(endPoint, {}, { execute: execute });
46303+ };
46304+ APIEndPoint.prototype.getOptionControlFile = function (command) {
46305+ var endPoint = '/api/optionControlFile/' + command;
46306+ return this.resource(endPoint, {}).get();
46307+ };
46308+ APIEndPoint.prototype.getFiles = function (fileId) {
46309+ var endPoint = '/api/v1/workspace';
46310+ if (fileId) {
46311+ endPoint += '/' + fileId;
46312+ }
46313+ return this.resource(endPoint, {}).get();
46314+ };
46315+ APIEndPoint.prototype.getDirectories = function () {
46316+ var endPoint = '/api/v1/all/workspace/directory';
46317+ return this.resource(endPoint, {}).get();
46318+ };
46319+ APIEndPoint.prototype.execute = function (data) {
46320+ var endPoint = '/api/v1/execution';
46321+ var fd = new FormData();
46322+ fd.append('data', data);
46323+ return this.$http.post(endPoint, fd, {
46324+ headers: { 'Content-Type': undefined },
46325+ transformRequest: angular.identity
46326+ });
46327+ };
46328+ return APIEndPoint;
46329+ })();
46330+ services.APIEndPoint = APIEndPoint;
46331+ })(services = app.services || (app.services = {}));
46332+ })(app || (app = {}));
46333+ var app;
46334+ (function (app) {
46335+ var services;
46336+ (function (services) {
46337+ var MyModal = (function () {
46338+ function MyModal($uibModal) {
46339+ this.$uibModal = $uibModal;
46340+ this.modalOption = {
46341+ backdrop: true,
46342+ controller: null,
46343+ templateUrl: null,
46344+ size: null
46345+ };
46346+ }
46347+ MyModal.prototype.open = function (modalName) {
46348+ if (modalName === 'SelectCommand') {
46349+ this.modalOption.templateUrl = 'templates/select-command.html';
46350+ this.modalOption.size = 'lg';
46351+ }
46352+ return this.$uibModal.open(this.modalOption);
46353+ };
46354+ MyModal.prototype.selectCommand = function () {
46355+ this.modalOption.templateUrl = 'templates/select-command.html';
46356+ this.modalOption.controller = 'selectCommandController';
46357+ this.modalOption.size = 'lg';
46358+ return this.$uibModal.open(this.modalOption);
46359+ };
46360+ return MyModal;
46361+ })();
46362+ services.MyModal = MyModal;
46363+ })(services = app.services || (app.services = {}));
46364+ })(app || (app = {}));
46365+ var app;
46366+ (function (app) {
46367+ var directives;
46368+ (function (directives) {
46369+ var Command = (function () {
46370+ function Command() {
46371+ this.restrict = 'E';
46372+ this.replace = true;
46373+ this.scope = true;
46374+ this.controller = 'commandController';
46375+ this.controllerAs = 'ctrl';
46376+ this.bindToController = {
46377+ index: '=',
46378+ name: '=',
46379+ remove: '&',
46380+ list: '='
46381+ };
46382+ this.templateUrl = 'templates/command.html';
46383+ }
46384+ Command.Factory = function () {
46385+ var directive = function () {
46386+ return new Command();
46387+ };
46388+ directive.$inject = [];
46389+ return directive;
46390+ };
46391+ return Command;
46392+ })();
46393+ directives.Command = Command;
46394+ var CommandController = (function () {
46395+ function CommandController(APIEndPoint, $scope) {
46396+ this.APIEndPoint = APIEndPoint;
46397+ this.$scope = $scope;
46398+ var controller = this;
46399+ this.APIEndPoint
46400+ .getOptionControlFile('mrcImageNoiseAdd')
46401+ .$promise
46402+ .then(function (result) {
46403+ controller.options = result.info;
46404+ });
46405+ this.APIEndPoint
46406+ .getDirectories()
46407+ .$promise
46408+ .then(function (result) {
46409+ controller.dirs = result.info;
46410+ });
46411+ this.heading = "[" + this.index + "]: dcdFilePring";
46412+ this.isOpen = true;
46413+ this.$scope.$on('close', function () {
46414+ controller.isOpen = false;
46415+ });
46416+ }
46417+ CommandController.prototype.submit = function () {
46418+ var opt = [];
46419+ angular.forEach(this.options, function (option) {
46420+ var obj = {
46421+ name: option.option,
46422+ arguments: []
46423+ };
46424+ angular.forEach(option.arg, function (arg) {
46425+ if (arg.input) {
46426+ if (typeof arg.input === 'object') {
46427+ obj.arguments.push(arg.input.name);
46428+ }
46429+ else {
46430+ obj.arguments.push(arg.input);
46431+ }
46432+ }
46433+ });
46434+ if (obj.arguments.length > 0) {
46435+ opt.push(obj);
46436+ }
46437+ });
46438+ var execObj = {
46439+ command: this.name,
46440+ workspace: this.workspace.fileId,
46441+ options: opt
46442+ };
46443+ this.APIEndPoint
46444+ .execute(JSON.stringify(execObj))
46445+ .then(function (result) {
46446+ console.log(result);
46447+ });
46448+ };
46449+ CommandController.prototype.removeMySelf = function (index) {
46450+ this.remove()(index, this.list);
46451+ };
46452+ CommandController.prototype.reloadFiles = function () {
46453+ var _this = this;
46454+ var fileId = this.workspace.fileId;
46455+ this.APIEndPoint
46456+ .getFiles(fileId)
46457+ .$promise
46458+ .then(function (result) {
46459+ var status = result.status;
46460+ if (status === 'success') {
46461+ _this.files = result.info;
46462+ }
46463+ else {
46464+ console.log(result.message);
46465+ }
46466+ });
46467+ };
46468+ CommandController.prototype.debug = function () {
46469+ console.log(this.files);
46470+ console.log(this.files);
46471+ console.log(this.workspace);
46472+ };
46473+ CommandController.$inject = ['APIEndPoint', '$scope'];
46474+ return CommandController;
46475+ })();
46476+ directives.CommandController = CommandController;
46477+ })(directives = app.directives || (app.directives = {}));
46478+ })(app || (app = {}));
46479+ var app;
46480+ (function (app) {
46481+ var directives;
46482+ (function (directives) {
46483+ var HeaderMenu = (function () {
46484+ function HeaderMenu() {
46485+ this.restrict = 'E';
46486+ this.replace = true;
46487+ this.templateUrl = 'templates/header-menu.html';
46488+ }
46489+ HeaderMenu.Factory = function () {
46490+ var directive = function () {
46491+ return new HeaderMenu();
46492+ };
46493+ return directive;
46494+ };
46495+ return HeaderMenu;
46496+ })();
46497+ directives.HeaderMenu = HeaderMenu;
46498+ })(directives = app.directives || (app.directives = {}));
46499+ })(app || (app = {}));
46500+ var app;
46501+ (function (app) {
46502+ var directives;
46503+ (function (directives) {
46504+ var Option = (function () {
46505+ function Option() {
46506+ this.restrict = 'E';
46507+ this.replace = true;
46508+ this.controller = 'optionController';
46509+ this.bindToController = {
46510+ info: '=',
46511+ files: '='
46512+ };
46513+ this.scope = true;
46514+ this.templateUrl = 'templates/option.html';
46515+ this.controllerAs = 'ctrl';
46516+ }
46517+ Option.Factory = function () {
46518+ var directive = function () {
46519+ return new Option();
46520+ };
46521+ directive.$inject = [];
46522+ return directive;
46523+ };
46524+ return Option;
46525+ })();
46526+ directives.Option = Option;
46527+ var OptionController = (function () {
46528+ function OptionController() {
46529+ var controller = this;
46530+ angular.forEach(controller.info.arg, function (arg) {
46531+ if (arg.initialValue) {
46532+ if (arg.formType === 'number') {
46533+ arg.input = parseInt(arg.initialValue);
46534+ }
46535+ else {
46536+ arg.input = arg.initialValue;
46537+ }
46538+ }
46539+ });
46540+ }
46541+ OptionController.$inject = [];
46542+ return OptionController;
46543+ })();
46544+ directives.OptionController = OptionController;
46545+ })(directives = app.directives || (app.directives = {}));
46546+ })(app || (app = {}));
46547+ var app;
46548+ (function (app) {
46549+ var directives;
46550+ (function (directives) {
46551+ var Directory = (function () {
46552+ function Directory() {
46553+ this.restrict = 'E';
46554+ this.replace = true;
46555+ this.controller = 'directoryController';
46556+ this.controllerAs = 'ctrl';
46557+ this.bindToController = {
46558+ info: '=',
46559+ add: '&',
46560+ list: '=',
46561+ files: '='
46562+ };
46563+ this.templateUrl = 'templates/directory.html';
46564+ }
46565+ Directory.Factory = function () {
46566+ var directive = function () {
46567+ return new Directory();
46568+ };
46569+ return directive;
46570+ };
46571+ return Directory;
46572+ })();
46573+ directives.Directory = Directory;
46574+ var DirectoryController = (function () {
46575+ function DirectoryController(APIEndPoint, $scope) {
46576+ this.APIEndPoint = APIEndPoint;
46577+ this.$scope = $scope;
46578+ var controller = this;
46579+ this.APIEndPoint
46580+ .getFiles(this.info.fileId)
46581+ .$promise
46582+ .then(function (result) {
46583+ if (result.status === 'success') {
46584+ controller.files = result.info;
46585+ angular.forEach(result.info, function (file) {
46586+ if (file.fileType === '0') {
46587+ var o = file;
46588+ if (controller.info.path === '/') {
46589+ o.path = '/' + file.name;
46590+ }
46591+ else {
46592+ o.path = controller.info.path + '/' + file.name;
46593+ }
46594+ controller.add()(o, controller.list);
46595+ }
46596+ });
46597+ }
46598+ ;
46599+ });
46600+ }
46601+ DirectoryController.$inject = ['APIEndPoint', '$scope'];
46602+ return DirectoryController;
46603+ })();
46604+ directives.DirectoryController = DirectoryController;
46605+ })(directives = app.directives || (app.directives = {}));
46606+ })(app || (app = {}));
46607+ var app;
46608+ (function (app) {
46609+ var controllers;
46610+ (function (controllers) {
46611+ var Execution = (function () {
46612+ function Execution(MyModal, $scope) {
46613+ this.MyModal = MyModal;
46614+ this.$scope = $scope;
46615+ this.commandInfoList = [];
46616+ }
46617+ ;
46618+ Execution.prototype.add = function () {
46619+ this.$scope.$broadcast('close');
46620+ this.MyModal.selectCommand();
46621+ this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd'));
46622+ };
46623+ Execution.prototype.open = function () {
46624+ var result = this.MyModal.open('SelectCommand');
46625+ console.log(result);
46626+ };
46627+ Execution.prototype.remove = function (index, list) {
46628+ list.splice(index, 1);
46629+ };
46630+ Execution.prototype.close = function () {
46631+ console.log("close");
46632+ };
46633+ Execution.$inject = ['MyModal', '$scope'];
46634+ return Execution;
46635+ })();
46636+ controllers.Execution = Execution;
46637+ })(controllers = app.controllers || (app.controllers = {}));
46638+ })(app || (app = {}));
46639+ var app;
46640+ (function (app) {
46641+ var controllers;
46642+ (function (controllers) {
46643+ var Workspace = (function () {
46644+ function Workspace($scope, APIEndPoint) {
46645+ this.$scope = $scope;
46646+ this.APIEndPoint = APIEndPoint;
46647+ this.directoryList = [];
46648+ var controller = this;
46649+ var directoryList = this.directoryList;
46650+ var o = {
46651+ fileId: '1f83f620-c1ed-11e5-9657-7942989daa00',
46652+ name: '',
46653+ parentId: '',
46654+ fileType: '',
46655+ createdAt: '',
46656+ updatedAt: '',
46657+ path: '/'
46658+ };
46659+ directoryList.push(o);
46660+ }
46661+ Workspace.prototype.addDirectory = function (info, directoryList) {
46662+ directoryList.push(info);
46663+ };
46664+ Workspace.$inject = ['$scope', 'APIEndPoint'];
46665+ return Workspace;
46666+ })();
46667+ controllers.Workspace = Workspace;
46668+ })(controllers = app.controllers || (app.controllers = {}));
46669+ })(app || (app = {}));
46670+ var app;
46671+ (function (app) {
46672+ var controllers;
46673+ (function (controllers) {
46674+ var History = (function () {
46675+ function History($scope) {
46676+ this.page = "History";
46677+ }
46678+ History.$inject = ['$scope'];
46679+ return History;
46680+ })();
46681+ controllers.History = History;
46682+ })(controllers = app.controllers || (app.controllers = {}));
46683+ })(app || (app = {}));
46684+ var app;
46685+ (function (app) {
46686+ var controllers;
46687+ (function (controllers) {
46688+ var SelectCommand = (function () {
46689+ function SelectCommand($scope, APIEndPOint) {
46690+ this.APIEndPOint = APIEndPOint;
46691+ this.page = "History";
46692+ }
46693+ SelectCommand.$inject = ['$scope', 'APIEndPoint'];
46694+ return SelectCommand;
46695+ })();
46696+ controllers.SelectCommand = SelectCommand;
46697+ })(controllers = app.controllers || (app.controllers = {}));
46698+ })(app || (app = {}));
46699+ var app;
46700+ (function (app) {
4596946701 'use strict';
4597046702 var appName = 'zephyr';
4597146703 app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']);
@@ -45996,6 +46728,7 @@
4599646728 });
4599746729 });
4599846730 app.zephyr.service('APIEndPoint', app.services.APIEndPoint);
46731+ app.zephyr.controller('selectCommandController', app.controllers.SelectCommand);
4599946732 app.zephyr.service('MyModal', app.services.MyModal);
4600046733 app.zephyr.controller('executionController', app.controllers.Execution);
4600146734 app.zephyr.controller('workspaceController', app.controllers.Workspace);
--- a/front-end/dist/templates/select-command.html
+++ b/front-end/dist/templates/select-command.html
@@ -1 +1,38 @@
1-select command
1+<div class="modal-header">
2+ <h3>Select Command</h3>
3+</div>
4+
5+<div class="modal-body">
6+ <div class="row">
7+ <div class="col-md-8">
8+ <div class="btn-group"ng-repeat="tag in tags">
9+ <button type="button" class="btn btn-default btn-xs" ng-click="changeTag(tag)"><span class="glyphicon glyphicon-tag"></span>{{tag}}</button>
10+ </div>
11+ </div>
12+ <div class="col-md-4">
13+ <div class="input-group custom-search-form">
14+ <input type="text" class="form-control" placeholder="Search..." ng-model="searchText">
15+ <span class="input-group-btn">
16+ <button class="btn btn-default" type="button">
17+ <i class="fa fa-search"></i>
18+ </button>
19+ </span>
20+ </div>
21+ </div>
22+ </div>
23+</div>
24+
25+<div class="modal-footer">
26+ <div class="row">
27+ <!--<div ng-repeat="command in commands | filter:searchText |tagFilter:tag">-->
28+ <!-- <div ng-repeat="command in commands | filter:searchText | tagFilter:tag"> -->
29+ <div ng-repeat="command in commands | filter:searchText">
30+ <div class="col-md-6">
31+ <a class="pull-left" ng-click="selectCommand(command.name)" ng-if="$even">{{command.name}}</a>
32+ </div>
33+ <div class="col-md-6">
34+ <a class="pull-left" ng-click="selectCommand(command.name)" ng-if="$odd">{{command.name}}</a>
35+ </div>
36+ </div>
37+ </div>
38+</div>
Show on old repository browser