KYLIN-1849 support search cube in web Signed-off-by: Jason <jiat...@163.com>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e7d29566 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e7d29566 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e7d29566 Branch: refs/heads/master Commit: e7d295669e023a4e28ac8ec3c6177f468371feb2 Parents: 3cb0894 Author: kangkaisen <kangkai...@live.com> Authored: Mon Aug 15 23:46:23 2016 +0800 Committer: Jason <jiat...@163.com> Committed: Wed Aug 31 14:39:00 2016 +0800 ---------------------------------------------------------------------- webapp/app/js/controllers/cubes.js | 3 ++- webapp/app/partials/cubes/cubes.html | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/e7d29566/webapp/app/js/controllers/cubes.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js index 19de285..0ea8601 100644 --- a/webapp/app/js/controllers/cubes.js +++ b/webapp/app/js/controllers/cubes.js @@ -35,7 +35,6 @@ KylinApp.controller('CubesCtrl', function ($scope, $q, $routeParams, $location, $scope.loading = false; $scope.action = {}; - $scope.state = { filterAttr: 'create_time', filterReverse: true, reverseColumn: 'create_time', dimensionFilter: '', measureFilter: '' @@ -120,11 +119,13 @@ KylinApp.controller('CubesCtrl', function ($scope, $q, $routeParams, $location, }) $scope.loading = false; + $scope.listParams.cubeName = ''; defer.resolve(resp); return defer.promise; },function(resp){ $scope.loading = false; + $scope.listParams.cubeName = ''; defer.resolve([]); SweetAlert.swal('Oops...', resp, 'error'); return defer.promise; http://git-wip-us.apache.org/repos/asf/kylin/blob/e7d29566/webapp/app/partials/cubes/cubes.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/cubes/cubes.html b/webapp/app/partials/cubes/cubes.html index fceca4c..3f978a2 100644 --- a/webapp/app/partials/cubes/cubes.html +++ b/webapp/app/partials/cubes/cubes.html @@ -25,10 +25,19 @@ <!--Table--> <div ng-if="cubeList.cubes.length > 0" class="dataTables_wrapper no-footer"> <div class="row"> - <div class="col-xs-7"><label class="table-header-text">Cubes</label></div> - <!--button--> - + <div class="col-xs-10"> + <label class="table-header-text">Cubes</label> + </div> + <div class="col-xs-2"> + <form class="" ng-submit="cubeList.removeAll();list(0,3)" style="display: inline" > + <span class="input-icon input-icon-right nav-search"> + <input type="text" placeholder="Search by name" class="nav-search-input" ng-model="listParams.cubeName" /> + <i class="ace-icon fa fa-search blue" ng-click="cubeList.removeAll();list(0,3)"></i> + </span> + </form> + </div> </div> + <table class="table table-striped table-bordered table-hover dataTable no-footer"> <!--Header--> <thead>