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 change default method of removing data sources when deleting graphs #2538

Closed
sysres-dev opened this issue Mar 19, 2019 · 2 comments
Labels
enhancement General tag for an enhancement

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 :

  • by default, when deleting graphs, the radio button is set to delete data sources as well, mistakes were made where user clicked 'continue' a bit too fast.

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 :

Data source radio button change :

+++ cacti/graphs.php	
848c848
<                               form_radio_button('delete_type', '2', '2', __('Delete all Data Source(s) referenced by these Graph(s) that are not in use elsewhere.'), '1');
---
>                               form_radio_button('delete_type', '1', '2', __('Delete all Data Source(s) referenced by these Graph(s) that are not in use elsewhere.'), '1');
850c850
<                               form_radio_button('delete_type', '2', '1', __('Leave the Data Source(s) untouched.'), '1');
---
>                               form_radio_button('delete_type', '1', '1', __('Leave the Data Source(s) untouched.'), '1');

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

Again, as per the graph lock option, this should be determined by a system setting not a user setting. Refer to the other two posts for hints on how to properly achieve it. Feel free to reach out to me by email if you want to consult on any of it.

@netniV netniV added the enhancement General tag for an enhancement label Mar 19, 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 : change default DS radio button on graph delete Allow users to change default method of removing data sources when deleting graphs 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
Projects
None yet
Development

No branches or pull requests

2 participants