瀏覽代碼

HUE-8820 [stats] Adding number of queries in past 30 days

Romain 6 年之前
父節點
當前提交
cd48fa139b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      desktop/libs/notebook/src/notebook/models.py

+ 1 - 0
desktop/libs/notebook/src/notebook/models.py

@@ -494,6 +494,7 @@ class Analytics():
     stats.append(('\nAll', ''))
     stats.append(('Active users 30 days', User.objects.filter(last_login__gte=one_month).count()))
     stats.append(('Sessions 30 days', Session.objects.filter(expire_date__gte=one_month).count()))
+    stats.append(('Executed queries 30 days', Document2.objects.filter(last_modified__gte=one_month, is_history=True, type__startswith='query-').count()))
     stats.append(('Active users 90 days', User.objects.filter(last_login__gte=three_months).count()))
 
     return stats