Apache Solr open-source search software
SOLR-7666 - query pane and index.html serving tweaks
Upayavira484f4b600d23
diff --git a/solr/webapp/web/WEB-INF/web.xml b/solr/webapp/web/WEB-INF/web.xmlindex ed3036cd34e..f221fd4f3fa 100644--- a/solr/webapp/web/WEB-INF/web.xml+++ b/solr/webapp/web/WEB-INF/web.xml@@ -151,6 +151,11 @@<url-pattern>/admin.html</url-pattern></servlet-mapping>+ <servlet-mapping>+ <servlet-name>LoadAdminUI</servlet-name>+ <url-pattern>/index.html</url-pattern>+ </servlet-mapping>+<servlet-mapping><servlet-name>SolrRestApi</servlet-name><url-pattern>/schema/*</url-pattern>diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.jsindex 92913c93dab..1797e0dc2f9 100644--- a/solr/webapp/web/js/angular/app.js+++ b/solr/webapp/web/js/angular/app.js@@ -292,7 +292,7 @@ solrAdminApp.config([if (activeRequests == 0) {$rootScope.$broadcast('loadingStatusInactive');}- if (rejection.config.params.doNotIntercept) {+ if (rejection.config.headers.doNotIntercept) {return rejection;}if (rejection.status === 0) {@@ -403,6 +403,9 @@ solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $$location.url("/" + collection.name + "/collection-overview")}+ $scope.$on('$routeChangeStart', function() {+ $rootScope.exceptions = {};+ });});diff --git a/solr/webapp/web/js/angular/controllers/query.js b/solr/webapp/web/js/angular/controllers/query.jsindex 25bc7213492..9911d2bb5ad 100644--- a/solr/webapp/web/js/angular/controllers/query.js+++ b/solr/webapp/web/js/angular/controllers/query.js@@ -20,14 +20,14 @@ solrAdminApp.controller('QueryController',$scope.resetMenu("query", Constants.IS_COLLECTION_PAGE);// @todo read URL parameters into scope- $scope.query = {wt: 'json', q:'*:*', indent:'true'};+ $scope.query = {wt: 'json', q:'*:*', indent:'on'};$scope.filters = [{fq:""}];$scope.dismax = {defType: "dismax"};$scope.edismax = {defType: "edismax", stopwords: true, lowercaseOperators: true};- $scope.hl = {hl:"true"};- $scope.facet = {facet: "true"};+ $scope.hl = {hl:"on"};+ $scope.facet = {facet: "on"};$scope.spatial = {};- $scope.spellcheck = {spellcheck:"true"};+ $scope.spellcheck = {spellcheck:"on"};$scope.qt = "/select";if ($location.search().q) {@@ -75,7 +75,6 @@ solrAdminApp.controller('QueryController',copy(params, $scope.filters[filter]);}- params.doNotIntercept=true;params.core = $routeParams.core;params.handler = qt;var url = Query.url(params);diff --git a/solr/webapp/web/js/angular/services.js b/solr/webapp/web/js/angular/services.jsindex 8c5ef892b25..c410342d1dd 100644--- a/solr/webapp/web/js/angular/services.js+++ b/solr/webapp/web/js/angular/services.js@@ -46,7 +46,7 @@ solrAdminServices.factory('System',"unload": {params:{action: "UNLOAD", core: "@core"}},"rename": {params:{action: "RENAME"}},"swap": {params:{}},- "reload": {method: "GET", params:{action:"RELOAD", core: "@core", doNotIntercept: "true"}},+ "reload": {method: "GET", params:{action:"RELOAD", core: "@core"}, headers:{doNotIntercept: "true"}},"optimize": {params:{}}});}])@@ -160,12 +160,12 @@ solrAdminServices.factory('System',.factory('DataImport',['$resource', function($resource) {return $resource('/solr/:core/dataimport', {core: '@core', indent:'on', wt:'json', _:Date.now()}, {- "config": {params: {command: "show-config", doNotIntercept: "true"},+ "config": {params: {command: "show-config"}, headers: {doNotIntercept: "true"},transformResponse: function(data) {return {config: data};}},- "status": {params: {command: "status", doNotIntercept: "true"}},+ "status": {params: {command: "status"}, headers: {doNotIntercept: "true"}},"reload": {params: {command: "reload-config"}},"post": {method: "POST",headers: {'Content-type': 'application/x-www-form-urlencoded'},@@ -211,15 +211,17 @@ solrAdminServices.factory('System',['$resource', function($resource) {var resource = $resource('/solr/:core:handler', {core: '@core', handler: '@handler', '_':Date.now()}, {"query": {- method: "GET", transformResponse: function (data) {- return {data: data}- }+ method: "GET",+ transformResponse: function (data) {+ return {data: data}+ },+ headers: {doNotIntercept: "true"}}});resource.url = function(params) {var qs = [];for (key in params) {- if (key != "core" && key != "handler" && key != "doNotIntercept") {+ if (key != "core" && key != "handler") {for (var i in params[key]) {qs.push(key + "=" + params[key][i]);}diff --git a/solr/webapp/web/partials/query.html b/solr/webapp/web/partials/query.htmlindex 1ad0b32fb7e..7105d5297ad 100644--- a/solr/webapp/web/partials/query.html+++ b/solr/webapp/web/partials/query.html@@ -87,13 +87,13 @@ limitations under the License.</select><label for="indent" class="checkbox" title="Indent results.">- <input type="checkbox" ng-model="query.indent" name="indent" id="indent" title="Indent results." ng-true-value="'true'" ng-false-value="'false'">- <a rel="help">indent</a>+ <input type="checkbox" ng-model="query.indent" name="indent" id="indent" title="Indent results." ng-true-value="'on'" ng-false-value="''">+ indent</label><label for="debugQuery" class="checkbox" title="Show timing and diagnostics.">- <input type="checkbox" ng-model="query.debugQuery" name="debugQuery" id="debugQuery" title="Show timing and diagnostics." ng-true-value="'true'" ng-false-value="'false'">- <a rel="help">debugQuery</a>+ <input type="checkbox" ng-model="query.debugQuery" name="debugQuery" id="debugQuery" title="Show timing and diagnostics." ng-true-value="'on'" ng-false-value="''">+ debugQuery</label></div>@@ -244,7 +244,7 @@ limitations under the License.<fieldset class="facet optional"><legend><label for="facet" class="checkbox" title="Enable faceting.">- <input type="checkbox" ng-model="isFacet" name="facet" id="facet" value="true">+ <input type="checkbox" ng-model="isFacet" name="facet" id="facet">facet</label></legend>@@ -265,7 +265,7 @@ limitations under the License.<fieldset class="spatial optional"><legend><label for="spatial" class="checkbox" title="Show spatial options">- <input type="checkbox" ng-model="isSpatial" name="spatial" id="spatial" value="true">+ <input type="checkbox" ng-model="isSpatial" name="spatial" id="spatial">spatial</label></legend>@@ -286,7 +286,7 @@ limitations under the License.<fieldset class="spellcheck optional"><legend><label for="spellcheck" class="checkbox" title="Enable spellchecking.">- <input type="checkbox" ng-model="isSpellcheck" name="spellcheck" id="spellcheck" value="true">+ <input type="checkbox" ng-model="isSpellcheck" name="spellcheck" id="spellcheck">spellcheck</label></legend>