KYLIN-1161 update url to fetch single CubeInstance

Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d18b73ae
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d18b73ae
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d18b73ae

Branch: refs/heads/1.x-HBase1.1.3
Commit: d18b73ae5cd59aa18d8687a713b5fdcf9b173649
Parents: 25ac10a
Author: Zhong <jiazh...@lm-shc-16501192.corp.ebay.com>
Authored: Wed Nov 25 14:38:13 2015 +0800
Committer: jian <jiazh...@apache.org>
Committed: Tue Dec 8 11:03:05 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/rest/controller/CubeController.java    | 4 ++--
 webapp/app/js/services/cubes.js                                  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/d18b73ae/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java
----------------------------------------------------------------------
diff --git 
a/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java 
b/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java
index a8c28c4..b35a35c 100644
--- a/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java
+++ b/server/src/main/java/org/apache/kylin/rest/controller/CubeController.java
@@ -96,9 +96,9 @@ public class CubeController extends BasicController {
         return cubeService.getCubes(cubeName, projectName, (null == limit) ? 
20 : limit, offset);
     }
 
-    @RequestMapping(value = "/get_cube", method = { RequestMethod.GET })
+    @RequestMapping(value = "/{cubeName}", method = { RequestMethod.GET })
     @ResponseBody
-    public CubeInstance getCube(@RequestParam(value = "cubeName", required = 
true) String cubeName) {
+    public CubeInstance getCube(@PathVariable String cubeName) {
         CubeInstance cube = cubeService.getCubeManager().getCube(cubeName);
         if (cube == null) {
             throw new InternalErrorException("Cannot find cube " + cubeName);

http://git-wip-us.apache.org/repos/asf/kylin/blob/d18b73ae/webapp/app/js/services/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cubes.js b/webapp/app/js/services/cubes.js
index a18736f..2e7a185 100644
--- a/webapp/app/js/services/cubes.js
+++ b/webapp/app/js/services/cubes.js
@@ -19,7 +19,7 @@
 KylinApp.factory('CubeService', ['$resource', function ($resource, config) {
   return $resource(Config.service.url + 
'cubes/:cubeId/:propName/:propValue/:action', {}, {
     list: {method: 'GET', params: {}, isArray: true},
-    getCube: {method: 'GET', params: {action:'get_cube'}, isArray: false},
+    getCube: {method: 'GET', params: {}, isArray: false},
     getSql: {method: 'GET', params: {propName: 'segs', action: 'sql'}, 
isArray: false},
     updateNotifyList: {method: 'PUT', params: {propName: 'notify_list'}, 
isArray: false},
     cost: {method: 'PUT', params: {action: 'cost'}, isArray: false},

Reply via email to