You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by up...@apache.org on 2015/10/23 11:08:04 UTC

svn commit: r1710150 - in /lucene/dev/trunk/solr/webapp/web: js/angular/app.js js/angular/controllers/cloud.js js/angular/controllers/collection-overview.js js/angular/controllers/collections.js partials/collection_overview.html partials/collections.html

Author: upayavira
Date: Fri Oct 23 09:08:04 2015
New Revision: 1710150

URL: http://svn.apache.org/viewvc?rev=1710150&view=rev
Log:
SOLR-8157 Make links between nodes work correctly

Modified:
    lucene/dev/trunk/solr/webapp/web/js/angular/app.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cloud.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collection-overview.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collections.js
    lucene/dev/trunk/solr/webapp/web/partials/collection_overview.html
    lucene/dev/trunk/solr/webapp/web/partials/collections.html

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/app.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/app.js?rev=1710150&r1=1710149&r2=1710150&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/app.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/app.js Fri Oct 23 09:08:04 2015
@@ -136,7 +136,8 @@ solrAdminApp.config([
 .constant('Constants', {
   IS_ROOT_PAGE: 1,
   IS_CORE_PAGE: 2,
-  IS_COLLECTION_PAGE: 3
+  IS_COLLECTION_PAGE: 3,
+  ROOT_URL: "/index.html"
 })
 .filter('highlight', function($sce) {
   return function(input, lang) {

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cloud.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cloud.js?rev=1710150&r1=1710149&r2=1710150&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cloud.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cloud.js Fri Oct 23 09:08:04 2015
@@ -241,7 +241,7 @@ var graphSubController = function ($scop
     $scope.initGraph();
 };
 
-solrAdminApp.directive('graph', function() {
+solrAdminApp.directive('graph', function(Constants) {
     return {
         restrict: 'EA',
         scope: {
@@ -360,11 +360,11 @@ solrAdminApp.directive('graph', function
                         return 0 === d.depth ? 'end' : 'start';
                     })
                     .attr('data-href', function (d) {
-                        return d.name;
+                        return d.name + Constants.ROOT_URL + "#/~cloud";
                     })
                     .text(helper_node_text)
                     .on('click', function(d,i) {
-                        location.href = d.name;
+                        location.href = d.name+Constants.ROOT_URL+"#/~cloud";
                     });
             };
 
@@ -422,7 +422,7 @@ solrAdminApp.directive('graph', function
                     })
                     .text(helper_node_text)
                     .on('click', function(d,i) {
-                        location.href = d.name;
+                        location.href = d.name+Constants.ROOT_URL+"#/~cloud";
                     });
             }
         }

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collection-overview.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collection-overview.js?rev=1710150&r1=1710149&r2=1710150&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collection-overview.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collection-overview.js Fri Oct 23 09:08:04 2015
@@ -23,6 +23,7 @@ function($scope, $routeParams, Collectio
     Collections.status({}, function(data) {
       $scope.selectedCollection = data.cluster.collections[$routeParams.core];
       $scope.selectedCollection.name = $routeParams.core;
+      $scope.rootUrl = Constants.ROOT_URL;
     });
   };
 

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collections.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collections.js?rev=1710150&r1=1710149&r2=1710150&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collections.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/collections.js Fri Oct 23 09:08:04 2015
@@ -22,6 +22,8 @@ solrAdminApp.controller('CollectionsCont
 
       $scope.refresh = function() {
 
+          $scope.rootUrl = Constants.ROOT_URL + "#/~collections/" + $routeParams.collection;
+
           Collections.status(function (data) {
               $scope.collections = [];
               for (var name in data.cluster.collections) {

Modified: lucene/dev/trunk/solr/webapp/web/partials/collection_overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/collection_overview.html?rev=1710150&r1=1710149&r2=1710150&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/collection_overview.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/collection_overview.html Fri Oct 23 09:08:04 2015
@@ -67,7 +67,7 @@ limitations under the License.
                 <a ng-click="showReplica(replica)"><h3>{{replica.core}}</h3></a>
                 <dl ng-show="replica.show">
                   <dt>Base URL: </dt><dd>{{replica.base_url}}</dd>
-                  <dt>Core: </dt><dd><a href="{{replica.base_url}}/{{replica.core}}">{{replica.core}}</a></dd>
+                  <dt>Core: </dt><dd><a href="{{replica.base_url}}{{rootUrl}}#/{{replica.core}}">{{replica.core}}</a></dd>
                   <dt>Active: </dt>
                     <dd class="ico value" ng-class="replica.state == 'active' ? 'ico-1' : 'ico-0'"><span>yes</span></dd>
                   <dt>Leader: </dt>

Modified: lucene/dev/trunk/solr/webapp/web/partials/collections.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/collections.html?rev=1710150&r1=1710149&r2=1710150&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/collections.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/collections.html Fri Oct 23 09:08:04 2015
@@ -267,7 +267,7 @@ limitations under the License.
                                 <li>
                                     <dl class="clearfix">
                                         <dt><span>base URL:</span></dt>
-                                        <dd><a ng-href="{{replica.base_url}}">{{replica.base_url}}</a></dd>
+                                        <dd><a ng-href="{{replica.base_url}}{{rootUrl}}">{{replica.base_url}}</a></dd>
                                     </dl>
                                 </li>