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

feat(ui): dashboard variable chaining #2037

Merged
merged 30 commits into from
Jan 25, 2023
Merged

feat(ui): dashboard variable chaining #2037

merged 30 commits into from
Jan 25, 2023

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Jan 13, 2023

Addresses #1973

https://www.loom.com/share/75fb347f451e4c12b49c6f227e2918fc

This PR adds support for variable chaining. Whenever a variable changes, its dependent variable should be updated too. The default value for this dependent variable will be ALL values for multi-select and the first option for single-select. The independent variable remains the same.

Code changes:

There is a new API for this. This new API is POST request which accept the payload of the following type.

{
  "query": "select distinct(JSONExtractString(labels, 'operation')) FROM signoz_metrics.time_series_v2 Where JSONExtractString(labels, 'service_name') IN {{.service_name}};",
  "variables": {
    "http_status_code": "",
    "op": [
      "/driver.DriverService/FindNearest",
      "HTTP GET /dispatch",
      "HTTP GET: /route",
      "HTTP GET: /customer",
      "HTTP GET",
      ""
    ],
    "service_name": [
      "frontend"
    ],
    "span_kind": "SPAN_KIND_SERVER"
  }
}

And the VariableItem is updated with its onVarUpdate triggering subsequent updates for dependent vars.

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the enhancement New feature or request label Jan 13, 2023
Base automatically changed from issue-1973-qs to develop January 16, 2023 09:27
@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@srikanthccv srikanthccv marked this pull request as ready for review January 17, 2023 14:49
@srikanthccv
Copy link
Member Author

I am going to record a video and post it for better understanding.

@srikanthccv
Copy link
Member Author

palashgdev
palashgdev previously approved these changes Jan 24, 2023
@srikanthccv srikanthccv reopened this Jan 24, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@palashgdev palashgdev merged commit ca53136 into develop Jan 25, 2023
@srikanthccv srikanthccv deleted the issue-1973-ui branch January 25, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codeball:needs-careful-review Codeball enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants