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

Fix alignment in charts endpoint #13275

Merged
merged 1 commit into from Jun 30, 2022

Conversation

thiagoftsm
Copy link
Contributor

Summary

Our current json output for chart labels is not aligned, because we are missing a tab:

                        "green": null,
			"red": null,
			"alarms": {

			},
			"chart_labels": {
		"123caniuse":"testing",
		"myconstant":"never_change",
		"ourconstant":"we talk about",
		"yourconstant":"you define"
			}

This PR is fixing this issue aligning the JSON:

                        "green": null,
			"red": null,
			"alarms": {

			},
			"chart_labels": {
				"123caniuse":"testing",
				"myconstant":"never_change",
				"ourconstant":"we talk about",
				"yourconstant":"you define"
			}
Test Plan
  1. Before to compile this branch, start your netdata and access http://localhost:19999/api/v1/charts?all, you will have chart labels not aligned.
  2. Compile this branch
  3. Access the link again https://localhost:19999/api/v1/charts?all (press Ctrl+R) and you will see that chart labels are now aligned.
Additional Information
For users: How does this change affect me? Describe the PR affects users: - Which area of Netdata is affected by the change? API - Can they see the change or is it an under the hood? If they can see it, where? It is not visible for uses - How is the user impacted by the change? When users work directly with API, they will have data better organized. - What are there any benefits of the change? It keeps the JSON cleaner.

@thiagoftsm thiagoftsm merged commit df784d4 into netdata:master Jun 30, 2022
@thiagoftsm thiagoftsm deleted the fix_json_alignment branch June 30, 2022 14:24
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.

None yet

3 participants