Welcome to Pandora FMS Community › Forums › Community support › Found a bug on the Visual Console!
-
Found a bug on the Visual Console!
Posted by mbonal on October 9, 2008 at 13:42IF you create a top map and then go to a linked map and then click on a server you created the link goes to agent detail whith a blank screen.
The reason being is the java script calls for :
Top Map original link:
sec=visualc&sec2=operation/visual_console/render_view&pure=0&id=1
then goes to
index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=&tab=data
when it should call for something like this
index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1
mbonal replied 16 years, 4 months ago 4 Members · 21 Replies -
21 Replies
-
-
-
-
-
::
Hi again,
I think that the code you’re using is a bit old. The bug can be caused by the PHP configuration, which looks like it’s not handling short tags good “<?=".
Take a look at your php.ini file, and add this line to it.
short_open_tag = On
Afterwards, restart your web server and try it again.
This is fixed in the latest version, but updating may be a little difficult or unstable…
-
-
-
-
-
-
::
Ok, I used blogspot to upload the image. Here is a link to the image and you can see when I do a drop-down box on the module setting there is nothing there and there are modules.
http://2.bp.blogspot.com/_ut2IzTpA8-A/SPTRumTJy_I/AAAAAAAAAB8/k_CtR4-espM/s1600-h/module.bmp
-
-
::
Hi,
I can’t reproduce the bug, so I don’t know how can I help you… I’m under a Firefox 3 on an Apache server with PHP version 5.2 and it works for me.
I’ve done some changes to the javascript code, but I’m not sure if they’re going to help since I’ve got no problems… Maybe this bug is already solved in the latest code, but let’s try to debug a bit to find out the root of your problem so you can have a better answer.
Can you paste the result of this?
ajax.php?page=operation/agentes/ver_agente&id_agent=1&get_agent_modules_json=1
Where the 1 after “id_agent=” is the id number of any agent (probably 1 is ok).
That’s the page the javascript asks to get the list of modules in an agent so the list can be filled. It’s an ugly string, but I will understand it 😉
Greetings!
-
::
Do I understand you correct – I need do next – http://path_to pandora/ajax.php?page=operation/agentes/ver_agente&id_agent=1&get_agent_modules_json=1 ????
for id_agent=1..6 – empty page
regard’s -
::
This is what I got..
[{“0″:”1″,”id_agente_modulo”:”1″,”1″:”1″,”id_agente”:”1″,”2″:”100″,”id_tipo_modulo”:”100″,”3″:”Agent Keepalive monitor”,”descripcion”:”Agent Keepalive monitor”,”4″:”agent_keepalive”,”nombre”:”agent_keepalive”,”5″:”0″,”max”:”0″,”6″:”0″,”min”:”0″,”7″:”0″,”module_interval”:”0″,”8″:”0″,”tcp_port”:”0″,”9″:””,”tcp_send”:””,”10″:””,”tcp_rcv”:””,”11″:””,”snmp_community”:””,”12″:””,”snmp_oid”:””,”13″:””,”ip_target”:””,”14″:”4″,”id_module_group”:”4″,”15″:”0″,”flag”:”0″,”16″:”1″,”id_modulo”:”1″,”17″:”0″,”disabled”:”0″,”18″:”0″,”id_export”:”0″,”19″:””,”plugin_user”:””,”20″:””,”plugin_pass”:””,”21″:””,”plugin_parameter”:””,”22″:”0″,”id_plugin”:”0″,”
-
-
::
Mbonal: It’s not weird at all 🙂 Visual console configuration doesn’t work fine in IE (any version) due to some limitations. If you want to know the reasons, there’s a limitation in IE that doesn’t allow the creation of options fields in a drop down menu because it doesn’t allow to change the value of an input field using javascript (arguing security reasons). So, is it working fine in Google Chrome? If it’s, I hope we are done and the mystery is resolved for you 🙂
yduma: Ok, at least we know it shows nothing because nothing is returned when asking the modules of an agent… That’s step number 1 🙂 Let’s try to find out more
What PHP version are you using? You need 5.2.0 or greater, because it uses a function (json_encode) which was added in that version to the core. If you’re using a lower version, you have two options: updating to 5.2 or installing an extension which provides that function.
In any case, let’s try to get more info. Can you activate PHP error reporting on Pandora config? This is done by adding the following line at the bottom of include/config.php
error_reporting (E_ALL);
Greetings!
-
-
::
Great! So we finally got to an answer. I think that a check for this function was added in the new installer, but you may bypass it somehow.
If you don’t want to upgrade to PHP 5.2, you can install this extension: http://aurore.net/projects/php-json/
Greetings
-