From c152f482025ce88863dd511fe38865fecb4e57b9 Mon Sep 17 00:00:00 2001 From: qinmingyuan Date: Mon, 23 Sep 2024 18:03:54 +0800 Subject: [PATCH] suppot desc --- app/controllers/job/panel/jobs_controller.rb | 2 +- app/views/job/panel/jobs/_index/_index_thead.html.erb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/job/panel/jobs_controller.rb b/app/controllers/job/panel/jobs_controller.rb index ec34550d..57141390 100644 --- a/app/controllers/job/panel/jobs_controller.rb +++ b/app/controllers/job/panel/jobs_controller.rb @@ -102,7 +102,7 @@ def set_class_names def q_params q = { queue_name: params[:queue_id] } - q.merge! params.permit(:class_name) + q.merge! params.permit(:class_name, 'finished_at-desc') q end diff --git a/app/views/job/panel/jobs/_index/_index_thead.html.erb b/app/views/job/panel/jobs/_index/_index_thead.html.erb index b6718383..6696ac12 100644 --- a/app/views/job/panel/jobs/_index/_index_thead.html.erb +++ b/app/views/job/panel/jobs/_index/_index_thead.html.erb @@ -4,6 +4,8 @@

<%= SolidQueue::Job.human_attribute_name(:job_class) %>

-

<%= SolidQueue::Job.human_attribute_name(:finished_at) %>

+

+ <%= link_to SolidQueue::Job.human_attribute_name(:finished_at), filter_params('finished_at-desc': 1) %> +

<%= SolidQueue::Job.human_attribute_name(:arguments) %>