Browse Source

HUE-2451 [dashboard] Make top terms limit parameterizable

Romain Rigaux 8 years ago
parent
commit
ee917a5681
1 changed files with 2 additions and 2 deletions
  1. 2 2
      desktop/libs/dashboard/src/dashboard/api.py

+ 2 - 2
desktop/libs/dashboard/src/dashboard/api.py

@@ -243,12 +243,12 @@ def get_terms(request):
   try:
   try:
     collection = json.loads(request.POST.get('collection', '{}'))
     collection = json.loads(request.POST.get('collection', '{}'))
     analysis = json.loads(request.POST.get('analysis', '{}'))
     analysis = json.loads(request.POST.get('analysis', '{}'))
+    limit = json.loads(request.POST.get('limit', '25'))
 
 
     field = analysis['name']
     field = analysis['name']
     properties = {
     properties = {
-      'terms.limit': 25,
+      'terms.limit': limit,
       # lower
       # lower
-      # limit
       # mincount
       # mincount
       # maxcount
       # maxcount
     }
     }