mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Merge dev.
This commit is contained in:
commit
b3f8bbe3fc
10 changed files with 58 additions and 70 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { useState, useMemo, useEffect } from 'react';
|
||||
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
|
||||
import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd';
|
||||
import classNames from 'classnames';
|
||||
import { Button, Loading, Toggle, SearchField } from 'react-basics';
|
||||
import { firstBy } from 'thenby';
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>
|
|||
};
|
||||
|
||||
const handleCheck = (checked: boolean) => {
|
||||
const data = { shareId: checked ? generateId() : null };
|
||||
const data = { name: website.name, shareId: checked ? generateId() : null };
|
||||
mutate(data, {
|
||||
onSuccess: async () => {
|
||||
touch(`website:${website.id}`);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { isbot } from 'isbot';
|
||||
import { serializeError } from 'serialize-error';
|
||||
import { createToken, parseToken, safeDecodeURI } from 'next-basics';
|
||||
import clickhouse from 'lib/clickhouse';
|
||||
import { parseRequest } from 'lib/request';
|
||||
|
|
@ -111,7 +110,7 @@ export async function POST(request: Request) {
|
|||
});
|
||||
} catch (e: any) {
|
||||
if (!e.message.toLowerCase().includes('unique constraint')) {
|
||||
return serverError(serializeError(e));
|
||||
return serverError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export function FilterLink({
|
|||
{safeDecodeURIComponent(label || value)}
|
||||
</Link>
|
||||
)}
|
||||
{externalUrl && (
|
||||
{value && (
|
||||
<a className={styles.link} href={externalUrl} target="_blank" rel="noreferrer noopener">
|
||||
<Icon className={styles.icon}>
|
||||
<Icons.External />
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ export const labels = defineMessages({
|
|||
filterRaw: { id: 'label.filter-raw', defaultMessage: 'Raw' },
|
||||
views: { id: 'label.views', defaultMessage: 'Views' },
|
||||
none: { id: 'label.none', defaultMessage: 'None' },
|
||||
directNone: { id: 'label.direct-none', defaultMessage: 'Direct / None' },
|
||||
clearAll: { id: 'label.clear-all', defaultMessage: 'Clear all' },
|
||||
property: { id: 'label.property', defaultMessage: 'Property' },
|
||||
today: { id: 'label.today', defaultMessage: 'Today' },
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function ReferrersTable(props: MetricsTableProps) {
|
|||
id="referrer"
|
||||
value={referrer}
|
||||
externalUrl={`https://${referrer}`}
|
||||
label={!referrer && formatMessage(labels.none)}
|
||||
label={!referrer && formatMessage(labels.directNone)}
|
||||
>
|
||||
<Favicon domain={referrer} />
|
||||
</FilterLink>
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ async function relationalQuery(
|
|||
let entryExitQuery = '';
|
||||
let excludeDomain = '';
|
||||
if (column === 'referrer_domain') {
|
||||
excludeDomain = `and website_event.referrer_domain != {{websiteDomain}}
|
||||
and website_event.referrer_domain is not null`;
|
||||
excludeDomain = `and website_event.referrer_domain != {{websiteDomain}}`;
|
||||
}
|
||||
|
||||
if (type === 'entry' || type === 'exit') {
|
||||
|
|
@ -103,7 +102,7 @@ async function clickhouseQuery(
|
|||
let entryExitQuery = '';
|
||||
|
||||
if (column === 'referrer_domain') {
|
||||
excludeDomain = `and referrer_domain != {websiteDomain:String} and referrer_domain != ''`;
|
||||
excludeDomain = `and referrer_domain != {websiteDomain:String}`;
|
||||
}
|
||||
|
||||
if (type === 'entry' || type === 'exit') {
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@
|
|||
method: 'POST',
|
||||
body: JSON.stringify({ type, payload }),
|
||||
headers,
|
||||
credentials: 'omit',
|
||||
});
|
||||
|
||||
const data = await res.json();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue