SOLR-7666 - query pane and index.html serving tweaks

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1703798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Upayavira 2015-09-18 10:22:33 +00:00
parent f04d8a9025
commit 484f4b600d
5 changed files with 29 additions and 20 deletions

View File

@ -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>

View File

@ -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 = {};
});
});

View File

@ -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);

View File

@ -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]);
}

View File

@ -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>