centreon-archived
centreon-archived copied to clipboard
Added ServiceCategoriesMulti so that they are available for widgets
Description
Hello,
This will add the functionality to list Service Categories that can be used in widgets or other parts of the application.
This is needed for this PR in the Service Monitoring widget and both these contributions will fix issue 78 of that repository.
Apart from the change in the code, there is also a need to add a field type in the database, but I don't know where to place this:
INSERT INTO `widget_parameters_field_type` (`ft_typename`, `is_connector`) VALUES ('serviceCategoriesMulti', '1');
Type of change
- [ ] Patch fixing an issue (non-breaking change)
- [X] New functionality (non-breaking change)
- [ ] Breaking change (patch or feature) that might cause side effects breaking part of the Software
- [ ] Updating documentation (missing information, typo...)
Target serie
- [X] 19.10.x
- [X] 20.04.x
- [X] 20.10.x
- [X] 21.04.x (master)
How this pull request can be tested ?
This can be tested in conjunction with the changes on the related PR in the Service Monitoring widget:
- Create a new view with a new widget service-monitoring
- In the widget preferences, set "Host Category" or "Service Category" filter
- Check if the filter is correctly applied in the widget list
Checklist
- [X] I have followed the coding style guidelines provided by Centreon
- [X] I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
- [X] I have commented my code, especially hard-to-understand areas of the PR.
- [ ] I have made corresponding changes to the documentation.
- [X] I have rebased my development branch on the base branch (master, maintenance).
SonarQube Quality Gate
0 Bugs
0 Vulnerabilities
0 Security Hotspots
6 Code Smells
No Coverage information
0.0% Duplication
MON-15146
SonarQube Quality Gate
10 Bugs
0 Vulnerabilities
0 Security Hotspots (
100.0% reviewed)
3350 Code Smells