lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upayav...@apache.org
Subject svn commit: r1690589 - in /lucene/dev/trunk/solr/webapp/web/js/angular: app.js controllers/cloud.js controllers/cores.js controllers/java-properties.js controllers/logging.js controllers/threads.js
Date Mon, 13 Jul 2015 08:54:32 GMT
Author: upayavira
Date: Mon Jul 13 08:54:32 2015
New Revision: 1690589

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

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/cores.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/java-properties.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/logging.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/threads.js

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=1690589&r1=1690588&r2=1690589&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/app.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/app.js Mon Jul 13 08:54:32 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/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=1690589&r1=1690588&r2=1690589&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 Mon Jul 13 08:54:32 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/trunk/solr/webapp/web/js/angular/controllers/cores.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cores.js?rev=1690589&r1=1690588&r2=1690589&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cores.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/cores.js Mon Jul 13 08:54:32 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/trunk/solr/webapp/web/js/angular/controllers/java-properties.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/java-properties.js?rev=1690589&r1=1690588&r2=1690589&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/java-properties.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/java-properties.js Mon Jul 13
08:54:32 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/trunk/solr/webapp/web/js/angular/controllers/logging.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/logging.js?rev=1690589&r1=1690588&r2=1690589&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/logging.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/logging.js Mon Jul 13 08:54:32
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/trunk/solr/webapp/web/js/angular/controllers/threads.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/threads.js?rev=1690589&r1=1690588&r2=1690589&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/threads.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/threads.js Mon Jul 13 08:54:32
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;



Mime
View raw message