This is an automated email from the ASF dual-hosted git repository.

jbernste pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 1059f2d  SOLR-15890: Add a limit to the Admin SQL panel if one is not 
included in the stmt
1059f2d is described below

commit 1059f2db52d3fa0f71820d6885fd8b012821a895
Author: Joel Bernstein <[email protected]>
AuthorDate: Mon Jan 3 16:14:42 2022 -0500

    SOLR-15890: Add a limit to the Admin SQL panel if one is not included in 
the stmt
---
 solr/webapp/web/js/angular/controllers/sqlquery.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/solr/webapp/web/js/angular/controllers/sqlquery.js 
b/solr/webapp/web/js/angular/controllers/sqlquery.js
index 61183ba..7a6c44a 100644
--- a/solr/webapp/web/js/angular/controllers/sqlquery.js
+++ b/solr/webapp/web/js/angular/controllers/sqlquery.js
@@ -36,7 +36,14 @@ solrAdminApp.controller('SQLQueryController',
       var params = {};
       params.core = $routeParams.core;
       params.handler = $scope.qt;
-      params.stmt = [$scope.stmt]
+
+      var stmt = $scope.stmt
+
+      if(!stmt.toLowerCase().includes(' limit ')) {
+        params.stmt = [stmt + " limit 10"]
+      } else {
+        params.stmt = [$scope.stmt]
+      }
 
       $scope.lang = "json";
       $scope.response = null;

Reply via email to