Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.5.0 #2203

Merged
merged 117 commits into from
Aug 18, 2023
Merged

v2.5.0 #2203

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
d9f1cbf
[ImgBot] Optimize images
ImgBotApp Aug 2, 2023
7b9c29e
Check for DISABLE_LOGIN on api route.
mikecao Aug 2, 2023
4497951
Split out session query.
mikecao Aug 2, 2023
2d04e46
Insights progress update.
mikecao Aug 3, 2023
b65c478
Merge branch 'master' into dev
mikecao Aug 3, 2023
1578628
Refactored query filters.
mikecao Aug 4, 2023
9cde107
build out retention reports
franciscao633 Aug 4, 2023
8fff657
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 4, 2023
7148f66
Refactored query parameter handling.
mikecao Aug 4, 2023
74b5b14
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 4, 2023
c0ef8da
Fixed session queries.
mikecao Aug 4, 2023
9deda2b
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 4, 2023
2559263
Fixed session queries.
mikecao Aug 4, 2023
fab818e
add referrer query inside undefine / ignore check
franciscao633 Aug 4, 2023
688705d
Added query options.
mikecao Aug 4, 2023
0fd57aa
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 4, 2023
dbdbc90
fix if else in referrer filter
franciscao633 Aug 4, 2023
cad3dd8
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 4, 2023
e11766c
Fixed event data queries.
mikecao Aug 4, 2023
89f7b39
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 4, 2023
1d1b9cf
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 4, 2023
91d2b59
Fixed event data display.
mikecao Aug 4, 2023
ff58842
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 4, 2023
5e1111d
Update to insights query.
mikecao Aug 5, 2023
f48720c
Breakdown feature for insights report.
mikecao Aug 7, 2023
f57fbe6
Support Cloudflare headers for city and region.
mikecao Aug 7, 2023
1120052
Fixed events query.
mikecao Aug 7, 2023
9d86385
Updated filtering logic.
mikecao Aug 7, 2023
7da7f58
Added "columns" to query options. Added events count to event data me…
mikecao Aug 7, 2023
a71cf67
Fixed event data query.
mikecao Aug 7, 2023
13530c9
add psql query for retention
franciscao633 Aug 7, 2023
fc5a1f4
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 7, 2023
15575d7
fix column data in relational event data query
franciscao633 Aug 7, 2023
2eee9c2
Added useFormat hook to format special values.
mikecao Aug 7, 2023
c4bbcf3
Wrong column.
mikecao Aug 7, 2023
85c5934
Updated insights report rendering.
mikecao Aug 8, 2023
77d170e
Fixed event data display.
mikecao Aug 8, 2023
bf50703
finish CH query and clean up objects
franciscao633 Aug 8, 2023
5772941
remove retention chart
franciscao633 Aug 8, 2023
72248ff
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
franciscao633 Aug 8, 2023
618c643
Insights report filtering.
mikecao Aug 8, 2023
c9e4c69
Update zh-CN.json
essesoul Aug 9, 2023
bbc19c6
Replaced labels.
mikecao Aug 9, 2023
acbffed
Fixed incorrect labels.
mikecao Aug 9, 2023
5039349
Insights report filters.
mikecao Aug 9, 2023
50b3ad8
increase operation-per-run for stale issues
franciscao633 Aug 9, 2023
39fb4fd
Added field types.
mikecao Aug 10, 2023
45888fa
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 10, 2023
dcf8b2e
Add Search Api/Components.
briancao Aug 10, 2023
c87c59c
Merge pull request #2187 from Lonor/imgbot
mikecao Aug 11, 2023
24669a3
Merge pull request #2192 from umami-software/feat/um-376-retention-re…
mikecao Aug 11, 2023
cbe1a21
Add query types.
briancao Aug 11, 2023
937ff82
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 11, 2023
37f0e37
feat: add some Myanmar translation
zer0eXploit Aug 11, 2023
e6ab1e8
feat: add the rest of Myanmar translations
HtetOoWaiYan Aug 11, 2023
9436efa
Insights report filtering.
mikecao Aug 11, 2023
1b4c5c8
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 11, 2023
cbed961
Fix search results.
briancao Aug 11, 2023
0a81a4a
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 11, 2023
5e64eac
Add no reports message.
briancao Aug 11, 2023
b37a1fc
fix day filter
franciscao633 Aug 11, 2023
820ad69
Retention report updates.
mikecao Aug 13, 2023
6d43cb2
Remove case sensitivity on search.
briancao Aug 13, 2023
c2de8e4
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 13, 2023
f7eeaa6
Add website/reports to top nav.
briancao Aug 14, 2023
96d7478
Edit button states.
briancao Aug 14, 2023
743e7c0
Update show website state.
briancao Aug 14, 2023
5168cf2
Update language. Resolve loading reports error.
briancao Aug 14, 2023
8f542ed
Re-add message.
briancao Aug 14, 2023
e45d014
use functions to convert dates to string
franciscao633 Aug 15, 2023
29a943d
Add timezone to report queries.
mikecao Aug 15, 2023
6ef1f2e
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 15, 2023
1d78cc4
fix UTC timezone for CH query
franciscao633 Aug 15, 2023
27226d1
Merge branch 'dev' of https://github.com/umami-software/umami into dev
franciscao633 Aug 15, 2023
203f4e8
Add search Mode for mysql.
briancao Aug 15, 2023
14df1e5
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 15, 2023
979ea33
add daydiff function query
franciscao633 Aug 15, 2023
a16b0ce
Merge branch 'dev' of https://github.com/umami-software/umami into dev
franciscao633 Aug 15, 2023
495b7f1
fix mysql retention query
franciscao633 Aug 15, 2023
c3d0a1a
Fix noResultsFound.
briancao Aug 15, 2023
0b9987d
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 15, 2023
38445fc
Fix test console.
briancao Aug 15, 2023
c3e261f
Resolve issues in event data
franciscao633 Aug 16, 2023
c548267
Added month select component.
mikecao Aug 16, 2023
b69a6bb
stale-issues add ordering to look at old issues first
franciscao633 Aug 16, 2023
d7bf793
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 16, 2023
3601cb6
Change day range for retention.
mikecao Aug 16, 2023
927ebd7
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 16, 2023
7df142b
reorder getfunnel where to match index
franciscao633 Aug 16, 2023
d6c8f3a
fix mapfilter / rawquery for relational
franciscao633 Aug 16, 2023
0dfa6c1
Remove add buttons for cloud mode.
briancao Aug 16, 2023
2e2b141
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 16, 2023
1466505
add normalize filters to clickhouse
franciscao633 Aug 16, 2023
6dba68c
add metric performance indexes
franciscao633 Aug 16, 2023
bd87858
Merge pull request #2200 from umami-software/feat/um-311-relational-i…
mikecao Aug 17, 2023
9b8fa08
Fixed ugly navbar.
mikecao Aug 17, 2023
2c8996b
Retention report UI updates.
mikecao Aug 17, 2023
58527c3
Set onfocus.
briancao Aug 17, 2023
9a7fb1f
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 17, 2023
f35a9f0
Add page of intl.
briancao Aug 17, 2023
e42fe5c
fix event data stats
franciscao633 Aug 17, 2023
6a9f7ba
Merge branch 'dev' of https://github.com/umami-software/umami into dev
franciscao633 Aug 17, 2023
e48610e
Fixed filter select for insights.
mikecao Aug 17, 2023
b157ba5
Merge remote-tracking branch 'origin/dev' into dev
mikecao Aug 17, 2023
211ecf7
Added formatMessage wrapper. Updated messages.
mikecao Aug 17, 2023
69389eb
Add team reports.
briancao Aug 17, 2023
530fc5d
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 17, 2023
e49b0c1
Merge branch 'dev' into essesoul
mikecao Aug 18, 2023
8bbc332
Merge pull request #2195 from essesoul/essesoul
mikecao Aug 18, 2023
478235d
Updated messages.
mikecao Aug 18, 2023
1e7681f
Bump version v2.5.0.
mikecao Aug 18, 2023
2376163
Merge pull request #2196 from zer0eXploit/master
mikecao Aug 18, 2023
e482860
Updated my-MY lang files.
mikecao Aug 18, 2023
d3e175a
Hide edit button cloudMode.
briancao Aug 18, 2023
e518d44
Merge remote-tracking branch 'origin/dev' into dev
briancao Aug 18, 2023
bc7111a
Re-add add reports button.
briancao Aug 18, 2023
fefea88
Update react-basics.
mikecao Aug 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"@next/next/no-img-element": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off"
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-interface": "off"
},
"globals": {
"React": "writable"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ jobs:
close-issue-message: 'This issue was closed because it has been inactive for 7 days since being marked as stale.'
days-before-pr-stale: -1
days-before-pr-close: -1
operations-per-run: 200
ascending: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions assets/magnet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions components/common/Pager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import styles from './Pager.module.css';
import { Button, Flexbox, Icon, Icons } from 'react-basics';
import useMessages from 'hooks/useMessages';

export function Pager({ page, pageSize, count, onPageChange }) {
const { formatMessage, labels } = useMessages();
const maxPage = Math.ceil(count / pageSize);
const lastPage = page === maxPage;
const firstPage = page === 1;

if (count === 0) {
return null;
}

const handlePageChange = value => {
const nextPage = page + value;
if (nextPage > 0 && nextPage <= maxPage) {
onPageChange(nextPage);
}
};

if (maxPage === 1) {
return null;
}

return (
<Flexbox justifyContent="center" className={styles.container}>
<Button onClick={() => handlePageChange(-1)} disabled={firstPage}>
<Icon rotate={90}>
<Icons.ChevronDown />
</Icon>
</Button>
<Flexbox alignItems="center" className={styles.text}>
{formatMessage(labels.pageOf, { current: page, total: maxPage })}
</Flexbox>
<Button onClick={() => handlePageChange(1)} disabled={lastPage}>
<Icon rotate={270}>
<Icons.ChevronDown />
</Icon>
</Button>
</Flexbox>
);
}

export default Pager;
7 changes: 7 additions & 0 deletions components/common/Pager.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.container {
margin-top: 20px;
}

.text {
margin: 0 16px;
}
122 changes: 92 additions & 30 deletions components/common/SettingsTable.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,99 @@
import { Table, TableHeader, TableBody, TableRow, TableCell, TableColumn } from 'react-basics';
import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
import useMessages from 'hooks/useMessages';
import { useState } from 'react';
import {
SearchField,
Table,
TableBody,
TableCell,
TableColumn,
TableHeader,
TableRow,
} from 'react-basics';
import styles from './SettingsTable.module.css';
import Pager from 'components/common/Pager';

export function SettingsTable({
columns = [],
data,
children,
cellRender,
showSearch,
showPaging,
onFilterChange,
onPageChange,
onPageSizeChange,
filterValue,
}) {
const { formatMessage, messages } = useMessages();
const [filter, setFilter] = useState(filterValue);
const { data: value, page, count, pageSize } = data;

const handleFilterChange = value => {
setFilter(value);
onFilterChange(value);
};

export function SettingsTable({ columns = [], data = [], children, cellRender }) {
return (
<Table columns={columns} rows={data}>
<TableHeader className={styles.header}>
{(column, index) => {
return (
<TableColumn key={index} className={styles.cell} style={columns[index].style}>
{column.label}
</TableColumn>
);
}}
</TableHeader>
<TableBody className={styles.body}>
{(row, keys, rowIndex) => {
row.action = children(row, keys, rowIndex);
<>
{showSearch && (
<SearchField
onChange={handleFilterChange}
delay={1000}
value={filter}
autoFocus={true}
placeholder="Search"
style={{ maxWidth: '300px', marginBottom: '10px' }}
/>
)}
{value.length === 0 && filterValue && (
<EmptyPlaceholder message={formatMessage(messages.noResultsFound)}></EmptyPlaceholder>
)}
{value.length > 0 && (
<Table columns={columns} rows={value}>
<TableHeader className={styles.header}>
{(column, index) => {
return (
<TableColumn key={index} className={styles.cell} style={columns[index].style}>
{column.label}
</TableColumn>
);
}}
</TableHeader>
<TableBody className={styles.body}>
{(row, keys, rowIndex) => {
row.action = children(row, keys, rowIndex);

return (
<TableRow key={rowIndex} data={row} keys={keys} className={styles.row}>
{(data, key, colIndex) => {
return (
<TableCell key={colIndex} className={styles.cell} style={columns[colIndex].style}>
<label className={styles.label}>{columns[colIndex].label}</label>
{cellRender ? cellRender(row, data, key, colIndex) : data[key]}
</TableCell>
);
}}
</TableRow>
);
}}
</TableBody>
</Table>
return (
<TableRow key={rowIndex} data={row} keys={keys} className={styles.row}>
{(data, key, colIndex) => {
return (
<TableCell
key={colIndex}
className={styles.cell}
style={columns[colIndex].style}
>
<label className={styles.label}>{columns[colIndex].label}</label>
{cellRender ? cellRender(row, data, key, colIndex) : data[key]}
</TableCell>
);
}}
</TableRow>
);
}}
</TableBody>
{showPaging && (
<Pager
page={page}
pageSize={pageSize}
count={count}
onPageChange={onPageChange}
onPageSizeChange={onPageSizeChange}
/>
)}
</Table>
)}
</>
);
}

Expand Down
2 changes: 2 additions & 0 deletions components/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Gear from 'assets/gear.svg';
import Globe from 'assets/globe.svg';
import Lock from 'assets/lock.svg';
import Logo from 'assets/logo.svg';
import Magnet from 'assets/magnet.svg';
import Moon from 'assets/moon.svg';
import Nodes from 'assets/nodes.svg';
import Overview from 'assets/overview.svg';
Expand All @@ -35,6 +36,7 @@ const icons = {
Globe,
Lock,
Logo,
Magnet,
Moon,
Nodes,
Overview,
Expand Down
6 changes: 3 additions & 3 deletions components/input/DateFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Icon, Modal, Dropdown, Item, Text, Flexbox } from 'react-basics';
import { endOfYear, isSameDay } from 'date-fns';
import DatePickerForm from 'components/metrics/DatePickerForm';
import useLocale from 'hooks/useLocale';
import { dateFormat } from 'lib/date';
import { formatDate } from 'lib/date';
import Icons from 'components/icons';
import useMessages from 'hooks/useMessages';

Expand Down Expand Up @@ -135,8 +135,8 @@ const CustomRange = ({ startDate, endDate, onClick }) => {
<Icons.Calendar />
</Icon>
<Text>
{dateFormat(startDate, 'd LLL y', locale)}
{!isSameDay(startDate, endDate) && ` — ${dateFormat(endDate, 'd LLL y', locale)}`}
{formatDate(startDate, 'd LLL y', locale)}
{!isSameDay(startDate, endDate) && ` — ${formatDate(endDate, 'd LLL y', locale)}`}
</Text>
</Flexbox>
);
Expand Down
71 changes: 71 additions & 0 deletions components/input/MonthSelect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { useRef } from 'react';
import {
Text,
Icon,
CalendarMonthSelect,
CalendarYearSelect,
Button,
PopupTrigger,
Popup,
} from 'react-basics';
import { startOfMonth, endOfMonth } from 'date-fns';
import Icons from 'components/icons';
import { useLocale } from 'hooks';
import { formatDate } from 'lib/date';
import { getDateLocale } from 'lib/lang';
import styles from './MonthSelect.module.css';

export function MonthSelect({ date = new Date(), onChange }) {
const { locale } = useLocale();
const month = formatDate(date, 'MMMM', locale);
const year = date.getFullYear();
const ref = useRef();

const handleChange = (close, date) => {
onChange(`range:${startOfMonth(date).getTime()}:${endOfMonth(date).getTime()}`);
close();
};

return (
<>
<div ref={ref} className={styles.container}>
<PopupTrigger>
<Button className={styles.input} variant="quiet">
<Text>{month}</Text>
<Icon size="sm">
<Icons.ChevronDown />
</Icon>
</Button>
<Popup className={styles.popup} alignment="start">
{close => (
<CalendarMonthSelect
date={date}
locale={getDateLocale(locale)}
onSelect={handleChange.bind(null, close)}
/>
)}
</Popup>
</PopupTrigger>
<PopupTrigger>
<Button className={styles.input} variant="quiet">
<Text>{year}</Text>
<Icon size="sm">
<Icons.ChevronDown />
</Icon>
</Button>
<Popup className={styles.popup} alignment="start">
{close => (
<CalendarYearSelect
date={date}
locale={getDateLocale(locale)}
onSelect={handleChange.bind(null, close)}
/>
)}
</Popup>
</PopupTrigger>
</div>
</>
);
}

export default MonthSelect;
22 changes: 22 additions & 0 deletions components/input/MonthSelect.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.container {
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--base400);
border-radius: var(--border-radius);
}

.input {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
}

.popup {
border: 1px solid var(--base400);
background: var(--base50);
border-radius: var(--border-radius);
padding: 20px;
margin-top: 5px;
}
4 changes: 2 additions & 2 deletions components/input/WebsiteSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export function WebsiteSelect({ websiteId, onSelect }) {
const { data } = useQuery(['websites:me'], () => get('/me/websites'));

const renderValue = value => {
return data?.find(({ id }) => id === value)?.name;
return data?.data?.find(({ id }) => id === value)?.name;
};

return (
<Dropdown
items={data}
items={data?.data}
value={websiteId}
renderValue={renderValue}
onChange={onSelect}
Expand Down
6 changes: 2 additions & 4 deletions components/layout/AppLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { Container } from 'react-basics';
import Head from 'next/head';
import NavBar from 'components/layout/NavBar';
import UpdateNotice from 'components/common/UpdateNotice';
import useRequireLogin from 'hooks/useRequireLogin';
import useConfig from 'hooks/useConfig';
import { CURRENT_VERSION } from 'lib/constants';
import { useRequireLogin, useConfig } from 'hooks';
import styles from './AppLayout.module.css';

export function AppLayout({ title, children }) {
Expand All @@ -16,7 +14,7 @@ export function AppLayout({ title, children }) {
}

return (
<div className={styles.layout} data-app-version={CURRENT_VERSION}>
<div className={styles.layout}>
<UpdateNotice user={user} config={config} />
<Head>
<title>{title ? `${title} | umami` : 'umami'}</title>
Expand Down
1 change: 1 addition & 0 deletions components/layout/AppLayout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
width: 100vw;
grid-column: 1;
grid-row: 1 / 2;
z-index: 1;
}

.body {
Expand Down
2 changes: 2 additions & 0 deletions components/layout/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export function NavBar() {

const links = [
{ label: formatMessage(labels.dashboard), url: '/dashboard' },
{ label: formatMessage(labels.websites), url: '/websites' },
{ label: formatMessage(labels.reports), url: '/reports' },
!cloudMode && { label: formatMessage(labels.settings), url: '/settings' },
].filter(n => n);

Expand Down
1 change: 1 addition & 0 deletions components/layout/SettingsLayout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
display: flex;
flex-direction: column;
padding-top: 40px;
padding-right: 20px;
}

.content {
Expand Down
Loading