incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [1/3] Cleaned up some code
Date Sat, 12 Oct 2013 18:05:46 GMT
Updated Branches:
  refs/heads/blur-console-v2 1676142c1 -> 79df6ba8c


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79df6ba8/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
index a46824c..f7e361d 100644
--- a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
+++ b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/js/dashboard.js
@@ -19,19 +19,27 @@ blurApp.controller('DashboardCtrl', function($scope, $http, $timeout)
{
 	$scope.chartOptions = {
 		animation: false	
 	};
-    $scope.controllerData = [];
-    $scope.clusters = [];
 
-    (function controller_tick() {
-        $http.get('/service/dashboard/controllers/status').success(function (data) {
-            $scope.controllerData = data;
-            $timeout(controller_tick, 10000);
+    $scope.nodeData = {};
+    $scope.tableData = {};
+
+    (function node_tick() {
+        $http.get('/service/dashboard/node/status').success(function (data) {
+            $scope.nodeData = data;
+            $timeout(node_tick, 10000);
+        }).error(function(){
+            console.log("Unable to update nodes");
+            $timeout(node_tick, 10000);
         });
     })();
-    (function cluster_tick() {
-    	$http.get('/service/dashboard/clusters/status').success(function (data) {
-    		$scope.clusters = data;
-    		$timeout(cluster_tick, 10000);
-    	});
+
+    (function table_tick() {
+        $http.get('/service/dashboard/table/status').success(function (data) {
+            $scope.tableData = data;
+            $timeout(table_tick, 10000);
+        }).error(function(){
+            console.log("Unable to update tables");
+            $timeout(table_tick, 10000);
+        });
     })();
 })
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79df6ba8/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/dashboard.tpl.html
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/dashboard.tpl.html
b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/dashboard.tpl.html
new file mode 100644
index 0000000..ee033b8
--- /dev/null
+++ b/contrib/blur-console/src/main/resources/org/apache/blur/console/webapp/partials/dashboard.tpl.html
@@ -0,0 +1,44 @@
+<div ng-controller="DashboardCtrl">
+    <div id="slow-query-warnings" class="alert alert-danger hidden">Warning</div>
+    <div class="row">
+        <div class="col-md-8">
+            <div class="row">
+                <div class="col-md-6 center">
+                    <h4>Zookeepers</h4>
+                    <canvas doughnutchart data="nodeData.zookeepers.chart" width="100"
height="100" options="chartOptions"></canvas>
+                </div>
+                <div class="col-md-6 center">
+                    <h4>Controllers</h4>
+                    <canvas doughnutchart data="nodeData.controllers.chart" width="100"
height="100" options="chartOptions"></canvas>
+                </div>
+            </div>
+            <div class="row">
+                <div class="col-md-12">
+                    <h4>Queries By Cluster</h4>
+                </div>
+            </div>
+            <div class="row">
+                <div class="col-md-12">
+                    <h4>Query Performance By Cluster</h4>
+                </div>
+            </div>
+        </div>
+        <div class="col-md-4">
+            <div class="row">
+                <div class="col-md-12 center">
+                    <h4>Shards</h4>
+                    <div ng-repeat="cluster in nodeData.clusters" style="text-align:center">
+                        <h5>{{cluster.name}}</h5>
+                        <canvas doughnutchart data="cluster.chart" width="100" height="100"
options="chartOptions"></canvas>
+                    </div>
+                </div>
+            </div>
+            <div class="row">
+                <div class="col-md-12 center">
+                    <h4>Tables</h4>
+                    <canvas barchart data="tableData.chart" width="100" height="100" options="chartOptions"></canvas>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
\ No newline at end of file


Mime
View raw message