mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Updated hooks. Changed url, host to path, hostname.
This commit is contained in:
parent
25a9c011b3
commit
543674c7f2
146 changed files with 23348 additions and 2533 deletions
33
src/components/metrics/HostnamesTable.tsx
Normal file
33
src/components/metrics/HostnamesTable.tsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { MetricsTable, MetricsTableProps } from './MetricsTable';
|
||||
import { FilterLink } from '@/components/common/FilterLink';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Flexbox } from '@umami/react-zen';
|
||||
|
||||
export function HostnamesTable(props: MetricsTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
const renderLink = ({ x: hostname }) => {
|
||||
return (
|
||||
<Flexbox alignItems="center">
|
||||
<FilterLink
|
||||
id="hostname"
|
||||
value={hostname}
|
||||
externalUrl={`https://${hostname}`}
|
||||
label={!hostname && formatMessage(labels.none)}
|
||||
/>
|
||||
</Flexbox>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<MetricsTable
|
||||
{...props}
|
||||
title={formatMessage(labels.hostname)}
|
||||
type="hostname"
|
||||
metric={formatMessage(labels.visitors)}
|
||||
renderLabel={renderLink}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue