mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
Removed filters from pages.
This commit is contained in:
parent
a026fc97fc
commit
358519dddd
@ -1,38 +1,16 @@
|
|||||||
import { useState } from 'react';
|
|
||||||
import FilterLink from 'components/common/FilterLink';
|
import FilterLink from 'components/common/FilterLink';
|
||||||
import FilterButtons from 'components/common/FilterButtons';
|
|
||||||
import { urlFilter } from 'lib/filters';
|
|
||||||
import MetricsTable from './MetricsTable';
|
import MetricsTable from './MetricsTable';
|
||||||
import { FILTER_COMBINED, FILTER_RAW } from 'lib/constants';
|
|
||||||
import useMessages from 'hooks/useMessages';
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
const filters = {
|
export default function PagesTable({ websiteId, ...props }) {
|
||||||
[FILTER_RAW]: null,
|
|
||||||
[FILTER_COMBINED]: urlFilter,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function PagesTable({ websiteId, showFilters, ...props }) {
|
|
||||||
const [filter, setFilter] = useState(FILTER_COMBINED);
|
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
const buttons = [
|
|
||||||
{
|
|
||||||
label: formatMessage(labels.filterCombined),
|
|
||||||
key: FILTER_COMBINED,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: formatMessage(labels.filterRaw),
|
|
||||||
key: FILTER_RAW,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const renderLink = ({ x: url }) => {
|
const renderLink = ({ x: url }) => {
|
||||||
return <FilterLink id="url" value={url} />;
|
return <FilterLink id="url" value={url} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{showFilters && <FilterButtons items={buttons} selectedKey={filter} onSelect={setFilter} />}
|
|
||||||
<MetricsTable
|
<MetricsTable
|
||||||
title={formatMessage(labels.pages)}
|
title={formatMessage(labels.pages)}
|
||||||
type="url"
|
type="url"
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
min-height: 90px;
|
min-height: 90px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
background: var(--base50);
|
background: var(--base50);
|
||||||
|
z-index: var(--z-index300);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sticky {
|
.sticky {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
z-index: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.isSticky {
|
.isSticky {
|
||||||
|
@ -58,7 +58,7 @@ async function relationalQuery(
|
|||||||
${filterQuery}
|
${filterQuery}
|
||||||
group by 1
|
group by 1
|
||||||
order by 2 desc
|
order by 2 desc
|
||||||
limit 200`,
|
limit 100`,
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ async function clickhouseQuery(
|
|||||||
${filterQuery}
|
${filterQuery}
|
||||||
group by x
|
group by x
|
||||||
order by y desc
|
order by y desc
|
||||||
limit 200`,
|
limit 100`,
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ async function relationalQuery(
|
|||||||
)
|
)
|
||||||
group by 1
|
group by 1
|
||||||
order by 2 desc
|
order by 2 desc
|
||||||
limit 200`,
|
limit 100`,
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ async function clickhouseQuery(
|
|||||||
${filterQuery}
|
${filterQuery}
|
||||||
group by x
|
group by x
|
||||||
order by y desc
|
order by y desc
|
||||||
limit 200`,
|
limit 100`,
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user