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 2016/12/28 07:30:32 UTC
[1/2] kylin git commit: minor,update model designer
Repository: kylin
Updated Branches:
refs/heads/master 94acbc713 -> 76e321b2d
minor,update model designer
Signed-off-by: zhongjian <ji...@163.com>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/bc1a49ec
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/bc1a49ec
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/bc1a49ec
Branch: refs/heads/master
Commit: bc1a49ec57987cf52d2596ac4d7a439b7596eb0d
Parents: 94acbc7
Author: chenzhx <34...@qq.com>
Authored: Wed Dec 28 11:11:08 2016 +0800
Committer: zhongjian <ji...@163.com>
Committed: Wed Dec 28 15:15:36 2016 +0800
----------------------------------------------------------------------
webapp/app/js/controllers/modelDataModel.js | 5 ++++
webapp/app/js/controllers/modelSchema.js | 29 ++------------------
webapp/app/js/services/tree.js | 20 --------------
webapp/app/partials/cubes/cube_clone.html | 23 ++++------------
.../partials/modelDesigner/model_measures.html | 1 +
webapp/app/partials/models/model_clone.html | 10 ++++---
6 files changed, 20 insertions(+), 68 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/bc1a49ec/webapp/app/js/controllers/modelDataModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/modelDataModel.js b/webapp/app/js/controllers/modelDataModel.js
index 95c42c4..07009a2 100644
--- a/webapp/app/js/controllers/modelDataModel.js
+++ b/webapp/app/js/controllers/modelDataModel.js
@@ -203,12 +203,17 @@ KylinApp.controller('ModelDataModelCtrl', function ($location,$scope, $modal,cub
modelsManager.selectedModel.dimensions.splice(i, 1);
}
}
+ delete $scope.aliasTableMap[lookup.alias];
lookupList.splice(lookupList.indexOf(lookup), 1);
+ $scope.aliasName.splice($scope.aliasName.indexOf(lookup.alias),1);
}
});
}else{
+ delete $scope.aliasTableMap[lookup.alias];
lookupList.splice(lookupList.indexOf(lookup), 1);
+ $scope.aliasName.splice($scope.aliasName.indexOf(lookup.alias),1);
}
+ console.log($scope.aliasName);
};
$scope.changeKey = function(index){
http://git-wip-us.apache.org/repos/asf/kylin/blob/bc1a49ec/webapp/app/js/controllers/modelSchema.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/modelSchema.js b/webapp/app/js/controllers/modelSchema.js
index e309873..f917f1e 100644
--- a/webapp/app/js/controllers/modelSchema.js
+++ b/webapp/app/js/controllers/modelSchema.js
@@ -249,35 +249,10 @@ KylinApp.controller('ModelSchemaCtrl', function ($scope, QueryService, UserServi
* 1.metric can't be null
*/
$scope.check_model_measure = function () {
-
- var errors = [];
- if (!modelsManager.selectedModel.metrics || !modelsManager.selectedModel.metrics.length) {
- errors.push("Please define your metrics.");
- }
- var errorInfo = "";
- angular.forEach(errors, function (item) {
- errorInfo += "\n" + item;
- });
- if (errors.length) {
- SweetAlert.swal('', errorInfo, 'warning');
- return false;
- } else {
- return true;
- }
-
+ return true;
};
$scope.check_model_setting = function () {
- var errors = [];
- var errorInfo = "";
- angular.forEach(errors, function (item) {
- errorInfo += "\n" + item;
- });
- if (errors.length) {
- SweetAlert.swal('', errorInfo, 'warning');
- return false;
- } else {
- return true;
- }
+ return true;
}
http://git-wip-us.apache.org/repos/asf/kylin/blob/bc1a49ec/webapp/app/js/services/tree.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/tree.js b/webapp/app/js/services/tree.js
index 20de19b..921aefe 100755
--- a/webapp/app/js/services/tree.js
+++ b/webapp/app/js/services/tree.js
@@ -72,27 +72,7 @@ KylinApp.service('ModelGraphService', function (VdmUtil) {
}
});
-/* angular.forEach(model.dimensions, function (dimension, index) {
- // for dimension on lookup table
- if(model.fact_table!==dimension.table){
- var lookup = _.find(graphData.children,function(item){
- return item.name === dimension.table;
- });
- angular.forEach(lookup.join.primary_key, function(pk, index){
- for (var i = 0; i < lookup._children.length; i++) {
- if(lookup._children[i].name == pk)
- break;
- }
- if(i == lookup._children.length) {
- lookup._children.push({
- "type": "column",
- "name": pk
- });
- }
- });
- };
- });*/
model.graph.columnsCount = 0;
model.graph.tree = tree;
model.graph.root = graphData;
http://git-wip-us.apache.org/repos/asf/kylin/blob/bc1a49ec/webapp/app/partials/cubes/cube_clone.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubes/cube_clone.html b/webapp/app/partials/cubes/cube_clone.html
index f54bcd3..f5a332c 100644
--- a/webapp/app/partials/cubes/cube_clone.html
+++ b/webapp/app/partials/cubes/cube_clone.html
@@ -20,26 +20,13 @@
<div class="modal-header">
<h4 tooltip="submit">CUBE CLONE</h4>
</div>
- <div class="modal-body" style="background-color: white">
+ <ng-form name="forms.cube_clone_form" novalidate="novalidate" class="modal-body" style="background-color: white">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="row">
<p class="text-info"> Cross project clone is not allowed now, cube will be cloned into current project.</p>
- <!--<div class="form-group">-->
- <!--<b>Target Project is:</b>-->
- <!--<br/>-->
- <!--<select ng-required="projectModel.projects.length" chosen ng-model="targetObj.targetProject"-->
- <!--ng-init="newAccess.permission=permissions.READ.value;"-->
- <!--ng-options="project.name as project.name for project in projectModel.projects "-->
- <!--ng-disabled="true"-->
- <!--style="width: 100% !important;"-->
- <!--data-placeholder="select a project"-->
- <!--class="chosen-select">-->
- <!--<option value=""></option>-->
- <!--</select>-->
- <!--</div>-->
</div>
</div>
<div class="col-md-2"></div>
@@ -51,15 +38,17 @@
<div class="form-group">
<b>New Cube Name:</b>
<br/>
- <input type="text" class="form-control" ng-model="targetObj.cubeName"/>
+ <input type="text" class="form-control" name="cube_name" ng-model="targetObj.cubeName" ng-pattern="/^\w+$/" required />
+ <small class="help-block red" ng-show="forms.cube_clone_form.cube_name.$error.required && (forms.cube_clone_form.cube_name.$dirty||forms.cube_clone_form.$submitted)">Cube name is required.</small>
+ <small class="help-block red" ng-show="!forms.cube_clone_form.cube_name.$error.required&&forms.cube_clone_form.cube_name.$invalid && (forms.cube_clone_form.cube_name.$dirty||forms.cube_clone_form.$submitted)">Cube name is invalid.</small>
</div>
</div>
</div>
<div class="col-md-2"></div>
</div>
- </div>
+ </ng-form>
<div class="modal-footer">
- <button class="btn btn-success" ng-click="cloneCube()">Submit</button>
<button class="btn btn-primary" ng-click="cancel()">Close</button>
+ <button class="btn btn-success" ng-click="cloneCube()" ng-disabled="forms.cube_clone_form.$invalid">Submit</button>
</div>
</script>
http://git-wip-us.apache.org/repos/asf/kylin/blob/bc1a49ec/webapp/app/partials/modelDesigner/model_measures.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/modelDesigner/model_measures.html b/webapp/app/partials/modelDesigner/model_measures.html
index 271c04f..1bb71b5 100644
--- a/webapp/app/partials/modelDesigner/model_measures.html
+++ b/webapp/app/partials/modelDesigner/model_measures.html
@@ -20,6 +20,7 @@
<div ng-controller="ModelMeasuresCtrl">
<ng-form name="forms.model_measure_form" novalidate>
<div class="dataTables_wrapper form-inline no-footer">
+ <b class="col-xs-6" ng-if="state.mode=='view'&&modelsManager.selectedModel.metrics.length==0">No Measures</b>
<table ng-if="state.mode=='view'&&modelsManager.selectedModel.metrics.length > 0" class="table table-striped table-hover">
<thead>
<tr>
http://git-wip-us.apache.org/repos/asf/kylin/blob/bc1a49ec/webapp/app/partials/models/model_clone.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/models/model_clone.html b/webapp/app/partials/models/model_clone.html
index de1b562..484821a 100644
--- a/webapp/app/partials/models/model_clone.html
+++ b/webapp/app/partials/models/model_clone.html
@@ -20,7 +20,7 @@
<div class="modal-header">
<h4 tooltip="submit">MODEL CLONE</h4>
</div>
- <div class="modal-body" style="background-color: white">
+ <ng-form name="forms.model_clone_form" novalidate="novalidate" class="modal-body" style="background-color: white">
<div class="row">
<div class="col-md-2"></div>
@@ -49,15 +49,17 @@
<div class="form-group">
<b>New Model Name:</b>
<br/>
- <input type="text" class="form-control" ng-model="targetObj.modelName"/>
+ <input type="text" name="model_name" class="form-control" ng-model="targetObj.modelName" ng-pattern="/^\w+$/" required />
+ <small class="help-block red" ng-show="forms.model_clone_form.model_name.$error.required && (forms.model_clone_form.model_name.$dirty||forms.model_clone_form.$submitted)">Model name is required.</small>
+ <small class="help-block red" ng-show="!forms.model_clone_form.model_name.$error.required&&forms.model_clone_form.model_name.$invalid && (forms.model_clone_form.model_name.$dirty||forms.model_clone_form.$submitted)">Model name is invalid.</small>
</div>
</div>
</div>
<div class="col-md-2"></div>
</div>
- </div>
+ </ng-form>
<div class="modal-footer">
- <button class="btn btn-success" ng-click="cloneModel()">Submit</button>
<button class="btn btn-primary" ng-click="cancel()">Close</button>
+ <button class="btn btn-success" ng-click="cloneModel()" ng-disabled="forms.model_clone_form.$invalid">Submit</button>
</div>
</script>
[2/2] kylin git commit: minor fix review bug
Posted by zh...@apache.org.
minor fix review bug
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/76e321b2
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/76e321b2
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/76e321b2
Branch: refs/heads/master
Commit: 76e321b2d95955959fe3fac030195bbd321f9659
Parents: bc1a49e
Author: zhongjian <ji...@163.com>
Authored: Wed Dec 28 15:22:02 2016 +0800
Committer: zhongjian <ji...@163.com>
Committed: Wed Dec 28 15:22:02 2016 +0800
----------------------------------------------------------------------
webapp/app/partials/cubes/cube_clone.html | 4 ++--
webapp/app/partials/models/model_clone.html | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/76e321b2/webapp/app/partials/cubes/cube_clone.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubes/cube_clone.html b/webapp/app/partials/cubes/cube_clone.html
index f5a332c..a2d3ad1 100644
--- a/webapp/app/partials/cubes/cube_clone.html
+++ b/webapp/app/partials/cubes/cube_clone.html
@@ -39,8 +39,8 @@
<b>New Cube Name:</b>
<br/>
<input type="text" class="form-control" name="cube_name" ng-model="targetObj.cubeName" ng-pattern="/^\w+$/" required />
- <small class="help-block red" ng-show="forms.cube_clone_form.cube_name.$error.required && (forms.cube_clone_form.cube_name.$dirty||forms.cube_clone_form.$submitted)">Cube name is required.</small>
- <small class="help-block red" ng-show="!forms.cube_clone_form.cube_name.$error.required&&forms.cube_clone_form.cube_name.$invalid && (forms.cube_clone_form.cube_name.$dirty||forms.cube_clone_form.$submitted)">Cube name is invalid.</small>
+ <small class="help-block red" ng-show="forms.cube_clone_form.cube_name.$error.required && (forms.cube_clone_form.cube_name.$dirty)">Cube name is required.</small>
+ <small class="help-block red" ng-show="!forms.cube_clone_form.cube_name.$error.required&&forms.cube_clone_form.cube_name.$invalid && (forms.cube_clone_form.cube_name.$dirty)">Cube name is invalid.</small>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/kylin/blob/76e321b2/webapp/app/partials/models/model_clone.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/models/model_clone.html b/webapp/app/partials/models/model_clone.html
index 484821a..2554633 100644
--- a/webapp/app/partials/models/model_clone.html
+++ b/webapp/app/partials/models/model_clone.html
@@ -50,8 +50,8 @@
<b>New Model Name:</b>
<br/>
<input type="text" name="model_name" class="form-control" ng-model="targetObj.modelName" ng-pattern="/^\w+$/" required />
- <small class="help-block red" ng-show="forms.model_clone_form.model_name.$error.required && (forms.model_clone_form.model_name.$dirty||forms.model_clone_form.$submitted)">Model name is required.</small>
- <small class="help-block red" ng-show="!forms.model_clone_form.model_name.$error.required&&forms.model_clone_form.model_name.$invalid && (forms.model_clone_form.model_name.$dirty||forms.model_clone_form.$submitted)">Model name is invalid.</small>
+ <small class="help-block red" ng-show="forms.model_clone_form.model_name.$error.required && (forms.model_clone_form.model_name.$dirty)">Model name is required.</small>
+ <small class="help-block red" ng-show="!forms.model_clone_form.model_name.$error.required&&forms.model_clone_form.model_name.$invalid && (forms.model_clone_form.model_name.$dirty)">Model name is invalid.</small>
</div>
</div>
</div>