You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2019/05/15 18:35:40 UTC

[lucene-solr] branch master updated: SOLR-11558: It would be nice if the Graph section of the Cloud tab in the Admin UI could give some more information about the replicas of a collection

This is an automated email from the ASF dual-hosted git repository.

erick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ff5eb3  SOLR-11558: It would be nice if the Graph section of the Cloud tab in the Admin UI could give some more information about the replicas of a collection
9ff5eb3 is described below

commit 9ff5eb30af846f2396230606bcffe2862ca7f528
Author: Erick Erickson <Er...@gmail.com>
AuthorDate: Wed May 15 11:35:18 2019 -0700

    SOLR-11558: It would be nice if the Graph section of the Cloud tab in the Admin UI could give some more information about the replicas of a collection
---
 solr/CHANGES.txt                                |  3 ++
 solr/webapp/web/js/angular/controllers/cloud.js | 59 +++++++++++++++++++------
 2 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index bc9ff2f..83b0adf 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -85,6 +85,9 @@ New Features
 
 * SOLR-13440: Support saving/restoring autoscaling state for repeatable simulations. (ab)
 
+* SOLR-11558: It would be nice if the Graph section of the Cloud tab in the Admin UI could give some more
+  information about the replicas of a collection (Erick Erickson)
+
 Other Changes
 ----------------------
 
diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.js
index 0d49df2..296c75d 100644
--- a/solr/webapp/web/js/angular/controllers/cloud.js
+++ b/solr/webapp/web/js/angular/controllers/cloud.js
@@ -731,7 +731,9 @@ var graphSubController = function ($scope, Zookeeper) {
                                 name: shard_status == "shard-inactive" ? s + ' (inactive)' : s,
                                 data: {
                                     type: 'shard',
-                                    state: shard_status
+                                    state: shard_status,
+                                    range: state[c].shards[s].range
+
                                 },
                                 children: nodes
                             };
@@ -741,13 +743,20 @@ var graphSubController = function ($scope, Zookeeper) {
                         var collection = {
                             name: c,
                             data: {
-                                type: 'collection'
+                                type: 'collection',
+                                pullReplicas: state[c].pullReplicas,
+                                replicationFactor: state[c].replicationFactor,
+                                router: state[c].router.name,
+                                maxShardsPerNode: state[c].maxShardsPerNode,
+                                autoAddReplicas: state[c].autoAddReplicas,
+                                nrtReplicas: state[c].nrtReplicas,
+                                tlogReplicas: state[c].tlogReplicas,
+                                numShards: shards.length
                             },
                             children: shards
                         };
                         graph_data.children.push(collection);
                     }
-
                     $scope.helperData.protocol = $.unique($scope.helperData.protocol);
                     $scope.helperData.host = $.unique($scope.helperData.host);
                     $scope.helperData.hostname = $.unique($scope.helperData.hostname);
@@ -844,21 +853,44 @@ solrAdminApp.directive('graph', function(Constants) {
             };
 
             var helper_tooltip_text = function (d) {
-                if (!d.data || !d.data.uri) {
-                    return tooltip;
+                if (!d.data) {
+                  return tooltip;
                 }
+                var tooltip;
 
-                var tooltip = d.data.uri.core_node + " {<br/>";
-
-                if (0 !== scope.helperData.core.length) {
-                    tooltip += "core: [" + d.data.uri.core + "],<br/>";
+                if (! d.data.type) {
+                  return tooltip;
                 }
 
-                if (0 !== scope.helperData.node_name.length) {
-                    tooltip += "node_name: [" + d.data.uri.node_name + "],<br/>";
-                }
 
-                tooltip += "}";
+                if (d.data.type == 'collection') {
+                  tooltip = d.name + " {<br/> ";
+                  tooltip += "numShards: [" + d.data.numShards + "],<br/>";
+                  tooltip += "maxShardsPerNode: [" + d.data.maxShardsPerNode + "],<br/>";
+                  tooltip += "router: [" + d.data.router + "],<br/>";
+                  tooltip += "autoAddReplicas: [" + d.data.autoAddReplicas + "],<br/>";
+                  tooltip += "replicationFactor: [" + d.data.replicationFactor + "],<br/>";
+                  tooltip += "nrtReplicas: [" + d.data.nrtReplicas + "],<br/>";
+                  tooltip += "pullReplicas: [" + d.data.pullReplicas + "],<br/>";
+                  tooltip += "tlogReplicas: [" + d.data.tlogReplicas + "],<br/>";
+                  tooltip += "}";
+                } else if (d.data.type == 'shard') {
+                  tooltip = d.name + " {<br/> ";
+                  tooltip += "range: [" + d.data.range + "],<br/>";
+                  tooltip += "state: [" + d.data.state + "],<br/>";
+                  tooltip += "}";
+                } else if (d.data.type == 'node') {
+                  tooltip = d.data.uri.core_node + " {<br/>";
+
+                  if (0 !== scope.helperData.core.length) {
+                      tooltip += "core: [" + d.data.uri.core + "],<br/>";
+                  }
+
+                  if (0 !== scope.helperData.node_name.length) {
+                      tooltip += "node_name: [" + d.data.uri.node_name + "],<br/>";
+                  }
+                  tooltip += "}";
+                }
 
                 return tooltip;
             };
@@ -869,7 +901,6 @@ solrAdminApp.directive('graph', function(Constants) {
                 }
 
                 var name = d.data.uri.hostname;
-
                 if (1 !== scope.helperData.protocol.length) {
                     name = d.data.uri.protocol + '//' + name;
                 }