You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/02/21 09:32:25 UTC
kylin git commit: KYLIN 1875 filter in model dimensions and measures
Repository: kylin
Updated Branches:
refs/heads/master 7ce3a153c -> 78a082f4c
KYLIN 1875 filter in model dimensions and measures
Signed-off-by: Li Yang <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/78a082f4
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/78a082f4
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/78a082f4
Branch: refs/heads/master
Commit: 78a082f4ca9f587617152ef6b2935cb55c4618e0
Parents: 7ce3a15
Author: chenzhx <34...@qq.com>
Authored: Tue Feb 21 16:40:50 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Tue Feb 21 17:32:18 2017 +0800
----------------------------------------------------------------------
webapp/app/js/filters/filter.js | 10 ++++++++++
webapp/app/partials/cubeDesigner/dimensions.html | 4 ++--
webapp/app/partials/modelDesigner/data_model.html | 14 ++++++--------
.../app/partials/modelDesigner/model_dimensions.html | 2 +-
4 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/78a082f4/webapp/app/js/filters/filter.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/filters/filter.js b/webapp/app/js/filters/filter.js
index 01c060a..78f6cf9 100755
--- a/webapp/app/js/filters/filter.js
+++ b/webapp/app/js/filters/filter.js
@@ -204,6 +204,16 @@ KylinApp
});
return out;
}
+ }).filter('inMeaNotInDim', function ($filter) {
+ return function (inputArr, table, arr) {
+ var out=[];
+ angular.forEach(inputArr, function (inputItem) {
+ if (arr.indexOf(table+"."+inputItem.name) == -1) {
+ out.push(inputItem);
+ }
+ });
+ return out;
+ }
}).filter('assignedMeasureNames', function ($filter) {
//return the measures that haven't assign to column family
return function (inputArr, assignedArr) {
http://git-wip-us.apache.org/repos/asf/kylin/blob/78a082f4/webapp/app/partials/cubeDesigner/dimensions.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/dimensions.html b/webapp/app/partials/cubeDesigner/dimensions.html
index e1833d3..d7c2321 100644
--- a/webapp/app/partials/cubeDesigner/dimensions.html
+++ b/webapp/app/partials/cubeDesigner/dimensions.html
@@ -221,7 +221,7 @@
<h4>{{table}} [FactTable]</h4>
<table class="table table-striped table-hover ng-scope">
<tr >
- <td class="col-xs-2"><label><input type="checkbox" ng-model="selectedColumns[table].all" ng-change="autoChangeAll(table)">Select All</label></td>
+ <td class="col-xs-2"><label><input type="checkbox" ng-model="selectedColumns[table].all" ng-change="autoChangeAll(table)"> Select All</label></td>
<td class="col-xs-4"><label>Name</label></td>
<td class="col-xs-3"><label>Columns</label></td>
<td colspan="2" class="col-xs-3"></td>
@@ -247,7 +247,7 @@
<h4>{{table}} [LookupTable]</h4>
<table class="table table-striped table-hover ng-scope">
<tr class="row" >
- <td class="col-xs-2"><label><input type="checkbox" ng-model="selectedColumns[table].all" ng-change="autoChangeAll(table)">Select All</label></td>
+ <td class="col-xs-2"><label><input type="checkbox" ng-model="selectedColumns[table].all" ng-change="autoChangeAll(table)"> Select All</label></td>
<td class="col-xs-4"><label>Name</label></td>
<td class="col-xs-3"><label>Columns</label></td>
<td colspan="2" class="col-xs-3"></td>
http://git-wip-us.apache.org/repos/asf/kylin/blob/78a082f4/webapp/app/partials/modelDesigner/data_model.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/modelDesigner/data_model.html b/webapp/app/partials/modelDesigner/data_model.html
index b55935e..d6a6023 100644
--- a/webapp/app/partials/modelDesigner/data_model.html
+++ b/webapp/app/partials/modelDesigner/data_model.html
@@ -130,13 +130,12 @@
<ng-form name="lookup_form">
<div class="form-group">
<div class="row">
- <div class="col-xs-9">
+ <div class="col-xs-12">
<div>
<select chosen ng-model="newLookup.joinTable" class="col-sm-4"
ng-options="table as table for table in aliasName"
name="table_name" ng-disabled="lookupState.editing"
ng-required="true"
- data-placeholder="Join Table Name"
class="chosen-select">
<option value=""> -- From Table -- </option>
</select>
@@ -150,7 +149,6 @@
ng-options="table.name as VdmUtil.removeNameSpace(table.name) for table in tableModel.selectProjectTables"
name="table_name" ng-disabled="lookupState.editing"
ng-required="true" ng-change="changeJoinTable()"
- data-placeholder="Lookup Table Name"
class="chosen-select">
<option value=""> -- Select Lookup Table -- </option>
</select>
@@ -160,8 +158,8 @@
</div>
<div class="form-group">
<div class="row">
- <label class="col-sm-3 control-label font-color-default"><b>Alias</b></label>
- <div class="col-sm-6">
+ <label class="col-sm-6 control-label font-color-default" ><b style="float:right">Table Alias :</b></label>
+ <div class="col-sm-5">
<input type="text" class="form-control " name="joinTable_alias" placeholder="Input Table Alias" ng-required="true"
ng-model="newLookup.alias" ng-pattern="/^[A-Z_\d]+$/">
<small class="help-block red" ng-show="!lookup_form.joinTable_alias.$error.required&&lookup_form.joinTable_alias.$invalid && (lookup_form.joinTable_alias.$dirty||lookup_form.$submitted)"><i class="fa fa-exclamation-triangle"></i> Table alias is invalid(A Combination of numbers, uppercase letters or underscores).</small>
@@ -171,8 +169,8 @@
<!--Table Type-->
<div class="form-group">
<div class="row">
- <label class="col-sm-3"></label>
- <div class="col-sm-6">
+ <label class="col-sm-6"></label>
+ <div class="col-sm-5">
<label>
<input type="checkbox" ng-model="newLookup.kind" ng-true-value="FACT" ng-false-value="LOOKUP" > Is Limited
</label>
@@ -182,7 +180,7 @@
</div>
<div class="form-group">
<div class="row">
- <div class="col-xs-9">
+ <div class="col-xs-12">
<div ng-repeat="joinIndex in [] | range: newLookup.join.primary_key.length">
<div>
<select style="width: 45%" chosen data-placeholder="JoinTable Column"
http://git-wip-us.apache.org/repos/asf/kylin/blob/78a082f4/webapp/app/partials/modelDesigner/model_dimensions.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/modelDesigner/model_dimensions.html b/webapp/app/partials/modelDesigner/model_dimensions.html
index cfa422f..c246973 100644
--- a/webapp/app/partials/modelDesigner/model_dimensions.html
+++ b/webapp/app/partials/modelDesigner/model_dimensions.html
@@ -76,7 +76,7 @@
ng-model="modelsManager.selectedModel.dimensions[$index].columns" multiple>
<ui-select-match placeholder="Select Column...">{{$item.name}}</ui-select-match>
<ui-select-choices
- repeat="column.name as column in getColumnsByAlias(dimension.table) | filter:$select.search">
+ repeat="column.name as column in getColumnsByAlias(dimension.table) | filter:$select.search|inMeaNotInDim:dimension.table:modelsManager.selectedModel.metrics">
{{column.name}}
</ui-select-choices>
</ui-select>