-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ui: remove $ internal
from apps filter option
#75470
Conversation
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @Azhng and @maryliag)
pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts, line 72 at r1 (raw file):
sqlStatsState.data.internal_app_name_prefix, )) || sqlStatsState.data.internal_app_name_prefix == undefined
This boolean expression is getting a bit complicated, thoughts on refactoring this a bit? I'm thinking something along the line of:
const containsRegularAppName = (sqlStatsState.data.internal_app_name_prefix &&
!statement.key.key_data.app.startsWith(
sqlStatsState.data.internal_app_name_prefix,
);
const isInternalAppNameUndefined = sqlStatsState.data.internal_app_name_prefix;
if (containsRegularAppname || isInternalAppNameUndefined) {
// ...
}
Previously, we had the option `$ internal` on the list of Apps on filters of both Statement and Transaction pages. We're making a change to not return internal filters anymore, so this commit remove that option from the filter, since it will always results on a blank table. Release note (ui change): Remove `$ internal` as one of the apps option under the Statements and Transactions page filters.
e83963b
to
997cbfb
Compare
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @Azhng)
pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts, line 72 at r1 (raw file):
Previously, Azhng (Archer Zhang) wrote…
This boolean expression is getting a bit complicated, thoughts on refactoring this a bit? I'm thinking something along the line of:
const containsRegularAppName = (sqlStatsState.data.internal_app_name_prefix && !statement.key.key_data.app.startsWith( sqlStatsState.data.internal_app_name_prefix, ); const isInternalAppNameUndefined = sqlStatsState.data.internal_app_name_prefix; if (containsRegularAppname || isInternalAppNameUndefined) { // ... }
created the isNotInternalApp
to make that part of the conditional easier to understand, but kept the check for undefined directly since it's too straight forward for a creation of a const just for this
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @Azhng)
bors r+ |
Build failed (retrying...): |
Build succeeded: |
Previously, we had the option
$ internal
on the list ofApps on filters of both Statement and Transaction pages.
We're making a change to not return internal filters anymore,
so this commit remove that option from the filter, since
it will always results on a blank table.
Release note (ui change): Remove
$ internal
as one of the appsoption under the Statements and Transactions page filters.