Merge branch 'dev' into analytics

This commit is contained in:
Mike Cao 2024-02-16 10:49:32 -08:00
commit 4853437afa
525 changed files with 5436 additions and 4786 deletions

View File

@ -30,6 +30,7 @@
"rules": {
"no-console": "error",
"react/display-name": "off",
"react-hooks/exhaustive-deps": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"import/no-anonymous-default-export": "off",

View File

@ -1,4 +1,4 @@
name: "🐛 Bug Report"
name: '🐛 Bug Report'
description: Create a bug report for Umami.
body:
- type: textarea
@ -22,6 +22,10 @@ body:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: input
attributes:
label: Which Umami version are you using? (if relevant)
description: 'For example: Chrome, Edge, Firefox, etc'
- type: input
attributes:
label: Which browser are you using? (if relevant)
@ -29,4 +33,4 @@ body:
- type: input
attributes:
label: How are you deploying your application? (if relevant)
description: 'For example: Vercel, Railway, Docker, etc'
description: 'For example: Vercel, Railway, Docker, etc'

View File

@ -2,6 +2,21 @@ name: Create docker images
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.created=${{ env.NOW }},
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:
build:
name: Build, push, and deploy
@ -16,13 +31,16 @@ jobs:
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "NOW=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image to ghcr.io for ${{ matrix.db-type }}
with:
image: umami
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
labels: $DOCKER_LABELS
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
registry: ghcr.io
multiPlatform: true
@ -30,11 +48,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image to docker.io for ${{ matrix.db-type }}
with:
image: umamisoftware/umami
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
labels: $DOCKER_LABELS
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}

View File

@ -16,15 +16,15 @@ jobs:
strategy:
matrix:
include:
- node-version: 18.x
- node-version: 18.17
db-type: postgresql
- node-version: 18.x
- node-version: 18.17
db-type: mysql
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

View File

