add additional formatting for delayed job listing

This commit is contained in:
r888888888
2016-12-24 18:00:40 -08:00
parent 1ed5e0a087
commit 2584646017
4 changed files with 696 additions and 675 deletions

View File

@@ -1,6 +1,18 @@
module DelayedJobsHelper
def print_name(job)
case job.name
when "Tag.increment_post_counts"
"<strong>increment post counts</strong>"
when "Tag.decrement_post_counts"
"<strong>decrement post counts</strong>"
when "Post.expire_cache"
"<strong>expire post cache</strong>"
when "Moderator::TagBatchChange"
"<strong>tag batch change</strong>"
when "TagSubscription.process"
"<strong>process tag subscription</strong>"
@@ -56,6 +68,15 @@ module DelayedJobsHelper
def print_handler(job)
case job.name
when "Tag.increment_post_counts", "Tag.decrement_post_counts"
""
when "Post.expire_cache"
""
when "Moderator::TagBatchChange"
h(job.payload_object.antecedent) + " -> " + h(job.payload_object.consequent)
when "TagSubscription.process"
""
@@ -69,10 +90,10 @@ module DelayedJobsHelper
h(job.payload_object.name)
when "TagAlias#process!"
h(job.payload_object.antecedent_name) + " -&gt; " + h(job.payload_object.consequent_name)
h(job.payload_object.antecedent_name) + " -> " + h(job.payload_object.consequent_name)
when "TagImplication#process!"
h(job.payload_object.antecedent_name) + " -&gt; " + h(job.payload_object.consequent_name)
h(job.payload_object.antecedent_name) + " -> " + h(job.payload_object.consequent_name)
when "Class#clear_cache_for"
h(job.payload_object.args.flatten.join(" "))

View File

@@ -633,6 +633,7 @@ class Post < ActiveRecord::Base
normalized_tags = TagAlias.to_aliased(normalized_tags)
normalized_tags = add_automatic_tags(normalized_tags)
normalized_tags = TagImplication.with_descendants(normalized_tags)
normalized_tags = normalized_tags.compact
normalized_tags.sort!
set_tag_string(normalized_tags.uniq.sort.join(" "))
end

View File

@@ -14,7 +14,11 @@
<tr id="request-<%= request.id %>">
<td><%= link_to_user(request.user) %></td>
<td><% if request.approver %><%= link_to_user(request.approver) %><% end %></td>
<td><%= link_to(request.forum_topic_id, forum_topic_path(request.forum_topic_id)) %></td>
<td>
<% if request.forum_topic_id %>
<%= link_to(request.forum_topic_id, forum_topic_path(request.forum_topic_id)) %>
<% end %>
</td>
<td><%= script_with_line_breaks(request.script) %></td>
<td id="request-status-for-<%= request.id %>"><%= request.status %></td>
<td>

File diff suppressed because it is too large Load Diff