-
Notifications
You must be signed in to change notification settings - Fork 919
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
[query assist] use badge to show agent errors #7998
Conversation
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Thanks a ton for this. I too believe this is a good compromise until we can update the underlying component. While it is not perfect, it will prevent us from adding hackiness. |
Another option is hide the |
It would be ideal to add a feature in OUI text field so that it can append element inside itself. For now we have 2 workarounds: - calculate padding using dynamic width: it is hacky because it involves dynamically retrieving badge width and doing math to compute the correct padding. The math won't make sense if for example the layout changes, or text field size changes. - using css to change background on focus (implemented): this is less hacky because it doesn't involve math calculations. The downside is that it doesn't look perfect as the mocks. Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
7df6453
to
b83fdec
Compare
There is a very limited subset of We also need to think about where we might show query errors, or summary errors. Those should be in the query area and the summary area respectively. We should truncate the text when it's a single line and not in focus |
> | ||
<EuiText size="s" className="queryAssist__popoverText"> | ||
<dl> | ||
<dd id="queryAssistErrorTitle"> |
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 should use <EuiIcon type="alert" />
as opposed to having CSS add a different icon that the prescribed one.
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
- enable query assist for index patterns without data source - add agent error parsing utils - update ml-commons response schema processing - previously ml-commons returns error.body as a string, now it is a JSON object. Ideally frontend should keep it as is to reduce serializing/deserializing, but since older version of ml-commons can be used through MDS, we'll keep it as a string for consistency - use badge to show query assist error if possible - add unit tests Signed-off-by: Joshua Li <[email protected]> (cherry picked from commit 461a395) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- enable query assist for index patterns without data source - add agent error parsing utils - update ml-commons response schema processing - previously ml-commons returns error.body as a string, now it is a JSON object. Ideally frontend should keep it as is to reduce serializing/deserializing, but since older version of ml-commons can be used through MDS, we'll keep it as a string for consistency - use badge to show query assist error if possible - add unit tests (cherry picked from commit 461a395) Signed-off-by: Joshua Li <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- enable query assist for index patterns without data source - add agent error parsing utils - update ml-commons response schema processing - previously ml-commons returns error.body as a string, now it is a JSON object. Ideally frontend should keep it as is to reduce serializing/deserializing, but since older version of ml-commons can be used through MDS, we'll keep it as a string for consistency - use badge to show query assist error if possible - add unit tests Signed-off-by: Joshua Li <[email protected]> (cherry picked from commit 461a395) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- enable query assist for index patterns without data source - add agent error parsing utils - update ml-commons response schema processing - previously ml-commons returns error.body as a string, now it is a JSON object. Ideally frontend should keep it as is to reduce serializing/deserializing, but since older version of ml-commons can be used through MDS, we'll keep it as a string for consistency - use badge to show query assist error if possible - add unit tests (cherry picked from commit 461a395) Signed-off-by: Joshua Li <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
… (opensearch-project#8146) - enable query assist for index patterns without data source - add agent error parsing utils - update ml-commons response schema processing - previously ml-commons returns error.body as a string, now it is a JSON object. Ideally frontend should keep it as is to reduce serializing/deserializing, but since older version of ml-commons can be used through MDS, we'll keep it as a string for consistency - use badge to show query assist error if possible - add unit tests (cherry picked from commit 461a395) Signed-off-by: Joshua Li <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
this PR fixes some bugs caused by dataset and ml-commons api change, and adds error to badge on UI
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration