mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
214fadef22
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "umami",
|
"name": "umami",
|
||||||
"version": "2.7.0",
|
"version": "2.8.0",
|
||||||
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
|
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
|
||||||
"author": "Mike Cao <mike@mikecao.com>",
|
"author": "Mike Cao <mike@mikecao.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -116,7 +116,7 @@ export default function WebsiteMenuView({ websiteId, websiteDomain }) {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.layout}>
|
<div className={styles.layout}>
|
||||||
<div className={styles.menu}>
|
<div className={styles.menu}>
|
||||||
<LinkButton href={pathname} className={styles.back} variant="quiet">
|
<LinkButton href={pathname} className={styles.back} variant="quiet" scroll={false}>
|
||||||
<Icon rotate={180}>
|
<Icon rotate={180}>
|
||||||
<Icons.ArrowRight />
|
<Icons.ArrowRight />
|
||||||
</Icon>
|
</Icon>
|
||||||
|
@ -3,7 +3,7 @@ import Link from 'next/link';
|
|||||||
import { useLocale } from 'components/hooks';
|
import { useLocale } from 'components/hooks';
|
||||||
import styles from './LinkButton.module.css';
|
import styles from './LinkButton.module.css';
|
||||||
|
|
||||||
export function LinkButton({ href, className, variant, children }) {
|
export function LinkButton({ href, className, variant, scroll = true, children }) {
|
||||||
const { dir } = useLocale();
|
const { dir } = useLocale();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -11,6 +11,7 @@ export function LinkButton({ href, className, variant, children }) {
|
|||||||
className={classNames(styles.button, className, { [styles[variant]]: true })}
|
className={classNames(styles.button, className, { [styles[variant]]: true })}
|
||||||
href={href}
|
href={href}
|
||||||
dir={dir}
|
dir={dir}
|
||||||
|
scroll={scroll}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -91,6 +91,7 @@ async function clickhouseQuery(
|
|||||||
eventName: a.eventName,
|
eventName: a.eventName,
|
||||||
fieldName: a.fieldName,
|
fieldName: a.fieldName,
|
||||||
dataType: Number(a.dataType),
|
dataType: Number(a.dataType),
|
||||||
|
fieldValue: a.fieldValue,
|
||||||
total: Number(a.total),
|
total: Number(a.total),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -24,10 +24,10 @@ async function relationalQuery(websiteId: string) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function clickhouseQuery(websiteId: string): Promise<{ x: number }[]> {
|
async function clickhouseQuery(websiteId: string): Promise<{ x: number }> {
|
||||||
const { rawQuery } = clickhouse;
|
const { rawQuery } = clickhouse;
|
||||||
|
|
||||||
return rawQuery(
|
const result = rawQuery(
|
||||||
`
|
`
|
||||||
select
|
select
|
||||||
count(distinct session_id) x
|
count(distinct session_id) x
|
||||||
@ -41,4 +41,6 @@ async function clickhouseQuery(websiteId: string): Promise<{ x: number }[]> {
|
|||||||
return { x: Number(a.x) };
|
return { x: Number(a.x) };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return result[0] ?? null;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ async function clickhouseQuery(
|
|||||||
params,
|
params,
|
||||||
).then(a => {
|
).then(a => {
|
||||||
return Object.values(a).map(a => {
|
return Object.values(a).map(a => {
|
||||||
return { ...a, x: a.x, y: Number(a.y) };
|
return { x: a.x, y: Number(a.y), country: a.country };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user