From ae097105acac3555d12f76763a532490b19296fc Mon Sep 17 00:00:00 2001 From: himetani_cafe Date: Wed, 27 Jan 2016 23:38:15 +0900 Subject: [PATCH] [TMP] /workspace page showing workspace files. On branch master Changes to be committed: modified: app/scripts/App.ts deleted: app/scripts/controllers/Files.ts new file: app/scripts/controllers/Workspace.ts modified: app/scripts/declares.ts modified: app/scripts/directives/Command.ts modified: app/scripts/entry.ts modified: app/scripts/reference.ts modified: app/scripts/services/APIEndPoint.ts deleted: app/templates/files.html new file: app/templates/workspace.html modified: dist/bundle.js deleted: dist/templates/files.html new file: dist/templates/workspace.html Changes not staged for commit: modified: ../server/api/optionControlFile/index.js modified: ../server/express.js modified: ../server/routes.js Untracked files: ../server/api/optionControlFile/.index.js.swp --- front-end/app/scripts/App.ts | 10 +- front-end/app/scripts/controllers/Files.ts | 12 - front-end/app/scripts/controllers/Workspace.ts | 23 + front-end/app/scripts/declares.ts | 30 +- front-end/app/scripts/directives/Command.ts | 5 +- front-end/app/scripts/entry.ts | 2 +- front-end/app/scripts/reference.ts | 2 +- front-end/app/scripts/services/APIEndPoint.ts | 24 +- front-end/app/templates/files.html | 1 - front-end/app/templates/workspace.html | 3 + front-end/dist/bundle.js | 570 ++++++++++++++++--------- front-end/dist/templates/files.html | 1 - front-end/dist/templates/workspace.html | 3 + 13 files changed, 464 insertions(+), 222 deletions(-) delete mode 100644 front-end/app/scripts/controllers/Files.ts create mode 100644 front-end/app/scripts/controllers/Workspace.ts delete mode 100644 front-end/app/templates/files.html create mode 100644 front-end/app/templates/workspace.html delete mode 100644 front-end/dist/templates/files.html create mode 100644 front-end/dist/templates/workspace.html diff --git a/front-end/app/scripts/App.ts b/front-end/app/scripts/App.ts index 16ca02b..617d1f0 100644 --- a/front-end/app/scripts/App.ts +++ b/front-end/app/scripts/App.ts @@ -21,10 +21,10 @@ namespace app { controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -39,7 +39,7 @@ namespace app { zephyr.service('MyModal', services.MyModal); zephyr.controller('executionController', controllers.Execution); - zephyr.controller('filesController', controllers.Files); + zephyr.controller('workspaceController', controllers.Workspace); zephyr.controller('historyController', controllers.History); zephyr.controller('commandController', directives.CommandController); zephyr.controller('optionController', directives.OptionController); diff --git a/front-end/app/scripts/controllers/Files.ts b/front-end/app/scripts/controllers/Files.ts deleted file mode 100644 index b3b95ff..0000000 --- a/front-end/app/scripts/controllers/Files.ts +++ /dev/null @@ -1,12 +0,0 @@ -namespace app.controllers { - export class Files { - - public page = "ManageFiles"; - - public static $inject = ['$scope']; - - constructor($scope) { - - } - } -} diff --git a/front-end/app/scripts/controllers/Workspace.ts b/front-end/app/scripts/controllers/Workspace.ts new file mode 100644 index 0000000..76d1c77 --- /dev/null +++ b/front-end/app/scripts/controllers/Workspace.ts @@ -0,0 +1,23 @@ +namespace app.controllers { + export class Workspace { + + public page: string; + public fileInfo: declares.IFileInfo[]; + + public static $inject = ['$scope', 'APIEndPoint']; + + constructor(private $scope: ng.IScope, private APIEndPoint: services.APIEndPoint) { + var controller = this; + + this.page = 'workspace'; + + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') // rootのfileId + .$promise + .then(function(result) { + controller.fileInfo = result.info; + console.log(result); + }); + } + } +} diff --git a/front-end/app/scripts/declares.ts b/front-end/app/scripts/declares.ts index ca14cfc..5214228 100644 --- a/front-end/app/scripts/declares.ts +++ b/front-end/app/scripts/declares.ts @@ -18,7 +18,7 @@ namespace app.declares { input; } - export interface IOption extends ng.resource.IResource { + export interface IOption { option: string; fullOption: string; optionName: string; @@ -27,8 +27,32 @@ namespace app.declares { arg: IArg[]; } - export interface IOptionResource extends ng.resource.IResourceClass { - getOptionControlFile(): IOption; + export interface IFileInfo { + fileId: string, + name: string, + parentId: string, + fileType: number, + createdAt: string, + updatedAt: string + } + + export interface IResponse extends ng.resource.IResource { + status: string, + info: any + } + + export interface IResponseOption extends IResponse { + status: string, + info: IOption[] + } + + export interface IResponseFileInfo extends IResponse { + status: string, + info: IFileInfo[] + } + + export interface IResponseResource extends ng.resource.IResourceClass { + //customAction(): any } } diff --git a/front-end/app/scripts/directives/Command.ts b/front-end/app/scripts/directives/Command.ts index 0751479..a40614f 100644 --- a/front-end/app/scripts/directives/Command.ts +++ b/front-end/app/scripts/directives/Command.ts @@ -66,10 +66,11 @@ namespace app.directives { // Get OptionControlFile and bind it to $scope.options this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function(result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; diff --git a/front-end/app/scripts/entry.ts b/front-end/app/scripts/entry.ts index 8f73fb7..72e6eb6 100644 --- a/front-end/app/scripts/entry.ts +++ b/front-end/app/scripts/entry.ts @@ -18,7 +18,7 @@ import './directives/HeaderMenu.ts'; // controllers import './controllers/Execution.ts'; -import './controllers/Files.ts'; +import './controllers/Workspace.ts'; import './controllers/History.ts'; import './App.ts'; diff --git a/front-end/app/scripts/reference.ts b/front-end/app/scripts/reference.ts index 4f83418..9e58a1c 100644 --- a/front-end/app/scripts/reference.ts +++ b/front-end/app/scripts/reference.ts @@ -10,6 +10,6 @@ /// /// -/// +/// /// diff --git a/front-end/app/scripts/services/APIEndPoint.ts b/front-end/app/scripts/services/APIEndPoint.ts index d7a5bbe..5235d09 100644 --- a/front-end/app/scripts/services/APIEndPoint.ts +++ b/front-end/app/scripts/services/APIEndPoint.ts @@ -7,19 +7,31 @@ namespace app.services { this.$resource = $resource; } - private resource() { - var getOption: ng.resource.IActionDescriptor = { + private resource(endPoint: string) { + /** + * setting custom action + */ + var customAction: ng.resource.IActionDescriptor = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction}); } - public getOptionControlFile(): ng.resource.IResourceArray { - return this.resource().query(); + public getOptionControlFile(command: string): ng.resource.IResource { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint).get(); } + public getFiles(fileId: string): ng.resource.IResource { + var endPoint = '/api/v1/workspace'; + + if(fileId) { + endPoint += '/' + fileId; + } + console.log(endPoint); + return this.resource(endPoint).get(); + } } } diff --git a/front-end/app/templates/files.html b/front-end/app/templates/files.html deleted file mode 100644 index 1f78aed..0000000 --- a/front-end/app/templates/files.html +++ /dev/null @@ -1 +0,0 @@ -{{page}} diff --git a/front-end/app/templates/workspace.html b/front-end/app/templates/workspace.html new file mode 100644 index 0000000..bbd378c --- /dev/null +++ b/front-end/app/templates/workspace.html @@ -0,0 +1,3 @@ +workspace + +{{c.page}} diff --git a/front-end/dist/bundle.js b/front-end/dist/bundle.js index 35ee9fb..f162847 100644 --- a/front-end/dist/bundle.js +++ b/front-end/dist/bundle.js @@ -41018,16 +41018,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + 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; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -41095,10 +41103,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -41234,14 +41243,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -41276,10 +41295,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -41292,7 +41311,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -41327,16 +41346,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + 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; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -41404,10 +41431,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -41543,14 +41571,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -41585,10 +41623,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -41601,7 +41639,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -41636,16 +41674,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + 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; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -41713,10 +41759,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -41852,14 +41899,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -41894,10 +41951,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -41910,7 +41967,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -41945,16 +42002,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); + }; + APIEndPoint.prototype.getOptionControlFile = function (command) { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint).get(); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + APIEndPoint.prototype.getFiles = function (fileId) { + var endPoint = '/api/v1/workspace'; + if (fileId) { + endPoint += '/' + fileId; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -42022,10 +42087,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -42161,14 +42227,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -42203,10 +42279,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -42219,7 +42295,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -42254,16 +42330,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); + }; + APIEndPoint.prototype.getOptionControlFile = function (command) { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint).get(); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + APIEndPoint.prototype.getFiles = function (fileId) { + var endPoint = '/api/v1/workspace'; + if (fileId) { + endPoint += '/' + fileId; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -42331,10 +42415,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -42470,14 +42555,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -42512,10 +42607,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -42528,7 +42623,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -42563,16 +42658,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + 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; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -42640,10 +42743,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -42779,14 +42883,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -42821,10 +42935,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -42837,7 +42951,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -42872,16 +42986,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + 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; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -42949,10 +43071,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -43088,14 +43211,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -43130,10 +43263,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -43146,7 +43279,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -43181,16 +43314,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + 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; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -43258,10 +43399,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -43397,14 +43539,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -43439,10 +43591,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -43455,7 +43607,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -43490,16 +43642,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); + }; + APIEndPoint.prototype.getOptionControlFile = function (command) { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint).get(); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + APIEndPoint.prototype.getFiles = function (fileId) { + var endPoint = '/api/v1/workspace'; + if (fileId) { + endPoint += '/' + fileId; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -43567,10 +43727,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -43706,14 +43867,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -43748,10 +43919,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -43764,7 +43935,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); @@ -43799,16 +43970,24 @@ function APIEndPoint($resource) { this.$resource = $resource; } - APIEndPoint.prototype.resource = function () { - var getOption = { + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { method: 'GET', isArray: false }; - var apiUrl = '/api/optionControlFile/dcdFilePrint'; - return this.$resource(apiUrl, {}, { getOption: getOption }); + return this.$resource(endPoint, {}, { customAction: customAction }); + }; + APIEndPoint.prototype.getOptionControlFile = function (command) { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint).get(); }; - APIEndPoint.prototype.getOptionControlFile = function () { - return this.resource().query(); + APIEndPoint.prototype.getFiles = function (fileId) { + var endPoint = '/api/v1/workspace'; + if (fileId) { + endPoint += '/' + fileId; + } + console.log(endPoint); + return this.resource(endPoint).get(); }; return APIEndPoint; })(); @@ -43876,10 +44055,11 @@ this.$scope = $scope; var controller = this; this.APIEndPoint - .getOptionControlFile() + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.options = result; + console.log(result); + controller.options = result.info; }); this.files = ['a.file', 'b.file', 'c.file']; this.heading = "[" + this.index + "]: dcdFilePring"; @@ -44015,14 +44195,24 @@ (function (app) { var controllers; (function (controllers) { - var Files = (function () { - function Files($scope) { - this.page = "ManageFiles"; + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + var controller = this; + this.page = 'workspace'; + this.APIEndPoint + .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .$promise + .then(function (result) { + controller.fileInfo = result.info; + console.log(result); + }); } - Files.$inject = ['$scope']; - return Files; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; })(); - controllers.Files = Files; + controllers.Workspace = Workspace; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); var app; @@ -44057,10 +44247,10 @@ controller: 'executionController', controllerAs: 'c' }) - .state('files', { - url: '/files', - templateUrl: 'templates/files.html', - controller: 'filesController', + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', controllerAs: 'c' }) .state('history', { @@ -44073,7 +44263,7 @@ app.zephyr.service('APIEndPoint', app.services.APIEndPoint); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); - app.zephyr.controller('filesController', app.controllers.Files); + 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); diff --git a/front-end/dist/templates/files.html b/front-end/dist/templates/files.html deleted file mode 100644 index 1f78aed..0000000 --- a/front-end/dist/templates/files.html +++ /dev/null @@ -1 +0,0 @@ -{{page}} diff --git a/front-end/dist/templates/workspace.html b/front-end/dist/templates/workspace.html new file mode 100644 index 0000000..bbd378c --- /dev/null +++ b/front-end/dist/templates/workspace.html @@ -0,0 +1,3 @@ +workspace + +{{c.page}} -- 2.11.0