kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhongj...@apache.org
Subject [2/2] incubator-kylin git commit: KYLIN-811 use cubeinstance name when rebuild , and remove front cache after remove project
Date Wed, 03 Jun 2015 10:14:26 GMT
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 <jiazhong@ebay.com>
Authored: Wed Jun 3 18:09:28 2015 +0800
Committer: jiazhong <jiazhong@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();
});
+    }
+
+})


Mime
View raw message