Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

New interface design and some small changes. #229

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions dj_backend_server/dj_backend_server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'web.utils.context_processors.app_url',
],
'libraries':{
'time_difference': 'web.template_filters.time_difference'
Expand Down
22 changes: 22 additions & 0 deletions dj_backend_server/web/interfaces/dashboard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from django.db.models import Count
from django.db.models.functions import TruncDay
from web.models.chat_histories import ChatHistory


def get_discussion_counts():
# Aggregate discussion counts per day grouped by session_id
discussion_counts = (
ChatHistory.objects
.values('session_id')
.annotate(created_date=TruncDay('created_at'))
.values('created_date')
.annotate(discussion_count=Count('id'))
.order_by('created_date')
)
formatted_counts = [
{'year': count['created_date'].strftime('%b %d'), 'value': count['discussion_count']}
for count in discussion_counts
]
return formatted_counts


Binary file modified dj_backend_server/web/static/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dj_backend_server/web/static/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dj_backend_server/web/static/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading