Why is Add New Monitor button greyed out?

Forum for questions and support relating to the 1.25.x releases only.
Locked
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Why is Add New Monitor button greyed out?

Post by Tumult »

Recently installed Zoneminder 1.25.0 on Ubuntu 12.04.3 server. Successfully added D-Link DCS-5020L IP camera. Went to add second camera, and "Add New Monitor" button on console is greyed out.

Have tried refreshing, logging out/in, doesn't fix.

Entering the appropriate URL does successfully get me to the "Add New Monitor" page.

Any ideas why the "Add New Monitor" button would be greyed out?
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: Why is Add New Monitor button greyed out?

Post by Tumult »

Resolved.
Prior to encountering this, I had been playing with the user settings, and had clicked the only camera listed in the Restricted Monitors field, from this point on, the "Add New Monitor" button was disabled.

Apparently its designed this way. After digging through the code (console.php), I discovered that the enabling of the "Add New Monitor" button depends on two things, user must have permission to edit monitors, and user is NOT restricted to any particular monitor.

Also found on zoneminder site this, "Note that, if you ever select one of the monitors to be a Restricted Monitors, you probably will never be able to add a new monitor using that login, even if you remove all the Restricted Monitors."

I looked in the database to see where this setting was stored. Found it in the zm database, Users table, MonitorIds field. Apparently this is a user specific issue, so to undo the affect, for the afflicted user, on the server hosting zm's mysql database, run the command:

$ mysql -u <mysql zm username> -p<mysql zm username's password> -e 'UPDATE Users SET MonitorIds = NULL WHERE Username = <afflicted username>'

Where:
<mysql zm username> is the user name defined for mysql when installing zm
<mysql zm username's password> is the mysql user's password defined for mysql when installing zm
<afflicted username> is the zm user that cannot add new monitors

Moral of the story: Don't expect any user that has ever been restricted to monitor(s) to ever be able to add new monitors. Once restricted, even if subsequently unrestricted, user will never again have the ability to add new monitors via the "Add New Monitor" button (unless fixed as shown).
linforpros
Posts: 39
Joined: Fri Jan 29, 2016 6:12 pm

Re: Why is Add New Monitor button greyed out?

Post by linforpros »

Hello,
This problem with greyed out "add new monitor" issue still persists in a new install of zm 1.29.0-2 on a fedora 23.
Neither admin nor an added user are capable of adding new monitors having been assigned edit priviliges but restricted to one monitor.
I can understand that a regular user cannot do it but somehow it seems counter-intuitive for the admin user not be able to add monitors or undo this restriction from the web gui.


I will try to follow you solution to undo the trap I put myself into.

regards
Linforpros
best regards
LinforPros
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Why is Add New Monitor button greyed out?

Post by SteveGilvarry »

This will be a whole lot easier, I reproduced your issue and confirmed this fixes it. Edit your admin user, CTRL + Click the restricted monitor to unselect it. When you get it right it will no longer be highlighted in any way. This will remove the Selected option that is not removed from a multiple select list box. Save and logout and back in.
Maybe a js option for select and deselect can be added to all the multiple select boxes as the same problem exists elsewhere like the Linked Monitors Select under Monitor config. But the problem is more html than zoneminder.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Locked