-
Notifications
You must be signed in to change notification settings - Fork 100
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
[BUG]: App-analytics - fixed issue for app break on update chart #1147
[BUG]: App-analytics - fixed issue for app break on update chart #1147
Conversation
dashboards-observability/public/components/event_analytics/explorer/explorer.tsx
Show resolved
Hide resolved
...lorer/visualizations/config_panel/config_panes/config_controls/data_configurations_panel.tsx
Outdated
Show resolved
Hide resolved
@eugenesk24 Need your review and confirmation on their works for this issue: #1136 |
Waiting for changes addressing my comment before approving |
048a394
to
973e06e
Compare
Codecov Report
@@ Coverage Diff @@
## main opensearch-project/observability#1147 +/- ##
=============================================
- Coverage 71.87% 54.18% -17.69%
Complexity 291 291
=============================================
Files 42 279 +237
Lines 2311 9473 +7162
Branches 240 2235 +1995
=============================================
+ Hits 1661 5133 +3472
- Misses 509 4169 +3660
- Partials 141 171 +30
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
if (query.includes(appBaseQuery)) { | ||
if (query.includes('|')) { | ||
// Some scenarios have ' | ' after base query and some have '| ' | ||
return query.replace(' | ', '| ').replace(appBaseQuery + '| ', ''); |
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.
is the if necessary? also this seems flakey. it doesn't handle two spaces before |
, or how does it ensure there's only 0 or 1 space before |
?
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.
All query are pipelines, no matter how they're composed or split.
Can we instead try to use set-wise operations here ;
"...pipeline string...".split('|').map {|token| token.trim() }
And then later
tokens.join("|")
???
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.
It is also quite possible that the query can have multiple pipes, source = opensearch_dashboards_sample_logs | where response='403' | sort machine
. In this case the replace would only replace the first pipe and therefore the second replace will not match anything and the base query will not be removed from the search bar view.
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.
Again... why are we not using set-wise processing on the pipe sections?
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.
@pjfitzgibbons not sure where is the "set", but how do you handle source=index | fields `a|b`
?
i brought up a similar issue before: #81 (comment)
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.
Hi @eugenesk24 ,
As per the conversations on this PR we have made an implementation which would work irrespective of any amount of spaces present before or after the pipe. But if any field exists with a pipe sign in it like 'a |b' or 'a| b' this will fail. We wanted to confirm if these could possibly be valid fields or not.
Implementation:
const generateViewQuery = (query: string) => {
if (query.includes(appBaseQuery)) {
if (query.includes('|')) {
const newQuery = query
.split('|')
.map((section: string) => section.trim())
.join('|');
return newQuery.replace(appBaseQuery + '|', '');
}
return '';
}
return query;
};
973e06e
to
bf68f9a
Compare
Signed-off-by: Dipra Aich <[email protected]>
Signed-off-by: Dipra Aich <[email protected]>
Signed-off-by: Dipra Aich <[email protected]>
Signed-off-by: Dipra Aich <[email protected]>
38c06f2
to
95f5646
Compare
Signed-off-by: Dipra Aich <[email protected]>
Signed-off-by: Dipra Aich [email protected]
Description
Application Analytics - App does not respond if configuration is added and Update Chart is clicked
Issues Resolved
but only displays the part excluding the base query in UI.
It does not concatenate with the previous query.
#1136
#1168
Check List