- Notifications
You must be signed in to change notification settings - Fork715
fix: No data found was displayed after refreshing on logs page till logs are fetched#8678
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Greptile Overview
Summary
This PR fixes a UX issue where users briefly saw "No data found" messages when refreshing the logs page before the actual data was loaded. The fix properly sets the loading state (searchObj.loading = true) before callingloadLogsData() in thesetupLogsTab() function.
Key Changes:
- Added
searchObj.loading = true;beforeloadLogsData()call insetupLogsTab()function - Fixed the loading state management to prevent premature display of empty state messages
- Minor code formatting improvements for
q-iconelements and import statements
Impact:
- Improved user experience by showing proper loading indicators during page refresh
- Consistent with existing loading state patterns used throughout the component
- No breaking changes or functional alterations to core logging functionality
Confidence Score: 4/5
- This PR is safe to merge with minimal risk as it only adds proper loading state management
- Score reflects a straightforward UX improvement with minimal code changes. The fix follows existing patterns in the codebase and addresses a specific UI issue without introducing complexity or breaking changes
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| web/src/plugins/logs/Index.vue | 4/5 | Fixed loading state issue where "No data found" was briefly shown during page refresh by setting searchObj.loading = true before calling loadLogsData() |
Sequence Diagram
sequenceDiagram participant User participant LogsPage as Logs Page Component participant LoadLogsData as loadLogsData Function participant API as Backend API User->>LogsPage: Refreshes logs page LogsPage->>LogsPage: setupLogsTab() called Note over LogsPage: Before fix: loading state not set<br/>After fix: searchObj.loading = true LogsPage->>LoadLogsData: loadLogsData() LoadLogsData->>API: getStreamList() LoadLogsData->>API: getFunctions() LoadLogsData->>API: extractFields() LoadLogsData->>API: getQueryData() API-->>LoadLogsData: Return data LoadLogsData->>LogsPage: refreshData() Note over LogsPage: searchObj.loading = false<br/>Data displayed to user LogsPage-->>User: Show logs dataNo files reviewed, no comments
3bcd8d3 to5e879f1Compare…umn to the table using the eye icon does not add the column
5e879f1 to9352545Compare
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 376 | 349 | 0 | 21 | 6 | 93% | 5m 31s |
1d4a796 intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
PR Type
Bug fix, Enhancement
Description
Prevent "No data" flash on refresh
Set loading true before logs fetch
Minor formatting for icon attributes
Normalize SQL mode checks spacing
Diagram Walkthrough
File Walkthrough
Index.vue
Set loading before fetching logs; minor formattingweb/src/plugins/logs/Index.vue
searchObj.loading = truebeforeloadLogsData()on logs tab.