Delete all matches option in Filters dialog

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Delete all matches option in Filters dialog

Post by robi »

Hi!

I have several events.
-Opened the filter window. Set up a rule to test it: Id equal to 160, then Submit. Event list updates correctly.
-Then check "Delete all matches:", Submit, event is still there. Execute - still nothing. What am I doing wrong...?
-Zmfilter.log shows nothing related to this, only the eventdump and purgewhenfull actions.

I know that I can delete the event by selecting it in the event list and clicking "delete", but why doesn't delete from filter window?

Also, why two buttons: Submit and Execute? What's the difference between them?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Submit just applies th efilter (and shows you the events), execute also invokes the selected actions. So once you check 'delete all matches' you should then press Execute.
Phil
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

It doesn't work. :(
Mellon
Posts: 2
Joined: Thu Apr 05, 2007 2:27 pm

Post by Mellon »

i have the same problem any tips?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Can you give me details of your distro and browser? Do you see any errors (especially Javascript ones) on the page. Can you describe _exactly_ what you see, does the page not do anything when you presse Execute or does it refresh but with the same vents etc? Please be as detailed as you can.
Phil
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

Okay.
The page with the event list refreshes but with the match results. "Delete all matches:" has no effect. Browser: Firefox 1.5.0.11. No erros visable anywhere (nor browser nor logs)
v1.25.0 + Ubuntu Linux 12.04 Server
pneumoboy
Posts: 5
Joined: Sat Dec 16, 2006 2:49 am

Same here

Post by pneumoboy »

I am running ZM 1.22.3 on FC6 with Apache 2.

The workstations I access it on are running FC6 - 2.6.18-1.2849. Mozilla FireFox 1.5.0.10. I also access ZM on a Unbutu 6.10 workstation running FireFox 2. I did some testing by accessing ZM on a Windows XP box with FireFox 2. All the same results...

I get the results from the query. For example I run a query for all monitors to delete any event prior to 4/15/2007. The result window appears with accurate results. But executing does nothing. The results just sit there. Then I have to do a view all and then check the delete box, click on delete...

I have never been able to get it to work.
abroz
Posts: 28
Joined: Wed Jan 24, 2007 6:38 pm

Post by abroz »

Samo problem here with deleting (but also with executing E-Mail delivery and Message delivery) - running on Mandriva 2007, tried with Opera (can't check version now), FireFox 2, IE 7.0, IE 6.0 - no errors in browser or in Mandriva log but nothing happens.

I think that when I solve this one (deleting through Event FIlter and Exectuing) I will sole E-Mail/Message thing too.

Regards,

Aj
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I have had a bit of a look at this issue now. Can you try looking in zm_actions.php and finding the section that looks like

Code: Select all

            if ( $execute )
            {
                $temp_filter_name = "_TempFilter".time();
            }
                        if ( $filter_name || $new_filter_name )
                        {
                                if ( $temp_filter_name )
                                        $filter_name = $temp_filter_name;
                                elseif ( $new_filter_name )
                                        $filter_name = $new_filter_name;
and move the last four lines about the second if, like so

Code: Select all

            if ( $execute )
            {
                $temp_filter_name = "_TempFilter".time();
            }
                                if ( $temp_filter_name )
                                        $filter_name = $temp_filter_name;
                                elseif ( $new_filter_name )
                                        $filter_name = $new_filter_name;

                        if ( $filter_name )
                        {
and also remove one of the tests from that if. See if that works.

Apologies for the formatting but it's difficult to get things lined on in these boxes!
Phil
abroz
Posts: 28
Joined: Wed Jan 24, 2007 6:38 pm

Post by abroz »

Hi!

Well, it works GREAT!

Both Deleting events and e-mail/message options now work!!!

Thanks!
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

Confirming that it's working here too. :wink:
v1.25.0 + Ubuntu Linux 12.04 Server
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Dito here as well. Good show Phil :D
pneumoboy
Posts: 5
Joined: Sat Dec 16, 2006 2:49 am

Works!

Post by pneumoboy »

It works excellent... I can also now create videos from the filter window (somethings that also would not work previously).

Much appreciated... Thanks for looking into this. :wink:
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I have rather belatedly added this to the Wiki.
Phil
Locked