DEV: Database backed admin notices (#26192)

This PR introduces a basic AdminNotice model to store these notices. Admin notices are categorized by their source/type (currently only notices from problem check.) They also have a priority.
This commit is contained in:
Ted Johansson
2024-05-23 09:29:08 +08:00
committed by GitHub
parent 7e8e803785
commit 3137e60653
55 changed files with 512 additions and 264 deletions

View File

@ -26,7 +26,9 @@ class Admin::DashboardController < Admin::StaffController
end
def problems
render_json_dump(problems: AdminDashboardData.fetch_problems(check_force_https: request.ssl?))
ProblemCheck.realtime.run_all
render json: { problems: serialize_data(AdminNotice.problem.all, AdminNoticeSerializer) }
end
def new_features