Jump to content

Recommended Posts

Posted

When you view log files in the admin (Setup->Logs), they are sorted by name. I would like them initially sorted by date, newest to oldest. WireLog::getLogs() method support that with $sortNewest parameter set to true but there is no option to pass that parameter to  ProcessLogger::___execute() method. I could hook before and replace the whole ProcessLogger::___execute() but don't like that. Any other option? 

Posted
2 hours ago, matjazp said:

Any other option? 

That might actually be something @ryan could implement in the standard with a module config setting for ProcessLogger. So how about a pull request for that? ?

Posted

This is certainly something Ryan would easililly implement as you suggested, but you know that he almost never accepts PRs. This is not an issue but rather feature request, but there are already so many of them ... I was playing with simulating click() on MODIFIED column but failed, my js/jquery knowledge is a bit limited :-)

Posted

@dragan thank you. 

$wire->addHookAfter('ProcessLogger::execute', function(HookEvent $event) {
    $event->return .= '<script>jQuery(document).ready(function($){$("#AdminDataTable1").trigger("sorton",[[[1,1]]]);});</script>';
});

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...