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/07/13 10:54:52 UTC

svn commit: r1690590 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/webapp/ solr/webapp/web/js/angular/ solr/webapp/web/js/angular/controllers/

Author: upayavira
Date: Mon Jul 13 08:54:51 2015
New Revision: 1690590

URL: http://svn.apache.org/r1690590
Log:
SOLR-7784 Hide core menu when main page is selected

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/webapp/   (props changed)
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cloud.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cores.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/java-properties.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/logging.js
    lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/threads.js

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js?rev=1690590&r1=1690589&r2=1690590&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/app.js Mon Jul 13 08:54:51 2015
@@ -47,7 +47,7 @@ solrAdminApp.config([
         templateUrl: 'partials/cores.html',
         controller: 'CoreAdminController'
       }).
-      when('/~cores/:core', {
+      when('/~cores/:corename', {
         templateUrl: 'partials/cores.html',
         controller: 'CoreAdminController'
       }).
@@ -325,6 +325,7 @@ solrAdminApp.controller('MainController'
     Cores.list(function(data) {
       $scope.cores = [];
       var currentCoreName = $route.current.params.core;
+      delete $scope.currentCore;
       for (key in data.status) {
         var core = data.status[key];
         $scope.cores.push(core);
@@ -339,10 +340,11 @@ solrAdminApp.controller('MainController'
   };
   $scope.refresh();
 
-  $scope.resetMenu = function(page) {
+  $scope.resetMenu = function(page, isMainPage) {
     $scope.showingLogging = page.lastIndexOf("logging", 0) === 0;
     $scope.showingCloud = page.lastIndexOf("cloud", 0) === 0;
     $scope.page = page;
+    if (isMainPage) delete $scope.currentCore;
   };
 
   $scope.ping = function() {

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cloud.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cloud.js?rev=1690590&r1=1690589&r2=1690590&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cloud.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cloud.js Mon Jul 13 08:54:51 2015
@@ -30,13 +30,13 @@ solrAdminApp.controller('CloudController
 
         var view = $location.search().view ? $location.search().view : "graph";
         if (view == "tree") {
-            $scope.resetMenu("cloud-tree");
+            $scope.resetMenu("cloud-tree", true);
             treeSubController($scope, Zookeeper);
         } else if (view == "rgraph") {
-            $scope.resetMenu("cloud-rgraph");
+            $scope.resetMenu("cloud-rgraph", true);
             graphSubController($scope, Zookeeper, true);
         } else if (view == "graph") {
-            $scope.resetMenu("cloud-graph");
+            $scope.resetMenu("cloud-graph", true);
             graphSubController($scope, Zookeeper, false);
         }
     }

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cores.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cores.js?rev=1690590&r1=1690589&r2=1690590&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cores.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/cores.js Mon Jul 13 08:54:51 2015
@@ -19,8 +19,8 @@
 solrAdminApp.controller('CoreAdminController',
   ['$scope', '$routeParams', '$location', '$timeout', 'Cores', 'Update',
     function($scope, $routeParams, $location, $timeout, Cores, Update){
-      $scope.resetMenu("cores");
-      $scope.currentCore = $routeParams.core;
+      $scope.resetMenu("cores", true);
+      $scope.currentCore = $routeParams.corename; // use 'corename' not 'core' to distinguish from /solr/:core/
       $scope.refresh = function() {
         Cores.get(function(data) {
           var coreCount = 0;

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/java-properties.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/java-properties.js?rev=1690590&r1=1690589&r2=1690590&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/java-properties.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/java-properties.js Mon Jul 13 08:54:51 2015
@@ -17,7 +17,7 @@
 
 solrAdminApp.controller('JavaPropertiesController',
   function($scope, Properties){
-    $scope.resetMenu("java-props");
+    $scope.resetMenu("java-props", true);
     $scope.refresh = function() {
       Properties.get(function(data) {
         var sysprops = data["system.properties"];

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/logging.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/logging.js?rev=1690590&r1=1690589&r2=1690590&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/logging.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/logging.js Mon Jul 13 08:54:51 2015
@@ -25,7 +25,7 @@ var format_time_content = function( time
 
 solrAdminApp.controller('LoggingController',
   function($scope, $timeout, $cookies, Logging){
-    $scope.resetMenu("logging");
+    $scope.resetMenu("logging", true);
     $scope.timezone = $cookies.logging_timezone || "Local";
     $scope.refresh = function() {
       Logging.events(function(data) {

Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/threads.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/threads.js?rev=1690590&r1=1690589&r2=1690590&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/threads.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/angular/controllers/threads.js Mon Jul 13 08:54:51 2015
@@ -18,7 +18,7 @@
 solrAdminApp.controller('ThreadsController',
   ["$scope", "Threads",
   function($scope, Threads){
-    $scope.resetMenu("threads");
+    $scope.resetMenu("threads", true);
     $scope.refresh = function() {
       Threads.get(function(data) {
         var threadDump = data.system.threadDump;