Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(centreonACL): return all services linked to a servicegroup #8406

Merged
merged 5 commits into from
Mar 12, 2020

Conversation

adr-mo
Copy link
Contributor

@adr-mo adr-mo commented Mar 11, 2020

Description

The issue here was that when linking service templates to define a servicegroup, those where not "resolved" which lead to the non-consistent listing in the Reporting -> Dashboard -> Service Groups feature.

Using the centreon_storage database to get the information, where the services_servicegroups table provides "resolved" dependencies of possible components of the servicegroup which can be:

  • simple services
  • service templates
  • hostgroup services

Type of change

  • Patch fixing an issue (non-breaking change)
  • 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

  • 2.8.x
  • 18.10.x
  • 19.04.x
  • 19.10.x
  • 20.04.x (master)

How this pull request can be tested ?

  • Create a service group using all the possible components listed above.
  • Generate and push the configuration
  • Go to the reporting page of the service group.

The listing should display all the services linked to the servicegroup.

IMPORTANT

The test should also be done using an user with ACL on ressources.

Checklist

Community contributors & Centreon team

  • I followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have made corresponding changes to the documentation.
  • I have rebased my development branch on the base branch (master, maintenance).

Centreon team only

  • I have made sure that the unit tests related to the story are successful.
  • I have made sure that unit tests cover 80% of the code written for the story.
  • I have made sure that acceptance tests related to the story are successful (local and CI)

@adr-mo adr-mo requested review from kduret, callapa and sc979 March 11, 2020 13:34
@adr-mo adr-mo added pr/internal-rd PR made by the Centreon R&D Team status/in-backlog A dev will begin to work on your modifications soon labels Mar 11, 2020
@sc979 sc979 added area/acl area/monitoring kind/bug and removed status/in-backlog A dev will begin to work on your modifications soon labels Mar 11, 2020
* Sanitize the servicegroup id
* add missing code line to get only activated ressources
@adr-mo
Copy link
Contributor Author

adr-mo commented Mar 11, 2020

Feedbacks taken into account ! Thanks @sc979 for feedback and help 👍

sc979
sc979 previously approved these changes Mar 11, 2020
kduret
kduret previously approved these changes Mar 11, 2020
www/class/centreonACL.class.php Outdated Show resolved Hide resolved
Co-Authored-By: Kevin Duret <kduret@centreon.com>
@adr-mo adr-mo dismissed stale reviews from kduret and sc979 via 066211c March 11, 2020 16:24
@adr-mo adr-mo requested review from sc979 and kduret March 12, 2020 09:02
@adr-mo adr-mo merged commit 5076ce2 into master Mar 12, 2020
@adr-mo adr-mo deleted the MON-4000-reporting-issue branch March 12, 2020 10:59
adr-mo added a commit that referenced this pull request Mar 12, 2020
* fix(centreonACL): return all services linked to a servicegroup

* enh(centreonACL): add some code documentation

* fix(centreonACL): take review feedbacks into account

* Sanitize the servicegroup id
* add missing code line to get only activated ressources

* fix(centreonACL): variable enough checked.

* take kduret feedback into account

Co-Authored-By: Kevin Duret <kduret@centreon.com>

Co-authored-by: Kevin Duret <kduret@centreon.com>
adr-mo added a commit that referenced this pull request Mar 12, 2020
* fix(centreonACL): return all services linked to a servicegroup

* enh(centreonACL): add some code documentation

* fix(centreonACL): take review feedbacks into account

* Sanitize the servicegroup id
* add missing code line to get only activated ressources

* fix(centreonACL): variable enough checked.

* take kduret feedback into account

Co-Authored-By: Kevin Duret <kduret@centreon.com>

Co-authored-by: Kevin Duret <kduret@centreon.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants