-
Notifications
You must be signed in to change notification settings - Fork 17
feat: show streaming query stats in Info tab #3060
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
base: main
Are you sure you want to change the base?
Conversation
|
Skipped: This PR does not contain any of your configured keywords: ( |
| const items = prepareStreamingQueryItems(sysData); | ||
|
|
||
| return ( | ||
| <Flex direction="column" gap="4"> |
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.
Do we really need this wrapper?
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.
No, It doesn't affect anything, i will remove it
| let errorData: ErrorResponse | string | undefined; | ||
| if (typeof errorRaw === 'string') { | ||
| try { | ||
| errorData = JSON.parse(errorRaw) as ErrorResponse; |
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.
in this case it seems that if error is not ErrorResponse, we shouldn't try to do anything with is. Lets add check isQueryErrorResponse and it will be enough.
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.
Error, that I received, is not ErrorResponse:
{\"severity\":1,\"issues\":[{\"message\"...
I don't have field error in the answer so this function isQueryErrorResponse will always return false(
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.
Discussed it, decided to keep this manual check of the error type
| return text; | ||
| } | ||
|
|
||
| let normalized = text.replace(/^\s*\n+/, ''); |
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.
maybe trim will be enough?
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "noData": "No data for entity:", | |||
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.
let's use naming rules https://nda.ya.ru/t/IA1ObQgE7MmHgF
| return {error}; | ||
| } | ||
| }, | ||
| forceRefetch() { |
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.
why do we need forceRefetch?
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 guess, you're right, we can drop forceRefetch. I only added it to keep the status up to date))
| return content; | ||
| return ( | ||
| <Button view="normal" onClick={() => setShowIssues(!showIssues)}> | ||
| {showIssues ? 'Hide details' : 'Show details'} |
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.
lets add i18n
|
|
||
| &__error-list, | ||
| &__error-list-item { | ||
| display: flex; |
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.
lets better use Flex component instead of custom stypes
|
|
||
| background-color: var(--g-color-base-background); | ||
|
|
||
| &_column { |
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.
Let's use Flex here too
| } | ||
|
|
||
| export function ResultIssues({data, hideSeverity}: ResultIssuesProps) { | ||
| export function ResultIssues({ |
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.

Stand: https://nda.ya.ru/t/MBz7A5F67MiSzf
Example with empty error field: https://nda.ya.ru/t/ySdr2jMd7MiSXF
CI Results
Test Status: β FAILED
π Full Report
Test Changes Summary βοΈ2
βοΈ Skipped Tests (2)
Bundle Size: π½
Current: 66.07 MB | Main: 66.08 MB
Diff: 8.51 KB (-0.01%)
β Bundle size decreased.
βΉοΈ CI Information