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

Table: Cell inspector auto-detecting JSON #81152

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

gtk-grafana
Copy link
Contributor

@gtk-grafana gtk-grafana commented Jan 24, 2024

What is this feature?

Automatically setting the inspect type to json if the value can be parsed as JSON. This will automatically show the JSON/code view when the user clicks on the inspect icon within a table cell.

image image

Why do we need this feature?
It's hard to read JSON without any formatting.
#79589

Who is this feature for?
Table users, specifically logs table in explore.

Which issue(s) does this PR fix?:
Fixes #79589

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.4.x milestone Jan 24, 2024
@grafana-pr-automation grafana-pr-automation bot requested review from a team and Ukochka and removed request for a team January 24, 2024 13:51
@gtk-grafana gtk-grafana marked this pull request as ready for review January 24, 2024 14:17
@gtk-grafana gtk-grafana requested a review from a team as a code owner January 24, 2024 14:17
@gtk-grafana gtk-grafana requested review from codeincarnate, drew08t and leeoniya and removed request for a team January 24, 2024 14:17
@gtk-grafana gtk-grafana changed the title Table: Inspector auto-detect JSON Table: Cell inspector auto-detecting JSON Jan 24, 2024
@gtk-grafana gtk-grafana requested a review from a team January 24, 2024 15:04
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 24, 2024 15:16
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 24, 2024 16:07
Copy link
Member

@ryantxu ryantxu left a comment

Choose a reason for hiding this comment

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

much better -- happy we avoid trying to read every cell as json 😜

@gtk-grafana gtk-grafana merged commit a81d3b1 into main Jan 24, 2024
18 checks passed
@gtk-grafana gtk-grafana deleted the gtk-grafana/table-inspect-json branch January 24, 2024 18:08
Ukochka pushed a commit that referenced this pull request Feb 14, 2024
* set inspect mode to json if no errors parsing json
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs Panel: Table UI - Format JSON in inspect view
4 participants