Apache Solr open-source search software
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 Erickson9ff5eb30af84
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex bc9ff2f33a4..83b0adf5b54 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.jsindex 0d49df2db93..296c75dd7bf 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;}