From: himetani_cafe Date: Mon, 8 Feb 2016 07:22:18 +0000 (+0900) Subject: Create SelectCommand with Modal window X-Git-Tag: v0.3.0p0041 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=75e92f56b8b15cbd0a49b62ae020b56740381da6;p=eos%2Fzephyr.git 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 --- diff --git a/front-end/app/scripts/App.ts b/front-end/app/scripts/App.ts index 9b819dc..b6524fe 100644 --- a/front-end/app/scripts/App.ts +++ b/front-end/app/scripts/App.ts @@ -36,11 +36,13 @@ namespace app { }); zephyr.service('APIEndPoint', services.APIEndPoint); + zephyr.controller('selectCommandController', controllers.SelectCommand); zephyr.service('MyModal', services.MyModal); zephyr.controller('executionController', controllers.Execution); zephyr.controller('workspaceController', controllers.Workspace); zephyr.controller('historyController', controllers.History); + zephyr.controller('commandController', directives.CommandController); zephyr.controller('optionController', directives.OptionController); zephyr.controller('directoryController', directives.DirectoryController); diff --git a/front-end/app/scripts/controllers/Execution.ts b/front-end/app/scripts/controllers/Execution.ts index b1ae23d..9f8a37e 100644 --- a/front-end/app/scripts/controllers/Execution.ts +++ b/front-end/app/scripts/controllers/Execution.ts @@ -16,6 +16,7 @@ namespace app.controllers { this.$scope.$broadcast('close'); // add directive + this.MyModal.selectCommand(); this.commandInfoList.push(new declares.CommandInfo('mrcImageNoiseAdd')); } diff --git a/front-end/app/scripts/controllers/SelectCommand.ts b/front-end/app/scripts/controllers/SelectCommand.ts new file mode 100644 index 0000000..c9983d5 --- /dev/null +++ b/front-end/app/scripts/controllers/SelectCommand.ts @@ -0,0 +1,12 @@ +namespace app.controllers { + export class SelectCommand{ + + public page = "History"; + + public static $inject = ['$scope', 'APIEndPoint']; + + constructor($scope: ng.IScope, private APIEndPOint: services.APIEndPoint) { + + } + } +} diff --git a/front-end/app/scripts/entry.ts b/front-end/app/scripts/entry.ts index 00f169f..86bf3c6 100644 --- a/front-end/app/scripts/entry.ts +++ b/front-end/app/scripts/entry.ts @@ -21,5 +21,6 @@ import './directives/Directory.ts'; import './controllers/Execution.ts'; import './controllers/Workspace.ts'; import './controllers/History.ts'; +import './controllers/SelectCommand.ts'; import './App.ts'; diff --git a/front-end/app/scripts/reference.ts b/front-end/app/scripts/reference.ts index 3e70e6e..e20acb8 100644 --- a/front-end/app/scripts/reference.ts +++ b/front-end/app/scripts/reference.ts @@ -13,4 +13,5 @@ /// /// /// +/// diff --git a/front-end/app/scripts/services/MyModal.ts b/front-end/app/scripts/services/MyModal.ts index 3269914..447f800 100644 --- a/front-end/app/scripts/services/MyModal.ts +++ b/front-end/app/scripts/services/MyModal.ts @@ -22,7 +22,16 @@ namespace app.services { this.modalOption.size = 'lg'; } return this.$uibModal.open(this.modalOption); + //return modalName; } + + public selectCommand(): ng.ui.bootstrap.IModalServiceInstance { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + } + } } diff --git a/front-end/app/templates/select-command.html b/front-end/app/templates/select-command.html index 174e381..5516fba 100644 --- a/front-end/app/templates/select-command.html +++ b/front-end/app/templates/select-command.html @@ -1 +1,38 @@ -select command + + + + + diff --git a/front-end/dist/bundle.js b/front-end/dist/bundle.js index de98ad7..8e7e8c4 100644 --- a/front-end/dist/bundle.js +++ b/front-end/dist/bundle.js @@ -59,6 +59,7 @@ __webpack_require__(16); __webpack_require__(17); __webpack_require__(18); + __webpack_require__(19); /***/ }, @@ -41081,6 +41082,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -41341,6 +41348,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -41406,6 +41414,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -41436,6 +41459,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -41537,6 +41561,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -41797,6 +41827,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -41862,6 +41893,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -41892,6 +41938,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -41993,6 +42040,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -42253,6 +42306,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -42318,6 +42372,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -42348,6 +42417,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -42449,6 +42519,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -42709,6 +42785,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -42774,6 +42851,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -42804,6 +42896,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -42905,6 +42998,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -43165,6 +43264,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -43230,6 +43330,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -43260,6 +43375,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -43361,6 +43477,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -43621,6 +43743,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -43686,6 +43809,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -43716,6 +43854,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -43817,6 +43956,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -44077,6 +44222,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -44142,6 +44288,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -44172,6 +44333,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -44273,6 +44435,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -44533,6 +44701,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -44598,6 +44767,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -44628,6 +44812,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -44729,6 +44914,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -44989,6 +45180,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -45054,6 +45246,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -45084,6 +45291,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -45185,6 +45393,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -45445,6 +45659,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -45510,6 +45725,21 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -45540,6 +45770,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -45641,6 +45872,12 @@ } return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; return MyModal; })(); services.MyModal = MyModal; @@ -45901,6 +46138,7 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); }; Execution.prototype.open = function () { @@ -45966,6 +46204,500 @@ })(app || (app = {})); var app; (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + 'use strict'; + var appName = 'zephyr'; + app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); + app.zephyr.config(function ($stateProvider, $urlRouterProvider, $locationProvider) { + $urlRouterProvider.otherwise('/execution'); + $locationProvider.html5Mode({ + enabled: true, + requireBase: false + }); + $stateProvider + .state('execution', { + url: '/execution', + templateUrl: 'templates/execution.html', + controller: 'executionController', + controllerAs: 'c' + }) + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', + controllerAs: 'c' + }) + .state('history', { + url: '/history', + templateUrl: 'templates/history.html', + controller: 'historyController', + controllerAs: 'c' + }); + }); + app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.service('MyModal', app.services.MyModal); + app.zephyr.controller('executionController', app.controllers.Execution); + app.zephyr.controller('workspaceController', app.controllers.Workspace); + app.zephyr.controller('historyController', app.controllers.History); + app.zephyr.controller('commandController', app.directives.CommandController); + app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); + app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); + app.zephyr.directive('command', app.directives.Command.Factory()); + app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); + })(app || (app = {})); + + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + var app; + (function (app) { + var declares; + (function (declares) { + var CommandInfo = (function () { + function CommandInfo(name) { + this.name = name; + } + return CommandInfo; + })(); + declares.CommandInfo = CommandInfo; + })(declares = app.declares || (app.declares = {})); + })(app || (app = {})); + var app; + (function (app) { + var services; + (function (services) { + var APIEndPoint = (function () { + function APIEndPoint($resource, $http) { + this.$resource = $resource; + this.$http = $http; + } + APIEndPoint.prototype.resource = function (endPoint, data) { + var customAction = { + method: 'GET', + isArray: false + }; + var execute = { + method: 'POST', + headers: { 'Content-Type': undefined, enctype: 'multipart/form-data' } + }; + return this.$resource(endPoint, {}, { execute: execute }); + }; + APIEndPoint.prototype.getOptionControlFile = function (command) { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint, {}).get(); + }; + APIEndPoint.prototype.getFiles = function (fileId) { + var endPoint = '/api/v1/workspace'; + if (fileId) { + endPoint += '/' + fileId; + } + return this.resource(endPoint, {}).get(); + }; + APIEndPoint.prototype.getDirectories = function () { + var endPoint = '/api/v1/all/workspace/directory'; + return this.resource(endPoint, {}).get(); + }; + APIEndPoint.prototype.execute = function (data) { + var endPoint = '/api/v1/execution'; + var fd = new FormData(); + fd.append('data', data); + return this.$http.post(endPoint, fd, { + headers: { 'Content-Type': undefined }, + transformRequest: angular.identity + }); + }; + return APIEndPoint; + })(); + services.APIEndPoint = APIEndPoint; + })(services = app.services || (app.services = {})); + })(app || (app = {})); + var app; + (function (app) { + var services; + (function (services) { + var MyModal = (function () { + function MyModal($uibModal) { + this.$uibModal = $uibModal; + this.modalOption = { + backdrop: true, + controller: null, + templateUrl: null, + size: null + }; + } + MyModal.prototype.open = function (modalName) { + if (modalName === 'SelectCommand') { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.size = 'lg'; + } + return this.$uibModal.open(this.modalOption); + }; + MyModal.prototype.selectCommand = function () { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.controller = 'selectCommandController'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + return MyModal; + })(); + services.MyModal = MyModal; + })(services = app.services || (app.services = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var Command = (function () { + function Command() { + this.restrict = 'E'; + this.replace = true; + this.scope = true; + this.controller = 'commandController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + index: '=', + name: '=', + remove: '&', + list: '=' + }; + this.templateUrl = 'templates/command.html'; + } + Command.Factory = function () { + var directive = function () { + return new Command(); + }; + directive.$inject = []; + return directive; + }; + return Command; + })(); + directives.Command = Command; + var CommandController = (function () { + function CommandController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getOptionControlFile('mrcImageNoiseAdd') + .$promise + .then(function (result) { + controller.options = result.info; + }); + this.APIEndPoint + .getDirectories() + .$promise + .then(function (result) { + controller.dirs = result.info; + }); + this.heading = "[" + this.index + "]: dcdFilePring"; + this.isOpen = true; + this.$scope.$on('close', function () { + controller.isOpen = false; + }); + } + CommandController.prototype.submit = function () { + var opt = []; + angular.forEach(this.options, function (option) { + var obj = { + name: option.option, + arguments: [] + }; + angular.forEach(option.arg, function (arg) { + if (arg.input) { + if (typeof arg.input === 'object') { + obj.arguments.push(arg.input.name); + } + else { + obj.arguments.push(arg.input); + } + } + }); + if (obj.arguments.length > 0) { + opt.push(obj); + } + }); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + options: opt + }; + this.APIEndPoint + .execute(JSON.stringify(execObj)) + .then(function (result) { + console.log(result); + }); + }; + CommandController.prototype.removeMySelf = function (index) { + this.remove()(index, this.list); + }; + CommandController.prototype.reloadFiles = function () { + var _this = this; + var fileId = this.workspace.fileId; + this.APIEndPoint + .getFiles(fileId) + .$promise + .then(function (result) { + var status = result.status; + if (status === 'success') { + _this.files = result.info; + } + else { + console.log(result.message); + } + }); + }; + CommandController.prototype.debug = function () { + console.log(this.files); + console.log(this.files); + console.log(this.workspace); + }; + CommandController.$inject = ['APIEndPoint', '$scope']; + return CommandController; + })(); + directives.CommandController = CommandController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var HeaderMenu = (function () { + function HeaderMenu() { + this.restrict = 'E'; + this.replace = true; + this.templateUrl = 'templates/header-menu.html'; + } + HeaderMenu.Factory = function () { + var directive = function () { + return new HeaderMenu(); + }; + return directive; + }; + return HeaderMenu; + })(); + directives.HeaderMenu = HeaderMenu; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var Option = (function () { + function Option() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'optionController'; + this.bindToController = { + info: '=', + files: '=' + }; + this.scope = true; + this.templateUrl = 'templates/option.html'; + this.controllerAs = 'ctrl'; + } + Option.Factory = function () { + var directive = function () { + return new Option(); + }; + directive.$inject = []; + return directive; + }; + return Option; + })(); + directives.Option = Option; + var OptionController = (function () { + function OptionController() { + var controller = this; + angular.forEach(controller.info.arg, function (arg) { + if (arg.initialValue) { + if (arg.formType === 'number') { + arg.input = parseInt(arg.initialValue); + } + else { + arg.input = arg.initialValue; + } + } + }); + } + OptionController.$inject = []; + return OptionController; + })(); + directives.OptionController = OptionController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Execution = (function () { + function Execution(MyModal, $scope) { + this.MyModal = MyModal; + this.$scope = $scope; + this.commandInfoList = []; + } + ; + Execution.prototype.add = function () { + this.$scope.$broadcast('close'); + this.MyModal.selectCommand(); + this.commandInfoList.push(new app.declares.CommandInfo('mrcImageNoiseAdd')); + }; + Execution.prototype.open = function () { + var result = this.MyModal.open('SelectCommand'); + console.log(result); + }; + Execution.prototype.remove = function (index, list) { + list.splice(index, 1); + }; + Execution.prototype.close = function () { + console.log("close"); + }; + Execution.$inject = ['MyModal', '$scope']; + return Execution; + })(); + controllers.Execution = Execution; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + this.directoryList = []; + var controller = this; + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); + } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; + })(); + controllers.Workspace = Workspace; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var History = (function () { + function History($scope) { + this.page = "History"; + } + History.$inject = ['$scope']; + return History; + })(); + controllers.History = History; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var SelectCommand = (function () { + function SelectCommand($scope, APIEndPOint) { + this.APIEndPOint = APIEndPOint; + this.page = "History"; + } + SelectCommand.$inject = ['$scope', 'APIEndPoint']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { 'use strict'; var appName = 'zephyr'; app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); @@ -45996,6 +46728,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); diff --git a/front-end/dist/templates/select-command.html b/front-end/dist/templates/select-command.html index 174e381..5516fba 100644 --- a/front-end/dist/templates/select-command.html +++ b/front-end/dist/templates/select-command.html @@ -1 +1,38 @@ -select command + + + + +