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

Allow users to set the default graph lock status #2539

Closed
sysres-dev opened this issue Mar 19, 2019 · 3 comments
Closed

Allow users to set the default graph lock status #2539

sysres-dev opened this issue Mar 19, 2019 · 3 comments
Labels
enhancement General tag for an enhancement not a bug Not a bug as determined by dev

Comments

@sysres-dev
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Our cacti users complained about some behaviour changes in the interface, we used cacti 0.8.8 for a long time, and they would like some behaviors closer to it :

  • in some of our use cases, some data sources are manually moved from one graph to an other, when there is a lot of graphs, it means the user have to unlock and lock again all of thoses, which is long, especially when graphs have dozens of data source to load.

Describe the solution you'd like
It would be very nice to have new settings in global setting panel to choose cacti's behavior regarding this.

Describe alternatives you've considered
For now we solved thoses problems by hardcoding values in right places in the code :

graph lock status change :

+++ cacti/graphs.php	
1250c1250
<                       $locked = true;
---
>                       $locked = false;
1258c1258
<                       $locked = true;
---
>                       $locked = false;

Additional context
Here are some stats about my Cacti installation:

Cacti Version | 1.1.38
Cacti OS | unix
RSA Fingerprint | 22:9a:ef:ad:d8:de:1d:e7:95:7d:89:98:bd:4f:b9:df
NET-SNMP Version | NET-SNMP version: 5.7.2
RRDtool Version | RRDtool 1.4.x
Devices | 26897
Graphs | 458451
Data Sources:
Script/Command: 16597
SNMP Get: 76962
SNMP Query: 291955
Script Query: 62267
Script Server: 26697
Script Query - Script Server: 31729
Total: 506207

@netniV
Copy link
Member

netniV commented Mar 19, 2019

I'm a bit wary of this. But if you wanted to create this as a system admin option (not users as they shouldn't be determining this), add it to the $settings array in includes/global_settings.php and then update the above code to use read_config_option('setting name') to determine which should be set. The default should remain as it currently is, then you would be able to enable it.

Don't forget to update the CHANGELOG with the details.

@netniV netniV added the enhancement General tag for an enhancement label Mar 19, 2019
sysres-dev added a commit to sysres-dev/cacti that referenced this issue Mar 21, 2019
@cigamit
Copy link
Member

cigamit commented Mar 24, 2019

This was done intentionally so that multiple people would not accidentally edit a graph tree at the same time. So, I'm not very happy with auto-unlock.

@cigamit cigamit added the not a bug Not a bug as determined by dev label Mar 24, 2019
@sysres-dev
Copy link
Contributor Author

Implemented and merged in PR #2552, i'm closing the issue.

@netniV netniV changed the title New Setting : default graph lock status Allow users to set the default graph lock status Jun 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement General tag for an enhancement not a bug Not a bug as determined by dev
Projects
None yet
Development

No branches or pull requests

3 participants