@ -49,7 +49,7 @@ mysql://username:mypassword@localhost:3306/mydb
yarn build
```
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**.
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**.
### Start the application

View File

@ -1,5 +1,3 @@
SET allow_experimental_object_type = 1;
-- Create Event
CREATE TABLE umami.website_event
(
@ -34,82 +32,6 @@ CREATE TABLE umami.website_event
ORDER BY (website_id, session_id, created_at)
SETTINGS index_granularity = 8192;
CREATE TABLE umami.website_event_queue (
website_id UUID,
session_id UUID,
event_id UUID,
--sessions
hostname LowCardinality(String),
browser LowCardinality(String),
os LowCardinality(String),
device LowCardinality(String),
screen LowCardinality(String),
language LowCardinality(String),
country LowCardinality(String),
subdivision1 LowCardinality(String),
subdivision2 LowCardinality(String),
city String,
--pageviews
url_path String,
url_query String,
referrer_path String,
referrer_query String,
referrer_domain String,
page_title String,
--events
event_type UInt32,
event_name String,
created_at DateTime('UTC'),
--virtual columns
_error String,
_raw_message String
)
ENGINE = Kafka
SETTINGS kafka_broker_list = 'domain:9092,domain:9093,domain:9094', -- input broker list
kafka_topic_list = 'event',
kafka_group_name = 'event_consumer_group',
kafka_format = 'JSONEachRow',
kafka_max_block_size = 1048576,
kafka_handle_error_mode = 'stream';
CREATE MATERIALIZED VIEW umami.website_event_queue_mv TO umami.website_event AS
SELECT website_id,
session_id,
event_id,
hostname,
browser,
os,
device,
screen,
language,
country,
subdivision1,
subdivision2,
city,
url_path,
url_query,
referrer_path,
referrer_query,
referrer_domain,
page_title,
event_type,
event_name,
created_at
FROM umami.website_event_queue;
CREATE MATERIALIZED VIEW umami.website_event_errors_mv
(
error String,
raw String
)
ENGINE = MergeTree
ORDER BY (error, raw)
SETTINGS index_granularity = 8192 AS
SELECT _error AS error,
_raw_message AS raw
FROM umami.website_event_queue
WHERE length(_error) > 0;
CREATE TABLE umami.event_data
(
website_id UUID,
@ -127,55 +49,4 @@ CREATE TABLE umami.event_data
)
engine = MergeTree
ORDER BY (website_id, event_id, event_key, created_at)
SETTINGS index_granularity = 8192;
CREATE TABLE umami.event_data_queue (
website_id UUID,
session_id UUID,
event_id UUID,
url_path String,
event_name String,
event_key String,
string_value Nullable(String),
number_value Nullable(Decimal64(4)), --922337203685477.5625
date_value Nullable(DateTime('UTC')),
data_type UInt32,
created_at DateTime('UTC'),
--virtual columns
_error String,
_raw_message String
)
ENGINE = Kafka
SETTINGS kafka_broker_list = 'domain:9092,domain:9093,domain:9094', -- input broker list
kafka_topic_list = 'event_data',
kafka_group_name = 'event_data_consumer_group',
kafka_format = 'JSONEachRow',
kafka_max_block_size = 1048576,
kafka_handle_error_mode = 'stream';
CREATE MATERIALIZED VIEW umami.event_data_queue_mv TO umami.event_data AS
SELECT website_id,
session_id,
event_id,
url_path,
event_name,
event_key,
string_value,
number_value,
date_value,
data_type,
created_at
FROM umami.event_data_queue;
CREATE MATERIALIZED VIEW umami.event_data_errors_mv
(
error String,
raw String
)
ENGINE = MergeTree
ORDER BY (error, raw)
SETTINGS index_granularity = 8192 AS
SELECT _error AS error,
_raw_message AS raw
FROM umami.event_data_queue
WHERE length(_error) > 0;
SETTINGS index_granularity = 8192;

View File

@ -0,0 +1,29 @@
/*
Warnings:
- You are about to drop the `team_website` table. If the table is not empty, all the data it contains will be lost.
*/
-- AlterTable
ALTER TABLE `team` ADD COLUMN `deleted_at` TIMESTAMP(0) NULL,
ADD COLUMN `logo_url` VARCHAR(2183) NULL;
-- AlterTable
ALTER TABLE `user` ADD COLUMN `display_name` VARCHAR(255) NULL,
ADD COLUMN `logo_url` VARCHAR(2183) NULL;
-- AlterTable
ALTER TABLE `website` ADD COLUMN `created_by` VARCHAR(36) NULL,
ADD COLUMN `team_id` VARCHAR(36) NULL;
-- MigrateData
UPDATE `website` SET created_by = user_id WHERE team_id IS NULL;
-- DropTable
DROP TABLE `team_website`;
-- CreateIndex
CREATE INDEX `website_team_id_idx` ON `website`(`team_id`);
-- CreateIndex
CREATE INDEX `website_created_by_idx` ON `website`(`created_by`);

View File

@ -9,15 +9,18 @@ datasource db {
}
model User {
id String @id @unique @map("user_id") @db.VarChar(36)
username String @unique @db.VarChar(255)
password String @db.VarChar(60)
role String @map("role") @db.VarChar(50)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamp(0)
deletedAt DateTime? @map("deleted_at") @db.Timestamp(0)
id String @id @unique @map("user_id") @db.VarChar(36)
username String @unique @db.VarChar(255)
password String @db.VarChar(60)
role String @map("role") @db.VarChar(50)
logoUrl String? @map("logo_url") @db.VarChar(2183)
displayName String? @map("display_name") @db.VarChar(255)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamp(0)
deletedAt DateTime? @map("deleted_at") @db.Timestamp(0)
website Website[]
websiteUser Website[] @relation("user")
websiteCreateUser Website[] @relation("createUser")
teamUser TeamUser[]
report Report[]
@ -64,19 +67,24 @@ model Website {
shareId String? @unique @map("share_id") @db.VarChar(50)
resetAt DateTime? @map("reset_at") @db.Timestamp(0)
userId String? @map("user_id") @db.VarChar(36)
teamId String? @map("team_id") @db.VarChar(36)
createdBy String? @map("created_by") @db.VarChar(36)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamp(0)
deletedAt DateTime? @map("deleted_at") @db.Timestamp(0)
user User? @relation(fields: [userId], references: [id])
teamWebsite TeamWebsite[]
user User? @relation("user", fields: [userId], references: [id])
createUser User? @relation("createUser", fields: [createdBy], references: [id])
team Team? @relation(fields: [teamId], references: [id])
eventData EventData[]
report Report[]
sessionData SessionData[]
@@index([userId])
@@index([teamId])
@@index([createdAt])
@@index([shareId])
@@index([createdBy])
@@map("website")
}
@ -157,11 +165,13 @@ model Team {
id String @id() @unique() @map("team_id") @db.VarChar(36)
name String @db.VarChar(50)
accessCode String? @unique @map("access_code") @db.VarChar(50)
logoUrl String? @map("logo_url") @db.VarChar(2183)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamp(0)
deletedAt DateTime? @map("deleted_at") @db.Timestamp(0)
website Website[]
teamUser TeamUser[]
teamWebsite TeamWebsite[]
@@index([accessCode])
@@map("team")
@ -183,20 +193,6 @@ model TeamUser {
@@map("team_user")
}
model TeamWebsite {
id String @id() @unique() @map("team_website_id") @db.VarChar(36)
teamId String @map("team_id") @db.VarChar(36)
websiteId String @map("website_id") @db.VarChar(36)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
team Team @relation(fields: [teamId], references: [id])
website Website @relation(fields: [websiteId], references: [id])
@@index([teamId])
@@index([websiteId])
@@map("team_website")
}
model Report {
id String @id() @unique() @map("report_id") @db.VarChar(36)
userId String @map("user_id") @db.VarChar(36)

View File

@ -0,0 +1,29 @@
/*
Warnings:
- You are about to drop the `team_website` table. If the table is not empty, all the data it contains will be lost.
*/
-- AlterTable
ALTER TABLE "team" ADD COLUMN "deleted_at" TIMESTAMPTZ(6),
ADD COLUMN "logo_url" VARCHAR(2183);
-- AlterTable
ALTER TABLE "user" ADD COLUMN "display_name" VARCHAR(255),
ADD COLUMN "logo_url" VARCHAR(2183);
-- AlterTable
ALTER TABLE "website" ADD COLUMN "created_by" UUID,
ADD COLUMN "team_id" UUID;
-- MigrateData
UPDATE "website" SET created_by = user_id WHERE team_id IS NULL;
-- DropTable
DROP TABLE "team_website";
-- CreateIndex
CREATE INDEX "website_team_id_idx" ON "website"("team_id");
-- CreateIndex
CREATE INDEX "website_created_by_idx" ON "website"("created_by");

View File

@ -9,17 +9,20 @@ datasource db {
}
model User {
id String @id @unique @map("user_id") @db.Uuid
username String @unique @db.VarChar(255)
password String @db.VarChar(60)
role String @map("role") @db.VarChar(50)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
id String @id @unique @map("user_id") @db.Uuid
username String @unique @db.VarChar(255)
password String @db.VarChar(60)
role String @map("role") @db.VarChar(50)
logoUrl String? @map("logo_url") @db.VarChar(2183)
displayName String? @map("display_name") @db.VarChar(255)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
website Website[]
teamUser TeamUser[]
report Report[]
websiteUser Website[] @relation("user")
websiteCreateUser Website[] @relation("createUser")
teamUser TeamUser[]
report Report[]
@@map("user")
}
@ -64,19 +67,24 @@ model Website {
shareId String? @unique @map("share_id") @db.VarChar(50)
resetAt DateTime? @map("reset_at") @db.Timestamptz(6)
userId String? @map("user_id") @db.Uuid
teamId String? @map("team_id") @db.Uuid
createdBy String? @map("created_by") @db.Uuid
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
user User? @relation(fields: [userId], references: [id])
teamWebsite TeamWebsite[]
user User? @relation("user", fields: [userId], references: [id])
createUser User? @relation("createUser", fields: [createdBy], references: [id])
team Team? @relation(fields: [teamId], references: [id])
eventData EventData[]
report Report[]
sessionData SessionData[]
@@index([userId])
@@index([teamId])
@@index([createdAt])
@@index([shareId])
@@index([createdBy])
@@map("website")
}
@ -157,11 +165,13 @@ model Team {
id String @id() @unique() @map("team_id") @db.Uuid
name String @db.VarChar(50)
accessCode String? @unique @map("access_code") @db.VarChar(50)
logoUrl String? @map("logo_url") @db.VarChar(2183)
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamptz(6)
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
teamUser TeamUser[]
teamWebsite TeamWebsite[]
website Website[]
teamUser TeamUser[]
@@index([accessCode])
@@map("team")
@ -183,20 +193,6 @@ model TeamUser {
@@map("team_user")
}
model TeamWebsite {
id String @id() @unique() @map("team_website_id") @db.Uuid
teamId String @map("team_id") @db.Uuid
websiteId String @map("website_id") @db.Uuid
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamptz(6)
team Team @relation(fields: [teamId], references: [id])
website Website @relation(fields: [websiteId], references: [id])
@@index([teamId])
@@index([websiteId])
@@map("team_website")
}
model Report {
id String @id() @unique() @map("report_id") @db.Uuid
userId String @map("user_id") @db.Uuid

View File

@ -36,6 +36,7 @@
"metrics.referrers",
"message.powered-by"
],
"mn-MN": ["label.max", "label.min", "label.os", "label.query", "label.url", "label.urls"],
"nb-NO": ["label.administrator", "label.dashboard"],
"nl-NL": [
"label.analytics",

View File

@ -3,13 +3,25 @@ require('dotenv').config();
const path = require('path');
const pkg = require('./package.json');
const basePath = process.env.BASE_PATH || '';
const forceSSL = process.env.FORCE_SSL || '';
const collectApiEndpoint = process.env.COLLECT_API_ENDPOINT || '';
const defaultLocale = process.env.DEFAULT_LOCALE || '';
const trackerScriptName = process.env.TRACKER_SCRIPT_NAME || '';
const cloudMode = process.env.CLOUD_MODE || '';
const cloudUrl = process.env.CLOUD_URL || '';
const frameAncestors = process.env.ALLOWED_FRAME_URLS || '';
const disableLogin = process.env.DISABLE_LOGIN || '';
const disableUI = process.env.DISABLE_UI || '';
const hostURL = process.env.HOST_URL || '';
const contentSecurityPolicy = [
`default-src 'self'`,
`img-src *`,
`script-src 'self' 'unsafe-eval' 'unsafe-inline'`,
`style-src 'self' 'unsafe-inline'`,
`connect-src 'self' api.umami.is cloud.umami.is`,
`frame-ancestors 'self' ${process.env.ALLOWED_FRAME_URLS || ''}`,
`frame-ancestors 'self' ${frameAncestors}`,
];
const headers = [
@ -26,7 +38,7 @@ const headers = [
},
];
if (process.env.FORCE_SSL) {
if (forceSSL) {
headers.push({
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
@ -35,15 +47,15 @@ if (process.env.FORCE_SSL) {
const rewrites = [];
if (process.env.COLLECT_API_ENDPOINT) {
if (collectApiEndpoint) {
rewrites.push({
source: process.env.COLLECT_API_ENDPOINT,
source: collectApiEndpoint,
destination: '/api/send',
});
}
if (process.env.TRACKER_SCRIPT_NAME) {
const names = process.env.TRACKER_SCRIPT_NAME?.split(',').map(name => name.trim());
if (trackerScriptName) {
const names = trackerScriptName?.split(',').map(name => name.trim());
if (names) {
names.forEach(name => {
@ -58,36 +70,56 @@ if (process.env.TRACKER_SCRIPT_NAME) {
const redirects = [
{
source: '/settings',
destination: process.env.CLOUD_MODE
? `${process.env.CLOUD_URL}/settings/websites`
: '/settings/websites',
destination: '/settings/websites',
permanent: true,
},
{
source: '/teams/:id',
destination: '/teams/:id/dashboard',
permanent: true,
},
{
source: '/teams/:id/settings',
destination: '/teams/:id/settings/team',
permanent: true,
},
];
if (process.env.CLOUD_MODE && process.env.CLOUD_URL && process.env.DISABLE_LOGIN) {
if (cloudMode && cloudUrl) {
redirects.push({
source: '/login',
destination: process.env.CLOUD_URL,
source: '/settings/:path*',
destination: `${cloudUrl}/settings/:path*`,
permanent: false,
});
}
const basePath = process.env.BASE_PATH;
redirects.push({
source: '/teams/:id/settings/:path*',
destination: `${cloudUrl}/teams/:id/settings/:path*`,
permanent: false,
});
if (disableLogin) {
redirects.push({
source: '/login',
destination: cloudUrl,
permanent: false,
});
}
}
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: false,
env: {
basePath: basePath || '',
cloudMode: process.env.CLOUD_MODE || '',
cloudUrl: process.env.CLOUD_URL || '',
basePath,
cloudMode,
cloudUrl,
configUrl: '/config',
currentVersion: pkg.version,
defaultLocale: process.env.DEFAULT_LOCALE || '',
disableLogin: process.env.DISABLE_LOGIN || '',
disableUI: process.env.DISABLE_UI || '',
hostUrl: process.env.HOST_URL || '',
defaultLocale,
disableLogin,
disableUI,
hostURL,
},
basePath,
output: 'standalone',

View File

@ -1,6 +1,6 @@
{
"name": "umami",
"version": "2.9.0",
"version": "2.10.0",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",
@ -67,7 +67,7 @@
"@prisma/extension-read-replicas": "^0.3.0",
"@react-spring/web": "^9.7.3",
"@tanstack/react-query": "^5.12.2",
"@umami/prisma-client": "^0.8.0",
"@umami/prisma-client": "^0.14.0",
"@umami/redis-client": "^0.18.0",
"chalk": "^4.1.1",
"chart.js": "^4.2.1",
@ -92,6 +92,7 @@
"isbot": "^3.4.5",
"kafkajs": "^2.1.0",
"maxmind": "^4.3.6",
"md5": "^2.3.0",
"moment-timezone": "^0.5.35",
"next": "14.0.4",
"next-basics": "^0.39.0",
@ -99,7 +100,7 @@
"npm-run-all": "^4.1.5",
"prisma": "5.7.0",
"react": "^18.2.0",
"react-basics": "^0.114.0",
"react-basics": "^0.122.0",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.4",
@ -117,9 +118,8 @@
},
"devDependencies": {
"@formatjs/cli": "^4.2.29",
"@netlify/plugin-nextjs": "^4.27.3",
"@netlify/plugin-nextjs": "^4.41.3",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-buble": "^1.0.2",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.2.0",

View File

@ -35,7 +35,7 @@
"value": "Add website"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -20,13 +20,13 @@
"label.add": [
{
"type": 0,
"value": "Add"
"value": "أضِف"
}
],
"label.add-description": [
{
"type": 0,
"value": "Add description"
"value": "أضِف وصف"
}
],
"label.add-website": [
@ -44,7 +44,7 @@
"label.after": [
{
"type": 0,
"value": "After"
"value": "يعد"
}
],
"label.all": [
@ -68,7 +68,7 @@
"label.average": [
{
"type": 0,
"value": "Average"
"value": "المتوسط"
}
],
"label.average-visit-time": [
@ -86,7 +86,7 @@
"label.before": [
{
"type": 0,
"value": "Before"
"value": "قبل"
}
],
"label.bounce-rate": [
@ -98,13 +98,13 @@
"label.breakdown": [
{
"type": 0,
"value": "Breakdown"
"value": "التصنيف"
}
],
"label.browser": [
{
"type": 0,
"value": "Browser"
"value": "المتصفح"
}
],
"label.browsers": [
@ -116,7 +116,7 @@
"label.cancel": [
{
"type": 0,
"value": "إلغاء"
"value": "ألغِ"
}
],
"label.change-password": [
@ -134,7 +134,7 @@
"label.city": [
{
"type": 0,
"value": "City"
"value": "المدينة"
}
],
"label.clear-all": [
@ -158,13 +158,13 @@
"label.contains": [
{
"type": 0,
"value": "Contains"
"value": "يحتوي"
}
],
"label.continue": [
{
"type": 0,
"value": "متابعة"
"value": "تابع"
}
],
"label.countries": [
@ -176,37 +176,37 @@
"label.country": [
{
"type": 0,
"value": "Country"
"value": "الدولة"
}
],
"label.create": [
{
"type": 0,
"value": "Create"
"value": "أنشِئ"
}
],
"label.create-report": [
{
"type": 0,
"value": "Create report"
"value": "أنشِئ تقرير"
}
],
"label.create-team": [
{
"type": 0,
"value": "انشاء مجموعة"
"value": "أنشِئ فريق"
}
],
"label.create-user": [
{
"type": 0,
"value": "انشاء مستخدم"
"value": "أنشِئ مستخدم"
}
],
"label.created": [
{
"type": 0,
"value": "تم الانشاء"
"value": "أُنشئت"
}
],
"label.current-password": [
@ -218,7 +218,7 @@
"label.custom-range": [
{
"type": 0,
"value": "فترة مخصصة"
"value": "فترة مخصّصة"
}
],
"label.dashboard": [
@ -236,25 +236,25 @@
"label.date": [
{
"type": 0,
"value": "Date"
"value": "التاريخ"
}
],
"label.date-range": [
{
"type": 0,
"value": "فترة مخصصة"
"value": "فترة مخصّصة"
}
],
"label.day": [
{
"type": 0,
"value": "Day"
"value": "يوم"
}
],
"label.default-date-range": [
{
"type": 0,
"value": "الفترة المخصصة الافتراضية"
"value": "الفترة المخصّصة الافتراضية"
}
],
"label.delete": [
@ -266,7 +266,7 @@
"label.delete-team": [
{
"type": 0,
"value": "حذف مجموعة"
"value": "حذف الفريق"
}
],
"label.delete-user": [
@ -284,7 +284,7 @@
"label.description": [
{
"type": 0,
"value": "Description"
"value": "الوصف"
}
],
"label.desktop": [
@ -302,7 +302,7 @@
"label.device": [
{
"type": 0,
"value": "Device"
"value": "الجهاز"
}
],
"label.devices": [
@ -314,7 +314,7 @@
"label.dismiss": [
{
"type": 0,
"value": "اخفاء"
"value": "تجاهل"
}
],
"label.does-not-contain": [
@ -332,31 +332,31 @@
"label.dropoff": [
{
"type": 0,
"value": "Dropoff"
"value": "إنزال"
}
],
"label.edit": [
{
"type": 0,
"value": "تعديل"
"value": "عدّل"
}
],
"label.edit-dashboard": [
{
"type": 0,
"value": "تعديل لوحة التحكم"
"value": "عدّل لوحة التحكم"
}
],
"label.enable-share-url": [
{
"type": 0,
"value": "تفعيل مشاركة الرابط"
"value": "فعّل مشاركة الرابط"
}
],
"label.event": [
{
"type": 0,
"value": "Event"
"value": "الحدث"
}
],
"label.event-data": [
@ -374,115 +374,115 @@
"label.false": [
{
"type": 0,
"value": "False"
"value": "خطأ"
}
],
"label.field": [
{
"type": 0,
"value": "Field"
"value": "الحقل"
}
],
"label.fields": [
{
"type": 0,
"value": "Fields"
"value": "الحقول"
}
],
"label.filter": [
{
"type": 0,
"value": "Filter"
"value": "تصفيَة"
}
],
"label.filter-combined": [
{
"type": 0,
"value": جمعة"
"value": ُجمّعة"
}
],
"label.filter-raw": [
{
"type": 0,
"value": "مفصلة"
"value": "خام"
}
],
"label.filters": [
{
"type": 0,
"value": "Filters"
"value": "التصفيات"
}
],
"label.funnel": [
{
"type": 0,
"value": "Funnel"
"value": "قمع"
}
],
"label.funnel-description": [
{
"type": 0,
"value": "Understand the conversion and drop-off rate of users."
"value": "فهم معدل التحويل والانقطاع عن المستخدمين."
}
],
"label.greater-than": [
{
"type": 0,
"value": "Greater than"
"value": "أكبَر مِن"
}
],
"label.greater-than-equals": [
{
"type": 0,
"value": "Greater than or equals"
"value": "أكبَر مِن أو يساوي"
}
],
"label.insights": [
{
"type": 0,
"value": "Insights"
"value": "نتائج التحليلات"
}
],
"label.insights-description": [
{
"type": 0,
"value": "Dive deeper into your data by using segments and filters."
"value": "تعمق في بياناتك باستخدام الشرائح والتصفيات."
}
],
"label.is": [
{
"type": 0,
"value": "Is"
"value": "هو"
}
],
"label.is-not": [
{
"type": 0,
"value": "Is not"
"value": "لم"
}
],
"label.is-not-set": [
{
"type": 0,
"value": "Is not set"
"value": "لم ضُبط"
}
],
"label.is-set": [
{
"type": 0,
"value": "Is set"
"value": "ضُبط"
}
],
"label.join": [
{
"type": 0,
"value": "انضمام"
"value": "انضم"
}
],
"label.join-team": [
{
"type": 0,
"value": "الانضمام للمجموعة"
"value": "انضم للفريق"
}
],
"label.language": [
@ -506,7 +506,7 @@
"label.last-days": [
{
"type": 0,
"value": "اخر "
"value": "آخر "
},
{
"type": 1,
@ -520,7 +520,7 @@
"label.last-hours": [
{
"type": 0,
"value": "اخر "
"value": "آخر "
},
{
"type": 1,
@ -528,13 +528,13 @@
},
{
"type": 0,
"value": " ساعة/ساعات"
"value": " ساعة"
}
],
"label.leave": [
{
"type": 0,
"value": "مغادرة"
"value": "غادر"
}
],
"label.leave-team": [
@ -546,13 +546,13 @@
"label.less-than": [
{
"type": 0,
"value": "Less than"
"value": "أقل مِن"
}
],
"label.less-than-equals": [
{
"type": 0,
"value": "Less than or equals"
"value": "أقل مِن أو يساوي"
}
],
"label.login": [
@ -570,7 +570,7 @@
"label.max": [
{
"type": 0,
"value": "Max"
"value": "الحد الأقصى"
}
],
"label.members": [
@ -582,7 +582,7 @@
"label.min": [
{
"type": 0,
"value": "Min"
"value": "الحد الأدنى"
}
],
"label.mobile": [
@ -600,13 +600,13 @@
"label.my-websites": [
{
"type": 0,
"value": "My websites"
"value": "مواقعي"
}
],
"label.name": [
{
"type": 0,
"value": "الإسم"
"value": "الاسم"
}
],
"label.new-password": [
@ -618,19 +618,19 @@
"label.none": [
{
"type": 0,
"value": "غير معرف"
"value": "غير معرّف"
}
],
"label.os": [
{
"type": 0,
"value": "OS"
"value": "نظام التشغيل"
}
],
"label.overview": [
{
"type": 0,
"value": "Overview"
"value": "نظرة عامة"
}
],
"label.owner": [
@ -642,7 +642,7 @@
"label.page-of": [
{
"type": 0,
"value": "Page "
"value": "صفحة "
},
{
"type": 1,
@ -650,7 +650,7 @@
},
{
"type": 0,
"value": " of "
"value": " من "
},
{
"type": 1,
@ -666,7 +666,7 @@
"label.pageTitle": [
{
"type": 0,
"value": "Page title"
"value": "عنوان الصفحة"
}
],
"label.pages": [
@ -706,7 +706,7 @@
"label.query": [
{
"type": 0,
"value": "Query"
"value": "استعلام"
}
],
"label.query-parameters": [
@ -724,7 +724,7 @@
"label.referrer": [
{
"type": 0,
"value": "Referrer"
"value": "المرجع"
}
],
"label.referrers": [
@ -742,13 +742,13 @@
"label.regenerate": [
{
"type": 0,
"value": "اعادة انشاء"
"value": "إعادة توليد"
}
],
"label.region": [
{
"type": 0,
"value": "Region"
"value": "المنطقة"
}
],
"label.regions": [
@ -760,13 +760,13 @@
"label.remove": [
{
"type": 0,
"value": "إزالة"
"value": "أزِل"
}
],
"label.reports": [
{
"type": 0,
"value": "Reports"
"value": "التقارير"
}
],
"label.required": [
@ -790,13 +790,13 @@
"label.retention": [
{
"type": 0,
"value": "Retention"
"value": "الاحتفاظ"
}
],
"label.retention-description": [
{
"type": 0,
"value": "Measure your website stickiness by tracking how often users return."
"value": "قس مدى ثبات موقعك على الويب من خلال تتبع عدد مرات عودة المستخدمين."
}
],
"label.role": [
@ -808,7 +808,7 @@
"label.run-query": [
{
"type": 0,
"value": "Run query"
"value": "شغّل الاستعلام"
}
],
"label.save": [
@ -826,19 +826,19 @@
"label.search": [
{
"type": 0,
"value": "Search"
"value": "بحث"
}
],
"label.select-date": [
{
"type": 0,
"value": "Select date"
"value": "حدد التاريخ"
}
],
"label.select-website": [
{
"type": 0,
"value": "اختيار موقع"
"value": "حدد موقع"
}
],
"label.sessions": [
@ -850,7 +850,7 @@
"label.settings": [
{
"type": 0,
"value": "اعدادات"
"value": "الإعدادات"
}
],
"label.share-url": [
@ -868,7 +868,7 @@
"label.sum": [
{
"type": 0,
"value": "Sum"
"value": "المجموع"
}
],
"label.tablet": [
@ -880,55 +880,55 @@
"label.team": [
{
"type": 0,
"value": "مجموعة"
"value": "الفريق"
}
],
"label.team-guest": [
{
"type": 0,
"value": "زائر للمجموعة"
"value": "ضيف الفريق"
}
],
"label.team-id": [
{
"type": 0,
"value": "معرف المجموعة"
"value": "معرّف الفريق"
}
],
"label.team-member": [
{
"type": 0,
"value": "عضو المجموعة"
"value": "عضو الفريق"
}
],
"label.team-name": [
{
"type": 0,
"value": "Team name"
"value": "اسم الفريق"
}
],
"label.team-owner": [
{
"type": 0,
"value": "مدير المجموعة"
"value": "مدير الفريق"
}
],
"label.team-websites": [
{
"type": 0,
"value": "Team websites"
"value": "مواقع الفريق"
}
],
"label.teams": [
{
"type": 0,
"value": "المجموعات"
"value": "الفرق"
}
],
"label.theme": [
{
"type": 0,
"value": "المظهر"
"value": "السمة"
}
],
"label.this-month": [
@ -976,13 +976,13 @@
"label.total": [
{
"type": 0,
"value": "Total"
"value": "الإجمالي"
}
],
"label.total-records": [
{
"type": 0,
"value": "Total records"
"value": "إجمالي السجلات"
}
],
"label.tracking-code": [
@ -994,19 +994,19 @@
"label.true": [
{
"type": 0,
"value": "True"
"value": "حقيقي"
}
],
"label.type": [
{
"type": 0,
"value": "Type"
"value": "النوع"
}
],
"label.unique": [
{
"type": 0,
"value": "Unique"
"value": "فريد"
}
],
"label.unique-visitors": [
@ -1024,7 +1024,7 @@
"label.untitled": [
{
"type": 0,
"value": "Untitled"
"value": "بدون عنوان"
}
],
"label.url": [
@ -1042,7 +1042,7 @@
"label.user": [
{
"type": 0,
"value": "مستخدم"
"value": "المستخدم"
}
],
"label.username": [
@ -1060,7 +1060,7 @@
"label.value": [
{
"type": 0,
"value": "Value"
"value": "القيمة"
}
],
"label.view": [
@ -1078,7 +1078,7 @@
"label.view-only": [
{
"type": 0,
"value": "View only"
"value": "عرض فقط"
}
],
"label.views": [
@ -1096,13 +1096,13 @@
"label.website": [
{
"type": 0,
"value": "Website"
"value": "الموقع"
}
],
"label.website-id": [
{
"type": 0,
"value": "معرف الموقع"
"value": "معرّف الموقع"
}
],
"label.websites": [
@ -1114,7 +1114,7 @@
"label.window": [
{
"type": 0,
"value": "Window"
"value": "النافذة"
}
],
"label.yesterday": [
@ -1202,7 +1202,7 @@
"message.delete-account": [
{
"type": 0,
"value": "To delete this account, type "
"value": "لحذف هذا الحساب، اكتب "
},
{
"type": 1,
@ -1210,13 +1210,13 @@
},
{
"type": 0,
"value": " in the box below to confirm."
"value": " في المربع أدناه للتأكيد."
}
],
"message.delete-website": [
{
"type": 0,
"value": "To delete this website, type "
"value": "لحذف هذا الموقع، اكتب "
},
{
"type": 1,
@ -1224,13 +1224,13 @@
},
{
"type": 0,
"value": " in the box below to confirm."
"value": " في المربع أدناه للتأكيد."
}
],
"message.delete-website-warning": [
{
"type": 0,
"value": "كافة البيانات المرتبطة سيم حذفها ايضا."
"value": "سيتم حذف كافة بيانات الموقع."
}
],
"message.error": [
@ -1288,7 +1288,7 @@
"message.new-version-available": [
{
"type": 0,
"value": "A new version of Umami "
"value": "إصدار جديد من Umami "
},
{
"type": 1,
@ -1296,7 +1296,7 @@
},
{
"type": 0,
"value": " is available!"
"value": " متاح!"
}
],
"message.no-data-available": [
@ -1308,7 +1308,7 @@
"message.no-event-data": [
{
"type": 0,
"value": "No event data is available."
"value": "لا توجد بيانات الحدث متاحة."
}
],
"message.no-match-password": [
@ -1320,19 +1320,19 @@
"message.no-results-found": [
{
"type": 0,
"value": "No results were found."
"value": "لا توجد نتائج."
}
],
"message.no-team-websites": [
{
"type": 0,
"value": "هذه المجموعة ليس لديه اي موقع."
"value": "هذا الفريق ليس لديه أي مواقع."
}
],
"message.no-teams": [
{
"type": 0,
"value": "لم تقم بإنشاء اي مجموعة."
"value": "لم تنشِئ اي فرق."
}
],
"message.no-users": [
@ -1356,7 +1356,7 @@
"message.reset-website": [
{
"type": 0,
"value": "To reset this website, type "
"value": "لإعادة ضبط موقع الويب هذا، اكتب "
},
{
"type": 1,
@ -1364,7 +1364,7 @@
},
{
"type": 0,
"value": " in the box below to confirm."
"value": " في المربع أدناه للتأكيد."
}
],
"message.reset-website-warning": [
@ -1396,19 +1396,19 @@
"message.team-already-member": [
{
"type": 0,
"value": "أنت عضو في المجموعة"
"value": "أنت عضو في الفريق"
}
],
"message.team-not-found": [
{
"type": 0,
"value": "لم يتم العثور على المجموعة"
"value": "لم يتم العثور على الفريق"
}
],
"message.team-websites-info": [
{
"type": 0,
"value": "يمكن مشاهدة الموقع من اي عضو في المجموعة."
"value": "يمكن مشاهدة الموقع من اي عضو في الفريق."
}
],
"message.tracking-code": [

View File

@ -35,7 +35,7 @@
"value": "Дадаць сайт"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Адміністратар"

View File

@ -35,7 +35,7 @@
"value": "ওয়েবসাইট যুক্ত করুন"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "অ্যাডমিন"

View File

@ -35,7 +35,7 @@
"value": "Afegeix lloc web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrador"

View File

@ -35,7 +35,7 @@
"value": "Přidat web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrátor"

View File

@ -35,7 +35,7 @@
"value": "Tilføj hjemmeside"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Websiite hinzuefüege"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Website hinzufügen"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Προσθήκη ιστότοπου"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Διαχειριστής"

View File

@ -35,7 +35,7 @@
"value": "Add website"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Add website"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"
@ -1382,7 +1382,7 @@
"message.share-url": [
{
"type": 0,
"value": "Your website stats are publically available at the following URL:"
"value": "Your website stats are publicly available at the following URL:"
}
],
"message.team-already-member": [

View File

@ -35,7 +35,7 @@
"value": "Nuevo sitio web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrador"

View File

@ -35,7 +35,7 @@
"value": "افزودن وب‌سایت"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "مدیر"

View File

@ -35,7 +35,7 @@
"value": "Lisää verkkosivu"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Järjestelmänvalvoja"

View File

@ -35,7 +35,7 @@
"value": "Legg heimasíðu afturat"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Fyrisitari"

View File

@ -35,7 +35,7 @@
"value": "Ajouter un site"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrateur"

View File

@ -35,7 +35,7 @@
"value": "Engadir sitio web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administradora"

View File

@ -35,7 +35,7 @@
"value": "הוספת אתר"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "מנהל"

View File

@ -35,7 +35,7 @@
"value": "वेबसाइट"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "प्रशासक"

View File

@ -35,7 +35,7 @@
"value": "Dodaj web stranicu"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Weboldal hozzáadása"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Adminisztrátor"

View File

@ -35,7 +35,7 @@
"value": "Tambah situs web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Pengelola"

View File

@ -35,7 +35,7 @@
"value": "Aggiungi sito"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Amministratore"

View File

@ -35,7 +35,7 @@
"value": "Webサイトの追加"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "管理者"

View File

@ -35,7 +35,7 @@
"value": "បន្ថែមគេហទំព័រ"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "អ្នកគ្រប់គ្រង"

View File

@ -35,7 +35,7 @@
"value": "웹사이트 추가"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "관리자"

View File

@ -35,7 +35,7 @@
"value": "Pridėti svetainę"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administratorius"

View File

@ -35,7 +35,7 @@
"value": "Веб нэмэх"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Админ"
@ -314,7 +314,7 @@
"label.dismiss": [
{
"type": 0,
"value": "Үл хэргэсэх"
"value": "Үл хэрэгсэх"
}
],
"label.does-not-contain": [
@ -422,7 +422,7 @@
"label.funnel-description": [
{
"type": 0,
"value": "Хэрэглэгчдийн шилжилт, уналтын хэмжээг шижнлэх."
"value": "Хэрэглэгчдийн шилжилт, уналтын хэмжээг шинжлэх."
}
],
"label.greater-than": [
@ -446,7 +446,7 @@
"label.insights-description": [
{
"type": 0,
"value": "Өгөгдлөө хэсэгчлэн хуваах, шүүх байдлаар задлах шинжлэх."
"value": "Өгөгдлөө хэсэгчлэн хуваах, шүүх байдлаар задлан шинжлэх."
}
],
"label.is": [
@ -796,7 +796,7 @@
"label.retention-description": [
{
"type": 0,
"value": "Хэрэглэгчид таны веб рүү дахин хандах буюу хэрэглэгчидээ хэр тогтоож буйг хэмжих."
"value": "Хэрэглэгчид таны веб рүү дахин хандах буюу хэрэглэгчдээ хэр тогтоож буйг хэмжих."
}
],
"label.role": [
@ -982,7 +982,7 @@
"label.total-records": [
{
"type": 0,
"value": "Нийт мөриийн тоо"
"value": "Нийт мөрийн тоо"
}
],
"label.tracking-code": [
@ -1006,7 +1006,7 @@
"label.unique": [
{
"type": 0,
"value": "Unique"
"value": "Давхардаагүй"
}
],
"label.unique-visitors": [
@ -1364,7 +1364,7 @@
"message.reset-website": [
{
"type": 0,
"value": "Тоон үзүүлэлийг дахин эхлүүлэхийн тулд доорх хэсэгт "
"value": "Тоон үзүүлэлтийг дахин эхлүүлэхийн тулд доорх хэсэгт "
},
{
"type": 1,
@ -1378,7 +1378,7 @@
"message.reset-website-warning": [
{
"type": 0,
"value": "Энэ вебийн бүх тоон үзүүлэлтүүдийг устгах болно. Гэхдээ мөрдөх код хэвэндээ үлдэнэ."
"value": "Энэ вебийн бүх тоон үзүүлэлтүүдийг устгах болно. Гэхдээ мөрдөх код хэвээрээ үлдэнэ."
}
],
"message.saved": [

View File

@ -35,7 +35,7 @@
"value": "Tambah laman web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Pentadbir"

View File

@ -35,7 +35,7 @@
"value": "ဝက်ဘ်ဆိုဒ်ထည့်မည်"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "အက်ဒမင်"

View File

@ -35,7 +35,7 @@
"value": "Legg til nettsted"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Website koppelen"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Beheerder"

View File

@ -35,7 +35,7 @@
"value": "Dodaj witrynę"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Adicionar site"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrador"

View File

@ -35,7 +35,7 @@
"value": "Adicionar website"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrador"

View File

@ -35,7 +35,7 @@
"value": "Adăugare site web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Добавить сайт"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Администратор"

View File

@ -35,7 +35,7 @@
"value": "වෙබ් අඩවිය එක් කරන්න"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -35,7 +35,7 @@
"value": "Pridať web"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrátor"

View File

@ -35,7 +35,7 @@
"value": "Dodaj spletno mesto"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administrator"

View File

@ -2,7 +2,7 @@
"label.access-code": [
{
"type": 0,
"value": "Access code"
"value": "Åtkomstkod"
}
],
"label.actions": [
@ -20,22 +20,22 @@
"label.add": [
{
"type": 0,
"value": "Add"
"value": "Lägg till"
}
],
"label.add-description": [
{
"type": 0,
"value": "Add description"
"value": "Lägg till beskrivning"
}
],
"label.add-website": [
{
"type": 0,
"value": "Lägg till webbsajt"
"value": "Lägg till webbplats"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Administratör"
@ -44,7 +44,7 @@
"label.after": [
{
"type": 0,
"value": "After"
"value": "Efter"
}
],
"label.all": [
@ -62,19 +62,19 @@
"label.analytics": [
{
"type": 0,
"value": "Analys"
"value": "Webbplats Analys"
}
],
"label.average": [
{
"type": 0,
"value": "Average"
"value": "Genomsnitt"
}
],
"label.average-visit-time": [
{
"type": 0,
"value": "Medelbesökstid"
"value": "Genomsnittlig besökstid"
}
],
"label.back": [
@ -86,25 +86,25 @@
"label.before": [
{
"type": 0,
"value": "Before"
"value": "re"
}
],
"label.bounce-rate": [
{
"type": 0,
"value": "Avvisningfrekvens"
"value": "Avvisningsfrekvens"
}
],
"label.breakdown": [
{
"type": 0,
"value": "Breakdown"
"value": "Analys"
}
],
"label.browser": [
{
"type": 0,
"value": "Browser"
"value": "Webbläsare"
}
],
"label.browsers": [
@ -134,7 +134,7 @@
"label.city": [
{
"type": 0,
"value": "City"
"value": "Stad"
}
],
"label.clear-all": [
@ -158,7 +158,7 @@
"label.contains": [
{
"type": 0,
"value": "Contains"
"value": "Innehåller"
}
],
"label.continue": [
@ -176,19 +176,19 @@
"label.country": [
{
"type": 0,
"value": "Country"
"value": "Land"
}
],
"label.create": [
{
"type": 0,
"value": "Create"
"value": "Skapa"
}
],
"label.create-report": [
{
"type": 0,
"value": "Create report"
"value": "Skapa rapport"
}
],
"label.create-team": [
@ -236,19 +236,19 @@
"label.date": [
{
"type": 0,
"value": "Date"
"value": "Datum"
}
],
"label.date-range": [
{
"type": 0,
"value": "Datumomfång"
"value": "Tidsperiod"
}
],
"label.day": [
{
"type": 0,
"value": "Day"
"value": "Dag"
}
],
"label.default-date-range": [
@ -278,13 +278,13 @@
"label.delete-website": [
{
"type": 0,
"value": "Radera webbsajt"
"value": "Radera webbplats"
}
],
"label.description": [
{
"type": 0,
"value": "Description"
"value": "Beskrivning"
}
],
"label.desktop": [
@ -296,13 +296,13 @@
"label.details": [
{
"type": 0,
"value": "Detailjer"
"value": "Detaljer"
}
],
"label.device": [
{
"type": 0,
"value": "Device"
"value": "Enhet"
}
],
"label.devices": [
@ -320,7 +320,7 @@
"label.does-not-contain": [
{
"type": 0,
"value": "Does not contain"
"value": "Innehåller inte"
}
],
"label.domain": [
@ -332,7 +332,7 @@
"label.dropoff": [
{
"type": 0,
"value": "Dropoff"
"value": "Bortfall"
}
],
"label.edit": [
@ -350,19 +350,19 @@
"label.enable-share-url": [
{
"type": 0,
"value": "Aktivera delnings-URL"
"value": "Aktivera delningslänk"
}
],
"label.event": [
{
"type": 0,
"value": "Event"
"value": "Händelse"
}
],
"label.event-data": [
{
"type": 0,
"value": "Event data"
"value": "Händelsedata"
}
],
"label.events": [
@ -374,19 +374,19 @@
"label.false": [
{
"type": 0,
"value": "False"
"value": "Falskt"
}
],
"label.field": [
{
"type": 0,
"value": "Field"
"value": "Fält"
}
],
"label.fields": [
{
"type": 0,
"value": "Fields"
"value": "Fältar"
}
],
"label.filter": [
@ -410,7 +410,7 @@
"label.filters": [
{
"type": 0,
"value": "Filters"
"value": "Filter"
}
],
"label.funnel": [
@ -422,55 +422,55 @@
"label.funnel-description": [
{
"type": 0,
"value": "Understand the conversion and drop-off rate of users."
"value": "Förstå omvandlingen och bortfallsfrekvensen för användare."
}
],
"label.greater-than": [
{
"type": 0,
"value": "Greater than"
"value": "Större än"
}
],
"label.greater-than-equals": [
{
"type": 0,
"value": "Greater than or equals"
"value": "Större än eller lika med"
}
],
"label.insights": [
{
"type": 0,
"value": "Insights"
"value": "Insikter"
}
],
"label.insights-description": [
{
"type": 0,
"value": "Dive deeper into your data by using segments and filters."
"value": "Dyk djupare in i din data genom att använda olika segment och filter."
}
],
"label.is": [
{
"type": 0,
"value": "Is"
"value": "Är"
}
],
"label.is-not": [
{
"type": 0,
"value": "Is not"
"value": "Är inte"
}
],
"label.is-not-set": [
{
"type": 0,
"value": "Is not set"
"value": "Är inte inställd"
}
],
"label.is-set": [
{
"type": 0,
"value": "Is set"
"value": "Är inställd"
}
],
"label.join": [
@ -482,7 +482,7 @@
"label.join-team": [
{
"type": 0,
"value": "gå med i team"
"value": "Gå med i team"
}
],
"label.language": [
@ -546,13 +546,13 @@
"label.less-than": [
{
"type": 0,
"value": "Less than"
"value": "Mindre än"
}
],
"label.less-than-equals": [
{
"type": 0,
"value": "Less than or equals"
"value": "Mindre än eller lika med"
}
],
"label.login": [
@ -600,7 +600,7 @@
"label.my-websites": [
{
"type": 0,
"value": "My websites"
"value": "Mina webbplatser"
}
],
"label.name": [
@ -624,13 +624,13 @@
"label.os": [
{
"type": 0,
"value": "OS"
"value": "Operativsystem"
}
],
"label.overview": [
{
"type": 0,
"value": "Overview"
"value": "Översikt"
}
],
"label.owner": [
@ -642,7 +642,7 @@
"label.page-of": [
{
"type": 0,
"value": "Page "
"value": "Sida "
},
{
"type": 1,
@ -650,7 +650,7 @@
},
{
"type": 0,
"value": " of "
"value": " av "
},
{
"type": 1,
@ -666,7 +666,7 @@
"label.pageTitle": [
{
"type": 0,
"value": "Page title"
"value": "Sidtitel"
}
],
"label.pages": [
@ -706,13 +706,13 @@
"label.query": [
{
"type": 0,
"value": "Frågor"
"value": "Fråga"
}
],
"label.query-parameters": [
{
"type": 0,
"value": "Fråge-parametrar"
"value": "Frågeparametrar"
}
],
"label.realtime": [
@ -724,7 +724,7 @@
"label.referrer": [
{
"type": 0,
"value": "Referrer"
"value": "Hänvisare"
}
],
"label.referrers": [
@ -742,7 +742,7 @@
"label.regenerate": [
{
"type": 0,
"value": "Regenerera"
"value": "Förnya"
}
],
"label.region": [
@ -766,7 +766,7 @@
"label.reports": [
{
"type": 0,
"value": "Reports"
"value": "Rapporter"
}
],
"label.required": [
@ -784,7 +784,7 @@
"label.reset-website": [
{
"type": 0,
"value": "Återställ statistik"
"value": "Återställ webbplats"
}
],
"label.retention": [
@ -796,7 +796,7 @@
"label.retention-description": [
{
"type": 0,
"value": "Measure your website stickiness by tracking how often users return."
"value": "Mät din webbplats engagemang genom att följa hur ofta användare återvänder."
}
],
"label.role": [
@ -808,7 +808,7 @@
"label.run-query": [
{
"type": 0,
"value": "Run query"
"value": "Kör sökning"
}
],
"label.save": [
@ -826,25 +826,25 @@
"label.search": [
{
"type": 0,
"value": "Search"
"value": "Sök"
}
],
"label.select-date": [
{
"type": 0,
"value": "Select date"
"value": "Välj datum"
}
],
"label.select-website": [
{
"type": 0,
"value": "Välj webbsajt"
"value": "Välj webbplats"
}
],
"label.sessions": [
{
"type": 0,
"value": "Sessions"
"value": "Sessioner"
}
],
"label.settings": [
@ -856,7 +856,7 @@
"label.share-url": [
{
"type": 0,
"value": "Delnings-URL"
"value": "Delningslänk"
}
],
"label.single-day": [
@ -868,13 +868,13 @@
"label.sum": [
{
"type": 0,
"value": "Sum"
"value": "Summa"
}
],
"label.tablet": [
{
"type": 0,
"value": "Platta"
"value": "Surfplatta"
}
],
"label.team": [
@ -904,7 +904,7 @@
"label.team-name": [
{
"type": 0,
"value": "Team name"
"value": "Team namn"
}
],
"label.team-owner": [
@ -916,7 +916,7 @@
"label.team-websites": [
{
"type": 0,
"value": "Team websites"
"value": "Team webbplatser"
}
],
"label.teams": [
@ -976,13 +976,13 @@
"label.total": [
{
"type": 0,
"value": "Total"
"value": "Totalt"
}
],
"label.total-records": [
{
"type": 0,
"value": "Total records"
"value": "Totala poster"
}
],
"label.tracking-code": [
@ -994,19 +994,19 @@
"label.true": [
{
"type": 0,
"value": "True"
"value": "Sant"
}
],
"label.type": [
{
"type": 0,
"value": "Type"
"value": "Typ"
}
],
"label.unique": [
{
"type": 0,
"value": "Unique"
"value": "Unikt"
}
],
"label.unique-visitors": [
@ -1018,25 +1018,25 @@
"label.unknown": [
{
"type": 0,
"value": "Okänd"
"value": "Okänt"
}
],
"label.untitled": [
{
"type": 0,
"value": "Untitled"
"value": "Namnlös"
}
],
"label.url": [
{
"type": 0,
"value": "URL"
"value": "Länk"
}
],
"label.urls": [
{
"type": 0,
"value": "URLs"
"value": "Länkar"
}
],
"label.user": [
@ -1054,13 +1054,13 @@
"label.users": [
{
"type": 0,
"value": "Users"
"value": "Användare"
}
],
"label.value": [
{
"type": 0,
"value": "Value"
"value": "Värde"
}
],
"label.view": [
@ -1078,7 +1078,7 @@
"label.view-only": [
{
"type": 0,
"value": "View only"
"value": "Endast visning"
}
],
"label.views": [
@ -1096,25 +1096,25 @@
"label.website": [
{
"type": 0,
"value": "Website"
"value": "Webbplats"
}
],
"label.website-id": [
{
"type": 0,
"value": "Webbsajt-ID"
"value": "Webbplats ID"
}
],
"label.websites": [
{
"type": 0,
"value": "Webbsajt"
"value": "Webbplatser"
}
],
"label.window": [
{
"type": 0,
"value": "Window"
"value": "Fönster"
}
],
"label.yesterday": [
@ -1206,7 +1206,7 @@
"message.delete-account": [
{
"type": 0,
"value": "To delete this account, type "
"value": "För att radera det här kontot, skriv "
},
{
"type": 1,
@ -1214,13 +1214,13 @@
},
{
"type": 0,
"value": " in the box below to confirm."
"value": " i rutan nedan för att bekräfta."
}
],
"message.delete-website": [
{
"type": 0,
"value": "To delete this website, type "
"value": "För att radera den här webbplatsen, skriv "
},
{
"type": 1,
@ -1228,13 +1228,13 @@
},
{
"type": 0,
"value": " in the box below to confirm."
"value": " i rutan nedan för att bekräfta."
}
],
"message.delete-website-warning": [
{
"type": 0,
"value": "All tillhörande data kommer också raderas."
"value": "All tillhörande data kommer också att raderas."
}
],
"message.error": [
@ -1292,7 +1292,7 @@
"message.new-version-available": [
{
"type": 0,
"value": "A new version of Umami "
"value": "En ny version av Umami "
},
{
"type": 1,
@ -1300,7 +1300,7 @@
},
{
"type": 0,
"value": " is available!"
"value": " är tillgänglig!"
}
],
"message.no-data-available": [
@ -1312,25 +1312,25 @@
"message.no-event-data": [
{
"type": 0,
"value": "No event data is available."
"value": "Ingen händelsedata är tillgänglig."
}
],
"message.no-match-password": [
{
"type": 0,
"value": "Lösenorden är inte samma"
"value": "Lösenorden matchar inte"
}
],
"message.no-results-found": [
{
"type": 0,
"value": "No results were found."
"value": "Inga resultat hittades."
}
],
"message.no-team-websites": [
{
"type": 0,
"value": "Det här teamet har inga webbsajter."
"value": "Det här teamet har inga webbplatser."
}
],
"message.no-teams": [
@ -1348,19 +1348,19 @@
"message.no-websites-configured": [
{
"type": 0,
"value": "Du har inga webbsajter."
"value": "Du har inte konfigurerat några webbplatser."
}
],
"message.page-not-found": [
{
"type": 0,
"value": "Sidan kan inte hittas."
"value": "Sidan kunde inte hittas."
}
],
"message.reset-website": [
{
"type": 0,
"value": "För att återställa statistiken skriv "
"value": "För att återställa webbplatsen, skriv "
},
{
"type": 1,
@ -1374,19 +1374,19 @@
"message.reset-website-warning": [
{
"type": 0,
"value": "All statistik för webbsajten tas bort men spårningskoden förblir oförändrad."
"value": "All statistik för webbplatsen tas bort, men spårningskoden förblir oförändrad."
}
],
"message.saved": [
{
"type": 0,
"value": "Sparades!"
"value": "Sparat!"
}
],
"message.share-url": [
{
"type": 0,
"value": "Det här är den offentliga delnings-URL:en för "
"value": "Det här är den offentliga delningslänken för "
},
{
"type": 1,
@ -1406,13 +1406,13 @@
"message.team-not-found": [
{
"type": 0,
"value": "Team kan inte hittas."
"value": "Teamet kunde inte hittas."
}
],
"message.team-websites-info": [
{
"type": 0,
"value": "Websajter kan ses av alla i teamet."
"value": "Webbplatserna kan ses av alla i teamet."
}
],
"message.tracking-code": [
@ -1424,7 +1424,7 @@
"message.user-deleted": [
{
"type": 0,
"value": "Användare raderad."
"value": "Användaren har raderats."
}
],
"message.visitor-log": [

View File

@ -35,7 +35,7 @@
"value": "வலைத்தளத்தைச் சேர்க்க"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "நிர்வாகியைச் சேர்க்க"

View File

@ -35,7 +35,7 @@
"value": "เพิ่มเว็บไซต์"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "ผู้ดูแลระบบ"

View File

@ -35,7 +35,7 @@
"value": "Web sitesi ekle"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Yönetici"

View File

@ -35,7 +35,7 @@
"value": "Додати сайт"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Адміністратор"

View File

@ -35,7 +35,7 @@
"value": "ویب سائٹ کا اضافہ کریں"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "منتظم"

View File

@ -35,7 +35,7 @@
"value": "Thêm website"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "Quản trị"

View File

@ -35,7 +35,7 @@
"value": "添加网站"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "管理员"

View File

@ -35,7 +35,7 @@
"value": "新增網站"
}
],
"label.admin": [
"label.administrator": [
{
"type": 0,
"value": "管理員"

View File

@ -1,5 +1,4 @@
import 'dotenv/config';
import buble from '@rollup/plugin-buble';
import replace from '@rollup/plugin-replace';
import { terser } from 'rollup-plugin-terser';
@ -15,7 +14,6 @@ export default {
delimiters: ['', ''],
preventAssignment: true,
}),
buble({ objectAssign: true }),
terser({ compress: { evaluate: false } }),
],
};

View File

@ -27,7 +27,7 @@ export function App({ children }) {
{children}
<UpdateNotice user={user} config={config} />
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
<Script src={`/telemetry.js`} />
<Script src={`${process.env.basePath}/telemetry.js`} />
)}
</>
);

View File

@ -7,6 +7,7 @@
background: var(--base75);
border-bottom: 1px solid var(--base300);
padding: 0 20px;
z-index: 200;
}
.logo {
@ -26,6 +27,7 @@
padding: 0 40px;
font-weight: 700;
max-height: 60px;
align-items: center;
}
.links a,

View File

@ -2,35 +2,38 @@
import { Icon, Text } from 'react-basics';
import Link from 'next/link';
import classNames from 'classnames';
import Icons from 'components/icons';
import HamburgerButton from 'components/common/HamburgerButton';
import ThemeButton from 'components/input/ThemeButton';
import LanguageButton from 'components/input/LanguageButton';
import ProfileButton from 'components/input/ProfileButton';
import useMessages from 'components/hooks/useMessages';
import HamburgerButton from 'components/common/HamburgerButton';
import { usePathname } from 'next/navigation';
import TeamsButton from 'components/input/TeamsButton';
import Icons from 'components/icons';
import { useLogin, useMessages, useNavigation, useTeamUrl } from 'components/hooks';
import styles from './NavBar.module.css';
export function NavBar() {
const pathname = usePathname();
const { user } = useLogin();
const { formatMessage, labels } = useMessages();
const cloudMode = Boolean(process.env.cloudMode);
const { pathname } = useNavigation();
const { teamId, renderTeamUrl } = useTeamUrl();
const cloudMode = !!process.env.cloudMode;
const links = [
{ label: formatMessage(labels.dashboard), url: '/dashboard' },
{ label: formatMessage(labels.websites), url: '/websites' },
{ label: formatMessage(labels.reports), url: '/reports' },
{ label: formatMessage(labels.settings), url: '/settings' },
{ label: formatMessage(labels.dashboard), url: renderTeamUrl('/dashboard') },
{ label: formatMessage(labels.websites), url: renderTeamUrl('/websites') },
{ label: formatMessage(labels.reports), url: renderTeamUrl('/reports') },
{ label: formatMessage(labels.settings), url: renderTeamUrl('/settings') },
].filter(n => n);
const menuItems = [
{
label: formatMessage(labels.dashboard),
url: '/dashboard',
url: renderTeamUrl('/dashboard'),
},
!cloudMode && {
label: formatMessage(labels.settings),
url: '/settings',
url: renderTeamUrl('/settings'),
children: [
{
label: formatMessage(labels.websites),
@ -46,13 +49,13 @@ export function NavBar() {
},
{
label: formatMessage(labels.profile),
url: '/settings/profile',
url: '/profile',
},
],
},
cloudMode && {
label: formatMessage(labels.profile),
url: '/settings/profile',
url: '/profile',
},
!cloudMode && { label: formatMessage(labels.logout), url: '/logout' },
].filter(n => n);
@ -80,6 +83,7 @@ export function NavBar() {
})}
</div>
<div className={styles.actions}>
{user?.teams?.length && <TeamsButton teamId={teamId} />}
<ThemeButton />
<LanguageButton />
<ProfileButton />

View File

@ -1,4 +1,3 @@
'use client';
import { useEffect, useCallback, useState } from 'react';
import { createPortal } from 'react-dom';
import { Button } from 'react-basics';
@ -6,7 +5,7 @@ import { setItem } from 'next-basics';
import useStore, { checkVersion } from 'store/version';
import { REPO_URL, VERSION_CHECK } from 'lib/constants';
import styles from './UpdateNotice.module.css';
import useMessages from 'components/hooks/useMessages';
import { useMessages } from 'components/hooks';
import { usePathname } from 'next/navigation';
export function UpdateNotice({ user, config }) {

View File

@ -0,0 +1,6 @@
'use client';
import TestConsole from './TestConsole';
export default function ConsolePage({ websiteId }) {
return <TestConsole websiteId={websiteId} />;
}

View File

@ -1,7 +1,17 @@
.test {
.container {
display: grid;
gap: 30px;
padding-bottom: 40px;
}
.actions {
border: 1px solid var(--base400);
border-radius: 5px;
padding: 0 20px 20px 20px;
display: grid;
gap: 40px;
grid-template-columns: repeat(3, minmax(300px, 1fr));
box-shadow: 0 0 0 10px var(--base100);
}
.header {
@ -9,3 +19,15 @@
font-weight: 700;
margin: 20px 0;
}
.group {
display: flex;
flex-direction: column;
gap: 10px;
}
.wrapped {
border: 1px solid var(--blue900);
border-radius: 4px;
padding: 8px 16px;
}

View File

@ -1,4 +1,3 @@
'use client';
import { Button } from 'react-basics';
import Head from 'next/head';
import Link from 'next/link';
@ -7,9 +6,8 @@ import WebsiteSelect from 'components/input/WebsiteSelect';
import Page from 'components/layout/Page';
import PageHeader from 'components/layout/PageHeader';
import EventsChart from 'components/metrics/EventsChart';
import WebsiteChart from 'app/(main)/websites/[id]/WebsiteChart';
import useApi from 'components/hooks/useApi';
import useNavigation from 'components/hooks/useNavigation';
import WebsiteChart from '../websites/[websiteId]/WebsiteChart';
import { useApi, useNavigation } from 'components/hooks';
import styles from './TestConsole.module.css';
export function TestConsole({ websiteId }: { websiteId: string }) {
@ -82,15 +80,15 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
<WebsiteSelect websiteId={website?.id} onSelect={handleChange} />
</PageHeader>
{website && (
<>
<div className={styles.container}>
<Script
async
data-website-id={websiteId}
src={`${process.env.basePath}/script.js`}
data-cache="true"
/>
<div className={styles.test}>
<div>
<div className={styles.actions}>
<div className={styles.group}>
<div className={styles.header}>Page links</div>
<div>
<Link href={`/console/${websiteId}/page/1/?q=abc`}>page one</Link>
@ -114,12 +112,11 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
</a>
</div>
</div>
<div>
<div className={styles.group}>
<div className={styles.header}>Click events</div>
<Button id="send-event-button" data-umami-event="button-click" variant="primary">
Send event
</Button>
<p />
<Button
id="send-event-data-button"
data-umami-event="button-click"
@ -129,23 +126,39 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
>
Send event with data
</Button>
<Button
id="button-with-div-button"
data-umami-event="button-click"
data-umami-event-name="bob"
data-umami-event-id="123"
variant="primary"
>
<div className={styles.wrapped}>Button with div</div>
</Button>
<div data-umami-event="div-click" className={styles.wrapped}>
DIV with attribute
</div>
<div data-umami-event="div-click-one" className={styles.wrapped}>
<div data-umami-event="div-click-two" className={styles.wrapped}>
<div data-umami-event="div-click-three" className={styles.wrapped}>
Nested DIV
</div>
</div>
</div>
</div>
<div>
<div className={styles.group}>
<div className={styles.header}>Javascript events</div>
<Button id="manual-button" variant="primary" onClick={handleClick}>
Run script
</Button>
<p />
<Button id="manual-button" variant="primary" onClick={handleIdentifyClick}>
Run identify
</Button>
</div>
</div>
<div>
<WebsiteChart websiteId={website.id} />
<EventsChart websiteId={website.id} />
</div>
</>
<WebsiteChart websiteId={website.id} />
<EventsChart websiteId={website.id} />
</div>
)}
</Page>
);

View File

@ -1,20 +1,20 @@
import TestConsole from '../TestConsole';
import { Metadata } from 'next';
import ConsolePage from '../ConsolePage';
async function getEnabled() {
return !!process.env.ENABLE_TEST_CONSOLE;
}
export default async function ({ params: { id } }) {
export default async function ({ params: { websiteId } }) {
const enabled = await getEnabled();
if (!enabled) {
return null;
}
return <TestConsole websiteId={id?.[0]} />;
return <ConsolePage websiteId={websiteId?.[0]} />;
}
export const metadata: Metadata = {
title: 'Test Console | umami',
title: 'Test Console | Umami',
};

View File

@ -1,81 +0,0 @@
'use client';
import { Button, Icon, Icons, Loading, Text } from 'react-basics';
import Link from 'next/link';
import PageHeader from 'components/layout/PageHeader';
import Pager from 'components/common/Pager';
import WebsiteChartList from '../../(main)/websites/[id]/WebsiteChartList';
import DashboardSettingsButton from 'app/(main)/dashboard/DashboardSettingsButton';
import DashboardEdit from 'app/(main)/dashboard/DashboardEdit';
import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
import useApi from 'components/hooks/useApi';
import useDashboard from 'store/dashboard';
import useMessages from 'components/hooks/useMessages';
import useLocale from 'components/hooks/useLocale';
import useFilterQuery from 'components/hooks/useFilterQuery';
import { useUser } from 'components/hooks';
export function Dashboard() {
const { formatMessage, labels, messages } = useMessages();
const { user } = useUser();
const { showCharts, editing } = useDashboard();
const { dir } = useLocale();
const { get } = useApi();
const pageSize = 10;
const { query, params, setParams, result } = useFilterQuery({
queryKey: ['dashboard:websites'],
queryFn: (params: any) => {
return get(`/users/${user.id}/websites`, { ...params, includeTeams: true, pageSize });
},
});
const handlePageChange = (page: number) => {
setParams({ ...params, page });
};
const { data, count } = result || {};
const hasData = !!(data as any)?.length;
const { page } = params;
if (query.isLoading) {
return <Loading />;
}
return (
<>
<PageHeader title={formatMessage(labels.dashboard)}>
{!editing && hasData && <DashboardSettingsButton />}
</PageHeader>
{!hasData && (
<EmptyPlaceholder message={formatMessage(messages.noWebsitesConfigured)}>
<Link href="/settings/websites">
<Button>
<Icon rotate={dir === 'rtl' ? 180 : 0}>
<Icons.ArrowRight />
</Icon>
<Text>{formatMessage(messages.goToSettings)}</Text>
</Button>
</Link>
</EmptyPlaceholder>
)}
{hasData && (
<>
{editing && <DashboardEdit />}
{!editing && (
<>
<WebsiteChartList websites={data} showCharts={showCharts} limit={pageSize} />
<Pager
page={page}
pageSize={pageSize}
count={count}
onPageChange={handlePageChange}
/>
</>
)}
</>
)}
</>
);
}
export default Dashboard;

View File

@ -1,32 +1,30 @@
'use client';
import { useState, useMemo } from 'react';
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
import classNames from 'classnames';
import { Button } from 'react-basics';
import { Button, Loading } from 'react-basics';
import { firstBy } from 'thenby';
import useDashboard, { saveDashboard } from 'store/dashboard';
import useMessages from 'components/hooks/useMessages';
import useApi from 'components/hooks/useApi';
import { useMessages, useWebsites } from 'components/hooks';
import styles from './DashboardEdit.module.css';
const dragId = 'dashboard-website-ordering';
const DRAG_ID = 'dashboard-website-ordering';
export function DashboardEdit() {
export function DashboardEdit({ teamId }: { teamId: string }) {
const settings = useDashboard();
const { websiteOrder } = settings;
const { formatMessage, labels } = useMessages();
const [order, setOrder] = useState(websiteOrder || []);
const { get, useQuery } = useApi();
const { data: result } = useQuery({
queryKey: ['websites'],
queryFn: () => get('/websites', { includeTeams: 1 }),
});
const { data: websites } = result || {};
const {
result,
query: { isLoading },
} = useWebsites({ teamId });
const websites = result?.data;
const ordered = useMemo(() => {
if (websites) {
return websites
.map(website => ({ ...website, order: order.indexOf(website.id) }))
.map((website: { id: any }) => ({ ...website, order: order.indexOf(website.id) }))
.sort(firstBy('order'));
}
return [];
@ -57,6 +55,10 @@ export function DashboardEdit() {
setOrder([]);
}
if (isLoading) {
return <Loading />;
}
return (
<>
<div className={styles.buttons}>
@ -72,7 +74,7 @@ export function DashboardEdit() {
</div>
<div className={styles.dragActive}>
<DragDropContext onDragEnd={handleWebsiteDrag}>
<Droppable droppableId={dragId}>
<Droppable droppableId={DRAG_ID}>
{(provided, snapshot) => (
<div
{...provided.droppableProps}
@ -80,7 +82,7 @@ export function DashboardEdit() {
style={{ marginBottom: snapshot.isDraggingOver ? 260 : null }}
>
{ordered.map(({ id, name, domain }, index) => (
<Draggable key={id} draggableId={`${dragId}-${id}`} index={index}>
<Draggable key={id} draggableId={`${DRAG_ID}-${id}`} index={index}>
{(provided, snapshot) => (
<div
ref={provided.innerRef}

View File

@ -0,0 +1,71 @@
'use client';
import { Icon, Icons, Loading, Text } from 'react-basics';
import PageHeader from 'components/layout/PageHeader';
import Pager from 'components/common/Pager';
import WebsiteChartList from '../websites/[websiteId]/WebsiteChartList';
import DashboardSettingsButton from 'app/(main)/dashboard/DashboardSettingsButton';
import DashboardEdit from 'app/(main)/dashboard/DashboardEdit';
import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
import { useMessages, useLocale, useTeamUrl, useWebsites } from 'components/hooks';
import useDashboard from 'store/dashboard';
import LinkButton from 'components/common/LinkButton';
export function DashboardPage() {
const { formatMessage, labels, messages } = useMessages();
const { teamId, renderTeamUrl } = useTeamUrl();
const { showCharts, editing } = useDashboard();
const { dir } = useLocale();
const pageSize = 10;
const { result, query, params, setParams } = useWebsites({ teamId }, { pageSize });
const { page } = params;
const hasData = !!result?.data?.length;
const handlePageChange = (page: number) => {
setParams({ ...params, page });
};
if (query.isLoading) {
return <Loading />;
}
return (
<section style={{ marginBottom: 60 }}>
<PageHeader title={formatMessage(labels.dashboard)}>
{!editing && hasData && <DashboardSettingsButton />}
</PageHeader>
{!hasData && (
<EmptyPlaceholder message={formatMessage(messages.noWebsitesConfigured)}>
<LinkButton href={renderTeamUrl('/settings')}>
<Icon rotate={dir === 'rtl' ? 180 : 0}>
<Icons.ArrowRight />
</Icon>
<Text>{formatMessage(messages.goToSettings)}</Text>
</LinkButton>
</EmptyPlaceholder>
)}
{hasData && (
<>
{editing && <DashboardEdit teamId={teamId} />}
{!editing && (
<>
<WebsiteChartList
websites={result?.data as any}
showCharts={showCharts}
limit={pageSize}
/>
<Pager
page={page}
pageSize={pageSize}
count={result?.count}
onPageChange={handlePageChange}
/>
</>
)}
</>
)}
</section>
);
}
export default DashboardPage;

View File

@ -1,7 +1,7 @@
import { TooltipPopup, Icon, Text, Flexbox, Button } from 'react-basics';
import Icons from 'components/icons';
import { saveDashboard } from 'store/dashboard';
import useMessages from 'components/hooks/useMessages';
import { useMessages } from 'components/hooks';
export function DashboardSettingsButton() {
const { formatMessage, labels } = useMessages();

View File

@ -1,10 +1,10 @@
import Dashboard from 'app/(main)/dashboard/Dashboard';
import DashboardPage from './DashboardPage';
import { Metadata } from 'next';
export default function () {
return <Dashboard />;
return <DashboardPage />;
}
export const metadata: Metadata = {
title: 'Dashboard | umami',
title: 'Dashboard | Umami',
};

View File

@ -18,5 +18,16 @@
min-height: 0;
height: calc(100vh - 60px);
overflow-y: auto;
padding-bottom: 60px;
}
.content {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
width: 100%;
max-width: 1320px;
margin: 0 auto;
padding: 0 20px;
min-height: calc(100vh - 60px);
}

View File

@ -1,15 +1,15 @@
import DateFilter from 'components/input/DateFilter';
import { Button, Flexbox } from 'react-basics';
import useDateRange from 'components/hooks/useDateRange';
import { useDateRange, useMessages } from 'components/hooks';
import { DEFAULT_DATE_RANGE } from 'lib/constants';
import useMessages from 'components/hooks/useMessages';
import { DateRange } from 'lib/types';
export function DateRangeSetting() {
const { formatMessage, labels } = useMessages();
const [dateRange, setDateRange] = useDateRange();
const { value } = dateRange;
const handleChange = value => setDateRange(value);
const handleChange = (value: string | DateRange) => setDateRange(value);
const handleReset = () => setDateRange(DEFAULT_DATE_RANGE);
return (

View File

@ -0,0 +1,4 @@
div.menu {
max-height: 300px;
width: 300px;
}

View File

@ -1,17 +1,26 @@
import { useState } from 'react';
import { Button, Dropdown, Item, Flexbox } from 'react-basics';
import useLocale from 'components/hooks/useLocale';
import { useLocale, useMessages } from 'components/hooks';
import { DEFAULT_LOCALE } from 'lib/constants';
import { languages } from 'lib/lang';
import useMessages from 'components/hooks/useMessages';
import styles from './LanguageSetting.module.css';
export function LanguageSetting() {
const [search, setSearch] = useState('');
const { formatMessage, labels } = useMessages();
const { locale, saveLocale } = useLocale();
const options = Object.keys(languages);
const options = search
? Object.keys(languages).filter(n => {
return (
n.toLowerCase().includes(search.toLowerCase()) ||
languages[n].label.toLowerCase().includes(search.toLowerCase())
);
})
: Object.keys(languages);
const handleReset = () => saveLocale(DEFAULT_LOCALE);
const renderValue = value => languages[value].label;
const renderValue = (value: string | number) => languages[value].label;
return (
<Flexbox gap={10}>
@ -19,8 +28,10 @@ export function LanguageSetting() {
items={options}
value={locale}
renderValue={renderValue}
onChange={saveLocale}
menuProps={{ style: { height: 300, width: 300 } }}
onChange={val => saveLocale(val as string)}
allowSearch={true}
onSearch={setSearch}
menuProps={{ className: styles.menu }}
>
{item => <Item key={item}>{languages[item].label}</Item>}
</Dropdown>

View File

@ -1,7 +1,7 @@
import { Button, Icon, Text, useToasts, ModalTrigger, Modal } from 'react-basics';
import PasswordEditForm from 'app/(main)/settings/profile/PasswordEditForm';
import PasswordEditForm from 'app/(main)/profile/PasswordEditForm';
import Icons from 'components/icons';
import useMessages from 'components/hooks/useMessages';
import { useMessages } from 'components/hooks';
export function PasswordChangeButton() {
const { formatMessage, labels, messages } = useMessages();

View File

@ -1,7 +1,6 @@
import { useRef } from 'react';
import { Form, FormRow, FormInput, FormButtons, PasswordField, Button } from 'react-basics';
import useApi from 'components/hooks/useApi';
import useMessages from 'components/hooks/useMessages';
import { useApi, useMessages } from 'components/hooks';
export function PasswordEditForm({ onSave, onClose }) {
const { formatMessage, labels, messages } = useMessages();

View File

@ -1,4 +1,3 @@
'use client';
import PageHeader from 'components/layout/PageHeader';
import { useMessages } from 'components/hooks';

View File

@ -0,0 +1,9 @@
.container {
margin: 0 auto;
}
@media screen and (max-width: 768px) {
.container {
margin: 0;
}
}

View File

@ -1,16 +1,13 @@
'use client';
import ProfileHeader from './ProfileHeader';
import ProfileSettings from './ProfileSettings';
import { Metadata } from 'next';
import styles from './ProfilePage.module.css';
export default function () {
return (
<>
<div className={styles.container}>
<ProfileHeader />
<ProfileSettings />
</>
</div>
);
}
export const metadata: Metadata = {
title: 'Profile Settings | umami',
};

View File

@ -1,18 +1,16 @@
'use client';
import { Form, FormRow } from 'react-basics';
import TimezoneSetting from 'app/(main)/settings/profile/TimezoneSetting';
import DateRangeSetting from 'app/(main)/settings/profile/DateRangeSetting';
import LanguageSetting from 'app/(main)/settings/profile/LanguageSetting';
import ThemeSetting from 'app/(main)/settings/profile/ThemeSetting';
import TimezoneSetting from 'app/(main)/profile/TimezoneSetting';
import DateRangeSetting from 'app/(main)/profile/DateRangeSetting';
import LanguageSetting from 'app/(main)/profile/LanguageSetting';
import ThemeSetting from 'app/(main)/profile/ThemeSetting';
import PasswordChangeButton from './PasswordChangeButton';
import useUser from 'components/hooks/useUser';
import useMessages from 'components/hooks/useMessages';
import { useLogin, useMessages } from 'components/hooks';
import { ROLES } from 'lib/constants';
export function ProfileSettings() {
const { user } = useUser();
const { user } = useLogin();
const { formatMessage, labels } = useMessages();
const cloudMode = Boolean(process.env.cloudMode);
const cloudMode = !!process.env.cloudMode;
if (!user) {
return null;
@ -20,12 +18,12 @@ export function ProfileSettings() {
const { username, role } = user;
const renderRole = value => {
const renderRole = (value: string) => {
if (value === ROLES.user) {
return formatMessage(labels.user);
}
if (value === ROLES.admin) {
return formatMessage(labels.admin);
return formatMessage(labels.administrator);
}
if (value === ROLES.viewOnly) {
return formatMessage(labels.viewOnly);

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import { Button, Icon } from 'react-basics';
import useTheme from 'components/hooks/useTheme';
import { useTheme } from 'components/hooks';
import Sun from 'assets/sun.svg';
import Moon from 'assets/moon.svg';
import styles from './ThemeSetting.module.css';

View File

@ -0,0 +1,4 @@
div.menu {
max-height: 300px;
width: 300px;
}

View File

@ -1,13 +1,17 @@
import { useState } from 'react';
import { Dropdown, Item, Button, Flexbox } from 'react-basics';
import { listTimeZones } from 'timezone-support';
import useTimezone from 'components/hooks/useTimezone';
import useMessages from 'components/hooks/useMessages';
import { useTimezone, useMessages } from 'components/hooks';
import { getTimezone } from 'lib/date';
import styles from './TimezoneSetting.module.css';
export function TimezoneSetting() {
const [search, setSearch] = useState('');
const { formatMessage, labels } = useMessages();
const [timezone, saveTimezone] = useTimezone();
const options = listTimeZones();
const options = search
? listTimeZones().filter(n => n.toLowerCase().includes(search.toLowerCase()))
: listTimeZones();
const handleReset = () => saveTimezone(getTimezone());
@ -17,8 +21,9 @@ export function TimezoneSetting() {
items={options}
value={timezone}
onChange={saveTimezone}
style={{ flex: 1 }}
menuProps={{ style: { height: 300 } }}
menuProps={{ className: styles.menu }}
allowSearch={true}
onSearch={setSearch}
>
{item => <Item key={item}>{item}</Item>}
</Dropdown>

View File

@ -0,0 +1,10 @@
import { Metadata } from 'next';
import ProfilePage from './ProfilePage';
export default function () {
return <ProfilePage />;
}
export const metadata: Metadata = {
title: 'Profile | Umami',
};

View File

@ -1,7 +1,6 @@
import { Button, Icon, Icons, Modal, ModalTrigger, Text } from 'react-basics';
import ConfirmDeleteForm from 'components/common/ConfirmDeleteForm';
import { useApi, useMessages } from 'components/hooks';
import { setValue } from 'store/cache';
import { useApi, useMessages, useModified } from 'components/hooks';
import ConfirmationForm from 'components/common/ConfirmationForm';
export function ReportDeleteButton({
reportId,
@ -12,14 +11,17 @@ export function ReportDeleteButton({
reportName: string;
onDelete?: () => void;
}) {
const { formatMessage, labels } = useMessages();
const { formatMessage, labels, messages, FormattedMessage } = useMessages();
const { del, useMutation } = useApi();
const { mutate } = useMutation({ mutationFn: reportId => del(`/reports/${reportId}`) });
const { mutate, isPending, error } = useMutation({
mutationFn: reportId => del(`/reports/${reportId}`),
});
const { touch } = useModified();
const handleConfirm = (close: () => void) => {
mutate(reportId as any, {
onSuccess: () => {
setValue('reports', Date.now());
touch('reports');
onDelete?.();
close();
},
@ -34,12 +36,20 @@ export function ReportDeleteButton({
</Icon>
<Text>{formatMessage(labels.delete)}</Text>
</Button>
<Modal>
{close => (
<ConfirmDeleteForm
name={reportName}
<Modal title={formatMessage(labels.deleteReport)}>
{(close: () => void) => (
<ConfirmationForm
message={
<FormattedMessage
{...messages.confirmDelete}
values={{ target: <b>{reportName}</b> }}
/>
}
isLoading={isPending}
error={error}
onConfirm={handleConfirm.bind(null, close)}
onClose={close}
buttonLabel={formatMessage(labels.delete)}
/>
)}
</Modal>

View File

@ -1,10 +1,15 @@
'use client';
import { useReports } from 'components/hooks';
import ReportsTable from './ReportsTable';
import DataTable from 'components/common/DataTable';
export default function ReportsDataTable({ websiteId }: { websiteId?: string }) {
const queryResult = useReports(websiteId);
export default function ReportsDataTable({
websiteId,
teamId,
}: {
websiteId?: string;
teamId?: string;
}) {
const queryResult = useReports({ websiteId, teamId });
return (
<DataTable queryResult={queryResult}>

View File

@ -1,23 +1,20 @@
'use client';
import PageHeader from 'components/layout/PageHeader';
import { Button, Icon, Icons, Text } from 'react-basics';
import { useMessages } from 'components/hooks';
import { useRouter } from 'next/navigation';
import { Icon, Icons, Text } from 'react-basics';
import { useMessages, useTeamUrl } from 'components/hooks';
import LinkButton from 'components/common/LinkButton';
export function ReportsHeader() {
const { formatMessage, labels } = useMessages();
const router = useRouter();
const handleClick = () => router.push('/reports/create');
const { renderTeamUrl } = useTeamUrl();
return (
<PageHeader title={formatMessage(labels.reports)}>
<Button variant="primary" onClick={handleClick}>
<LinkButton href={renderTeamUrl('/reports/create')} variant="primary">
<Icon>
<Icons.Plus />
</Icon>
<Text>{formatMessage(labels.createReport)}</Text>
</Button>
</LinkButton>
</PageHeader>
);
}

View File

@ -0,0 +1,15 @@
'use client';
import ReportsHeader from './ReportsHeader';
import ReportsDataTable from './ReportsDataTable';
export default function ReportsPage({ teamId }: { teamId: string }) {
return (
<>
<ReportsHeader />
<ReportsDataTable teamId={teamId} />
</>
);
}
export const metadata = {
title: 'Reports | Umami',
};

View File

@ -1,14 +1,14 @@
import { GridColumn, GridTable, Icon, Icons, Text, useBreakpoint } from 'react-basics';
import LinkButton from 'components/common/LinkButton';
import { useMessages } from 'components/hooks';
import useUser from 'components/hooks/useUser';
import { useMessages, useLogin, useTeamUrl } from 'components/hooks';
import { REPORT_TYPES } from 'lib/constants';
import ReportDeleteButton from './ReportDeleteButton';
export function ReportsTable({ data = [], showDomain }: { data: any[]; showDomain?: boolean }) {
const { formatMessage, labels } = useMessages();
const { user } = useUser();
const { user } = useLogin();
const breakpoint = useBreakpoint();
const { renderTeamUrl } = useTeamUrl();
return (
<GridTable data={data} cardMode={['xs', 'sm', 'md'].includes(breakpoint)}>
@ -34,7 +34,7 @@ export function ReportsTable({ data = [], showDomain }: { data: any[]; showDomai
{(user.id === userId || user.id === website?.userId) && (
<ReportDeleteButton reportId={id} reportName={name} />
)}
<LinkButton href={`/reports/${id}`}>
<LinkButton href={renderTeamUrl(`/reports/${id}`)}>
<Icon>
<Icons.ArrowRight />
</Icon>

View File

@ -1,14 +0,0 @@
import ReportDetails from './ReportDetails';
import { Metadata } from 'next';
export default function ReportDetailsPage({ params: { id } }) {
if (!id) {
return null;
}
return <ReportDetails reportId={id} />;
}
export const metadata: Metadata = {
title: 'Reports | umami',
};

View File

@ -3,7 +3,7 @@ import { FormRow } from 'react-basics';
import { parseDateRange } from 'lib/date';
import DateFilter from 'components/input/DateFilter';
import WebsiteSelect from 'components/input/WebsiteSelect';
import { useMessages } from 'components/hooks';
import { useMessages, useTeamUrl, useWebsite } from 'components/hooks';
import { ReportContext } from './Report';
export interface BaseParametersProps {
@ -21,10 +21,12 @@ export function BaseParameters({
}: BaseParametersProps) {
const { report, updateReport } = useContext(ReportContext);
const { formatMessage, labels } = useMessages();
const { teamId } = useTeamUrl();
const { parameters } = report || {};
const { websiteId, dateRange } = parameters || {};
const { value, startDate, endDate } = dateRange || {};
const { data: website } = useWebsite(websiteId);
const { name } = website || {};
const handleWebsiteSelect = (websiteId: string) => {
updateReport({ websiteId, parameters: { websiteId } });
@ -38,8 +40,10 @@ export function BaseParameters({
<>
{showWebsiteSelect && (
<FormRow label={formatMessage(labels.website)}>
{allowWebsiteSelect && (
<WebsiteSelect websiteId={websiteId} onSelect={handleWebsiteSelect} />
{allowWebsiteSelect ? (
<WebsiteSelect teamId={teamId} websiteId={websiteId} onSelect={handleWebsiteSelect} />
) : (
name
)}
</FormRow>
)}

Some files were not shown because too many files have changed in this diff Show More