mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Fixed teams urls.
This commit is contained in:
parent
8a722ff013
commit
4b67d10f04
8 changed files with 17 additions and 25 deletions
|
|
@ -60,7 +60,7 @@ export function ReportHeader({ icon }) {
|
||||||
<div className={styles.type}>
|
<div className={styles.type}>
|
||||||
<Breadcrumb
|
<Breadcrumb
|
||||||
data={[
|
data={[
|
||||||
{ label: formatMessage(labels.reports), url: '/reports' },
|
{ label: formatMessage(labels.reports), url: renderTeamUrl('/reports') },
|
||||||
{
|
{
|
||||||
label: formatMessage(
|
label: formatMessage(
|
||||||
labels[Object.keys(REPORT_TYPES).find(key => REPORT_TYPES[key] === report?.type)],
|
labels[Object.keys(REPORT_TYPES).find(key => REPORT_TYPES[key] === report?.type)],
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
import Page from 'app/(main)/reports/goals/page';
|
|
||||||
|
|
||||||
export default Page;
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
'use client';
|
'use client';
|
||||||
import WebsitesHeader from 'app/(main)/settings/websites/WebsitesHeader';
|
import WebsitesHeader from 'app/(main)/settings/websites/WebsitesHeader';
|
||||||
import WebsitesDataTable from 'app/(main)/settings/websites/WebsitesDataTable';
|
import WebsitesDataTable from 'app/(main)/settings/websites/WebsitesDataTable';
|
||||||
|
import { useTeamUrl } from 'components/hooks';
|
||||||
|
|
||||||
|
export default function WebsitesPage() {
|
||||||
|
const { teamId } = useTeamUrl();
|
||||||
|
|
||||||
export default function WebsitesPage({ teamId }: { teamId: string }) {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WebsitesHeader teamId={teamId} allowCreate={false} />
|
<WebsitesHeader teamId={teamId} allowCreate={false} />
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import WebsitesPage from './WebsitesPage';
|
import WebsitesPage from './WebsitesPage';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
|
|
||||||
export default function ({ params: { teamId, userId } }) {
|
export default function () {
|
||||||
return <WebsitesPage teamId={teamId} userId={userId} />;
|
return <WebsitesPage />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
.favicon {
|
|
||||||
margin-inline-end: 8px;
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import styles from './Favicon.module.css';
|
|
||||||
|
|
||||||
function getHostName(url: string) {
|
function getHostName(url: string) {
|
||||||
const match = url.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:/\n?=]+)/im);
|
const match = url.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:/\n?=]+)/im);
|
||||||
return match && match.length > 1 ? match[1] : null;
|
return match && match.length > 1 ? match[1] : null;
|
||||||
|
|
@ -14,7 +12,6 @@ export function Favicon({ domain, ...props }) {
|
||||||
|
|
||||||
return hostName ? (
|
return hostName ? (
|
||||||
<img
|
<img
|
||||||
className={styles.favicon}
|
|
||||||
src={`https://icons.duckduckgo.com/ip3/${hostName}.ico`}
|
src={`https://icons.duckduckgo.com/ip3/${hostName}.ico`}
|
||||||
width={16}
|
width={16}
|
||||||
height={16}
|
height={16}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,21 @@
|
||||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
|
||||||
import FilterLink from 'components/common/FilterLink';
|
import FilterLink from 'components/common/FilterLink';
|
||||||
import Favicon from 'components/common/Favicon';
|
import Favicon from 'components/common/Favicon';
|
||||||
import { useMessages } from 'components/hooks';
|
import { useMessages } from 'components/hooks';
|
||||||
import { Flexbox } from 'react-basics';
|
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||||
|
|
||||||
export function ReferrersTable(props: MetricsTableProps) {
|
export function ReferrersTable(props: MetricsTableProps) {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
const renderLink = ({ x: referrer }) => {
|
const renderLink = ({ x: referrer }) => {
|
||||||
return (
|
return (
|
||||||
<Flexbox alignItems="center">
|
<FilterLink
|
||||||
|
id="referrer"
|
||||||
|
value={referrer}
|
||||||
|
externalUrl={`https://${referrer}`}
|
||||||
|
label={!referrer && formatMessage(labels.none)}
|
||||||
|
>
|
||||||
<Favicon domain={referrer} />
|
<Favicon domain={referrer} />
|
||||||
<FilterLink
|
</FilterLink>
|
||||||
id="referrer"
|
|
||||||
value={referrer}
|
|
||||||
externalUrl={`https://${referrer}`}
|
|
||||||
label={!referrer && formatMessage(labels.none)}
|
|
||||||
/>
|
|
||||||
</Flexbox>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,8 @@ async function clickhouseQuery(
|
||||||
order by t
|
order by t
|
||||||
`,
|
`,
|
||||||
params,
|
params,
|
||||||
).then(a => {
|
).then(result => {
|
||||||
return Object.values(a).map(a => {
|
return Object.values(result).map((a: any) => {
|
||||||
return { x: a.x, y: Number(a.y) };
|
return { x: a.x, y: Number(a.y) };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue