You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "epugh (via GitHub)" <gi...@apache.org> on 2026/07/24 12:13:17 UTC
[PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
epugh opened a new pull request, #4659:
URL: https://github.com/apache/solr/pull/4659
https://issues.apache.org/jira/browse/SOLR-15752
# Description
Start using V2 apis in our solr admin. We need to use them "in anger" if we want to build confidence in them, and to help us move away from v1 equivalents.
# Solution
Work with Claude to do the updates to our javascript from v1 to v2. We don't have tests, so this is all manually tested.
I've chosen the easiest apis first.
# Tests
Sigh. No JS tests. And not ready to even begin that!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3865230957
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
$httpProvider.interceptors.push("httpInterceptor");
// Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header so browser will not pop up login dialogue
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+ // The V2 solrApi client (superagent-based) never goes through $httpProvider, so it needs its own
+ // copy of both headers: X-Requested-With for the same popup-suppression trick, and Authorization
+ // because -- unlike $http, which re-reads sessionStorage per request in httpInterceptor.started
+ // below -- solrApi only gets Authorization set in-memory (AuthenticationService.SetCredentials/
+ // ClearCredentials, login.js), which a page reload wipes; re-seed it here on every app bootstrap.
Review Comment:
I suppose that's exactly the kind of centralized hook I was looking for. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5153107013
Okay, had claude via playwright give this a good testing, and I did a bunch of manual testing. I think it's ready for final review and merging in a few days...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5185606860
> Impressive work - for a UI that is going away :)
>
Well, by getting this migration done, it opens the door to a bunch of v1 apis to "that is going away :)" too! once the CLI is updated and the Admin UI is updated, and the New UI doesn't use V1 apis, we could go ahead and start marking them deprecated!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5153095512
Learning more about our OpenAPI JS client.. it uses "superagent" for http, and that doesn't wire into AngularJS existing `$http` object.. So we lost error handling. However, claude and I have a fix that restores:
<img width="1191" height="223" alt="image" src="https://github.com/user-attachments/assets/2414735e-2b81-4075-b7d4-d4db0a7451fe" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5261044793
I am going to merge this pending any other feedback this week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3848043152
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
$httpProvider.interceptors.push("httpInterceptor");
// Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header so browser will not pop up login dialogue
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+ // The V2 solrApi client (superagent-based) never goes through $httpProvider, so it needs its own
+ // copy of both headers: X-Requested-With for the same popup-suppression trick, and Authorization
+ // because -- unlike $http, which re-reads sessionStorage per request in httpInterceptor.started
+ // below -- solrApi only gets Authorization set in-memory (AuthenticationService.SetCredentials/
+ // ClearCredentials, login.js), which a page reload wipes; re-seed it here on every app bootstrap.
Review Comment:
maybe... But in a week or so (maybe!) we'll be on ApiClient for everything....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3848046917
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
$httpProvider.interceptors.push("httpInterceptor");
// Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header so browser will not pop up login dialogue
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+ // The V2 solrApi client (superagent-based) never goes through $httpProvider, so it needs its own
+ // copy of both headers: X-Requested-With for the same popup-suppression trick, and Authorization
+ // because -- unlike $http, which re-reads sessionStorage per request in httpInterceptor.started
+ // below -- solrApi only gets Authorization set in-memory (AuthenticationService.SetCredentials/
+ // ClearCredentials, login.js), which a page reload wipes; re-seed it here on every app bootstrap.
Review Comment:
i will poke.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3689725950
##########
solr/webapp/web/js/angular/controllers/cores.js:
##########
@@ -67,20 +70,26 @@ solrAdminApp.controller('CoreAdminController',
} else if (false) { //@todo detect whether core exists
$scope.AddMessage = "A core with that name already exists";
} else {
Review Comment:
This branch assigns to `$scope.AddMessage`, but the cores UI template displays `addMessage` (lowercase). As a result, the "core already exists" error won’t be shown.
##########
solr/webapp/web/js/angular/controllers/segments.js:
##########
@@ -17,41 +17,47 @@
var MB_FACTOR = 1024*1024;
-solrAdminApp.controller('SegmentsController', function($scope, $routeParams, $interval, Segments, Constants) {
+solrAdminApp.controller('SegmentsController', function($scope, $routeParams, $interval, $timeout, SegmentsV2, Constants) {
$scope.resetMenu("segments", Constants.IS_CORE_PAGE);
$scope.refresh = function() {
- Segments.get({core: $routeParams.core}, function(data) {
- var segments = data.segments;
+ SegmentsV2.getSegmentData($routeParams.core, {}, function(error, data, response) {
+ if (error) {
+ console.error('Failed to fetch segment data:', error);
+ return;
+ }
+ $timeout(function() {
+ var segments = data.segments;
- var segmentSizeInBytesMax = getLargestSegmentSize(segments);
- $scope.segmentMB = Math.floor(segmentSizeInBytesMax / MB_FACTOR);
- $scope.xaxis = calculateXAxis(segmentSizeInBytesMax);
+ var segmentSizeInBytesMax = getLargestSegmentSize(segments);
+ $scope.segmentMB = Math.floor(segmentSizeInBytesMax / MB_FACTOR);
+ $scope.xaxis = calculateXAxis(segmentSizeInBytesMax);
- $scope.documentCount = 0;
- $scope.deletionCount = 0;
+ $scope.documentCount = 0;
+ $scope.deletionCount = 0;
- $scope.segments = [];
- for (var name in segments) {
- var segment = segments[name];
+ $scope.segments = [];
+ for (var name in segments) {
+ var segment = segments[name];
- var segmentSizeInBytesLog = Math.log(segment.sizeInBytes);
- var segmentSizeInBytesMaxLog = Math.log(segmentSizeInBytesMax);
+ var segmentSizeInBytesLog = Math.log(segment.sizeInBytes);
+ var segmentSizeInBytesMaxLog = Math.log(segmentSizeInBytesMax);
- segment.totalSize = Math.floor((segmentSizeInBytesLog / segmentSizeInBytesMaxLog ) * 100);
+ segment.totalSize = Math.floor((segmentSizeInBytesLog / segmentSizeInBytesMaxLog ) * 100);
- segment.deletedDocSize = Math.floor((segment.delCount / segment.size) * segment.totalSize);
- if (segment.delDocSize <= 0.001) delete segment.deletedDocSize;
+ segment.deletedDocSize = Math.floor((segment.delCount / segment.size) * segment.totalSize);
+ if (segment.delDocSize <= 0.001) delete segment.deletedDocSize;
Review Comment:
`segment.delDocSize` is not defined; this check will never be true (and can yield NaN comparisons). It looks like this should check the newly computed `segment.deletedDocSize` instead.
##########
solr/webapp/web/js/angular/controllers/cloud.js:
##########
@@ -353,43 +353,50 @@ var nodesSubController = function($scope, Collections, System, Metrics, MetricsE
Fetch system info for all selected nodes
Pick the data we want to display and add it to the node-centric data structure
*/
- System.get({"nodes": liveNodesToShow.join(',')}, function (systemResponse) {
- for (var node in systemResponse) {
- if (node in nodes) {
- var s = systemResponse[node];
- nodes[node]['system'] = s;
- var memTotal = s.system.totalPhysicalMemorySize;
- var memFree = s.system.freePhysicalMemorySize;
- var memPercentage = Math.floor((memTotal - memFree) / memTotal * 100);
- nodes[node]['memUsedPct'] = memPercentage;
- nodes[node]['memUsedPctStyle'] = styleForPct(memPercentage);
- nodes[node]['memTotal'] = bytesToSize(memTotal);
- nodes[node]['memFree'] = bytesToSize(memFree);
- nodes[node]['memUsed'] = bytesToSize(memTotal - memFree);
-
- var heapMax = s.jvm.memory.raw.max;
- var heapTotal = s.jvm.memory.raw.total;
- var heapFree = s.jvm.memory.raw.free;
- var heapPercentage = Math.floor((heapTotal - heapFree) / heapMax * 100);
- nodes[node]['heapUsed'] = bytesToSize(heapTotal - heapFree);
- nodes[node]['heapUsedPct'] = heapPercentage;
- nodes[node]['heapUsedPctStyle'] = styleForPct(heapPercentage);
- nodes[node]['heapMax'] = bytesToSize(heapMax);
- nodes[node]['heapTotal'] = bytesToSize(heapTotal);
- nodes[node]['heapFree'] = bytesToSize(heapFree);
-
- var jvmUptime = s.jvm.jmx.upTimeMS / 1000; // Seconds
- nodes[node]['jvmUptime'] = secondsForHumans(jvmUptime);
- nodes[node]['jvmUptimeSec'] = jvmUptime;
-
- nodes[node]['uptime'] = (s.system.uptime || "unknown").replace(/.*up (.*?,.*?),.*/, "$1");
- nodes[node]['loadAvg'] = Math.round(s.system.systemLoadAverage * 100) / 100;
- nodes[node]['cpuPct'] = Math.ceil(s.system.processCpuLoad * 100);
- nodes[node]['cpuPctStyle'] = styleForPct(Math.ceil(s.system.processCpuLoad));
- nodes[node]['maxFileDescriptorCount'] = s.system.maxFileDescriptorCount;
- nodes[node]['openFileDescriptorCount'] = s.system.openFileDescriptorCount;
- }
+ SystemV2.getNodeSystemInfo({"nodes": liveNodesToShow.join(',')}, function (error, data, response) {
+ if (error) {
+ console.error('Failed to fetch node system info:', error);
+ return;
}
+ $timeout(function() {
+ var systemResponse = response.body;
+ for (var node in systemResponse) {
Review Comment:
`getNodeSystemInfo` callbacks elsewhere in the admin UI use the parsed `data` argument. Using `response.body` here is inconsistent and will break if the client doesn’t populate `response.body` (or if it’s a raw string). Prefer using `data`, with a fallback if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3865643293
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
$httpProvider.interceptors.push("httpInterceptor");
// Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header so browser will not pop up login dialogue
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+ // The V2 solrApi client (superagent-based) never goes through $httpProvider, so it needs its own
+ // copy of both headers: X-Requested-With for the same popup-suppression trick, and Authorization
+ // because -- unlike $http, which re-reads sessionStorage per request in httpInterceptor.started
+ // below -- solrApi only gets Authorization set in-memory (AuthenticationService.SetCredentials/
+ // ClearCredentials, login.js), which a page reload wipes; re-seed it here on every app bootstrap.
Review Comment:
yeah... I didn't aboslutely love it, but on the other hand, we're going to get rid of $http ;-). Maybe.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5400806658
@janhoy if you want to give this a looksee? I'm going to merge I think tomorrow. The Admin UI Selenium tests found some weaknesses ;-).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #4659:
URL: https://github.com/apache/solr/pull/4659
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5070341777
Migrated to V2
| Controller | What moved | Notes |
|---|---|---|
| **cores.js** | list/add/unload/rename/swap/reload → `CoresV2` | Full migration |
| **segments.js** | get → plain `$resource` on `/api/cores/:core/segments` | No generated client existed; response shape identical to v1 |
| **threads.js** | get → plain `$resource` on `/api/node/threads` | No generated client (pre-dates OpenAPI v2 framework); same handler as v1 under the hood |
| **index.js** | system info → `SystemV2` | Full migration |
| **app.js** (MainController) | system info fetch in `resetMenu()`, core-list fetch → `SystemV2`, `CoresV2` | Drives nav/sidebar across the whole app |
| **security.js** | system info → `SystemV2` | Ported the 401/403 detection logic to the new callback shape |
| **logging.js** | events, levels → `LoggingV2` | `setLevel` stayed on v1 (see below) |
| **collections.js** | aliases, create/delete alias, create/delete collection, delete shard, create/delete replica, configsets, live-nodes → `AliasesV2`/`ShardsV2`/`ReplicasV2`/`ConfigSetsV2`/`ClusterV2`; `reloadCollection` was already on `CollectionsV2` before this work started | `Collections.status` (CLUSTERSTATUS) stayed on v1 (see below) |
## Still on v1 — deliberately, with a documented reason
| Where | Why |
|---|---|
| `logging.js` `setLevel` | v1's `nodes=all` broadcasts the log-level change to every node in the cluster; the v2 `NodeLoggingApis` endpoint is single-node only until SOLR-16738 wires up proxying for it |
| `cloud.js` `System.get({nodes:...})` (Nodes page) | Found a real bug: v2's multi-node proxying for system info throws a server-side NullPointerException (`GetNodeSystemInfo.remoteNodeData` never initialized) — filed as a standalone JIRA [issue](https://issues.apache.org/jira/browse/SOLR-18318) with a suggested one-line fix |
| `collections.js` `Collections.status` (CLUSTERSTATUS) | No v2 endpoint returns the full collections+shards+replicas topology in one call; only per-collection status exists, which would mean N+1 requests. Your call was to leave this on v1 |
| `plugins.js` | Was migrated to `MetricsV2`, then you asked me to back it out — fully reverted to v1 `Metrics.raw` |
| `cloud.js` (everything else) | `Metrics.get`, `Zookeeper.*` (tree/simple/clusterState/detail) untouched — not in scope of any request so far |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3847919058
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
$httpProvider.interceptors.push("httpInterceptor");
// Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header so browser will not pop up login dialogue
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+ // The V2 solrApi client (superagent-based) never goes through $httpProvider, so it needs its own
+ // copy of both headers: X-Requested-With for the same popup-suppression trick, and Authorization
+ // because -- unlike $http, which re-reads sessionStorage per request in httpInterceptor.started
+ // below -- solrApi only gets Authorization set in-memory (AuthenticationService.SetCredentials/
+ // ClearCredentials, login.js), which a page reload wipes; re-seed it here on every app bootstrap.
Review Comment:
It's a pity we need explicit sync between clients. Is there no way to make a central hook somewhere that copies things from session over to ApiClient before the request is sent?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5120279941
Merging https://github.com/apache/solr/pull/4661 unblocks the move to V2 for cloud.js.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3862823775
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
$httpProvider.interceptors.push("httpInterceptor");
// Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header so browser will not pop up login dialogue
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+ // The V2 solrApi client (superagent-based) never goes through $httpProvider, so it needs its own
+ // copy of both headers: X-Requested-With for the same popup-suppression trick, and Authorization
+ // because -- unlike $http, which re-reads sessionStorage per request in httpInterceptor.started
+ // below -- solrApi only gets Authorization set in-memory (AuthenticationService.SetCredentials/
+ // ClearCredentials, login.js), which a page reload wipes; re-seed it here on every app bootstrap.
Review Comment:
Okay, check out what I added, that wires SuperAgent and $http together a bit more!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15752: Migrate admin UI to v2 apis [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4659:
URL: https://github.com/apache/solr/pull/4659#issuecomment-5069778334
Created https://issues.apache.org/jira/browse/SOLR-18318 to track blocker to finishing this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org