-
-
Notifications
You must be signed in to change notification settings - Fork 127
fix: prevent inconsistent demo data display across dashboard charts #1402
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3135ff9
fix: only show demo data when payment failed (forceDemo=true)
riderx e196b93
fix: use dashboardAppsStore to determine demo mode for charts
riderx 3979e82
fix: show 'No Data' consistently when chart has no data
riderx 1bcd208
fix: show 'No Data' in chart when no activity but total exists (Storage)
riderx 1f21491
fix: auto-scale Y-axis to make small values visible in charts
riderx 9a9b78f
fix: correct tooltip positioning to use relative canvas coordinates
riderx d76a8bb
fix: hide chart axis border lines for consistent grid appearance
riderx d650c88
fix: align tooltip date with actual chart X-axis label
riderx 264b60b
fix: normalize dates to midnight for consistent chart data alignment
riderx 2bfb34e
fix: include today's data in 30-day chart date range
riderx 8df26a0
fix: use tomorrow midnight as end date for MAU/storage/bandwidth queries
riderx 64d3dda
Merge branch 'main' into riderx/fix-dashboard-fake-data
riderx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <script setup lang="ts"> | ||
| import { useI18n } from 'vue-i18n' | ||
| import { useRouter } from 'vue-router' | ||
| import IconAlertCircle from '~icons/lucide/alert-circle' | ||
|
|
||
| const { t } = useI18n() | ||
| const router = useRouter() | ||
|
|
||
| function goToApps() { | ||
| router.push('/app') | ||
| } | ||
| </script> | ||
|
|
||
| <template> | ||
| <div class="flex absolute inset-0 z-10 flex-col justify-center items-center bg-white/60 dark:bg-gray-900/60"> | ||
| <div class="p-8 text-center bg-white rounded-xl border shadow-xl dark:bg-gray-800 border-red-200 dark:border-red-700"> | ||
| <div class="flex justify-center mb-4"> | ||
| <div class="flex justify-center items-center w-16 h-16 bg-red-100 rounded-full dark:bg-red-900/30"> | ||
| <IconAlertCircle class="w-8 h-8 text-red-500" /> | ||
| </div> | ||
| </div> | ||
| <h2 class="mb-2 text-2xl font-bold text-gray-900 dark:text-white"> | ||
| {{ t('app-not-found') }} | ||
| </h2> | ||
| <p class="mb-6 max-w-sm text-gray-600 dark:text-gray-400"> | ||
| {{ t('app-not-found-description') }} | ||
| </p> | ||
| <button | ||
| class="inline-flex gap-2 items-center px-6 py-3 text-white bg-primary rounded-lg transition-colors cursor-pointer hover:bg-primary/90 focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:outline-none" | ||
| @click="goToApps" | ||
| > | ||
| <svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor"> | ||
| <path fill-rule="evenodd" d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z" clip-rule="evenodd" /> | ||
| </svg> | ||
| {{ t('back-to-apps') }} | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
When the devices chart fails to load (e.g., API error or empty response),
rawChartDatastaysnull, which makesisDemoModetrue once loading finishes, so ChartCard renders the slot as “demo data.” HoweverprocessedChartDatais stillnull, and the<Line :data="processedChartData!">call now executes under that demo branch, which can throw or render a broken chart while showing the demo overlay. Consider only passingis-demo-datawhen demo data was actually loaded (e.g.,forceDemo) or guarding the slot render onprocessedChartDatabeing non-null.Useful? React with 👍 / 👎.