Default event view - changed?

Forum for questions and support relating to the 1.25.x releases only.
Locked
Flasheart
Posts: 342
Joined: Thu Jul 06, 2006 2:27 pm

Default event view - changed?

Post 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?
RichardK
Posts: 6
Joined: Mon May 11, 2009 4:02 am

Re: Default event view - changed?

Post by RichardK »

I have noticed this as well. The previous behavior was much more convenient.
RichardK
Posts: 6
Joined: Mon May 11, 2009 4:02 am

Re: Default event view - changed?

Post 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.
Flasheart
Posts: 342
Joined: Thu Jul 06, 2006 2:27 pm

Re: Default event view - changed?

Post 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.
Locked