You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2024/05/22 20:58:34 UTC
(solr) branch branch_9x updated: Admin UI: fixed node list display bug caused by different hostname with same front part (duplicates PR #2449) (#2475)
This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 92f0dc66110 Admin UI: fixed node list display bug caused by different hostname with same front part (duplicates PR #2449) (#2475)
92f0dc66110 is described below
commit 92f0dc661103afadfa95235eb9384b1be99ee1b5
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Wed May 22 16:58:04 2024 -0400
Admin UI: fixed node list display bug caused by different hostname with same front part (duplicates PR #2449) (#2475)
---------
Co-authored-by: hgdharold <wm...@163.com>
Co-authored-by: Christine Poerschke <cp...@apache.org>
---
solr/CHANGES.txt | 2 ++
solr/webapp/web/js/angular/controllers/cloud.js | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d6cf60cd626..0f0f5d05ba2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -41,6 +41,8 @@ Bug Fixes
* SOLR-17275: SolrJ ZkClientClusterStateProvider, revert SOLR-17153 for perf regression when aliases are used. (Aparna Suresh)
+* PR-2475: Fixed node listing bug in Admin UI when different hostnames start with the same front part. (@hgdharold via Eric Pugh)
+
Dependency Upgrades
---------------------
(No changes)
diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.js
index 75eef23dae5..01e284b2001 100644
--- a/solr/webapp/web/js/angular/controllers/cloud.js
+++ b/solr/webapp/web/js/angular/controllers/cloud.js
@@ -155,7 +155,7 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
$scope.isFirstNodeForHost = function(node) {
var hostName = node.split(":")[0];
var nodesInHost = $scope.filteredNodes.filter(function (node) {
- return node.startsWith(hostName);
+ return node.split(":")[0] === hostName;
});
return nodesInHost[0] === node;
};
@@ -164,7 +164,7 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
$scope.firstLiveNodeForHost = function(key) {
var hostName = key.split(":")[0];
var liveNodesInHost = $scope.filteredNodes.filter(function (key) {
- return key.startsWith(hostName);
+ return key.split(":")[0] === hostName;
}).filter(function (key) {
return $scope.live_nodes.includes(key);
});
@@ -329,7 +329,7 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
hostsToShow.push(hostName);
if (isFiltered) { // Only show the nodes per host matching active filter
nodesToShow = nodesToShow.concat(filteredNodes.filter(function (node) {
- return node.startsWith(hostName);
+ return node.split(":")[0] === hostName;
}));
} else {
nodesToShow = nodesToShow.concat(hosts[hostName]['nodes']);