Skip to content

Commit 915a4ee

Browse files
authored
Merge pull request #2534 from umami-software/dev
v2.10.0
2 parents 784237b + 23a45a3 commit 915a4ee

539 files changed

Lines changed: 16106 additions & 7085 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,15 @@
2222
"plugins": ["@typescript-eslint", "prettier"],
2323
"settings": {
2424
"import/resolver": {
25-
"alias": {
26-
"map": [
27-
["assets", "./src/assets"],
28-
["components", "./src/components"],
29-
["db", "./db"],
30-
["hooks", "./src/components/hooks"],
31-
["lang", "./src/lang"],
32-
["lib", "./src/lib"],
33-
["public", "./public"],
34-
["queries", "./src/queries"],
35-
["store", "./src/store"],
36-
["styles", "./src/styles"]
37-
],
38-
"extensions": [".ts", ".tsx", ".js", ".jsx", ".json"]
25+
"node": {
26+
"moduleDirectory": ["node_modules", "src/"]
3927
}
4028
}
4129
},
4230
"rules": {
4331
"no-console": "error",
4432
"react/display-name": "off",
33+
"react-hooks/exhaustive-deps": "off",
4534
"react/react-in-jsx-scope": "off",
4635
"react/prop-types": "off",
4736
"import/no-anonymous-default-export": "off",

.github/ISSUE_TEMPLATE/1.bug_report.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "🐛 Bug Report"
1+
name: '🐛 Bug Report'
22
description: Create a bug report for Umami.
33
body:
44
- type: textarea
@@ -22,11 +22,15 @@ body:
2222
label: Relevant log output
2323
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
2424
render: shell
25+
- type: input
26+
attributes:
27+
label: Which Umami version are you using? (if relevant)
28+
description: 'For example: Chrome, Edge, Firefox, etc'
2529
- type: input
2630
attributes:
2731
label: Which browser are you using? (if relevant)
2832
description: 'For example: Chrome, Edge, Firefox, etc'
2933
- type: input
3034
attributes:
3135
label: How are you deploying your application? (if relevant)
32-
description: 'For example: Vercel, Railway, Docker, etc'
36+
description: 'For example: Vercel, Railway, Docker, etc'

.github/workflows/cd.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ name: Create docker images
22

33
on: [create]
44

5+
env:
6+
# set Docker OCI Labels
7+
DOCKER_LABELS: >
8+
org.opencontainers.image.title=${{github.event.repository.name}},
9+
org.opencontainers.image.description="Umami is a simple, fast, privacy-focused alternative to Google Analytics",
10+
org.opencontainers.image.vendor=${{github.repository_owner}},
11+
org.opencontainers.image.licenses="MIT",
12+
org.opencontainers.image.version=${{github.ref_name}},
13+
org.opencontainers.image.created=${{ env.NOW }},
14+
org.opencontainers.image.source=${{github.server_url}}/${{github.repository}},
15+
org.opencontainers.image.revision=${{github.sha}},
16+
org.opencontainers.image.url="https://umami.is/",
17+
org.opencontainers.image.documentation="https://umami.is/docs",
18+
org.opencontainers.image.base.name="docker.io/library/node:18-alpine"
19+
520
jobs:
621
build:
722
name: Build, push, and deploy
@@ -16,25 +31,30 @@ jobs:
1631
- uses: actions/checkout@v3
1732

1833
- name: Set env
19-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
34+
run: |
35+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
36+
echo "NOW=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
2037
2138
- uses: mr-smithers-excellent/docker-build-push@v6
2239
name: Build & push Docker image to ghcr.io for ${{ matrix.db-type }}
2340
with:
2441
image: umami
2542
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
43+
labels: $DOCKER_LABELS
2644
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
2745
registry: ghcr.io
2846
multiPlatform: true
2947
platform: linux/amd64,linux/arm64
3048
username: ${{ github.actor }}
3149
password: ${{ secrets.GITHUB_TOKEN }}
3250

51+
3352
- uses: mr-smithers-excellent/docker-build-push@v6
3453
name: Build & push Docker image to docker.io for ${{ matrix.db-type }}
3554
with:
3655
image: umamisoftware/umami
3756
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
57+
labels: $DOCKER_LABELS
3858
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
3959
registry: docker.io
4060
username: ${{ secrets.DOCKER_USERNAME }}

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
strategy:
1717
matrix:
1818
include:
19-
- node-version: 18.x
19+
- node-version: 18.17
2020
db-type: postgresql
21-
- node-version: 18.x
21+
- node-version: 18.17
2222
db-type: mysql
2323

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
cache: 'npm'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mysql://username:mypassword@localhost:3306/mydb
4949
yarn build
5050
```
5151

52-
The build step will also create tables in your database if you ae installing for the first time. It will also create a login user with username **admin** and password **umami**.
52+
The build step will also create tables in your database if you are installing for the first time. It will also create a login user with username **admin** and password **umami**.
5353

5454
### Start the application
5555

db/clickhouse/schema.sql

Lines changed: 1 addition & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
SET allow_experimental_object_type = 1;
2-
31
-- Create Event
42
CREATE TABLE umami.website_event
53
(
@@ -34,82 +32,6 @@ CREATE TABLE umami.website_event
3432
ORDER BY (website_id, session_id, created_at)
3533
SETTINGS index_granularity = 8192;
3634

37-
CREATE TABLE umami.website_event_queue (
38-
website_id UUID,
39-
session_id UUID,
40-
event_id UUID,
41-
--sessions
42-
hostname LowCardinality(String),
43-
browser LowCardinality(String),
44-
os LowCardinality(String),
45-
device LowCardinality(String),
46-
screen LowCardinality(String),
47-
language LowCardinality(String),
48-
country LowCardinality(String),
49-
subdivision1 LowCardinality(String),
50-
subdivision2 LowCardinality(String),
51-
city String,
52-
--pageviews
53-
url_path String,
54-
url_query String,
55-
referrer_path String,
56-
referrer_query String,
57-
referrer_domain String,
58-
page_title String,
59-
--events
60-
event_type UInt32,
61-
event_name String,
62-
created_at DateTime('UTC'),
63-
--virtual columns
64-
_error String,
65-
_raw_message String
66-
)
67-
ENGINE = Kafka
68-
SETTINGS kafka_broker_list = 'domain:9092,domain:9093,domain:9094', -- input broker list
69-
kafka_topic_list = 'event',
70-
kafka_group_name = 'event_consumer_group',
71-
kafka_format = 'JSONEachRow',
72-
kafka_max_block_size = 1048576,
73-
kafka_handle_error_mode = 'stream';
74-
75-
CREATE MATERIALIZED VIEW umami.website_event_queue_mv TO umami.website_event AS
76-
SELECT website_id,
77-
session_id,
78-
event_id,
79-
hostname,
80-
browser,
81-
os,
82-
device,
83-
screen,
84-
language,
85-
country,
86-
subdivision1,
87-
subdivision2,
88-
city,
89-
url_path,
90-
url_query,
91-
referrer_path,
92-
referrer_query,
93-
referrer_domain,
94-
page_title,
95-
event_type,
96-
event_name,
97-
created_at
98-
FROM umami.website_event_queue;
99-
100-
CREATE MATERIALIZED VIEW umami.website_event_errors_mv
101-
(
102-
error String,
103-
raw String
104-
)
105-
ENGINE = MergeTree
106-
ORDER BY (error, raw)
107-
SETTINGS index_granularity = 8192 AS
108-
SELECT _error AS error,
109-
_raw_message AS raw
110-
FROM umami.website_event_queue
111-
WHERE length(_error) > 0;
112-
11335
CREATE TABLE umami.event_data
11436
(
11537
website_id UUID,
@@ -127,55 +49,4 @@ CREATE TABLE umami.event_data
12749
)
12850
engine = MergeTree
12951
ORDER BY (website_id, event_id, event_key, created_at)
130-
SETTINGS index_granularity = 8192;
131-
132-
CREATE TABLE umami.event_data_queue (
133-
website_id UUID,
134-
session_id UUID,
135-
event_id UUID,
136-
url_path String,
137-
event_name String,
138-
event_key String,
139-
string_value Nullable(String),
140-
number_value Nullable(Decimal64(4)), --922337203685477.5625
141-
date_value Nullable(DateTime('UTC')),
142-
data_type UInt32,
143-
created_at DateTime('UTC'),
144-
--virtual columns
145-
_error String,
146-
_raw_message String
147-
)
148-
ENGINE = Kafka
149-
SETTINGS kafka_broker_list = 'domain:9092,domain:9093,domain:9094', -- input broker list
150-
kafka_topic_list = 'event_data',
151-
kafka_group_name = 'event_data_consumer_group',
152-
kafka_format = 'JSONEachRow',
153-
kafka_max_block_size = 1048576,
154-
kafka_handle_error_mode = 'stream';
155-
156-
CREATE MATERIALIZED VIEW umami.event_data_queue_mv TO umami.event_data AS
157-
SELECT website_id,
158-
session_id,
159-
event_id,
160-
url_path,
161-
event_name,
162-
event_key,
163-
string_value,
164-
number_value,
165-
date_value,
166-
data_type,
167-
created_at
168-
FROM umami.event_data_queue;
169-
170-
CREATE MATERIALIZED VIEW umami.event_data_errors_mv
171-
(
172-
error String,
173-
raw String
174-
)
175-
ENGINE = MergeTree
176-
ORDER BY (error, raw)
177-
SETTINGS index_granularity = 8192 AS
178-
SELECT _error AS error,
179-
_raw_message AS raw
180-
FROM umami.event_data_queue
181-
WHERE length(_error) > 0;
52+
SETTINGS index_granularity = 8192;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
Warnings:
3+
4+
- You are about to drop the `team_website` table. If the table is not empty, all the data it contains will be lost.
5+
6+
*/
7+
-- AlterTable
8+
ALTER TABLE `team` ADD COLUMN `deleted_at` TIMESTAMP(0) NULL,
9+
ADD COLUMN `logo_url` VARCHAR(2183) NULL;
10+
11+
-- AlterTable
12+
ALTER TABLE `user` ADD COLUMN `display_name` VARCHAR(255) NULL,
13+
ADD COLUMN `logo_url` VARCHAR(2183) NULL;
14+
15+
-- AlterTable
16+
ALTER TABLE `website` ADD COLUMN `created_by` VARCHAR(36) NULL,
17+
ADD COLUMN `team_id` VARCHAR(36) NULL;
18+
19+
-- MigrateData
20+
UPDATE `website` SET created_by = user_id WHERE team_id IS NULL;
21+
22+
-- DropTable
23+
DROP TABLE `team_website`;
24+
25+
-- CreateIndex
26+
CREATE INDEX `website_team_id_idx` ON `website`(`team_id`);
27+
28+
-- CreateIndex
29+
CREATE INDEX `website_created_by_idx` ON `website`(`created_by`);

0 commit comments

Comments
 (0)