Merge branch 'dev' into analytics

This commit is contained in:
Mike Cao 2023-08-28 20:35:32 -07:00
commit 6e37a5b610
8 changed files with 789 additions and 762 deletions

View File

@ -21,7 +21,7 @@
"build-components": "rollup -c rollup.components.config.mjs", "build-components": "rollup -c rollup.components.config.mjs",
"build-tracker": "rollup -c rollup.tracker.config.mjs", "build-tracker": "rollup -c rollup.tracker.config.mjs",
"build-db": "npm-run-all copy-db-files build-db-client", "build-db": "npm-run-all copy-db-files build-db-client",
"build-lang": "npm-run-all format-lang compile-lang download-country-names download-language-names", "build-lang": "npm-run-all format-lang compile-lang clean-lang download-country-names download-language-names",
"build-geo": "node scripts/build-geo.js", "build-geo": "node scripts/build-geo.js",
"build-db-schema": "prisma db pull", "build-db-schema": "prisma db pull",
"build-db-client": "prisma generate", "build-db-client": "prisma generate",
@ -35,6 +35,7 @@
"generate-lang": "npm-run-all extract-messages merge-messages", "generate-lang": "npm-run-all extract-messages merge-messages",
"format-lang": "node scripts/format-lang.js", "format-lang": "node scripts/format-lang.js",
"compile-lang": "formatjs compile-folder --ast build/messages public/intl/messages", "compile-lang": "formatjs compile-folder --ast build/messages public/intl/messages",
"clean-lang": "prettier --write ./public/intl/messages/*.json",
"check-lang": "node scripts/check-lang.js", "check-lang": "node scripts/check-lang.js",
"download-country-names": "node scripts/download-country-names.js", "download-country-names": "node scripts/download-country-names.js",
"download-language-names": "node scripts/download-language-names.js", "download-language-names": "node scripts/download-language-names.js",
@ -61,7 +62,7 @@
], ],
"dependencies": { "dependencies": {
"@fontsource/inter": "^4.5.15", "@fontsource/inter": "^4.5.15",
"@prisma/client": "5.0.0", "@prisma/client": "5.2.0",
"@tanstack/react-query": "^4.33.0", "@tanstack/react-query": "^4.33.0",
"@umami/prisma-client": "^0.2.0", "@umami/prisma-client": "^0.2.0",
"@umami/redis-client": "^0.5.0", "@umami/redis-client": "^0.5.0",
@ -145,7 +146,7 @@
"postcss-preset-env": "7.8.3", "postcss-preset-env": "7.8.3",
"postcss-rtlcss": "^4.0.1", "postcss-rtlcss": "^4.0.1",
"prettier": "^2.6.2", "prettier": "^2.6.2",
"prisma": "5.0.0", "prisma": "5.2.0",
"prompts": "2.4.2", "prompts": "2.4.2",
"rollup": "^3.28.0", "rollup": "^3.28.0",
"rollup-plugin-copy": "^3.4.0", "rollup-plugin-copy": "^3.4.0",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -54,21 +54,18 @@ export function MetricsTable({
city, city,
}, },
], ],
() => () => {
get(`/websites/${websiteId}/metrics`, { const filters = { url, title, referrer, os, browser, device, country, region, city };
filters[type] = undefined;
return get(`/websites/${websiteId}/metrics`, {
type, type,
startAt: +startDate, startAt: +startDate,
endAt: +endDate, endAt: +endDate,
url, ...filters,
title, });
referrer, },
os,
browser,
device,
country,
region,
city,
}),
{ onSuccess: onDataLoad, retryDelay: delay || DEFAULT_ANIMATION_DURATION }, { onSuccess: onDataLoad, retryDelay: delay || DEFAULT_ANIMATION_DURATION },
); );

View File

