incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject git commit: Got the table filtering and sorting working
Date Mon, 18 Nov 2013 04:10:53 GMT
Updated Branches:
  refs/heads/blur-console-v2 d3099d7b7 -> f930739a9


Got the table filtering and sorting working


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/f930739a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/f930739a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/f930739a

Branch: refs/heads/blur-console-v2
Commit: f930739a98c0eaeea37a3b1451a39fac84b15c81
Parents: d3099d7
Author: Chris Rohr <crohr@nearinfinity.com>
Authored: Sun Nov 17 23:10:49 2013 -0500
Committer: Chris Rohr <crohr@nearinfinity.com>
Committed: Sun Nov 17 23:10:49 2013 -0500

----------------------------------------------------------------------
 .../resources/org/apache/blur/console/webapp/js/tables.js    | 8 ++++++++
 .../org/apache/blur/console/webapp/partials/tables.tpl.html  | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f930739a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/tables.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/tables.js
b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/tables.js
index e1451d4..41ed763 100644
--- a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/tables.js
+++ b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/tables.js
@@ -19,6 +19,14 @@ blurApp.controller('TableCtrl', function($scope, $http, $timeout) {
 	$scope.summaryData = {};
 	$scope.testMsg = 'This message';
 
+    $scope.isEnabled = function(item) {
+        return item.enabled;
+    };
+
+    $scope.isDisabled = function(item) {
+        return !item.enabled;
+    };
+
 	(function table_summary_tick() {
         $http.get('/service/tables/summaries').success(function (data) {
             $scope.summaryData = data;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f930739a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/tables.tpl.html
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/tables.tpl.html
b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/tables.tpl.html
index ffc2d30..89689d2 100644
--- a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/tables.tpl.html
+++ b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/tables.tpl.html
@@ -39,7 +39,7 @@ Licensed to the Apache Software Foundation (ASF) under one
 								</tr>
 							</thead>
 							<tbody>
-								<tr ng-repeat="table in summaryData.tables[cluster]">
+								<tr ng-repeat="table in summaryData.tables[cluster] | filter:isEnabled | orderBy:'name'">
 									<td>{{table.name}}</td>
 									<td>{{table.rowCount}}</td>
 									<td>{{table.recordCount}}</td>
@@ -61,7 +61,7 @@ Licensed to the Apache Software Foundation (ASF) under one
 								</tr>
 							</thead>
 							<tbody>
-								<tr ng-repeat="table in summaryData.tables[cluster]">
+								<tr ng-repeat="table in summaryData.tables[cluster] | filter:isDisabled | orderBy:'name'">
 									<td>{{table.name}}</td>
 									<td></td>
 								</tr>


Mime
View raw message