Explorar el Código

HUE-2451 [dashboard] Make top terms limit parameterizable

Romain Rigaux hace 8 años
padre
commit
ee917a5
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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:
     collection = json.loads(request.POST.get('collection', '{}'))
     analysis = json.loads(request.POST.get('analysis', '{}'))
+    limit = json.loads(request.POST.get('limit', '25'))
 
     field = analysis['name']
     properties = {
-      'terms.limit': 25,
+      'terms.limit': limit,
       # lower
-      # limit
       # mincount
       # maxcount
     }