You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by up...@apache.org on 2015/09/18 12:22:33 UTC

svn commit: r1703798 - in /lucene/dev/trunk/solr/webapp/web: WEB-INF/web.xml js/angular/app.js js/angular/controllers/query.js js/angular/services.js partials/query.html

Author: upayavira
Date: Fri Sep 18 10:22:33 2015
New Revision: 1703798

URL: http://svn.apache.org/viewvc?rev=1703798&view=rev
Log:
SOLR-7666 - query pane and index.html serving tweaks

Modified:
    lucene/dev/trunk/solr/webapp/web/WEB-INF/web.xml
    lucene/dev/trunk/solr/webapp/web/js/angular/app.js
    lucene/dev/trunk/solr/webapp/web/js/angular/controllers/query.js
    lucene/dev/trunk/solr/webapp/web/js/angular/services.js
    lucene/dev/trunk/solr/webapp/web/partials/query.html

Modified: lucene/dev/trunk/solr/webapp/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/WEB-INF/web.xml?rev=1703798&r1=1703797&r2=1703798&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/WEB-INF/web.xml (original)
+++ lucene/dev/trunk/solr/webapp/web/WEB-INF/web.xml Fri Sep 18 10:22:33 2015
@@ -152,6 +152,11 @@
   </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>
   </servlet-mapping>

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/app.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/app.js?rev=1703798&r1=1703797&r2=1703798&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/app.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/app.js Fri Sep 18 10:22:33 2015
@@ -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'
     $location.url("/" + collection.name + "/collection-overview")
   }
 
+  $scope.$on('$routeChangeStart', function() {
+      $rootScope.exceptions = {};
+  });
 });
 
 

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/query.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/query.js?rev=1703798&r1=1703797&r2=1703798&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/query.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/query.js Fri Sep 18 10:22:33 2015
@@ -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);

Modified: lucene/dev/trunk/solr/webapp/web/js/angular/services.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/services.js?rev=1703798&r1=1703797&r2=1703798&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/services.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/services.js Fri Sep 18 10:22:33 2015
@@ -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]);
                    }

Modified: lucene/dev/trunk/solr/webapp/web/partials/query.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/query.html?rev=1703798&r1=1703797&r2=1703798&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/query.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/query.html Fri Sep 18 10:22:33 2015
@@ -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>