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

fix(api) return curve metric name for map #8055

Merged
merged 1 commit into from
Nov 5, 2019
Merged

Conversation

loiclau
Copy link
Contributor

@loiclau loiclau commented Oct 25, 2019

Pull Request Template

Description

To fix STUDIO-2315, we need to add additional information

Solution is to add a new field to the response, which will always be the name of the associated metric, so we have no possible regressions.

Fixes # (issue)

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 (master)

How this pull request can be tested ?

Please describe the procedure to verify that the goal of the PR is matched. Provide clear instructions so that it can be correctly tested.

Any relevant details of the configuration to perform the test should be added.

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)

@@ -122,6 +122,7 @@ public function getData($rows = 200)
"warn" => null
);
$info['legend'] = str_replace('\\\\', '\\', $metric['metric_legend']);
$info['metric_name'] = !empty($metric['ds_name']) ? $metric['ds_name'] : $info['legend'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't you use a null coalescent ternary instead

@kduret
Copy link
Contributor

kduret commented Oct 28, 2019

Please include a short description of the PR.
Do not let pull request template...

@loiclau loiclau changed the title fix(api) return curve metric name fix(api) return curve metric name for map Oct 29, 2019
@Moujimouja
Copy link
Contributor

Can this be merged before it's tested :) ? As describe in the process

@loiclau loiclau merged commit 3606403 into master Nov 5, 2019
@loiclau loiclau deleted the MON-4400-curve-label-api branch November 5, 2019 13:24
loiclau added a commit that referenced this pull request Nov 5, 2019
loiclau added a commit that referenced this pull request Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants