-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: update empty state of infra monitoring tables #7003
base: main
Are you sure you want to change the base?
Conversation
Amlan Kumar Nandy seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
👍 Looks good to me! Reviewed everything up to d6e0c5d in 59 seconds
More details
- Looked at
1925
lines of code in18
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. frontend/src/hooks/infraMonitoring/useGetK8sEntityStatus.ts:25
- Draft comment:
ThequeryKey
logic can be simplified by directly returning the default key if no custom key is provided. Consider using a ternary operator for clarity. - Reason this comment was not posted:
Confidence changes required:20%
The code inuseGetK8sEntityStatus.ts
is well-structured, but there's a minor improvement that can be made for clarity. ThequeryKey
logic can be simplified by directly returning the default key if no custom key is provided.
2. frontend/src/api/infraMonitoring/getK8sEntityStatus.ts:41
- Draft comment:
Consider using the message from the response if available, instead of hardcoding 'Success'. - Reason this comment was not posted:
Confidence changes required:30%
The PR introduces a new filegetK8sEntityStatus.ts
which fetches Kubernetes entity status. The error handling is done usingErrorResponseHandler
, which is consistent with the existing codebase. However, themessage
field in the success response is hardcoded to 'Success', which might not always be accurate. It would be better to use the message from the response if available.
3. frontend/src/container/InfraMonitoringK8s/EntityStatusEmptyStateWrapper.tsx:114
- Draft comment:
Remove theconsole.log
statement as it is unnecessary in production code. - Reason this comment was not posted:
Confidence changes required:50%
TheEntityStatusEmptyStateWrapper
component is responsible for rendering different empty states based on the category and data. However, theconsole.log
statement on line 114 is unnecessary and should be removed in production code.
4. frontend/src/container/InfraMonitoringHosts/HostsListTable.tsx:103
- Draft comment:
Remove the commented-outSkeleton.Input
section as it is not used in the current implementation. - Reason this comment was not posted:
Confidence changes required:20%
TheHostsListTable.tsx
file has a commented-out section for loading state usingSkeleton.Input
. This is not used in the current implementation and should be removed to keep the code clean.
5. frontend/src/container/InfraMonitoringK8s/Jobs/K8sJobsList.tsx:460
- Draft comment:
Avoid using inline styles in React components. Instead, use external stylesheets, CSS classes, or styled components. This issue is also present in other files likeK8sNamespacesList.tsx
,K8sNodesList.tsx
,K8sPodLists.tsx
,K8sStatefulSetsList.tsx
, andK8sVolumesList.tsx
. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_VcEklHBBjeANfFcb
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
<Typography.Text className="no-filtered-hosts-message"> | ||
This query had no results. Edit your query and try again! | ||
</Typography.Text> | ||
<EntityStatusEmptyStateWrapper |
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.
Haven't really made any huge changes here or in any of the listing pages. Only added the EntityStatusEmptyStateWrapper
around the table component everywhere, due to which the padding shifted. The changes are not as big as the lines of code suggest.
d6e0c5d
to
5114c14
Compare
Partial metrics detected. The following metrics from the kubelet metrics are | ||
not received. They help monitor the resource utilisation to their | ||
requests/limits. Learn more{' '} | ||
<Typography.Link href="placeholder">here</Typography.Link> about how to send |
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.
Waiting to get the links for a couple of places here. Will update these before merging.
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.
👍 Looks good to me! Incremental review on 69ef3fd in 25 seconds
More details
- Looked at
67
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/EntityStatusEmptyStateWrapper.tsx:59
- Draft comment:
The href attribute is set to "placeholder". Ensure to replace it with the actual documentation link before merging. - Reason this comment was not posted:
Comment did not seem useful.
2. frontend/src/container/InfraMonitoringK8s/EntityStatusEmptyStateWrapper.tsx:55
- Draft comment:
Avoid using inline styles for the image and text components. Use external stylesheets, CSS classes, or styled components instead. This applies to the image on line 177 and the text on line 183. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_YgRAl1gdsKu50UVE
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@amlannandy, I assigned this to myself and will update the placeholder links when the docs PR is merged. |
Got it 👍🏻 |
Summary
Update the empty states of both hosts and k8s tables to provide more accurate information.
Related Issues / PR's
Fixes #6889
Fixes #6890
Fixes #6980
Screenshots
Affected Areas and Manually Tested Areas
Important
Update empty states for infra monitoring tables with new K8s entity status handling and improved UI messages.
HostsEmptyOrIncorrectMetrics.tsx
andEntityStatusEmptyStateWrapper.tsx
.getK8sEntityStatus
ingetK8sEntityStatus.ts
to fetch K8s entity status.useGetK8sEntityStatus
hook inuseGetK8sEntityStatus.ts
to utilize the new API.K8sEntityStatusResponse
interface ingetK8sEntityStatus.ts
.GET_K8S_ENTITY_STATUS
toreactQueryKeys.ts
.HostsListTable.tsx
andInfraMonitoringK8s.tsx
to use new empty state logic.K8sClustersList.tsx
,K8sDaemonSetsList.tsx
) to integrateEntityStatusEmptyStateWrapper
.InfraMonitoringK8s.styles.scss
for new empty state messages.This description was created by
for 69ef3fd. It will automatically update as commits are pushed.