• R/O
  • HTTP
  • SSH
  • HTTPS

zephyr: Commit

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


Commit MetaInfo

Revision428afaf312a3cdd9ad4eb996f54561d948663871 (tree)
Time2016-02-08 17:11:20
Authorhimetani_cafe <fumifumi@yasu...>
Commiterhimetani_cafe

Log Message

[Develop and manual test] /api/v1/commandList

On branch master
Changes to be committed:

modified: front-end/app/scripts/controllers/SelectCommand.ts
modified: front-end/app/scripts/services/APIEndPoint.ts
modified: front-end/app/templates/select-command.html
modified: front-end/dist/bundle.js
modified: front-end/dist/templates/select-command.html
new file: server/api/v1/commandList/index.js
modified: server/routes.js

Change Summary

Incremental Difference

--- a/front-end/app/scripts/controllers/SelectCommand.ts
+++ b/front-end/app/scripts/controllers/SelectCommand.ts
@@ -3,6 +3,7 @@ namespace app.controllers {
33
44 public static $inject = ['$scope', 'APIEndPoint'];
55 private tags: string[];
6+ private commands: string[];
67
78 constructor($scope: ng.IScope, private APIEndPoint: services.APIEndPoint) {
89 var controller = this;
@@ -12,6 +13,12 @@ namespace app.controllers {
1213 controller.tags = result.info;
1314 });
1415
16+ this.APIEndPoint
17+ .getCommands()
18+ .$promise.then((result) => {
19+ controller.commands = result.info;
20+ });
21+
1522 }
1623 }
1724 }
--- a/front-end/app/scripts/services/APIEndPoint.ts
+++ b/front-end/app/scripts/services/APIEndPoint.ts
@@ -52,6 +52,12 @@ namespace app.services {
5252 return this.resource(endPoint, {}).get();
5353 }
5454
55+ public getCommands(): ng.resource.IResource<declares.IResponse> {
56+ var endPoint = '/api/v1/commandList';
57+ return this.resource(endPoint, {}).get();
58+ }
59+
60+
5561 public execute(data: any): ng.IHttpPromise<{}> {
5662 var endPoint = '/api/v1/execution';
5763 var fd = new FormData()
--- a/front-end/app/templates/select-command.html
+++ b/front-end/app/templates/select-command.html
@@ -5,7 +5,7 @@
55 <div class="modal-body">
66 <div class="row">
77 <div class="col-md-8">
8- <p ng-repeat="tag in c.tags">{{tag}}</p>
8+ <p ng-repeat="command in c.commands">{{command}}</p>
99 <!--
1010 <div class="btn-group"ng-repeat="tag in tags">
1111 <button type="button" class="btn btn-default btn-xs" ng-click="changeTag(tag)"><span class="glyphicon glyphicon-tag"></span>{{tag}}</button>
--- a/front-end/dist/bundle.js
+++ b/front-end/dist/bundle.js
@@ -41051,6 +41051,10 @@
4105141051 var endPoint = '/api/v1/tagList';
4105241052 return this.resource(endPoint, {}).get();
4105341053 };
41054+ APIEndPoint.prototype.getCommands = function () {
41055+ var endPoint = '/api/v1/commandList';
41056+ return this.resource(endPoint, {}).get();
41057+ };
4105441058 APIEndPoint.prototype.execute = function (data) {
4105541059 var endPoint = '/api/v1/execution';
4105641060 var fd = new FormData();
@@ -41429,6 +41433,11 @@
4142941433 .$promise.then(function (result) {
4143041434 controller.tags = result.info;
4143141435 });
41436+ this.APIEndPoint
41437+ .getCommands()
41438+ .$promise.then(function (result) {
41439+ controller.commands = result.info;
41440+ });
4143241441 }
4143341442 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4143441443 return SelectCommand;
@@ -41539,6 +41548,10 @@
4153941548 var endPoint = '/api/v1/tagList';
4154041549 return this.resource(endPoint, {}).get();
4154141550 };
41551+ APIEndPoint.prototype.getCommands = function () {
41552+ var endPoint = '/api/v1/commandList';
41553+ return this.resource(endPoint, {}).get();
41554+ };
4154241555 APIEndPoint.prototype.execute = function (data) {
4154341556 var endPoint = '/api/v1/execution';
4154441557 var fd = new FormData();
@@ -41917,6 +41930,11 @@
4191741930 .$promise.then(function (result) {
4191841931 controller.tags = result.info;
4191941932 });
41933+ this.APIEndPoint
41934+ .getCommands()
41935+ .$promise.then(function (result) {
41936+ controller.commands = result.info;
41937+ });
4192041938 }
4192141939 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4192241940 return SelectCommand;
@@ -42027,6 +42045,10 @@
4202742045 var endPoint = '/api/v1/tagList';
4202842046 return this.resource(endPoint, {}).get();
4202942047 };
42048+ APIEndPoint.prototype.getCommands = function () {
42049+ var endPoint = '/api/v1/commandList';
42050+ return this.resource(endPoint, {}).get();
42051+ };
4203042052 APIEndPoint.prototype.execute = function (data) {
4203142053 var endPoint = '/api/v1/execution';
4203242054 var fd = new FormData();
@@ -42405,6 +42427,11 @@
4240542427 .$promise.then(function (result) {
4240642428 controller.tags = result.info;
4240742429 });
42430+ this.APIEndPoint
42431+ .getCommands()
42432+ .$promise.then(function (result) {
42433+ controller.commands = result.info;
42434+ });
4240842435 }
4240942436 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4241042437 return SelectCommand;
@@ -42515,6 +42542,10 @@
4251542542 var endPoint = '/api/v1/tagList';
4251642543 return this.resource(endPoint, {}).get();
4251742544 };
42545+ APIEndPoint.prototype.getCommands = function () {
42546+ var endPoint = '/api/v1/commandList';
42547+ return this.resource(endPoint, {}).get();
42548+ };
4251842549 APIEndPoint.prototype.execute = function (data) {
4251942550 var endPoint = '/api/v1/execution';
4252042551 var fd = new FormData();
@@ -42893,6 +42924,11 @@
4289342924 .$promise.then(function (result) {
4289442925 controller.tags = result.info;
4289542926 });
42927+ this.APIEndPoint
42928+ .getCommands()
42929+ .$promise.then(function (result) {
42930+ controller.commands = result.info;
42931+ });
4289642932 }
4289742933 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4289842934 return SelectCommand;
@@ -43003,6 +43039,10 @@
4300343039 var endPoint = '/api/v1/tagList';
4300443040 return this.resource(endPoint, {}).get();
4300543041 };
43042+ APIEndPoint.prototype.getCommands = function () {
43043+ var endPoint = '/api/v1/commandList';
43044+ return this.resource(endPoint, {}).get();
43045+ };
4300643046 APIEndPoint.prototype.execute = function (data) {
4300743047 var endPoint = '/api/v1/execution';
4300843048 var fd = new FormData();
@@ -43381,6 +43421,11 @@
4338143421 .$promise.then(function (result) {
4338243422 controller.tags = result.info;
4338343423 });
43424+ this.APIEndPoint
43425+ .getCommands()
43426+ .$promise.then(function (result) {
43427+ controller.commands = result.info;
43428+ });
4338443429 }
4338543430 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4338643431 return SelectCommand;
@@ -43491,6 +43536,10 @@
4349143536 var endPoint = '/api/v1/tagList';
4349243537 return this.resource(endPoint, {}).get();
4349343538 };
43539+ APIEndPoint.prototype.getCommands = function () {
43540+ var endPoint = '/api/v1/commandList';
43541+ return this.resource(endPoint, {}).get();
43542+ };
4349443543 APIEndPoint.prototype.execute = function (data) {
4349543544 var endPoint = '/api/v1/execution';
4349643545 var fd = new FormData();
@@ -43869,6 +43918,11 @@
4386943918 .$promise.then(function (result) {
4387043919 controller.tags = result.info;
4387143920 });
43921+ this.APIEndPoint
43922+ .getCommands()
43923+ .$promise.then(function (result) {
43924+ controller.commands = result.info;
43925+ });
4387243926 }
4387343927 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4387443928 return SelectCommand;
@@ -43979,6 +44033,10 @@
4397944033 var endPoint = '/api/v1/tagList';
4398044034 return this.resource(endPoint, {}).get();
4398144035 };
44036+ APIEndPoint.prototype.getCommands = function () {
44037+ var endPoint = '/api/v1/commandList';
44038+ return this.resource(endPoint, {}).get();
44039+ };
4398244040 APIEndPoint.prototype.execute = function (data) {
4398344041 var endPoint = '/api/v1/execution';
4398444042 var fd = new FormData();
@@ -44357,6 +44415,11 @@
4435744415 .$promise.then(function (result) {
4435844416 controller.tags = result.info;
4435944417 });
44418+ this.APIEndPoint
44419+ .getCommands()
44420+ .$promise.then(function (result) {
44421+ controller.commands = result.info;
44422+ });
4436044423 }
4436144424 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4436244425 return SelectCommand;
@@ -44467,6 +44530,10 @@
4446744530 var endPoint = '/api/v1/tagList';
4446844531 return this.resource(endPoint, {}).get();
4446944532 };
44533+ APIEndPoint.prototype.getCommands = function () {
44534+ var endPoint = '/api/v1/commandList';
44535+ return this.resource(endPoint, {}).get();
44536+ };
4447044537 APIEndPoint.prototype.execute = function (data) {
4447144538 var endPoint = '/api/v1/execution';
4447244539 var fd = new FormData();
@@ -44845,6 +44912,11 @@
4484544912 .$promise.then(function (result) {
4484644913 controller.tags = result.info;
4484744914 });
44915+ this.APIEndPoint
44916+ .getCommands()
44917+ .$promise.then(function (result) {
44918+ controller.commands = result.info;
44919+ });
4484844920 }
4484944921 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4485044922 return SelectCommand;
@@ -44955,6 +45027,10 @@
4495545027 var endPoint = '/api/v1/tagList';
4495645028 return this.resource(endPoint, {}).get();
4495745029 };
45030+ APIEndPoint.prototype.getCommands = function () {
45031+ var endPoint = '/api/v1/commandList';
45032+ return this.resource(endPoint, {}).get();
45033+ };
4495845034 APIEndPoint.prototype.execute = function (data) {
4495945035 var endPoint = '/api/v1/execution';
4496045036 var fd = new FormData();
@@ -45333,6 +45409,11 @@
4533345409 .$promise.then(function (result) {
4533445410 controller.tags = result.info;
4533545411 });
45412+ this.APIEndPoint
45413+ .getCommands()
45414+ .$promise.then(function (result) {
45415+ controller.commands = result.info;
45416+ });
4533645417 }
4533745418 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4533845419 return SelectCommand;
@@ -45443,6 +45524,10 @@
4544345524 var endPoint = '/api/v1/tagList';
4544445525 return this.resource(endPoint, {}).get();
4544545526 };
45527+ APIEndPoint.prototype.getCommands = function () {
45528+ var endPoint = '/api/v1/commandList';
45529+ return this.resource(endPoint, {}).get();
45530+ };
4544645531 APIEndPoint.prototype.execute = function (data) {
4544745532 var endPoint = '/api/v1/execution';
4544845533 var fd = new FormData();
@@ -45821,6 +45906,11 @@
4582145906 .$promise.then(function (result) {
4582245907 controller.tags = result.info;
4582345908 });
45909+ this.APIEndPoint
45910+ .getCommands()
45911+ .$promise.then(function (result) {
45912+ controller.commands = result.info;
45913+ });
4582445914 }
4582545915 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4582645916 return SelectCommand;
@@ -45931,6 +46021,10 @@
4593146021 var endPoint = '/api/v1/tagList';
4593246022 return this.resource(endPoint, {}).get();
4593346023 };
46024+ APIEndPoint.prototype.getCommands = function () {
46025+ var endPoint = '/api/v1/commandList';
46026+ return this.resource(endPoint, {}).get();
46027+ };
4593446028 APIEndPoint.prototype.execute = function (data) {
4593546029 var endPoint = '/api/v1/execution';
4593646030 var fd = new FormData();
@@ -46309,6 +46403,11 @@
4630946403 .$promise.then(function (result) {
4631046404 controller.tags = result.info;
4631146405 });
46406+ this.APIEndPoint
46407+ .getCommands()
46408+ .$promise.then(function (result) {
46409+ controller.commands = result.info;
46410+ });
4631246411 }
4631346412 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4631446413 return SelectCommand;
@@ -46419,6 +46518,10 @@
4641946518 var endPoint = '/api/v1/tagList';
4642046519 return this.resource(endPoint, {}).get();
4642146520 };
46521+ APIEndPoint.prototype.getCommands = function () {
46522+ var endPoint = '/api/v1/commandList';
46523+ return this.resource(endPoint, {}).get();
46524+ };
4642246525 APIEndPoint.prototype.execute = function (data) {
4642346526 var endPoint = '/api/v1/execution';
4642446527 var fd = new FormData();
@@ -46797,6 +46900,11 @@
4679746900 .$promise.then(function (result) {
4679846901 controller.tags = result.info;
4679946902 });
46903+ this.APIEndPoint
46904+ .getCommands()
46905+ .$promise.then(function (result) {
46906+ controller.commands = result.info;
46907+ });
4680046908 }
4680146909 SelectCommand.$inject = ['$scope', 'APIEndPoint'];
4680246910 return SelectCommand;
--- a/front-end/dist/templates/select-command.html
+++ b/front-end/dist/templates/select-command.html
@@ -5,7 +5,7 @@
55 <div class="modal-body">
66 <div class="row">
77 <div class="col-md-8">
8- <p ng-repeat="tag in c.tags">{{tag}}</p>
8+ <p ng-repeat="command in c.commands">{{command}}</p>
99 <!--
1010 <div class="btn-group"ng-repeat="tag in tags">
1111 <button type="button" class="btn btn-default btn-xs" ng-click="changeTag(tag)"><span class="glyphicon glyphicon-tag"></span>{{tag}}</button>
--- /dev/null
+++ b/server/api/v1/commandList/index.js
@@ -0,0 +1,15 @@
1+'use strict';
2+
3+var express = require('express');
4+var router = express.Router();
5+
6+router.get('/', function(req, res) {
7+ var commandList = require(__dirname + '/../../../../user-specific-files/OptionControlFile/command_list');
8+ var info = {
9+ status: 'success',
10+ info: commandList
11+ };
12+ res.send(info);
13+});
14+
15+module.exports = router;
--- a/server/routes.js
+++ b/server/routes.js
@@ -23,6 +23,7 @@ module.exports = function(app) {
2323 app.use('/api/v1/all/workspace/directory', require(__dirname + '/api/v1/all/workspace/directory'));
2424 app.use('/api/v1/optionControlFile', require(__dirname + '/api/v1/optionControlFile'));
2525 app.use('/api/v1/tagList', require(__dirname + '/api/v1/tagList'));
26+ app.use('/api/v1/commandList', require(__dirname + '/api/v1/commandList'));
2627
2728 app.route('/*')
2829 .get(function(req, res) {
Show on old repository browser