mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
43 lines
No EOL
835 B
JavaScript
43 lines
No EOL
835 B
JavaScript
adminNav.push({
|
|
route: 'searchLogs',
|
|
label: 'Search Logs'
|
|
});
|
|
|
|
|
|
Meteor.startup(function () {
|
|
|
|
PostsSearchController = PostsListController.extend({
|
|
view: 'search'
|
|
});
|
|
|
|
Router.onBeforeAction(Router._filters.isAdmin, {only: ['logs']});
|
|
|
|
Router.map(function() {
|
|
|
|
// Search
|
|
|
|
this.route('search', {
|
|
path: '/search/:limit?',
|
|
controller: PostsSearchController
|
|
});
|
|
|
|
// Search Logs
|
|
|
|
this.route('searchLogs', {
|
|
path: '/logs/:limit?',
|
|
waitOn: function () {
|
|
var limit = this.params.limit || 100;
|
|
if(Meteor.isClient) {
|
|
Session.set('logsLimit', limit);
|
|
}
|
|
return Meteor.subscribe('searches', limit);
|
|
},
|
|
data: function () {
|
|
return Searches.find({}, {sort: {timestamp: -1}});
|
|
},
|
|
fastRender: true
|
|
});
|
|
|
|
});
|
|
|
|
}); |