Merge branch 'umami-software:master' into master

This commit is contained in:
Aitor Alonso 2024-03-01 15:50:23 +01:00 committed by GitHub
commit f4c3e128c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 27 additions and 56 deletions

View file

@ -2,20 +2,6 @@ name: Create docker images
on: [create] on: [create]
env:
# set Docker OCI Labels
DOCKER_LABELS: >
org.opencontainers.image.title=${{github.event.repository.name}},
org.opencontainers.image.description="Umami is a simple, fast, privacy-focused alternative to Google Analytics",
org.opencontainers.image.vendor=${{github.repository_owner}},
org.opencontainers.image.licenses="MIT",
org.opencontainers.image.version=${{github.ref_name}},
org.opencontainers.image.source=${{github.server_url}}/${{github.repository}},
org.opencontainers.image.revision=${{github.sha}},
org.opencontainers.image.url="https://umami.is/",
org.opencontainers.image.documentation="https://umami.is/docs",
org.opencontainers.image.base.name="docker.io/library/node:18-alpine"
jobs: jobs:
build: build:
name: Build, push, and deploy name: Build, push, and deploy
@ -39,7 +25,6 @@ jobs:
with: with:
image: umami image: umami
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
labels: $DOCKER_LABELS
buildArgs: DATABASE_TYPE=${{ matrix.db-type }} buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
registry: ghcr.io registry: ghcr.io
multiPlatform: true multiPlatform: true
@ -53,7 +38,6 @@ jobs:
with: with:
image: umamisoftware/umami image: umamisoftware/umami
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
labels: $DOCKER_LABELS
buildArgs: DATABASE_TYPE=${{ matrix.db-type }} buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
registry: docker.io registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}

View file

@ -1,8 +1,8 @@
{ {
"name": "umami", "name": "umami",
"version": "2.10.0", "version": "2.10.1",
"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": "Umami Software, Inc. <hello@umami.is>",
"license": "MIT", "license": "MIT",
"homepage": "https://umami.is", "homepage": "https://umami.is",
"repository": { "repository": {

View file

@ -33,7 +33,6 @@ export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?:
return ( return (
<> <>
{process.env.cloudMode && (
<ActionForm <ActionForm
label={formatMessage(labels.transferWebsite)} label={formatMessage(labels.transferWebsite)}
description={formatMessage(messages.transferWebsite)} description={formatMessage(messages.transferWebsite)}
@ -49,7 +48,6 @@ export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?:
</Modal> </Modal>
</ModalTrigger> </ModalTrigger>
</ActionForm> </ActionForm>
)}
<ActionForm <ActionForm
label={formatMessage(labels.resetWebsite)} label={formatMessage(labels.resetWebsite)}
description={formatMessage(messages.resetWebsiteWarning)} description={formatMessage(messages.resetWebsiteWarning)}

View file

@ -263,6 +263,13 @@ export function getOffsetDateRange(dateRange: DateRange, increment: number) {
const { unit: originalUnit } = parseDateValue(value) || {}; const { unit: originalUnit } = parseDateValue(value) || {};
switch (originalUnit) { switch (originalUnit) {
case 'day':
return {
...dateRange,
startDate: addDays(startDate, increment),
endDate: addDays(endDate, increment),
offset: offset + increment,
};
case 'week': case 'week':
return { return {
...dateRange, ...dateRange,

View file

@ -44,8 +44,6 @@ export default async (
return unauthorized(res); return unauthorized(res);
} }
const { query, page, pageSize } = req.query;
const users = await getTeamUsers( const users = await getTeamUsers(
{ {
where: { where: {
@ -63,11 +61,7 @@ export default async (
}, },
}, },
}, },
{ req.query,
query,
page,
pageSize,
},
); );
return ok(res, users); return ok(res, users);

View file

@ -43,13 +43,7 @@ export default async (
return unauthorized(res); return unauthorized(res);
} }
const { page, query, pageSize } = req.query; const websites = await getTeamWebsites(teamId, req.query);
const websites = await getTeamWebsites(teamId, {
page,
query,
pageSize,
});
return ok(res, websites); return ok(res, websites);
} }

View file

@ -39,13 +39,7 @@ export default async (
return unauthorized(res); return unauthorized(res);
} }
const { page, query, pageSize } = req.query; const teams = await getUserTeams(userId as string, req.query);
const teams = await getUserTeams(userId as string, {
query,
page,
pageSize,
});
return ok(res, teams); return ok(res, teams);
} }