You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by zh...@apache.org on 2015/06/03 12:14:25 UTC

[1/2] incubator-kylin git commit: KYLIN-811 init cubeMode data when view cubeDesigner

Repository: incubator-kylin
Updated Branches:
  refs/heads/0.8.0 3eee24f94 -> c34e1d9e6


KYLIN-811 init cubeMode data when view cubeDesigner


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

Branch: refs/heads/0.8.0
Commit: b68ba93fe8e4af634ead7a4f84d63998952fb2a8
Parents: 3eee24f
Author: jiazhong <ji...@ebay.com>
Authored: Wed Jun 3 11:22:39 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Wed Jun 3 18:11:05 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeSchema.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b68ba93f/webapp/app/js/controllers/cubeSchema.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeSchema.js b/webapp/app/js/controllers/cubeSchema.js
index cc8390d..b939ada 100755
--- a/webapp/app/js/controllers/cubeSchema.js
+++ b/webapp/app/js/controllers/cubeSchema.js
@@ -18,7 +18,7 @@
 
 'use strict';
 
-KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserService, ProjectService, AuthenticationService,$filter,ModelService,MetaModel,CubeDescModel,CubeList,TableModel,ProjectModel,ModelDescService,SweetAlert,cubesManager) {
+KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserService,modelsManager, ProjectService, AuthenticationService,$filter,ModelService,MetaModel,CubeDescModel,CubeList,TableModel,ProjectModel,ModelDescService,SweetAlert,cubesManager) {
 
     $scope.cubesManager = cubesManager;
     $scope.projects = [];
@@ -38,7 +38,14 @@ KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserServic
     $scope.curStep = $scope.wizardSteps[0];
 
 
-    // ~ init
+  if(!$scope.metaModel){
+    $scope.metaModel = {
+      model:modelsManager.getModel(cubesManager.cubeMetaFrame.model_name)
+    }
+  }
+
+
+  // ~ init
     if (!$scope.state) {
         $scope.state = {mode: "view"};
     }


[2/2] incubator-kylin git commit: KYLIN-811 use cubeinstance name when rebuild , and remove front cache after remove project

Posted by zh...@apache.org.
KYLIN-811 use cubeinstance name when rebuild ,and remove front cache after remove project


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

Branch: refs/heads/0.8.0
Commit: c34e1d9e6641ed3cd9f9fb3c6dc832324f8aa57d
Parents: b68ba93
Author: jiazhong <ji...@ebay.com>
Authored: Wed Jun 3 18:09:28 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Wed Jun 3 18:13:47 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cube.js   |   2 +-
 webapp/app/js/model/projectModel.js | 174 ++++++++++++++++---------------
 2 files changed, 91 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/c34e1d9e/webapp/app/js/controllers/cube.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cube.js b/webapp/app/js/controllers/cube.js
index f53b590..7a63aa4 100755
--- a/webapp/app/js/controllers/cube.js
+++ b/webapp/app/js/controllers/cube.js
@@ -341,7 +341,7 @@ KylinApp.controller('CubeCtrl', function ($scope, AccessService, MessageService,
                 controller: jobSubmitCtrl,
                 resolve: {
                     cube: function () {
-                        return cube.detail;
+                        return cube;
                     },
                     metaModel:function(){
                         return $scope.metaModel;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/c34e1d9e/webapp/app/js/model/projectModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/projectModel.js b/webapp/app/js/model/projectModel.js
index 934424f..62d8c9a 100644
--- a/webapp/app/js/model/projectModel.js
+++ b/webapp/app/js/model/projectModel.js
@@ -1,84 +1,90 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-KylinApp.service('ProjectModel',function(){
-
-    this.projects = [];
-    this.selectedProject =null;
-
-
-    this.setSelectedProject = function(project) {
-            this.selectedProject = project;
-    };
-    this.getSelectedProject = function(project) {
-         return this.selectedProject;
-    };
-
-    this.setProjects = function(projects){
-        if(projects.length){
-            this.projects = projects;
-        }
-    }
-
-    this.addProject = function(project){
-        this.projects.push(project);
-        this.sortProjects();
-    }
-
-    this.removeProject = function(project){
-        var index =this.projects.indexOf(project);
-        if(index>-1){
-            this.projects.splice(index,1);
-        }
-        this.selectedProject = this.projects[0];
-        this.sortProjects();
-    }
-
-    this.updateProject = function (_new,_old) {
-        for(var i = 0;i<projects.length; i++){
-          if(projects[i].name === _old){
-              projects[i].name = _new;
-              break;
-          }
-        }
-    }
-
-    this.getProjects = function(){
-        return this.projects;
-    }
-
-    this.getProjectByCubeModel = function(modelName){
-        for(var i = 0;i<this.projects.length;i++){
-            if(!this.projects[i].models){
-                continue;
-            }
-            for(var j = 0;j<this.projects[i].models.length;j++){
-                var model = this.projects[i].models[j];
-                if(model.toUpperCase()===modelName.toUpperCase()){
-                    return this.projects[i].name;
-                }
-            }
-        };
-        return this.getSelectedProject();
-    }
-
-    this.sortProjects = function (){
-        this.projects = _.sortBy(this.projects, function (i) { return i.name.toLowerCase(); });
-    }
-
-})
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+KylinApp.service('ProjectModel',function(){
+
+    this.projects = [];
+    this.selectedProject =null;
+
+
+    this.setSelectedProject = function(project) {
+            this.selectedProject = project;
+    };
+    this.getSelectedProject = function(project) {
+         return this.selectedProject;
+    };
+
+    this.setProjects = function(projects){
+        if(projects.length){
+            this.projects = projects;
+        }
+    }
+
+    this.addProject = function(project){
+        this.projects.push(project);
+        this.sortProjects();
+    }
+
+    this.removeProject = function(project){
+        var index = -1;
+        for(var i=0;i<this.projects.length;i++){
+          if(this.projects[i].name==project){
+            index = i;
+            break;
+          }
+        }
+        if(index>-1){
+            this.projects.splice(index,1);
+        }
+        this.selectedProject = this.projects[0];
+        this.sortProjects();
+    }
+
+    this.updateProject = function (_new,_old) {
+        for(var i = 0;i<projects.length; i++){
+          if(projects[i].name === _old){
+              projects[i].name = _new;
+              break;
+          }
+        }
+    }
+
+    this.getProjects = function(){
+        return this.projects;
+    }
+
+    this.getProjectByCubeModel = function(modelName){
+        for(var i = 0;i<this.projects.length;i++){
+            if(!this.projects[i].models){
+                continue;
+            }
+            for(var j = 0;j<this.projects[i].models.length;j++){
+                var model = this.projects[i].models[j];
+                if(model.toUpperCase()===modelName.toUpperCase()){
+                    return this.projects[i].name;
+                }
+            }
+        };
+        return this.getSelectedProject();
+    }
+
+    this.sortProjects = function (){
+        this.projects = _.sortBy(this.projects, function (i) { return i.name.toLowerCase(); });
+    }
+
+})