Skip to content

Commit

Permalink
UX: Improve rough edges of AI usage page (#1014)
Browse files Browse the repository at this point in the history
* UX: Improve rough edges of AI usage page

* Ensure all text uses I18n
* Change from <button> usage to <DButton>
* Use <AdminConfigAreaCard> in place of custom card styles
* Format numbers nicely using our number format helper,
  show full values on hover using title attr
* Ensure 0 is always shown for counters, instead of being blank

* FEATURE: Load usage data after page load

Use ConditionalLoadingSpinner to hide load of usage
data, this prevents us hanging on page load with a white
screen.

* UX: Split users table, and add empty placeholders and page subheader

* DEV: Test fix
  • Loading branch information
martin-brennan authored Dec 11, 2024
1 parent a4440c5 commit ae80494
Show file tree
Hide file tree
Showing 7 changed files with 391 additions and 245 deletions.
3 changes: 3 additions & 0 deletions app/controllers/discourse_ai/admin/ai_usage_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ class AiUsageController < ::Admin::AdminController
requires_plugin "discourse-ai"

def show
end

def report
render json: AiUsageSerializer.new(create_report, root: false)
end

Expand Down
Loading

0 comments on commit ae80494

Please sign in to comment.