Apache Lucene open-source search software
SOLR-10147: Admin UI -> Cloud -> Graph: Impossible to see shard state
Jan Høydahl516122b31db8
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 7c3a4f1fa1e..9cc13cf0cff 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -177,6 +177,8 @@ Other Changes* SOLR-10357: Enable edismax and standard query parsers to handle the option combinationsow=false / autoGeneratePhraseQueries="true" by setting QueryBuilder.autoGenerateMultiTermSynonymsQuery.+* SOLR-10147: Admin UI -> Cloud -> Graph: Impossible to see shard state (Amrit Sarkar, janhoy)+================== 6.5.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/webapp/web/css/angular/cloud.css b/solr/webapp/web/css/angular/cloud.cssindex 4017c221683..80e53e8137c 100644--- a/solr/webapp/web/css/angular/cloud.css+++ b/solr/webapp/web/css/angular/cloud.css@@ -331,11 +331,13 @@ limitations under the License.{color: #C43C35;stroke: #C43C35;+ font-style: italic;}#content #graph-content .node.recovery_failed text{fill: #C43C35;+ font-style: italic;}#content #cloud #legend .down,@@ -357,11 +359,13 @@ limitations under the License.{color: #d5dd00;stroke: #d5dd00;+ font-style: italic;}#content #graph-content .node.recovering text{fill: #d5dd00;+ font-style: italic;}#content #cloud #legend .active,@@ -394,6 +398,12 @@ limitations under the License.stroke: #c0c0c0;}+#content #cloud #legend .leader,+#content #graph-content .leader text+{+ font-weight: bold;+}+#content #graph-content .node.lvl-0 circle{stroke: #fff;@@ -410,3 +420,17 @@ limitations under the License.padding-top: 15px;padding-bottom: 15px;}++#content #cloud #legend .shard-inactive,+#content #cloud #legend .shard-inactive li,+#content #cloud #legend .shard-inactive li text,+#content #graph-content .shard-inactive text+{+ text-decoration: line-through;+}+#content #cloud #legend .shard-inactive circle,+#content #graph-content .shard-inactive circle,+#content #graph-content .link.shard-inactive+{+ stroke: #e9e9e9;+}\ No newline at end of filediff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.jsindex 2d0dae0860b..aeaf5d3d89a 100644--- a/solr/webapp/web/js/angular/controllers/cloud.js+++ b/solr/webapp/web/js/angular/controllers/cloud.js@@ -139,6 +139,8 @@ var graphSubController = function ($scope, Zookeeper, isRadial) {for (var c in state) {var shards = [];for (var s in state[c].shards) {+ var shard_status = state[c].shards[s].state;+ shard_status = shard_status == 'inactive' ? 'shard-inactive' : shard_status;var nodes = [];for (var n in state[c].shards[s].replicas) {leaf_count++;@@ -160,17 +162,19 @@ var graphSubController = function ($scope, Zookeeper, isRadial) {$scope.helperData.port.push(uri_parts.port);$scope.helperData.pathname.push(uri_parts.pathname);- var status = replica.state;+ var replica_status = replica.state;if (!live_nodes[replica.node_name]) {- status = 'gone';+ replica_status = 'gone';+ } else if(shard_status=='shard-inactive') {+ replica_status += ' ' + shard_status;}var node = {name: uri,data: {type: 'node',- state: status,+ state: replica_status,leader: 'true' === replica.leader,uri: uri_parts}@@ -179,9 +183,10 @@ var graphSubController = function ($scope, Zookeeper, isRadial) {}var shard = {- name: s,+ name: shard_status == "shard-inactive" ? s + ' (inactive)' : s,data: {- type: 'shard'+ type: 'shard',+ state: shard_status},children: nodes};@@ -280,7 +285,9 @@ solrAdminApp.directive('graph', function(Constants) {}if (d.data && d.data.state) {- classes.push(d.data.state);+ if(!(d.data.type=='shard' && d.data.state=='active')){+ classes.push(d.data.state);+ }}return classes.join(' ');diff --git a/solr/webapp/web/partials/cloud.html b/solr/webapp/web/partials/cloud.htmlindex 415e123e73d..ea1c6a0d670 100644--- a/solr/webapp/web/partials/cloud.html+++ b/solr/webapp/web/partials/cloud.html@@ -59,6 +59,7 @@ limitations under the License.<li class="recovering"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Recovering</li><li class="down"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Down</li><li class="recovery_failed"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Recovery Failed</li>+ <li class="shard-inactive"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Inactive</li><li class="gone"><svg width="15" height="15"><g transform="translate(5,2)"><g transform="translate(0,5)"><circle r="4.5"></circle></g></g></svg> Gone</li></ul></div>