-
Notifications
You must be signed in to change notification settings - Fork 715
fix: fixed tabs column issue in scheduled dashboard table #4516
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
Conversation
|
Warning Rate limit exceeded@omkarK06 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 32 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes involve enhancements to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ScheduledDashboards
participant ViewDashboard
User->>ScheduledDashboards: Request dashboard data
ScheduledDashboards->>ScheduledDashboards: Check loading state
alt Loading
ScheduledDashboards->>User: Show loading spinner
else Data Loaded
ScheduledDashboards->>ScheduledDashboards: Render reportTypeTabs
ScheduledDashboards->>ScheduledDashboards: Call getTabName(tabId)
end
User->>ViewDashboard: Open specific dashboard
ViewDashboard->>ViewDashboard: Bind tabs from currentDashboardData
alt No tabs available
ViewDashboard->>ViewDashboard: Default to empty array
end
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
web/src/views/Dashboards/ScheduledDashboards.vue (1)
44-46: Nitpick: Remove the unnecessary<template>tag.Since there is only one root element, the
<template>tag can be removed:-<template> <NoData /> -</template>
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/src/views/Dashboards/ScheduledDashboards.vue (6 hunks)
- web/src/views/Dashboards/ViewDashboard.vue (1 hunks)
Additional comments not posted (8)
web/src/views/Dashboards/ScheduledDashboards.vue (7)
36-42: LGTM!The addition of the loading spinner improves the user experience by providing visual feedback while data is being fetched.
57-57: LGTM!The prop renaming from
tabstoreportTypeTabsimproves code readability by clarifying the purpose of the tabs.
143-146: Request for more information: Clarify the purpose and usage of the newtabsprop.A new prop
tabsof typeArrayis added to the component. However, the purpose and usage of this prop within the component is unclear from the given context.Please provide more information about:
- What data does this prop expect to receive?
- How is this prop being used within the component?
- Is this prop being passed from the parent component? If so, please point to the relevant code segment.
Clarifying these points will help in understanding the role of this new prop in the component.
Line range hint
165-173: LGTM!The
tabsproperty is renamed toreportTypeTabs, which is consistent with the prop renaming and improves code consistency.
193-193: LGTM!The introduction of the
getTabNamehelper function to retrieve the tab name based on thetabIdimproves code modularity and maintainability.
196-199: LGTM!The code segment ensures that the
last_triggered_atproperty is consistently formatted by checking the length of thelastTriggeredAtproperty and adjusting the timestamp if necessary before passing it toconvertUnixToQuasarFormat. This handles potential inconsistencies in the timestamp format.
211-214: LGTM!The
getTabNamehelper function improves code modularity and maintainability by encapsulating the logic to retrieve the tab name based on thetabId. It relies on thetabsprop to find the corresponding tab object.web/src/views/Dashboards/ViewDashboard.vue (1)
246-246: LGTM!The new prop binding
:tabs="currentDashboardData?.data?.tabs || []"passes thetabsdata fromcurrentDashboardData.datato theScheduledDashboardscomponent. The use of optional chaining and the fallback to an empty array ensures that theScheduledDashboardscomponent always receives a validtabsprop, preventing potential issues with undefined values.
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
web/src/views/Dashboards/ScheduledDashboards.vue (1)
44-46: Nitpick: Remove the unnecessary<template>tag.The
<template>tag is not needed here since there is only one root element inside it.Apply this diff to remove the
<template>tag:- <template> <NoData /> - </template> + <NoData />
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/src/components/reports/CreateReport.vue (1 hunks)
- web/src/views/Dashboards/ScheduledDashboards.vue (6 hunks)
Additional comments not posted (4)
web/src/views/Dashboards/ScheduledDashboards.vue (3)
36-42: LGTM!The code changes to display a loading spinner while data is being fetched are approved. This improves the user experience.
57-57: LGTM!The prop renaming from
tabstoreportTypeTabsis approved. It improves code readability.
165-165: LGTM!The code changes related to tab management are approved:
- Renaming
tabstoreportTypeTabsimproves clarity.- The new
getTabNamehelper function retrieves the tab name correctly based on thetabId.Also applies to: 193-193, 208-211
web/src/components/reports/CreateReport.vue (1)
1325-1325: LGTM, but verify the timestamp usage.The change to store the
lastTriggeredAttimestamp in microseconds instead of milliseconds is approved.However, please ensure that all the code that consumes this timestamp is updated to handle the increased precision to avoid any issues.
Run the following script to verify the timestamp usage:
#!/bin/bash # Description: Verify that the code consuming `lastTriggeredAt` is updated to handle microseconds. # Test: Search for the usage of `lastTriggeredAt`. Expect: Code should handle microsecond precision. rg --type typescript --type vue $'lastTriggeredAt' -A 5
58fe56e to
05d763f
Compare
#4508
Showing the wrong last trigger date; it displays as 1970.
Tab ID is being shown in the tab field instead of tab name
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Improvements
tabsproperty toreportTypeTabsfor better readability.