mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:03:48 +08:00
FIX: Logs notice was not displaying the right Date.
This commit is contained in:
parent
bf683178a8
commit
dc2dae2cc4
|
@ -28,8 +28,7 @@ const LogsNotice = Ember.Object.extend({
|
|||
|
||||
this.set('text',
|
||||
I18n.t(`logs_error_rate_notice.${translationKey}`, {
|
||||
relativeAge: autoUpdatingRelativeAge(new Date),
|
||||
timestamp: moment().format("YYYY-MM-DD H:mm:ss"),
|
||||
relativeAge: autoUpdatingRelativeAge(new Date(data.publish_at * 1000)),
|
||||
siteSettingRate: I18n.t('logs_error_rate_notice.rate', { count: siteSettingLimit, duration: duration }),
|
||||
rate: I18n.t('logs_error_rate_notice.rate', { count: rate, duration: duration }),
|
||||
url: Discourse.getURL('/logs')
|
||||
|
|
|
@ -74,7 +74,7 @@ RailsMultisite::ConnectionManagement.each_connection do
|
|||
|
||||
if (error_rate_per_minute || 0) > 0
|
||||
store.register_rate_limit_per_minute(severities, error_rate_per_minute) do |rate|
|
||||
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'minute' })
|
||||
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'minute', publish_at: Time.current.to_i })
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -82,7 +82,7 @@ RailsMultisite::ConnectionManagement.each_connection do
|
|||
|
||||
if (error_rate_per_hour || 0) > 0
|
||||
store.register_rate_limit_per_hour(severities, error_rate_per_hour) do |rate|
|
||||
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'hour' })
|
||||
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'hour', publish_at: Time.current.to_i })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user