OSDN Git Service

[TMP] /workspace page showing workspace files.
authorhimetani_cafe <fumifumi@yasunaga-lab.bio.kyutech.ac.jp>
Wed, 27 Jan 2016 14:38:15 +0000 (23:38 +0900)
committerhimetani_cafe <fumifumi@yasunaga-lab.bio.kyutech.ac.jp>
Wed, 27 Jan 2016 14:38:15 +0000 (23:38 +0900)
 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

13 files changed:
front-end/app/scripts/App.ts
front-end/app/scripts/controllers/Files.ts [deleted file]
front-end/app/scripts/controllers/Workspace.ts [new file with mode: 0644]
front-end/app/scripts/declares.ts
front-end/app/scripts/directives/Command.ts
front-end/app/scripts/entry.ts
front-end/app/scripts/reference.ts
front-end/app/scripts/services/APIEndPoint.ts
front-end/app/templates/files.html [deleted file]
front-end/app/templates/workspace.html [new file with mode: 0644]
front-end/dist/bundle.js
front-end/dist/templates/files.html [deleted file]
front-end/dist/templates/workspace.html [new file with mode: 0644]

index 16ca02b..617d1f0 100644 (file)
@@ -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 (file)
index b3b95ff..0000000
+++ /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 (file)
index 0000000..76d1c77
--- /dev/null
@@ -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);
+            });
+        } 
+    }
+}
index ca14cfc..5214228 100644 (file)
@@ -18,7 +18,7 @@ namespace app.declares {
         input;
     }        
 
-    export interface IOption extends ng.resource.IResource<IOption> {
+    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<IOption> {
-        getOptionControlFile(): IOption;
+    export interface IFileInfo {
+        fileId: string,
+        name: string,
+        parentId: string,
+        fileType: number,
+        createdAt: string,
+        updatedAt: string
+    }
+
+    export interface IResponse extends ng.resource.IResource<IResponse> {
+        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<IResponse> {
+        //customAction(): any
     }
 
 }
index 0751479..a40614f 100644 (file)
@@ -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'];
index 8f73fb7..72e6eb6 100644 (file)
@@ -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';
index 4f83418..9e58a1c 100644 (file)
@@ -10,6 +10,6 @@
 /// <reference path="./directives/Option.ts" />
 
 /// <reference path="./controllers/Execution.ts" />
-/// <reference path="./controllers/Files.ts" />
+/// <reference path="./controllers/Workspace.ts" />
 /// <reference path="./controllers/History.ts" />
 
index d7a5bbe..5235d09 100644 (file)
@@ -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 <declares.IOptionResource> this.$resource(apiUrl, {}, { getOption: getOption });
+            return <declares.IResponseResource> this.$resource(endPoint, {}, { customAction: customAction});
         }
 
-        public getOptionControlFile(): ng.resource.IResourceArray<declares.IOption> {
-            return this.resource().query();
+        public getOptionControlFile(command: string): ng.resource.IResource<declares.IResponse> {
+            var endPoint = '/api/optionControlFile/' + command;
+            return <declares.IResponseOption>this.resource(endPoint).get();
         }
 
+        public getFiles(fileId: string): ng.resource.IResource<declares.IResponse> {
+            var endPoint = '/api/v1/workspace'; 
+
+            if(fileId) {
+                endPoint += '/' + fileId;
+            }
+            console.log(endPoint);
+            return <declares.IResponseFileInfo>this.resource(endPoint).get();
+        }
     }
 }
diff --git a/front-end/app/templates/files.html b/front-end/app/templates/files.html
deleted file mode 100644 (file)
index 1f78aed..0000000
+++ /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 (file)
index 0000000..bbd378c
--- /dev/null
@@ -0,0 +1,3 @@
+workspace
+
+{{c.page}}
index 35ee9fb..f162847 100644 (file)
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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);
                    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;
                })();
                        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";
        (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;
                    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', {
            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 (file)
index 1f78aed..0000000
+++ /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 (file)
index 0000000..bbd378c
--- /dev/null
@@ -0,0 +1,3 @@
+workspace
+
+{{c.page}}