@ -1,211 +1,211 @@
{ {
"label.access-code": "Access code", "label.access-code": "アクセスコード",
"label.actions": "アクション", "label.actions": "アクション",
"label.activity-log": "Activity log", "label.activity-log": "アクティビティログ",
"label.add": "Add", "label.add": "追加",
"label.add-description": "Add description", "label.add-description": "説明を追加",
"label.add-website": "Webサイトの追加", "label.add-website": "Webサイトの追加",
"label.admin": "管理者", "label.admin": "管理者",
"label.after": "After", "label.after": "直後",
"label.all": "すべて表示", "label.all": "すべて",
"label.all-time": "All time", "label.all-time": "すべての時間帯",
"label.analytics": "Analytics", "label.analytics": "アナリティクス",
"label.average": "Average", "label.average": "平均",
"label.average-visit-time": "平均滞在時間", "label.average-visit-time": "平均滞在時間",
"label.back": "戻る", "label.back": "戻る",
"label.before": "Before", "label.before": "直前",
"label.bounce-rate": "直帰率", "label.bounce-rate": "直帰率",
"label.breakdown": "Breakdown", "label.breakdown": "故障",
"label.browser": "Browser", "label.browser": "ブラウザ",
"label.browsers": "ブラウザ", "label.browsers": "ブラウザ",
"label.cancel": "キャンセル", "label.cancel": "キャンセル",
"label.change-password": "パスワード変更", "label.change-password": "パスワード変更",
"label.cities": "Cities", "label.cities": "都市",
"label.city": "City", "label.city": "都市",
"label.clear-all": "Clear all", "label.clear-all": "すべてクリア",
"label.confirm": "Confirm", "label.confirm": "確認",
"label.confirm-password": "パスワード(確認)", "label.confirm-password": "パスワード(確認)",
"label.contains": "Contains", "label.contains": "コンテンツ",
"label.continue": "Continue", "label.continue": "続ける",
"label.countries": "国", "label.countries": "国",
"label.country": "Country", "label.country": "",
"label.create-report": "Create report", "label.create-report": "レポートの作成",
"label.create-team": "Create team", "label.create-team": "チームの作成",
"label.create-user": "Create user", "label.create-user": "ユーザーの作成",
"label.created": "Created", "label.created": "作成されました",
"label.current-password": "現在のパスワード", "label.current-password": "現在のパスワード",
"label.custom-range": "期間を指定する", "label.custom-range": "範囲指定",
"label.dashboard": "ダッシュボード", "label.dashboard": "ダッシュボード",
"label.data": "Data", "label.data": "データ",
"label.date": "Date", "label.date": "日付",
"label.date-range": "範囲指定", "label.date-range": "期間",
"label.day": "Day", "label.day": "",
"label.default-date-range": "最初に表示する期間", "label.default-date-range": "デフォルトの期間",
"label.delete": "削除", "label.delete": "削除",
"label.delete-team": "Delete team", "label.delete-team": "チームの削除",
"label.delete-user": "Delete user", "label.delete-user": "ユーザーの削除",
"label.delete-website": "Webサイトの削除", "label.delete-website": "Webサイトの削除",
"label.description": "Description", "label.description": "説明",
"label.desktop": "デスクトップ", "label.desktop": "デスクトップ",
"label.details": "Details", "label.details": "詳細情報",
"label.device": "Device", "label.device": "デバイス",
"label.devices": "デバイス", "label.devices": "デバイス",
"label.dismiss": "無視する", "label.dismiss": "却下",
"label.does-not-contain": "Does not contain", "label.does-not-contain": "を含まない",
"label.domain": "ドメイン", "label.domain": "ドメイン",
"label.dropoff": "Dropoff", "label.dropoff": "切り捨て",
"label.edit": "編集", "label.edit": "編集",
"label.edit-dashboard": "Edit dashboard", "label.edit-dashboard": "ダッシュボードの編集",
"label.enable-share-url": "共有リンクを有効にする", "label.enable-share-url": "共有URLを有効にする",
"label.event": "Event", "label.event": "イベント",
"label.event-data": "Event data", "label.event-data": "イベントデータ",
"label.events": "イベント", "label.events": "イベント",
"label.false": "False", "label.false": "",
"label.field": "Field", "label.field": "フィールド",
"label.fields": "Fields", "label.fields": "フィールド",
"label.filter-combined": "パスまで", "label.filter-combined": "統合",
"label.filter-raw": "すべて表示", "label.filter-raw": "RAW",
"label.filters": "Filters", "label.filters": "フィルター",
"label.funnel": "Funnel", "label.funnel": "分析",
"label.greater-than": "Greater than", "label.greater-than": "超過",
"label.greater-than-equals": "Greater than or equals", "label.greater-than-equals": "以上",
"label.insights": "Insights", "label.insights": "見通し",
"label.is": "Is", "label.is": "に等しい",
"label.is-not": "Is not", "label.is-not": "に等しくない",
"label.is-not-set": "Is not set", "label.is-not-set": "未設定",
"label.is-set": "Is set", "label.is-set": "設定済み",
"label.join": "Join", "label.join": "参加",
"label.join-team": "Join team", "label.join-team": "チームに参加",
"label.language": "Language", "label.language": "言語",
"label.languages": "Languages", "label.languages": "言語",
"label.laptop": "ートPC", "label.laptop": "ートPC",
"label.last-days": "過去{x}日間", "label.last-days": "過去{x}日間",
"label.last-hours": "過去{x}時間", "label.last-hours": "過去{x}時間",
"label.leave": "Leave", "label.leave": "離脱",
"label.leave-team": "Leave team", "label.leave-team": "チームを離脱",
"label.less-than": "Less than", "label.less-than": "未満",
"label.less-than-equals": "Less than or equals", "label.less-than-equals": "以下",
"label.login": "ログイン", "label.login": "ログイン",
"label.logout": "ログアウト", "label.logout": "ログアウト",
"label.max": "Max", "label.max": "最大",
"label.members": "Members", "label.members": "メンバー",
"label.min": "Min", "label.min": "最小",
"label.mobile": "携帯電話", "label.mobile": "携帯電話",
"label.more": "さらに表示", "label.more": "もっと見る",
"label.my-websites": "My websites", "label.my-websites": "マイWebサイト",
"label.name": "名前", "label.name": "名前",
"label.new-password": "新しいパスワード", "label.new-password": "新しいパスワード",
"label.none": "None", "label.none": "なし",
"label.os": "OS", "label.os": "OS",
"label.overview": "Overview", "label.overview": "概要",
"label.owner": "Owner", "label.owner": "所有者",
"label.page-of": "Page {current} of {total}", "label.page-of": "ページ {current}/{total}",
"label.page-views": "閲覧数", "label.page-views": "閲覧数",
"label.pageTitle": "Page title", "label.pageTitle": "ページタイトル",
"label.pages": "ページ", "label.pages": "ページ",
"label.password": "パスワード", "label.password": "パスワード",
"label.powered-by": "このシステムは {name} で実行されています。", "label.powered-by": "Powered by {name}",
"label.profile": "プロファイル", "label.profile": "プロフィール",
"label.queries": "Queries", "label.queries": "クエリ",
"label.query": "Query", "label.query": "クエリ",
"label.query-parameters": "Query parameters", "label.query-parameters": "クエリパラメーター",
"label.realtime": "リアルタイム", "label.realtime": "リアルタイム",
"label.referrer": "Referrer", "label.referrer": "リファラー",
"label.referrers": "リファラー", "label.referrers": "リファラー",
"label.refresh": "更新", "label.refresh": "更新",
"label.regenerate": "Regenerate", "label.regenerate": "再生成",
"label.region": "Region", "label.region": "地域",
"label.regions": "Regions", "label.regions": "地域",
"label.remove": "Remove", "label.remove": "削除",
"label.reports": "Reports", "label.reports": "レポート",
"label.required": "必須", "label.required": "必須",
"label.reset": "リセット", "label.reset": "リセット",
"label.reset-website": "Reset statistics", "label.reset-website": "Webサイトをリセットする",
"label.retention": "Retention", "label.retention": "保持",
"label.role": "Role", "label.role": "ロール",
"label.run-query": "Run query", "label.run-query": "クエリ実行",
"label.save": "保存", "label.save": "保存",
"label.screens": "Screens", "label.screens": "画面サイズ",
"label.select-date": "Select date", "label.select-date": "日付を選択",
"label.select-website": "Select website", "label.select-website": "Webサイトを選択",
"label.sessions": "Sessions", "label.sessions": "セッション",
"label.settings": "設定", "label.settings": "設定",
"label.share-url": "共有リンク", "label.share-url": "共有URL",
"label.single-day": "一日のみ", "label.single-day": "一日",
"label.sum": "Sum", "label.sum": "合計",
"label.tablet": "タブレット", "label.tablet": "タブレット",
"label.team": "Team", "label.team": "チーム",
"label.team-guest": "Team guest", "label.team-guest": "チームゲスト",
"label.team-id": "Team ID", "label.team-id": "チームID",
"label.team-member": "Team member", "label.team-member": "チームメンバー",
"label.team-name": "Team name", "label.team-name": "チーム名",
"label.team-owner": "Team owner", "label.team-owner": "チーム所有者",
"label.team-websites": "Team websites", "label.team-websites": "チームのWebサイト",
"label.teams": "Teams", "label.teams": "チーム",
"label.theme": "Theme", "label.theme": "テーマ",
"label.this-month": "今月", "label.this-month": "今月",
"label.this-week": "今週", "label.this-week": "今週",
"label.this-year": "今年", "label.this-year": "今年",
"label.timezone": "タイムゾーン", "label.timezone": "タイムゾーン",
"label.title": "Title", "label.title": "タイトル",
"label.today": "今日", "label.today": "今日",
"label.toggle-charts": "Toggle charts", "label.toggle-charts": "グラフを切り替える",
"label.total": "Total", "label.total": "累計",
"label.total-records": "Total records", "label.total-records": "総記録数",
"label.tracking-code": "トラッキングコード", "label.tracking-code": "トラッキングコード",
"label.true": "True", "label.true": "",
"label.type": "Type", "label.type": "種別",
"label.unique": "Unique", "label.unique": "ユニーク",
"label.unique-visitors": "ユニーク訪問者数", "label.unique-visitors": "ユニーク訪問者数",
"label.unknown": "不明", "label.unknown": "不明",
"label.untitled": "Untitled", "label.untitled": "無題",
"label.url": "URL", "label.url": "URL",
"label.urls": "URLs", "label.urls": "URL",
"label.user": "User", "label.user": "ユーザー",
"label.username": "ユーザー名", "label.username": "ユーザー名",
"label.users": "Users", "label.users": "ユーザー",
"label.value": "Value", "label.value": "",
"label.view": "View", "label.view": "表示",
"label.view-details": "詳細を見る", "label.view-details": "詳細を表示",
"label.view-only": "View only", "label.view-only": "表示のみ",
"label.views": "閲覧数", "label.views": "表示",
"label.visitors": "訪問者", "label.visitors": "訪問者",
"label.website": "Website", "label.website": "Webサイト",
"label.website-id": "Website ID", "label.website-id": "WebサイトID",
"label.websites": "Webサイト", "label.websites": "Webサイト",
"label.window": "Window", "label.window": "ウィンドウ",
"label.yesterday": "Yesterday", "label.yesterday": "昨日",
"message.active-users": "{x}人が閲覧中です。", "message.active-users": "{x} {x, plural, one {アクティブな訪問者} other {アクティブな訪問者}}",
"message.confirm-delete": "{target}を削除してもよろしいですか?", "message.confirm-delete": "{target}を削除してもよろしいですか?",
"message.confirm-leave": "Are you sure you want to leave {target}?", "message.confirm-leave": "{target}から離脱してもよろしいですか?",
"message.confirm-reset": "Are your sure you want to reset {target}'s statistics?", "message.confirm-reset": "{target}をリセットしてもよろしいですか?",
"message.delete-account": "To delete this account, type {confirmation} in the box below to confirm.", "message.delete-account": "このアカウントを削除するには、下のフォームに「{confirmation}」と入力してください。",
"message.delete-website": "To delete this website, type {confirmation} in the box below to confirm.", "message.delete-website": "このWebサイトを削除するには、下のフォームに「{confirmation}」と入力してください。",
"message.delete-website-warning": "関連するすべてのデータも削除されます。", "message.delete-website-warning": "Webサイトのデータがすべて削除されます。",
"message.error": "問題が発生しました。", "message.error": "未知のエラーが発生しました。",
"message.event-log": "{event} on {url}", "message.event-log": "{url}の{event}",
"message.go-to-settings": "設定する", "message.go-to-settings": "設定に移動する",
"message.incorrect-username-password": "ユーザー名/パスワードが正しくありません。", "message.incorrect-username-password": "ユーザー名またはパスワードが間違っています。",
"message.invalid-domain": "無効なドメイン", "message.invalid-domain": "無効なドメインです。http/httpsを含めないでください。",
"message.min-password-length": "Minimum length of {n} characters", "message.min-password-length": "最小文字数は{n}文字です",
"message.new-version-available": "A new version of Umami {version} is available!", "message.new-version-available": "Umamiの新しいバージョン{version}が利用可能です!",
"message.no-data-available": "データがありません。", "message.no-data-available": "データがありません。",
"message.no-event-data": "No event data is available.", "message.no-event-data": "イベントデータがありません。",
"message.no-match-password": "パスワードが一致しません", "message.no-match-password": "パスワードが一致しません",
"message.no-results-found": "No results were found.", "message.no-results-found": "結果が見つかりません。",
"message.no-team-websites": "This team does not have any websites.", "message.no-team-websites": "このチームにはWebサイトがありません。",
"message.no-teams": "You have not created any teams.", "message.no-teams": "チームを作成していません。",
"message.no-users": "There are no users.", "message.no-users": "ユーザーが存在しません。",
"message.no-websites-configured": "Webサイトが設定されていません。", "message.no-websites-configured": "Webサイトが設定されていません。",
"message.page-not-found": "ページが見つかりません", "message.page-not-found": "ページが見つかりません",
"message.reset-website": "To reset this website, type {confirmation} in the box below to confirm.", "message.reset-website": "このWebサイトをリセットするには、下のフォームに「{confirmation}」と入力してください。",
"message.reset-website-warning": "All statistics for this website will be deleted, but your tracking code will remain intact.", "message.reset-website-warning": "このWebサイトの統計情報はすべて削除されますが、設定はそのまま残ります。",
"message.saved": "正常に保存されました。", "message.saved": "保存されました。",
"message.share-url": "これは{target}の共有リンクです。", "message.share-url": "あなたのWebサイトの統計情報は次のURLで公開されています",
"message.team-already-member": "You are already a member of the team.", "message.team-already-member": "あなたはすでにチームのメンバーです。",
"message.team-not-found": "Team not found.", "message.team-not-found": "チームが見つかりません。",
"message.team-websites-info": "Websites can be viewed by anyone on the team.", "message.team-websites-info": "Webサイトはチーム内の誰でも見ることができます。",
"message.tracking-code": "トラッキングコード", "message.tracking-code": "このWebサイトの統計情報を追跡するには、HTMLの<head>...</head>セクションに以下のコードを記述します。",
"message.user-deleted": "User deleted.", "message.user-deleted": "ユーザーが削除されました。",
"message.visitor-log": "{os}{device}で{browser}を使用している{country}からの訪問者" "message.visitor-log": "{os}({device})で{browser}を使用している{country}からの訪問者"
} }

