-
Notifications
You must be signed in to change notification settings - Fork 32
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
Allow array index on graph widget #1402
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1402 +/- ##
=======================================
Coverage 75.40% 75.40%
=======================================
Files 600 600
Lines 44701 44700 -1
Branches 777 777
=======================================
+ Hits 33705 33708 +3
+ Misses 10908 10905 -3
+ Partials 88 87 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -49,6 +49,7 @@ TELEMETRY <%= target_name %> HEALTH_STATUS BIG_ENDIAN "Health and status from th | |||
STATE CONNECTED 1 GREEN | |||
STATE UNAVAILABLE 0 YELLOW | |||
APPEND_ITEM BLOCKTEST 80 BLOCK "Block data" | |||
APPEND_ITEM BRACKET[0] 8 UINT "Regular item with brackets in the name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's unusual to add items to the demo but it was the only way to really test it
LABELSPARKLINE <%= target_name %> HEALTH_STATUS ARY[1] | ||
SETTING HISTORY 60s | ||
LABELSPARKLINE <%= target_name %> HEALTH_STATUS BRACKET[[0]] | ||
SETTING HISTORY 60s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting all these case to work correctly was interesting
) | ||
// Return the mapped values since we may have removed bracket escaping | ||
return item | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Key to getting this work was reassigning this.items to the mapped version which returns the escaped bracket names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't support an array item with a real bracket in the name. That's probably ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're naming an array item with brackets then you're really asking for trouble!
) | ||
// Return the mapped values since we may have removed bracket escaping | ||
return item | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't support an array item with a real bracket in the name. That's probably ok.
Quality Gate passedIssues Measures |
closes #1395