diff --git a/apps/gto/views/views_main.py b/apps/gto/views/views_main.py index e6d7539..3148083 100644 --- a/apps/gto/views/views_main.py +++ b/apps/gto/views/views_main.py @@ -40,10 +40,13 @@ def update_object(request): try: time_filter = datetime.fromisoformat( time_filter.rstrip('Z')).replace(tzinfo=utc) + time_filter_minus_week = time_filter - timedelta(days=7) latest_times = ( EquipmentTracking.objects - .filter(equipment__block=False, time__lt=time_filter) + .filter(equipment__block=False, + time__gt=time_filter_minus_week, + time__lt=time_filter) .values('equipment_id') .annotate(latest_time=Max('time')) .values_list('equipment_id', 'latest_time') diff --git a/apps/main/templates/main_index.html b/apps/main/templates/main_index.html index 028ebf8..03c22a2 100644 --- a/apps/main/templates/main_index.html +++ b/apps/main/templates/main_index.html @@ -286,7 +286,6 @@ if (globalTimeQuery !== "" && prevTimeQuery === globalTimeQuery) return if (globalTimeQuery !== "") { loading = true - console.log(loaderWrapper.classList.contains("d-none")) if (loaderWrapper.classList.contains("d-none")) { loaderWrapper.classList.remove("d-none") } diff --git a/apps/management/templates/settings.html b/apps/management/templates/settings.html index 7b146c4..2cef7cd 100644 --- a/apps/management/templates/settings.html +++ b/apps/management/templates/settings.html @@ -59,10 +59,8 @@
- Изображения -
-
- Опасные зоны + Опасные + зоны
- Управление загрузкой данных + +
+ +
+
+
+ +
+ +
+
+
+ Управление + загрузкой данных
- Настройка отображения + Настройка + отображения