centreon-archived icon indicating copy to clipboard operation
centreon-archived copied to clipboard

Added ServiceCategoriesMulti so that they are available for widgets

Open alfredosilvestre-natixis opened this issue 4 years ago • 4 comments

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:

  1. Create a new view with a new widget service-monitoring
  2. In the widget preferences, set "Host Category" or "Service Category" filter
  3. 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:
Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

MON-15146

lpinsivy avatar Sep 26 '22 08:09 lpinsivy