Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus: Fix problem where changing display name in Field tab has no effect #29441

Merged
merged 2 commits into from
Dec 1, 2020

Conversation

zoltanbedi
Copy link
Member

Which issue(s) this PR fixes:

Fixes #29437

Special notes for your reviewer:

@zoltanbedi zoltanbedi added type/bug datasource/Prometheus old backport v7.3.x Mark PR to be automatically backported to v7.3.x labels Nov 27, 2020
@zoltanbedi zoltanbedi added this to the 7.3.5 milestone Nov 27, 2020
@zoltanbedi zoltanbedi self-assigned this Nov 27, 2020
@zoltanbedi zoltanbedi requested review from a team, Elfo404 and ivanahuckova and removed request for a team November 27, 2020 17:32
@torkelo
Copy link
Member

torkelo commented Nov 27, 2020

I can still see two places where displayName is set

fields.push(getValueField({ data: dps, parseValue: false, labels, displayName: name }));

@zoltanbedi
Copy link
Member Author

That is just the name of the object that is passed to getValueField function. I've changed the property in getValueField. Should I rename these properties?

Copy link
Member

@torkelo torkelo left a comment

Choose a reason for hiding this comment

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

I think that is fine, maybe rename it to just name for that function to avoid confusion

Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

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

LGTM! 🍧 I also like that you have renamed displayNameFromDS in getValueField so it is more clear what is happening. 👍 for test.

@zoltanbedi zoltanbedi merged commit 207831f into master Dec 1, 2020
@zoltanbedi zoltanbedi deleted the zoltan/fix-prometheus-display-name-issue branch December 1, 2020 09:36
grafanabot pushed a commit that referenced this pull request Dec 1, 2020
* Prometheus: don't override displayName property

* Rename displayName to displayNameFromDS for consistency

(cherry picked from commit 207831f)
zoltanbedi added a commit that referenced this pull request Dec 1, 2020
* Prometheus: don't override displayName property

* Rename displayName to displayNameFromDS for consistency

(cherry picked from commit 207831f)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
ryantxu pushed a commit that referenced this pull request Dec 8, 2020
* Prometheus: don't override displayName property

* Rename displayName to displayNameFromDS for consistency
@zoltanbedi zoltanbedi changed the title Prometheus: don't override displayName property Prometheus: Fix display name field has no effect Dec 10, 2020
@torkelo torkelo changed the title Prometheus: Fix display name field has no effect Prometheus: Fixes problem where changing display name in Field tab had no effect Dec 10, 2020
@wbrowne wbrowne changed the title Prometheus: Fixes problem where changing display name in Field tab had no effect Prometheus: Fix problem where changing display name in Field tab had no effect Dec 10, 2020
@wbrowne wbrowne changed the title Prometheus: Fix problem where changing display name in Field tab had no effect Prometheus: Fix problem where changing display name in Field tab has no effect Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus: Field display name has no effect
3 participants