This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit a3ff1e362635321ab58c783089fef60e90ec95fe
Author: Nick <[email protected]>
AuthorDate: Mon Oct 5 08:58:58 2026 -0600

    SOLR-18317: Admin UI no longer sends nodes=all in standalone mode (#5001)
    
    Co-authored-by: Eric Pugh <[email protected]>
    Adapted for branch_9x: applied to the v1 Admin UI services; the Selenium 
test is
    omitted since its test base class is not on 9.x.
    
    (cherry picked from commit e432df19c4a50b9d54d7fba545397b859cc54f98)
    (cherry picked from commit ca0ad8281f6ddd4d1943a0028487f0bd287144f6)
---
 changelog/unreleased/SOLR-18317.yml               |  7 +++++++
 solr/webapp/web/js/angular/app.js                 |  5 +++++
 solr/webapp/web/js/angular/controllers/logging.js | 25 ++++++++++++++++++++---
 solr/webapp/web/js/angular/services.js            |  4 +++-
 4 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/changelog/unreleased/SOLR-18317.yml 
b/changelog/unreleased/SOLR-18317.yml
new file mode 100644
index 00000000000..03d74711b8e
--- /dev/null
+++ b/changelog/unreleased/SOLR-18317.yml
@@ -0,0 +1,7 @@
+title: Admin UI no longer sends nodes=all in standalone mode.
+type: fixed
+authors:
+  - name: Nick Shanin
+links:
+  - name: SOLR-18317
+    url: https://issues.apache.org/jira/browse/SOLR-18317
diff --git a/solr/webapp/web/js/angular/app.js 
b/solr/webapp/web/js/angular/app.js
index c8176396dd3..1483a6607e1 100644
--- a/solr/webapp/web/js/angular/app.js
+++ b/solr/webapp/web/js/angular/app.js
@@ -593,6 +593,11 @@ solrAdminApp.controller('MainController', function($scope, 
$route, $rootScope, $
           $scope.environment_color = data.environment_color;
         }
       }
+    }, function() {
+      // The mode could not be determined. Treat the node as standalone so that
+      // pages waiting for isCloudEnabled to settle (e.g. the logging page) 
fall
+      // back to local-only behavior instead of waiting forever.
+      $scope.isCloudEnabled = false;
     });
 
     $scope.showingLogging = page.lastIndexOf("logging", 0) === 0;
diff --git a/solr/webapp/web/js/angular/controllers/logging.js 
b/solr/webapp/web/js/angular/controllers/logging.js
index 6b38afe06ce..5981429b17c 100644
--- a/solr/webapp/web/js/angular/controllers/logging.js
+++ b/solr/webapp/web/js/angular/controllers/logging.js
@@ -155,9 +155,28 @@ solrAdminApp.controller('LoggingController',
       }
       var setString = logger.name + ":" + newLevel;
       logger.showOptions = false;
-      Logging.setLevel({set: setString}, function(data) {
-        $scope.refresh();
-      });
+      var doSetLevel = function() {
+        var params = {set: setString};
+        // "nodes=all" only makes sense in SolrCloud mode; in standalone 
(user-managed) mode the
+        // request is handled locally, so the param is omitted entirely.
+        if ($scope.isCloudEnabled) {
+          params.nodes = "all";
+        }
+        Logging.setLevel(params, function(data) {
+          $scope.refresh();
+        });
+      };
+      // isCloudEnabled populates asynchronously via resetMenu(), so wait for 
it to settle
+      // before deciding whether to broadcast.
+      if ($scope.isCloudEnabled === undefined) {
+        var unwatchCloudEnabled = $scope.$watch('isCloudEnabled', 
function(value) {
+          if (value === undefined) return;
+          unwatchCloudEnabled();
+          doSetLevel();
+        });
+      } else {
+        doSetLevel();
+      }
     };
 
     $scope.refresh();
diff --git a/solr/webapp/web/js/angular/services.js 
b/solr/webapp/web/js/angular/services.js
index 0a2f5d95266..e988d7507cb 100644
--- a/solr/webapp/web/js/angular/services.js
+++ b/solr/webapp/web/js/angular/services.js
@@ -69,10 +69,12 @@ solrAdminServices.factory('System',
   }])
 .factory('Logging',
   ['$resource', function($resource) {
+    // "setLevel" needs the "nodes=all" broadcast only in SolrCloud mode; the 
caller passes
+    // nodes:'all' when SolrCloud is enabled, and omits it in standalone mode.
     return $resource('admin/info/logging', {'wt':'json', '_':Date.now()}, {
       "events": {params: {since:'0'}},
       "levels": {},
-      "setLevel": {params: {nodes:'all'}}
+      "setLevel": {}
       });
   }])
 .factory('Zookeeper',

Reply via email to