SOLR-9584: Use relative URLs also for files and query

This commit is contained in:
Jan Høydahl 2017-02-17 10:45:10 +01:00
parent 7a8c59dd86
commit bd459c1275
5 changed files with 11 additions and 10 deletions

View File

@ -74,9 +74,6 @@ Optimizations
string fields from the FieldCache, resulting in up to 56% better throughput for those cases.
(yonik)
* SOLR-9584: Support Solr being proxied with another endpoint than default /solr, by using relative links
in AdminUI javascripts (Yun Jie Zhou via janhoy)
* SOLR-5944: In-place updates of Numeric DocValues. To leverage this, the _version_ field and the updated
field must both be stored=false, indexed=false, docValues=true. (Ishan Chattopadhyaya, hossman, noble,
shalin, yonik)
@ -175,6 +172,10 @@ Optimizations
* SOLR-9764: All filters that which all documents in the index now share the same memory (DocSet).
(Michael Sun, yonik)
* SOLR-9584: Support Solr being proxied with another endpoint than default /solr, by using relative links
in AdminUI javascripts (Yun Jie Zhou via janhoy)
Other Changes
----------------------
* SOLR-9980: Expose configVersion in core admin status (Jessica Cheng Mallet via Tomás Fernández Löbbe)

View File

@ -25,7 +25,7 @@ solrAdminApp.controller('FilesController',
$scope.file = $location.search().file;
$scope.content = null;
$scope.baseurl = $location.protocol()+ "://" + $location.host() + ":" + $location.port();
$scope.baseurl = $location.absUrl().substr(0,$location.absUrl().indexOf("#")); // Including /solr/ context
$scope.refresh = function () {
@ -81,7 +81,7 @@ solrAdminApp.controller('FilesController',
Files.get({core: $routeParams.core, file: $scope.file, contentType: contentType}, function(data) {
$scope.content = data.data;
$scope.url = $scope.baseurl + data.config.url + "?" + $.param(data.config.params);
$scope.url = data.config.url + "?" + $.param(data.config.params); // relative URL
if (contentType.indexOf("text/plain") && (data.data.indexOf("<?xml")>=0) || data.data.indexOf("<!--")>=0) {
$scope.lang = "xml";
} else {

View File

@ -88,9 +88,9 @@ solrAdminApp.controller('QueryController',
Query.query(params, function(data) {
$scope.lang = $scope.query.wt;
$scope.response = data;
$scope.url = $location.protocol() + "://" +
$location.host() + ":" +
$location.port() + url;
// Use relative URL to make it also work through proxies that may have a different host/port/context
$scope.url = url;
$scope.hostPortContext = $location.absUrl().substr(0,$location.absUrl().indexOf("#")); // For display only
});
};

View File

@ -27,7 +27,7 @@ limitations under the License.
<div class="top clearfix">
<a id="url" class="address-bar" href="{{url}}" ng-show="url">{{url}}</a>
<a id="url" class="address-bar" href="{{url}}" ng-show="url">{{baseurl}}{{url}}</a>
</div>

View File

@ -345,7 +345,7 @@ limitations under the License.
<div id="result">
<a ng-show="response.data" id="url" class="address-bar" ng-href="{{url}}">{{url}}</a>
<a ng-show="response.data" id="url" class="address-bar" ng-href="{{url}}">{{hostPortContext}}{{url}}</a>
<div id="response">
<pre class="syntax language-{{lang}}"><code ng-bind-html="response.data | highlight:lang | unsafe"></code></pre>