View File

@ -1,211 +1,211 @@
{ {
"label.access-code": "Access code", "label.access-code": "存取碼",
"label.actions": "用戶行為", "label.actions": "行動",
"label.activity-log": "Activity log", "label.activity-log": "活動日誌",
"label.add": "Add", "label.add": "新增",
"label.add-description": "Add description", "label.add-description": "新增描述",
"label.add-website": "網站", "label.add-website": "增網站",
"label.admin": "管理員", "label.admin": "管理員",
"label.after": "After", "label.after": "之後",
"label.all": "所有", "label.all": "全部",
"label.all-time": "所有時間", "label.all-time": "所有時間",
"label.analytics": "Analytics", "label.analytics": "分析",
"label.average": "Average", "label.average": "平均",
"label.average-visit-time": "平均時間", "label.average-visit-time": "平均訪時間",
"label.back": "返回", "label.back": "返回",
"label.before": "Before", "label.before": "之前",
"label.bounce-rate": "跳出率", "label.bounce-rate": "跳出率",
"label.breakdown": "Breakdown", "label.breakdown": "分解",
"label.browser": "Browser", "label.browser": "瀏覽器",
"label.browsers": "瀏覽器", "label.browsers": "瀏覽器",
"label.cancel": "取消", "label.cancel": "取消",
"label.change-password": "更密碼", "label.change-password": "更密碼",
"label.cities": "Cities", "label.cities": "城市",
"label.city": "City", "label.city": "城市",
"label.clear-all": "Clear all", "label.clear-all": "全部清除",
"label.confirm": "Confirm", "label.confirm": "確認",
"label.confirm-password": "確認密碼", "label.confirm-password": "確認密碼",
"label.contains": "Contains", "label.contains": "包含",
"label.continue": "Continue", "label.continue": "繼續",
"label.countries": "國家/地區", "label.countries": "國家",
"label.country": "Country", "label.country": "國家",
"label.create-report": "Create report", "label.create-report": "建立報告",
"label.create-team": "Create team", "label.create-team": "建立團隊",
"label.create-user": "Create user", "label.create-user": "建立使用者",
"label.created": "Created", "label.created": "已建立",
"label.current-password": "目前密碼", "label.current-password": "目前密碼",
"label.custom-range": "自定義時段", "label.custom-range": "自訂範圍",
"label.dashboard": "管理面板", "label.dashboard": "儀表板",
"label.data": "Data", "label.data": "資料",
"label.date": "Date", "label.date": "日期",
"label.date-range": "日", "label.date-range": "期範圍",
"label.day": "Day", "label.day": "",
"label.default-date-range": "默認日期範圍", "label.default-date-range": "預設日期範圍",
"label.delete": "刪除", "label.delete": "刪除",
"label.delete-team": "Delete team", "label.delete-team": "刪除團隊",
"label.delete-user": "Delete user", "label.delete-user": "刪除使用者",
"label.delete-website": "刪除網站", "label.delete-website": "刪除網站",
"label.description": "Description", "label.description": "描述",
"label.desktop": "桌", "label.desktop": "桌上型電腦",
"label.details": "Details", "label.details": "詳細資訊",
"label.device": "Device", "label.device": "裝置",
"label.devices": "裝置", "label.devices": "裝置",
"label.dismiss": "關閉", "label.dismiss": "關閉",
"label.does-not-contain": "Does not contain", "label.does-not-contain": "不包含",
"label.domain": "", "label.domain": "域",
"label.dropoff": "Dropoff", "label.dropoff": "退出",
"label.edit": "編輯", "label.edit": "編輯",
"label.edit-dashboard": "編輯管理面板", "label.edit-dashboard": "編輯儀表板",
"label.enable-share-url": "啟用分享連結", "label.enable-share-url": "啟用分享網址",
"label.event": "Event", "label.event": "事件",
"label.event-data": "Event data", "label.event-data": "事件資料",
"label.events": "行為類別", "label.events": "事件",
"label.false": "False", "label.false": "",
"label.field": "Field", "label.field": "欄位",
"label.fields": "Fields", "label.fields": "欄位",
"label.filter-combined": "總和", "label.filter-combined": "組合",
"label.filter-raw": "原始", "label.filter-raw": "原始",
"label.filters": "Filters", "label.filters": "篩選器",
"label.funnel": "Funnel", "label.funnel": "漏斗",
"label.greater-than": "Greater than", "label.greater-than": "大於",
"label.greater-than-equals": "Greater than or equals", "label.greater-than-equals": "大於或等於",
"label.insights": "Insights", "label.insights": "洞察",
"label.is": "Is", "label.is": "",
"label.is-not": "Is not", "label.is-not": "不是",
"label.is-not-set": "Is not set", "label.is-not-set": "未設定",
"label.is-set": "Is set", "label.is-set": "已設定",
"label.join": "Join", "label.join": "加入",
"label.join-team": "Join team", "label.join-team": "加入團隊",
"label.language": "語言", "label.language": "語言",
"label.languages": "語言", "label.languages": "語言",
"label.laptop": "筆記", "label.laptop": "筆記型電腦",
"label.last-days": "最近 {x} 天", "label.last-days": "最近 {x} 天",
"label.last-hours": "最近 {x} 小時", "label.last-hours": "最近 {x} 小時",
"label.leave": "Leave", "label.leave": "離開",
"label.leave-team": "Leave team", "label.leave-team": "離開團隊",
"label.less-than": "Less than", "label.less-than": "小於",
"label.less-than-equals": "Less than or equals", "label.less-than-equals": "小於或等於",
"label.login": "登入", "label.login": "登入",
"label.logout": "退出", "label.logout": "出",
"label.max": "Max", "label.max": "最大",
"label.members": "Members", "label.members": "成員",
"label.min": "Min", "label.min": "最小",
"label.mobile": "手機", "label.mobile": "行動裝置",
"label.more": "更多", "label.more": "更多",
"label.my-websites": "My websites", "label.my-websites": "我的網站",
"label.name": "名", "label.name": "名",
"label.new-password": "新密碼", "label.new-password": "新密碼",
"label.none": "無", "label.none": "無",
"label.os": "OS", "label.os": "作業系統",
"label.overview": "Overview", "label.overview": "概覽",
"label.owner": "擁有者", "label.owner": "擁有者",
"label.page-of": "Page {current} of {total}", "label.page-of": "頁面 {current} / {total}",
"label.page-views": "網頁流量", "label.page-views": "頁面瀏覽",
"label.pageTitle": "Page title", "label.pageTitle": "頁面標題",
"label.pages": "頁", "label.pages": "",
"label.password": "密碼", "label.password": "密碼",
"label.powered-by": "運行 {name}", "label.powered-by": "由 {name} 提供",
"label.profile": "個人資料", "label.profile": "個人資料",
"label.queries": "Queries", "label.queries": "查詢",
"label.query": "Query", "label.query": "查詢",
"label.query-parameters": "查詢參數", "label.query-parameters": "查詢參數",
"label.realtime": "時", "label.realtime": "時",
"label.referrer": "Referrer", "label.referrer": "參照來源",
"label.referrers": "指入域名", "label.referrers": "參照來源",
"label.refresh": "刷新", "label.refresh": "重新整理",
"label.regenerate": "Regenerate", "label.regenerate": "重新產生",
"label.region": "Region", "label.region": "區域",
"label.regions": "Regions", "label.regions": "區域",
"label.remove": "Remove", "label.remove": "移除",
"label.reports": "Reports", "label.reports": "報告",
"label.required": "必填", "label.required": "必填",
"label.reset": "重", "label.reset": "重",
"label.reset-website": "重置統計數據", "label.reset-website": "重設網站",
"label.retention": "Retention", "label.retention": "保留",
"label.role": "Role", "label.role": "角色",
"label.run-query": "Run query", "label.run-query": "執行查詢",
"label.save": "存", "label.save": "存",
"label.screens": "屏幕尺寸", "label.screens": "螢幕",
"label.select-date": "Select date", "label.select-date": "選擇日期",
"label.select-website": "Select website", "label.select-website": "選擇網站",
"label.sessions": "Sessions", "label.sessions": "工作階段",
"label.settings": "設", "label.settings": "設",
"label.share-url": "分享連結", "label.share-url": "分享網址",
"label.single-day": "單日", "label.single-day": "單日",
"label.sum": "Sum", "label.sum": "總和",
"label.tablet": "平板", "label.tablet": "平板",
"label.team": "Team", "label.team": "團隊",
"label.team-guest": "Team guest", "label.team-guest": "團隊訪客",
"label.team-id": "Team ID", "label.team-id": "團隊 ID",
"label.team-member": "Team member", "label.team-member": "團隊成員",
"label.team-name": "Team name", "label.team-name": "團隊名稱",
"label.team-owner": "Team owner", "label.team-owner": "團隊擁有者",
"label.team-websites": "Team websites", "label.team-websites": "團隊網站",
"label.teams": "Teams", "label.teams": "團隊",
"label.theme": "主題", "label.theme": "主題",
"label.this-month": "本月", "label.this-month": "本月",
"label.this-week": "本週", "label.this-week": "本週",
"label.this-year": "今年", "label.this-year": "今年",
"label.timezone": "時區", "label.timezone": "時區",
"label.title": "Title", "label.title": "標題",
"label.today": "今天", "label.today": "今天",
"label.toggle-charts": "切換圖表", "label.toggle-charts": "切換圖表",
"label.total": "Total", "label.total": "總計",
"label.total-records": "Total records", "label.total-records": "總記錄",
"label.tracking-code": "追蹤代碼", "label.tracking-code": "追蹤代碼",
"label.true": "True", "label.true": "",
"label.type": "Type", "label.type": "類型",
"label.unique": "Unique", "label.unique": "獨立",
"label.unique-visitors": "獨立訪客", "label.unique-visitors": "獨立訪客",
"label.unknown": "未知", "label.unknown": "未知",
"label.untitled": "Untitled", "label.untitled": "無標題",
"label.url": "URL", "label.url": "網址",
"label.urls": "URLs", "label.urls": "網址",
"label.user": "User", "label.user": "使用者",
"label.username": "用户名", "label.username": "使用者名稱",
"label.users": "Users", "label.users": "使用者",
"label.value": "Value", "label.value": "",
"label.view": "View", "label.view": "檢視",
"label.view-details": "查看更多", "label.view-details": "檢視詳細資訊",
"label.view-only": "View only", "label.view-only": "僅供檢視",
"label.views": "頁面流量", "label.views": "檢視",
"label.visitors": "獨立訪客", "label.visitors": "訪客",
"label.website": "Website", "label.website": "網站",
"label.website-id": "Website ID", "label.website-id": "網站 ID",
"label.websites": "網站", "label.websites": "網站",
"label.window": "Window", "label.window": "視窗",
"label.yesterday": "Yesterday", "label.yesterday": "昨天",
"message.active-users": "當前線上 {x} 人", "message.active-users": "目前有 {x} 個活躍的訪客",
"message.confirm-delete": "確定要刪除 {target} 嗎?", "message.confirm-delete": "確定要刪除 {target} 嗎?",
"message.confirm-leave": "Are you sure you want to leave {target}?", "message.confirm-leave": "您確定要離開 {target} 嗎?",
"message.confirm-reset": "您確定要重置 {target} 的數據嗎?", "message.confirm-reset": "您確定要重設 {target} 嗎?",
"message.delete-account": "To delete this account, type {confirmation} in the box below to confirm.", "message.delete-account": "要刪除此帳戶,請在下方的方框中輸入 {confirmation} 以確認。",
"message.delete-website": "To delete this website, type {confirmation} in the box below to confirm.", "message.delete-website": "要刪除此網站,請在下方的方框中輸入 {confirmation} 以確認。",
"message.delete-website-warning": "所有相關數據將會被刪除。", "message.delete-website-warning": "所有網站資料將被刪除。",
"message.error": "出現錯誤。", "message.error": "發生錯誤。",
"message.event-log": "{event} on {url}", "message.event-log": "{event} {url}",
"message.go-to-settings": "設定", "message.go-to-settings": "前往設定",
"message.incorrect-username-password": "用户名或密碼不正確。", "message.incorrect-username-password": "使用者名稱和/或密碼不正確。",
"message.invalid-domain": "無效域名", "message.invalid-domain": "無效的網域。請不要包含 http/https。",
"message.min-password-length": "Minimum length of {n} characters", "message.min-password-length": "最少需要 {n} 個字元",
"message.new-version-available": "A new version of Umami {version} is available!", "message.new-version-available": "Umami {version} 的新版本已經可以使用!",
"message.no-data-available": "無可用數據。", "message.no-data-available": "沒有可用的資料。",
"message.no-event-data": "No event data is available.", "message.no-event-data": "沒有可用的事件資料。",
"message.no-match-password": "密碼不一致", "message.no-match-password": "密碼不一致",
"message.no-results-found": "No results were found.", "message.no-results-found": "找不到結果。",
"message.no-team-websites": "This team does not have any websites.", "message.no-team-websites": "此團隊沒有任何網站。",
"message.no-teams": "You have not created any teams.", "message.no-teams": "您尚未建立任何團隊。",
"message.no-users": "There are no users.", "message.no-users": "沒有使用者。",
"message.no-websites-configured": "目前無任何網站設定。", "message.no-websites-configured": "您尚未設定任何網站。",
"message.page-not-found": "網頁未找到。", "message.page-not-found": "找不到頁面",
"message.reset-website": "To reset this website, type {confirmation} in the box below to confirm.", "message.reset-website": "要重設此網站,請在下方的方框中輸入 {confirmation} 以確認。",
"message.reset-website-warning": "本網站的所有統計數據將被刪除,但您的跟蹤代碼將保持不變。", "message.reset-website-warning": "此網站的所有統計將被刪除,但您的設定將保持不變。",
"message.saved": "成功保存。", "message.saved": "已儲存。",
"message.share-url": "這是 {target} 的分享連結。", "message.share-url": "您的網站統計資料可以在以下網址公開檢視:",
"message.team-already-member": "You are already a member of the team.", "message.team-already-member": "您已經是團隊的成員。",
"message.team-not-found": "Team not found.", "message.team-not-found": "找不到團隊。",
"message.team-websites-info": "Websites can be viewed by anyone on the team.", "message.team-websites-info": "團隊的任何成員都可以檢視網站。",
"message.tracking-code": "追蹤代碼", "message.tracking-code": "追蹤此網站的統計,請將以下代碼放在您的 HTML 的 <head>...</head> 區段中。",
"message.user-deleted": "User deleted.", "message.user-deleted": "使用者已刪除。",
"message.visitor-log": "來自{country}的訪客在搭載 {os} 的{device}上使用 {browser} 進行訪問。" "message.visitor-log": "來自 {country} 的訪客在 {device} 上的 {os} 使用 {browser} 瀏覽。"
} }

