2013-08-02 09:30:13 +08:00
|
|
|
/**
|
|
|
|
Index redirects to a default logs index.
|
|
|
|
|
|
|
|
@class AdminLogsIndexRoute
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminLogsIndexRoute = Discourse.Route.extend({
|
|
|
|
redirect: function() {
|
2013-08-08 04:04:12 +08:00
|
|
|
this.transitionTo('adminLogs.staffActionLogs');
|
2013-08-02 09:30:13 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-08-15 22:48:30 +08:00
|
|
|
/**
|
|
|
|
The route that lists staff actions that were logged.
|
|
|
|
|
|
|
|
@class AdminLogsStaffActionLogsRoute
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminLogsStaffActionLogsRoute = Discourse.Route.extend({
|
|
|
|
renderTemplate: function() {
|
|
|
|
this.render('admin/templates/logs/staff_action_logs', {into: 'adminLogs'});
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller) {
|
|
|
|
var queryParams = Discourse.URL.get('queryParams');
|
|
|
|
if (queryParams) {
|
|
|
|
controller.set('filters', queryParams);
|
|
|
|
}
|
|
|
|
return controller.show();
|
|
|
|
},
|
|
|
|
|
2013-09-17 02:08:55 +08:00
|
|
|
actions: {
|
2013-08-21 22:49:35 +08:00
|
|
|
showDetailsModal: function(logRecord) {
|
2013-08-22 00:33:05 +08:00
|
|
|
Discourse.Route.showModal(this, 'admin_staff_action_log_details', logRecord);
|
|
|
|
this.controllerFor('modal').set('modalClass', 'log-details-modal');
|
|
|
|
},
|
|
|
|
|
|
|
|
showCustomDetailsModal: function(logRecord) {
|
2013-08-21 22:49:35 +08:00
|
|
|
Discourse.Route.showModal(this, logRecord.action_name + '_details', logRecord);
|
|
|
|
this.controllerFor('modal').set('modalClass', 'tabbed-modal log-details-modal');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2013-08-15 22:48:30 +08:00
|
|
|
deactivate: function() {
|
|
|
|
this._super();
|
|
|
|
|
|
|
|
// Clear any filters when we leave the route
|
|
|
|
Discourse.URL.set('queryParams', null);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-08-02 09:30:13 +08:00
|
|
|
/**
|
|
|
|
The route that lists blocked email addresses.
|
|
|
|
|
2013-08-15 04:40:12 +08:00
|
|
|
@class AdminLogsScreenedEmailsRoute
|
2013-08-02 09:30:13 +08:00
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
2013-08-15 04:40:12 +08:00
|
|
|
Discourse.AdminLogsScreenedEmailsRoute = Discourse.Route.extend({
|
2013-08-02 09:30:13 +08:00
|
|
|
renderTemplate: function() {
|
2013-08-15 04:40:12 +08:00
|
|
|
this.render('admin/templates/logs/screened_emails', {into: 'adminLogs'});
|
2013-08-02 09:30:13 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function() {
|
2013-08-15 04:40:12 +08:00
|
|
|
return this.controllerFor('adminLogsScreenedEmails').show();
|
2013-08-02 09:30:13 +08:00
|
|
|
}
|
2013-08-08 04:04:12 +08:00
|
|
|
});
|
|
|
|
|
2013-10-22 02:49:51 +08:00
|
|
|
/**
|
|
|
|
The route that lists screened IP addresses.
|
|
|
|
|
|
|
|
@class AdminLogsScreenedIpAddresses
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminLogsScreenedIpAddressesRoute = Discourse.Route.extend({
|
|
|
|
renderTemplate: function() {
|
|
|
|
this.render('admin/templates/logs/screened_ip_addresses', {into: 'adminLogs'});
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function() {
|
|
|
|
return this.controllerFor('adminLogsScreenedIpAddresses').show();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-08-08 04:04:12 +08:00
|
|
|
/**
|
2013-08-15 22:48:30 +08:00
|
|
|
The route that lists screened URLs.
|
2013-08-08 04:04:12 +08:00
|
|
|
|
2013-08-15 22:48:30 +08:00
|
|
|
@class AdminLogsScreenedUrlsRoute
|
2013-08-08 04:04:12 +08:00
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
2013-08-15 22:48:30 +08:00
|
|
|
Discourse.AdminLogsScreenedUrlsRoute = Discourse.Route.extend({
|
2013-08-08 04:04:12 +08:00
|
|
|
renderTemplate: function() {
|
2013-08-15 22:48:30 +08:00
|
|
|
this.render('admin/templates/logs/screened_urls', {into: 'adminLogs'});
|
2013-08-08 04:04:12 +08:00
|
|
|
},
|
|
|
|
|
2013-08-15 22:48:30 +08:00
|
|
|
setupController: function() {
|
|
|
|
return this.controllerFor('adminLogsScreenedUrls').show();
|
2013-08-08 04:04:12 +08:00
|
|
|
}
|
2014-06-10 23:54:38 +08:00
|
|
|
});
|