Page 1 of 1

Default event view - changed?

Posted: Fri Jun 07, 2013 6:39 pm
by Flasheart
I've run 1.24.2 and .3 for years, but recently on installing a new box I was pleased to see 1.25 has made it into the official debian repos. The package installs fine, and all works fine, apart from one different.

When I click a list of events for a monitor, the "index.php?view=events" page is listed as usual, but it includes any "Archived" events.

In previous debian versions this was not the case, if you refreshed this page after archiving one or more events, they'd disappear - showing up in their own "Archives" entry on the console page.

I'm so used to using archive to "put aside" interesting footage this is really quite annoying and I'd like the default view not to do this.

I realise I can use a filter to modify this view, but that means clicking "Show filter window", adding a "Archive_status = Not Archived" and hitting execute, which takes a lot of time when I have many monitors to review.

So my question is;

Can I make this the default behavior, please?

Re: Default event view - changed?

Posted: Mon Jun 10, 2013 12:05 pm
by RichardK
I have noticed this as well. The previous behavior was much more convenient.

Re: Default event view - changed?

Posted: Tue Jun 11, 2013 2:20 am
by RichardK
OK, I found it. It's hardcoded in: /usr/share/zoneminder/skins/classic/views/console.php

Find the following four lines:
array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),

In each case insert the following line above:
array( "attr" => "Archived", "op" => "=", "val" => "0" ),

So you end up with (example):

Code: Select all

            "terms" => array(
                array( "attr" => "Archived", "op" => "=", "val" => "0" ),
                array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
            )
This restores the previous behavior.

Re: Default event view - changed?

Posted: Tue Jun 11, 2013 8:47 pm
by Flasheart
Thank you RichardK.

My version (1.25, debian 7) had a slightly different layout, having this instead of the second line;

array( "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),

Commenting it out and inserting the two lines you gave, and amending the period for each, seems to have done the trick though!

I wonder how this got changed? There's nothing in the release notes since 1.24.0 that signify anything related.