Problem
The graph and data-source editor pickers stop at the configured row limit, so browsing an empty search can omit otherwise permitted graphs. Interface descriptions (SNMP ifAlias) are not included in the data-source label or search, making similarly named ports harder to identify. The graph search term is also concatenated into the request without URL encoding.
Reproduction
- Have more permitted graphs than the configured num_rows_table value.
- Open the graph or data-source picker without a search term and browse the results.
- Search for an interface description or a graph title containing an ampersand.
Expected behavior
Every permitted graph should be discoverable, descriptions should help identify interfaces, and special characters should not change the request parameters.
A draft fix returns the complete permitted catalog, includes ifAlias in the label/search and encodes the graph search term. Existing is_graph_allowed checks are retained. For very large installations, pagination may be preferable to fetching the entire catalog; feedback on that tradeoff would be welcome.
Tested manually on my test setup with Weathermap 1.7, Cacti 1.2.31 and PHP 8.3. The proposed source is adapted to current develop.
Problem
The graph and data-source editor pickers stop at the configured row limit, so browsing an empty search can omit otherwise permitted graphs. Interface descriptions (SNMP ifAlias) are not included in the data-source label or search, making similarly named ports harder to identify. The graph search term is also concatenated into the request without URL encoding.
Reproduction
Expected behavior
Every permitted graph should be discoverable, descriptions should help identify interfaces, and special characters should not change the request parameters.
A draft fix returns the complete permitted catalog, includes ifAlias in the label/search and encodes the graph search term. Existing is_graph_allowed checks are retained. For very large installations, pagination may be preferable to fetching the entire catalog; feedback on that tradeoff would be welcome.
Tested manually on my test setup with Weathermap 1.7, Cacti 1.2.31 and PHP 8.3. The proposed source is adapted to current develop.