View File

@ -13,23 +13,26 @@ export interface WebsiteMetricsRequestQuery {
type: string; type: string;
startAt: number; startAt: number;
endAt: number; endAt: number;
url: string; url?: string;
referrer: string; referrer?: string;
title: string; title?: string;
query: string; query?: string;
event: string; os?: string;
os: string; browser?: string;
browser: string; device?: string;
device: string; country?: string;
country: string; region?: string;
region: string; city?: string;
city: string; language?: string;
language: string; event?: string;
} }
const schema = { const schema = {
GET: yup.object().shape({ GET: yup.object().shape({
id: yup.string().uuid().required(), id: yup.string().uuid().required(),
type: yup.string().required(),
startAt: yup.number().required(),
endAt: yup.number().required(),
}), }),
}; };
@ -50,7 +53,6 @@ export default async (
referrer, referrer,
title, title,
query, query,
event,
os, os,
browser, browser,
device, device,
@ -58,6 +60,7 @@ export default async (
region, region,
city, city,
language, language,
event,
} = req.query; } = req.query;
if (req.method === 'GET') { if (req.method === 'GET') {
@ -74,7 +77,6 @@ export default async (
referrer, referrer,
title, title,
query, query,
event,
os, os,
browser, browser,
device, device,
@ -82,10 +84,9 @@ export default async (
region, region,
city, city,
language, language,
event,
}; };
filters[type] = undefined;
const column = FILTER_COLUMNS[type] || type; const column = FILTER_COLUMNS[type] || type;
if (SESSION_COLUMNS.includes(type)) { if (SESSION_COLUMNS.includes(type)) {

View File

@ -1832,22 +1832,22 @@
"@nodelib/fs.scandir" "2.1.5" "@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0" fastq "^1.6.0"
"@prisma/client@5.0.0": "@prisma/client@5.2.0":
version "5.0.0" version "5.2.0"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.0.0.tgz#9f0cd4164f4ffddb28bb1811c27eb7fa1e01a087" resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.2.0.tgz#cbfdd440614b38736563a7999f39922fcde0ed50"
integrity sha512-XlO5ELNAQ7rV4cXIDJUNBEgdLwX3pjtt9Q/RHqDpGf43szpNJx2hJnggfFs7TKNx0cOFsl6KJCSfqr5duEU/bQ== integrity sha512-AiTjJwR4J5Rh6Z/9ZKrBBLel3/5DzUNntMohOy7yObVnVoTNVFi2kvpLZlFuKO50d7yDspOtW6XBpiAd0BVXbQ==
dependencies: dependencies:
"@prisma/engines-version" "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584" "@prisma/engines-version" "5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f"
"@prisma/engines-version@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584": "@prisma/engines-version@5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f":
version "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584" version "5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584.tgz#b36eda5620872d3fac810c302a7e46cf41daa033" resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f.tgz#11366e7ff031c908debf4983248d40046016de37"
integrity sha512-HHiUF6NixsldsP3JROq07TYBLEjXFKr6PdH8H4gK/XAoTmIplOJBCgrIUMrsRAnEuGyRoRLXKXWUb943+PFoKQ== integrity sha512-jsnKT5JIDIE01lAeCj2ghY9IwxkedhKNvxQeoyLs6dr4ZXynetD0vTy7u6wMJt8vVPv8I5DPy/I4CFaoXAgbtg==
"@prisma/engines@5.0.0": "@prisma/engines@5.2.0":
version "5.0.0" version "5.2.0"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.0.0.tgz#5249650eabe77c458c90f2be97d8210353c2e22e" resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.2.0.tgz#e5dff48eb324c8137393933292d44ea5c3bc2ce7"
integrity sha512-kyT/8fd0OpWmhAU5YnY7eP31brW1q1YrTGoblWrhQJDiN/1K+Z8S1kylcmtjqx5wsUGcP1HBWutayA/jtyt+sg== integrity sha512-dT7FOLUCdZmq+AunLqB1Iz+ZH/IIS1Fz2THmKZQ6aFONrQD/BQ5ecJ7g2wGS2OgyUFf4OaLam6/bxmgdOBDqig==
"@react-spring/animated@~9.7.3": "@react-spring/animated@~9.7.3":
version "9.7.3" version "9.7.3"
@ -7523,12 +7523,12 @@ pretty-bytes@^5.6.0:
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==
prisma@5.0.0: prisma@5.2.0:
version "5.0.0" version "5.2.0"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.0.0.tgz#f6571c46dc2478172cb7bc1bb62d74026a2c2630" resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.2.0.tgz#a302dc2635cdec1d22d552ece837fb29a03563b9"
integrity sha512-KYWk83Fhi1FH59jSpavAYTt2eoMVW9YKgu8ci0kuUnt6Dup5Qy47pcB4/TLmiPAbhGrxxSz7gsSnJcCmkyPANA== integrity sha512-FfFlpjVCkZwrqxDnP4smlNYSH1so+CbfjgdpioFzGGqlQAEm6VHAYSzV7jJgC3ebtY9dNOhDMS2+4/1DDSM7bQ==
dependencies: dependencies:
"@prisma/engines" "5.0.0" "@prisma/engines" "5.2.0"
promise.series@^0.2.0: promise.series@^0.2.0:
version "0.2.0" version "0.2.0"