From 2b7c614bdb3d300225ed4cac4d8e4e9966889d60 Mon Sep 17 00:00:00 2001 From: himetani_cafe Date: Wed, 17 Feb 2016 19:03:45 +0900 Subject: [PATCH] [TMP] Before implement websocket at front-end --- front-end/app/scripts/controllers/Execution.ts | 1 + front-end/app/scripts/controllers/Workspace.ts | 8 +- front-end/app/templates/execution.html | 1 + front-end/app/templates/header-menu.html | 4 +- front-end/app/templates/preview.html | 1 + front-end/app/templates/select-command.html | 4 +- front-end/app/templates/workspace.html | 4 +- front-end/dist/bundle.js | 1281 +++++++++++++++++++++--- front-end/dist/templates/execution.html | 1 + front-end/dist/templates/header-menu.html | 4 +- front-end/dist/templates/preview.html | 1 + front-end/dist/templates/select-command.html | 4 +- front-end/dist/templates/workspace.html | 4 +- package.json | 2 +- server/ws/index.js | 2 +- 15 files changed, 1176 insertions(+), 146 deletions(-) create mode 100644 front-end/app/templates/preview.html create mode 100644 front-end/dist/templates/preview.html diff --git a/front-end/app/scripts/controllers/Execution.ts b/front-end/app/scripts/controllers/Execution.ts index dc77834..b56e4ce 100644 --- a/front-end/app/scripts/controllers/Execution.ts +++ b/front-end/app/scripts/controllers/Execution.ts @@ -45,5 +45,6 @@ namespace app.controllers { public close() { console.log("close"); } + } } diff --git a/front-end/app/scripts/controllers/Workspace.ts b/front-end/app/scripts/controllers/Workspace.ts index 273dd69..f37ef81 100644 --- a/front-end/app/scripts/controllers/Workspace.ts +++ b/front-end/app/scripts/controllers/Workspace.ts @@ -4,9 +4,9 @@ namespace app.controllers { public page: string; public directoryList: declares.IDirectoryInfo[]; - public static $inject = ['$scope', 'APIEndPoint']; + public static $inject = ['$scope', 'APIEndPoint', 'MyModal']; - constructor(private $scope: ng.IScope, private APIEndPoint: services.APIEndPoint) { + constructor(private $scope: ng.IScope, private APIEndPoint: services.APIEndPoint, private MyModal: services.MyModal) { this.directoryList = []; var controller = this; @@ -29,5 +29,9 @@ namespace app.controllers { directoryList.push(info); } + private debug() { + this.MyModal.preview(); + } + } } diff --git a/front-end/app/templates/execution.html b/front-end/app/templates/execution.html index 478f7a3..18c20db 100644 --- a/front-end/app/templates/execution.html +++ b/front-end/app/templates/execution.html @@ -1,3 +1,4 @@ +
diff --git a/front-end/app/templates/header-menu.html b/front-end/app/templates/header-menu.html index 2914d66..72db138 100644 --- a/front-end/app/templates/header-menu.html +++ b/front-end/app/templates/header-menu.html @@ -4,9 +4,9 @@
diff --git a/front-end/app/templates/workspace.html b/front-end/app/templates/workspace.html index bf7925a..9ac29f8 100644 --- a/front-end/app/templates/workspace.html +++ b/front-end/app/templates/workspace.html @@ -1,6 +1,8 @@ +
+
- +
diff --git a/front-end/dist/bundle.js b/front-end/dist/bundle.js index 098d214..e96a9f9 100644 --- a/front-end/dist/bundle.js +++ b/front-end/dist/bundle.js @@ -60,6 +60,7 @@ __webpack_require__(17); __webpack_require__(18); __webpack_require__(19); + __webpack_require__(20); /***/ }, @@ -41097,6 +41098,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -41132,9 +41141,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -41206,11 +41216,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -41357,7 +41365,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -41380,9 +41394,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -41400,7 +41415,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -41425,8 +41443,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -41442,14 +41461,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -41503,6 +41541,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -41619,6 +41658,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -41654,9 +41701,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -41728,11 +41776,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -41879,7 +41925,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -41902,9 +41954,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -41922,7 +41975,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -41947,8 +42003,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -41964,14 +42021,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -42025,6 +42101,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -42141,6 +42218,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -42176,9 +42261,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -42250,11 +42336,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -42401,7 +42485,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -42424,9 +42514,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -42444,7 +42535,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -42469,8 +42563,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -42486,14 +42581,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -42547,6 +42661,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -42663,6 +42778,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -42698,9 +42821,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -42772,11 +42896,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -42923,7 +43045,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -42946,9 +43074,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -42966,7 +43095,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -42991,8 +43123,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -43008,14 +43141,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -43069,6 +43221,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -43185,6 +43338,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -43220,9 +43381,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -43294,11 +43456,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -43445,7 +43605,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -43468,9 +43634,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -43488,7 +43655,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -43513,8 +43683,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -43530,14 +43701,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -43591,6 +43781,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -43707,6 +43898,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -43742,9 +43941,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -43816,11 +44016,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -43967,7 +44165,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -43990,9 +44194,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -44010,7 +44215,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -44035,8 +44243,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -44052,14 +44261,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -44113,6 +44341,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -44229,6 +44458,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -44264,9 +44501,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -44338,11 +44576,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -44489,7 +44725,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -44512,9 +44754,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -44532,7 +44775,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -44557,8 +44803,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -44574,14 +44821,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -44635,6 +44901,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -44751,6 +45018,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -44786,9 +45061,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -44860,11 +45136,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -45011,7 +45285,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -45034,9 +45314,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -45054,7 +45335,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -45079,8 +45363,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -45096,14 +45381,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -45157,6 +45461,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -45273,6 +45578,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -45308,9 +45621,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -45382,11 +45696,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -45533,7 +45845,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -45556,9 +45874,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -45576,7 +45895,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -45601,8 +45923,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -45618,14 +45941,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -45679,6 +46021,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -45795,6 +46138,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -45830,9 +46181,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -45904,11 +46256,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -46055,7 +46405,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -46078,9 +46434,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -46098,7 +46455,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -46123,8 +46483,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -46140,14 +46501,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -46201,6 +46581,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -46317,6 +46698,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -46352,9 +46741,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -46426,11 +46816,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -46577,7 +46965,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -46600,9 +46994,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -46620,7 +47015,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -46645,8 +47043,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -46662,14 +47061,33 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -46723,6 +47141,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); app.zephyr.controller('workspaceController', app.controllers.Workspace); @@ -46839,6 +47258,14 @@ this.modalOption.size = 'lg'; return this.$uibModal.open(this.modalOption); }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; return MyModal; })(); services.MyModal = MyModal; @@ -46874,9 +47301,10 @@ })(); directives.Command = Command; var CommandController = (function () { - function CommandController(APIEndPoint, $scope) { + function CommandController(APIEndPoint, $scope, MyModal) { this.APIEndPoint = APIEndPoint; this.$scope = $scope; + this.MyModal = MyModal; var controller = this; this.APIEndPoint .getOptionControlFile('mrcImageNoiseAdd') @@ -46948,11 +47376,9 @@ }); }; CommandController.prototype.debug = function () { - console.log(this.files); - console.log(this.files); - console.log(this.workspace); + this.MyModal.preview(); }; - CommandController.$inject = ['APIEndPoint', '$scope']; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; return CommandController; })(); directives.CommandController = CommandController; @@ -47099,7 +47525,13 @@ ; Execution.prototype.add = function () { this.$scope.$broadcast('close'); - this.MyModal.selectCommand(); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); }; Execution.prototype.open = function () { var result = this.MyModal.open('SelectCommand'); @@ -47122,9 +47554,10 @@ var controllers; (function (controllers) { var Workspace = (function () { - function Workspace($scope, APIEndPoint) { + function Workspace($scope, APIEndPoint, MyModal) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; this.directoryList = []; var controller = this; var directoryList = this.directoryList; @@ -47142,7 +47575,10 @@ Workspace.prototype.addDirectory = function (info, directoryList) { directoryList.push(info); }; - Workspace.$inject = ['$scope', 'APIEndPoint']; + Workspace.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; return Workspace; })(); controllers.Workspace = Workspace; @@ -47167,8 +47603,9 @@ var controllers; (function (controllers) { var SelectCommand = (function () { - function SelectCommand($scope, APIEndPoint) { + function SelectCommand($scope, APIEndPoint, $modalInstance) { this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; var controller = this; this.APIEndPoint .getTags() @@ -47184,14 +47621,593 @@ } SelectCommand.prototype.changeTag = function (tag) { this.currentTag = tag; - console.log(this.currentTag); }; - SelectCommand.$inject = ['$scope', 'APIEndPoint']; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); + 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.filter('Tag', filters.Tag); + app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); + 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 = {})); + + +/***/ }, +/* 20 */ +/***/ 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/v1/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.getTags = function () { + var endPoint = '/api/v1/tagList'; + return this.resource(endPoint, {}).get(); + }; + APIEndPoint.prototype.getCommands = function () { + var endPoint = '/api/v1/commandList'; + 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.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.prototype.preview = function () { + this.modalOption.templateUrl = 'templates/preview.html'; + this.modalOption.controller = 'previewController'; + this.modalOption.controllerAs = 'c'; + this.modalOption.size = 'lg'; + return this.$uibModal.open(this.modalOption); + }; + MyModal.$inject = ['$uibModal']; + 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, MyModal) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + this.MyModal = MyModal; + 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 () { + this.MyModal.preview(); + }; + CommandController.$inject = ['APIEndPoint', '$scope', 'MyModal']; + 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'); + var commandInfoList = this.commandInfoList; + var commandInstance = this.MyModal.selectCommand(); + commandInstance + .result + .then(function (command) { + commandInfoList.push(new app.declares.CommandInfo(command)); + }); + }; + 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, MyModal) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + this.MyModal = MyModal; + 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.prototype.debug = function () { + this.MyModal.preview(); + }; + Workspace.$inject = ['$scope', 'APIEndPoint', 'MyModal']; + 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, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + this.APIEndPoint + .getTags() + .$promise.then(function (result) { + controller.tags = result.info; + }); + this.APIEndPoint + .getCommands() + .$promise.then(function (result) { + controller.commands = result.info; + }); + this.currentTag = 'all'; + } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + }; + SelectCommand.prototype.selectCommand = function (command) { + this.$modalInstance.close(command); + }; + SelectCommand.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return SelectCommand; + })(); + controllers.SelectCommand = SelectCommand; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Preview = (function () { + function Preview($scope, APIEndPoint, $modalInstance) { + this.APIEndPoint = APIEndPoint; + this.$modalInstance = $modalInstance; + var controller = this; + console.log('preview'); + } + Preview.$inject = ['$scope', 'APIEndPoint', '$uibModalInstance']; + return Preview; + })(); + controllers.Preview = Preview; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); var filters; (function (filters) { function Tag() { @@ -47245,6 +48261,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); + app.zephyr.controller('previewController', app.controllers.Preview); 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/execution.html b/front-end/dist/templates/execution.html index 478f7a3..18c20db 100644 --- a/front-end/dist/templates/execution.html +++ b/front-end/dist/templates/execution.html @@ -1,3 +1,4 @@ +
diff --git a/front-end/dist/templates/header-menu.html b/front-end/dist/templates/header-menu.html index 2914d66..72db138 100644 --- a/front-end/dist/templates/header-menu.html +++ b/front-end/dist/templates/header-menu.html @@ -4,9 +4,9 @@
diff --git a/front-end/dist/templates/workspace.html b/front-end/dist/templates/workspace.html index bf7925a..9ac29f8 100644 --- a/front-end/dist/templates/workspace.html +++ b/front-end/dist/templates/workspace.html @@ -1,6 +1,8 @@ +
+
- +
diff --git a/package.json b/package.json index b56bc42..5a23c48 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "node-uuid": "^1.4.7", "request": "^2.67.0", "sequelize": "^3.18.0", - "socket.io": "^1.3.7", + "socket.io": "^1.4.5", "sqlite3": "^3.1.1" }, "devDependencies": { diff --git a/server/ws/index.js b/server/ws/index.js index 2a6259b..4a7d5f7 100644 --- a/server/ws/index.js +++ b/server/ws/index.js @@ -12,7 +12,6 @@ module.exports = function(io) { name: filename, dir : directory, } - */ socket.on('upload', function(array) { array.forEach(function(file) { var path = file.dir+'/'+file.name @@ -20,5 +19,6 @@ module.exports = function(io) { }) socket.emit('done', 'success') }) + */ }) } -- 2.11.0