You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2017/03/29 09:34:08 UTC

lucene-solr:branch_6x: SOLR-10147: Admin UI -> Cloud -> Graph: Impossible to see shard state

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 40a9568d5 -> bb5454c4a


SOLR-10147: Admin UI -> Cloud -> Graph: Impossible to see shard state

(cherry picked from commit a6f27d3)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/bb5454c4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/bb5454c4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/bb5454c4

Branch: refs/heads/branch_6x
Commit: bb5454c4a945eafb9f795fd501c6d5932916d8c0
Parents: 40a9568
Author: Jan H�ydahl <ja...@apache.org>
Authored: Wed Mar 29 10:51:34 2017 +0200
Committer: Jan H�ydahl <ja...@apache.org>
Committed: Wed Mar 29 11:24:14 2017 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  2 ++
 solr/webapp/web/css/angular/cloud.css           | 24 ++++++++++++++++++++
 solr/webapp/web/js/angular/controllers/cloud.js | 19 +++++++++++-----
 solr/webapp/web/partials/cloud.html             |  1 +
 4 files changed, 40 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bb5454c4/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 2794645..fe871af 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -96,6 +96,8 @@ Other Changes
 * SOLR-10357: Enable edismax and standard query parsers to handle the option combination 
   sow=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.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bb5454c4/solr/webapp/web/css/angular/cloud.css
----------------------------------------------------------------------
diff --git a/solr/webapp/web/css/angular/cloud.css b/solr/webapp/web/css/angular/cloud.css
index 4017c22..80e53e8 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 file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bb5454c4/solr/webapp/web/js/angular/controllers/cloud.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.js
index 2d0dae0..aeaf5d3 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(' ');

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bb5454c4/solr/webapp/web/partials/cloud.html
----------------------------------------------------------------------
diff --git a/solr/webapp/web/partials/cloud.html b/solr/webapp/web/partials/cloud.html
index 415e123..ea1c6a0 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>