mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Always cache prisma. Renamed WebsiteMonthSelect to MonthFilter.
This commit is contained in:
parent
92ee44756c
commit
904c313a64
7 changed files with 11 additions and 11 deletions
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3001 --turbopack",
|
||||
"dev": "next dev -p 3001 --turbo",
|
||||
"build": "npm-run-all check-env build-db check-db build-tracker build-geo build-app",
|
||||
"start": "next start",
|
||||
"build-docker": "npm-run-all build-db build-tracker build-geo build-app",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Column, Row } from '@umami/react-zen';
|
|||
import { WebsiteFilterButton } from '@/components/input/WebsiteFilterButton';
|
||||
import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';
|
||||
import { FilterBar } from '@/components/input/FilterBar';
|
||||
import { WebsiteMonthSelect } from '@/components/input/WebsiteMonthSelect';
|
||||
import { MonthFilter } from '@/components/input/MonthFilter';
|
||||
import { ExportButton } from '@/components/input/ExportButton';
|
||||
|
||||
export function LinkControls({
|
||||
|
|
@ -24,7 +24,7 @@ export function LinkControls({
|
|||
{allowFilter ? <WebsiteFilterButton websiteId={websiteId} /> : <div />}
|
||||
{allowDateFilter && <WebsiteDateFilter websiteId={websiteId} showAllTime={false} />}
|
||||
{allowDownload && <ExportButton websiteId={websiteId} />}
|
||||
{allowMonthFilter && <WebsiteMonthSelect websiteId={websiteId} />}
|
||||
{allowMonthFilter && <MonthFilter />}
|
||||
</Row>
|
||||
{allowFilter && <FilterBar websiteId={websiteId} />}
|
||||
</Column>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Column, Row } from '@umami/react-zen';
|
|||
import { WebsiteFilterButton } from '@/components/input/WebsiteFilterButton';
|
||||
import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';
|
||||
import { FilterBar } from '@/components/input/FilterBar';
|
||||
import { WebsiteMonthSelect } from '@/components/input/WebsiteMonthSelect';
|
||||
import { MonthFilter } from '@/components/input/MonthFilter';
|
||||
import { ExportButton } from '@/components/input/ExportButton';
|
||||
|
||||
export function PixelControls({
|
||||
|
|
@ -24,7 +24,7 @@ export function PixelControls({
|
|||
{allowFilter ? <WebsiteFilterButton websiteId={websiteId} /> : <div />}
|
||||
{allowDateFilter && <WebsiteDateFilter websiteId={websiteId} showAllTime={false} />}
|
||||
{allowDownload && <ExportButton websiteId={websiteId} />}
|
||||
{allowMonthFilter && <WebsiteMonthSelect websiteId={websiteId} />}
|
||||
{allowMonthFilter && <MonthFilter />}
|
||||
</Row>
|
||||
{allowFilter && <FilterBar websiteId={websiteId} />}
|
||||
</Column>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Column, Row } from '@umami/react-zen';
|
|||
import { WebsiteFilterButton } from '@/components/input/WebsiteFilterButton';
|
||||
import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';
|
||||
import { FilterBar } from '@/components/input/FilterBar';
|
||||
import { WebsiteMonthSelect } from '@/components/input/WebsiteMonthSelect';
|
||||
import { MonthFilter } from '@/components/input/MonthFilter';
|
||||
import { ExportButton } from '@/components/input/ExportButton';
|
||||
|
||||
export function WebsiteControls({
|
||||
|
|
@ -26,7 +26,7 @@ export function WebsiteControls({
|
|||
{allowFilter ? <WebsiteFilterButton websiteId={websiteId} /> : <div />}
|
||||
{allowDateFilter && <WebsiteDateFilter websiteId={websiteId} allowCompare={allowCompare} />}
|
||||
{allowDownload && <ExportButton websiteId={websiteId} />}
|
||||
{allowMonthFilter && <WebsiteMonthSelect websiteId={websiteId} />}
|
||||
{allowMonthFilter && <MonthFilter />}
|
||||
</Row>
|
||||
{allowFilter && <FilterBar websiteId={websiteId} />}
|
||||
</Column>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useDateRange, useNavigation } from '@/components/hooks';
|
|||
import { getMonthDateRangeValue } from '@/lib/date';
|
||||
import { MonthSelect } from './MonthSelect';
|
||||
|
||||
export function WebsiteMonthSelect() {
|
||||
export function MonthFilter() {
|
||||
const { router, updateParams } = useNavigation();
|
||||
const {
|
||||
dateRange: { startDate },
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { LoadingButton, Icon, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import { setWebsiteDateRange } from '@/store/websites';
|
||||
import { useDateRange } from '@/components/hooks';
|
||||
import { Refresh } from '@/components/icons';
|
||||
import { RefreshCw } from '@/components/icons';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function RefreshButton({
|
||||
|
|
@ -24,7 +24,7 @@ export function RefreshButton({
|
|||
<TooltipTrigger>
|
||||
<LoadingButton isLoading={isLoading} onPress={handleClick}>
|
||||
<Icon>
|
||||
<Refresh />
|
||||
<RefreshCw />
|
||||
</Icon>
|
||||
</LoadingButton>
|
||||
<Tooltip>{formatMessage(labels.refresh)}</Tooltip>
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ function getClient() {
|
|||
replicaUrl: process.env.DATABASE_REPLICA_URL,
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (!globalThis[PRISMA]) {
|
||||
globalThis[PRISMA] = prisma.client;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue