KYLIN-919 fix ui show dimension error Signed-off-by: honma <ho...@ebay.com>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/24d3825b Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/24d3825b Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/24d3825b Branch: refs/heads/2.x-staging Commit: 24d3825bc4652f2f449dde68223788aa3b51fefe Parents: 5216fad Author: jian <jiat...@163.com> Authored: Fri Dec 4 12:29:09 2015 +0800 Committer: honma <ho...@ebay.com> Committed: Fri Dec 4 16:29:07 2015 +0800 ---------------------------------------------------------------------- webapp/app/js/controllers/cubeEdit.js | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/24d3825b/webapp/app/js/controllers/cubeEdit.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/controllers/cubeEdit.js b/webapp/app/js/controllers/cubeEdit.js index 2920458..ae4a0f1 100755 --- a/webapp/app/js/controllers/cubeEdit.js +++ b/webapp/app/js/controllers/cubeEdit.js @@ -47,6 +47,7 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio return temp; }; + //get columns from model $scope.getDimColumnsByTable = function (tableName) { if (!tableName) { return []; @@ -55,6 +56,9 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $locatio var tableDim = _.find($scope.metaModel.model.dimensions, function (dimension) { return dimension.table == tableName }); + if(!tableDim){ + return []; + } var tableDimColumns = tableDim.columns; var avaColObject = _.filter(tableColumns, function (col) { return tableDimColumns.indexOf(col.name) != -1;