Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When viewing graphs, automatic refresh so not always work as expected #3859

Closed
surpadisfa opened this issue Oct 14, 2020 · 6 comments
Closed
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@surpadisfa
Copy link

Page graph.php automatic refresh does not work, once the page is loaded is not updated anymore.

I'm using Cacti 1.2.14 on a CentOS 7 (rpm package cacti-1.2.14-1.el7.noarch frpm EPEL repo).
The database is from an older Cacti 0.8.8h upgraded do 1.2.14.
There isn't any plugin loaded.

I had a look at graph.php and i saw the following code

$refresh['seconds'] = read_config_option('page_refresh');
$refresh['page']    = 'graph.php?local_graph_id=' . get_request_var('local_graph_id') . '&header=false';
$refresh['logout']  = 'false';
set_page_refresh($refresh);

As far as I can see there isn't a 'page_refresh' entry in table 'settings' and I can confirm that $refresh['seconds'] is empty when it is passed to set_page_refresh().

I tried the following change but it didn't get any better, the only difference is that $refresh['seconds'] gets a value but still the page doesn't refresh.

$refresh['seconds'] = read_user_setting('page_refresh');
$refresh['page']    = 'graph.php?local_graph_id=' . get_request_var('local_graph_id') . '&header=false';
$refresh['logout']  = 'false';
set_page_refresh($refresh);

The issue doesn't seem related to the broswer: I tried with Chrome 85, Firefox 72, Edge 44 and IE 11.

@surpadisfa surpadisfa added bug Undesired behaviour unverified Some days we don't have a clue labels Oct 14, 2020
@TheWitness
Copy link
Member

I started digging into this, and I'm still scratching my head. For certain drill-downs, it's supposed to be disabled, but for others it should not be. So, I'm rightfully perplexed at the moment.

@TheWitness TheWitness removed the unverified Some days we don't have a clue label Oct 15, 2020
@surpadisfa
Copy link
Author

surpadisfa commented Oct 15, 2020

I can add that if I open the graph.php in a new tab, with the change to the code I described before, it refreshes correctly.

Example:
URL: https://cacti/cacti/graph_view.php?action=tree&node=tbranch-4578&host_id=1567&site_id=-1&host_template_id=-1&hgd=&hyper=true
refresh doesn't work
EDIT: of course the content displayed is the one from graph.php even if the url is the device view.

URL:
https://cacti/cacti/graph.php?local_graph_id=44175
refresh works properly

@iskandarbasman
Copy link

Might be related to #3892 this Cacti was upgraded from v1.1.38 to v1.2.14.

@TheWitness TheWitness added this to the v1.2.16 milestone Nov 10, 2020
@TheWitness
Copy link
Member

I'll be re-verifying with the latest code to see if the refresh works.

TheWitness added a commit that referenced this issue Nov 22, 2020
Page refresh in graph.php does not work
@TheWitness TheWitness added the resolved A fixed issue label Nov 22, 2020
@TheWitness
Copy link
Member

This is fixed now. Thanks for your patience.

@iskandarbasman
Copy link

Hi Witness just want to state that #3859 is not resolved from my testing with the latest developer cacti.

@netniV netniV changed the title Page refresh in graph.php does not work When viewing graphs, automatic refresh so not always work as expected Nov 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants