Merge pull request #14905 from supabase/master

prod deploy
This commit is contained in:
Terry Sutton authored and GitHub committed 2023-06-08 12:18:09 -02:30
commit d9bbd6f375
3 files changed
+6 -6

No files matched your search

@@ -16,7 +16,7 @@ import MembersExceedLimitModal from './MembersExceedLimitModal'
import PaymentMethodSelection from './PaymentMethodSelection'
import { plans as subscriptionsPlans } from 'shared-data/plans'
import { useProjectSubscriptionV2Query } from 'data/subscriptions/project-subscription-v2-query'
import { PRICING_TIER_PRODUCT_IDS, STRIPE_PRODUCT_IDS } from 'lib/constants'
import { PRICING_TIER_PRODUCT_IDS } from 'lib/constants'
const TierUpdateSidePanel = () => {
const { ui } = useStore()
@@ -63,18 +63,18 @@ const Usage = () => {
}, [dateRange, subscription])
const endDate = useMemo(() => {
// If end date is in future, set end date to now
// If end date is in future, set end date to end of current day
if (dateRange?.period_end?.date && dayjs(dateRange.period_end.date).isAfter(dayjs())) {
// LF seems to have an issue with the milliseconds, causes infinite loading sometimes
return new Date().toISOString().slice(0, -5) + 'Z'
// In order to have full days from Prometheus metrics when using 1d interval,
// the time needs to be greater or equal than the time of the start date
return dayjs().endOf('day').toISOString().slice(0, -5) + 'Z'
} else if (dateRange?.period_end?.date) {
// LF seems to have an issue with the milliseconds, causes infinite loading sometimes
return new Date(dateRange.period_end.date).toISOString().slice(0, -5) + 'Z'
}
}, [dateRange, subscription])
console.log({ startDate, endDate })
const { data: ioBudgetData } = useInfraMonitoringQuery({
projectRef: selectedProjectRef,
attribute: 'disk_io_budget',
+1 -1
View File
@@ -131,7 +131,7 @@ export const useDailyStatsQuery = <TData = DailyStatsData>(
typeof endDate !== 'undefined',
select(data) {
const noDataYet = data.data[0].id === undefined
const noDataYet = data.data[0]?.id === undefined
// [Joshen] Ideally handled by API, like infra-monitoring
if (noDataYet) {