Apache Solr open-source search software
SOLR-7784 Hide core menu when main page is selected
Upayavira1958b2f4d946
diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.jsindex a99c000682b..8cac0324216 100644--- a/solr/webapp/web/js/angular/app.js+++ b/solr/webapp/web/js/angular/app.js@@ -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', function($scope, $route, $rootScope, $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', function($scope, $route, $rootScope, $};$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() {diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.jsindex ef8e9c1c31c..e279406bb54 100644--- a/solr/webapp/web/js/angular/controllers/cloud.js+++ b/solr/webapp/web/js/angular/controllers/cloud.js@@ -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);}}diff --git a/solr/webapp/web/js/angular/controllers/cores.js b/solr/webapp/web/js/angular/controllers/cores.jsindex 4be58da7c4a..5473602d15c 100644--- a/solr/webapp/web/js/angular/controllers/cores.js+++ b/solr/webapp/web/js/angular/controllers/cores.js@@ -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;diff --git a/solr/webapp/web/js/angular/controllers/java-properties.js b/solr/webapp/web/js/angular/controllers/java-properties.jsindex 92a2550daf5..88fba879d0e 100644--- a/solr/webapp/web/js/angular/controllers/java-properties.js+++ b/solr/webapp/web/js/angular/controllers/java-properties.js@@ -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"];diff --git a/solr/webapp/web/js/angular/controllers/logging.js b/solr/webapp/web/js/angular/controllers/logging.jsindex de315a301d9..71a2975d864 100644--- a/solr/webapp/web/js/angular/controllers/logging.js+++ b/solr/webapp/web/js/angular/controllers/logging.js@@ -25,7 +25,7 @@ var format_time_content = function( time, timeZone ) {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) {diff --git a/solr/webapp/web/js/angular/controllers/threads.js b/solr/webapp/web/js/angular/controllers/threads.jsindex 45420cc57bb..90fe9ff48af 100644--- a/solr/webapp/web/js/angular/controllers/threads.js+++ b/solr/webapp/web/js/angular/controllers/threads.js@@ -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;