From e30f2dfb44ec334b63da87cd0ac306038a526824 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 9 Oct 2020 17:58:27 -0700 Subject: [PATCH] Realtime header component. --- components/common/Table.js | 25 ++++---- components/common/Table.module.css | 2 - components/common/Tag.module.css | 1 - components/metrics/BarChart.js | 8 +-- components/metrics/PageviewsChart.js | 2 + components/metrics/RealtimeChart.js | 8 ++- components/metrics/RealtimeHeader.js | 53 ++++++++++++++++ components/metrics/RealtimeHeader.module.css | 3 + components/metrics/RealtimeLog.js | 62 ++++++++++--------- components/metrics/RealtimeLog.module.css | 18 +++++- components/pages/RealtimeDashboard.js | 57 ++++++++--------- components/pages/RealtimeDashboard.module.css | 4 ++ lang/da-DK.json | 5 -- lang/de-DE.json | 5 -- lang/el-GR.json | 5 -- lang/en-US.json | 5 -- lang/es-MX.json | 5 -- lang/fi-FI.json | 3 + lang/fo-FO.json | 5 -- lang/fr-FR.json | 5 -- lang/id-ID.json | 5 -- lang/ja-JP.json | 5 -- lang/mn-MN.json | 5 -- lang/nb-NO.json | 5 -- lang/nl-NL.json | 5 -- lang/pt-PT.json | 5 -- lang/ro-RO.json | 5 -- lang/ru-RU.json | 5 -- lang/sv-SE.json | 5 -- lang/tr-TR.json | 5 -- lang/uk-UA.json | 5 -- lang/zh-CN.json | 5 -- lib/constants.js | 1 + package.json | 2 +- 34 files changed, 167 insertions(+), 177 deletions(-) create mode 100644 components/metrics/RealtimeHeader.js create mode 100644 components/metrics/RealtimeHeader.module.css diff --git a/components/common/Table.js b/components/common/Table.js index d0a1e0c7..f0989903 100644 --- a/components/common/Table.js +++ b/components/common/Table.js @@ -10,6 +10,7 @@ export default function Table({ className, bodyClassName, rowKey, + showHeader = true, children, }) { if (empty && rows.length === 0) { @@ -18,17 +19,19 @@ export default function Table({ return (
-
- {columns.map(({ key, label, className, style, header }) => ( -
- {label} -
- ))} -
+ {showHeader && ( +
+ {columns.map(({ key, label, className, style, header }) => ( +
+ {label} +
+ ))} +
+ )}
{rows.length === 0 && } {!children && diff --git a/components/common/Table.module.css b/components/common/Table.module.css index 5db753ec..4d7cd24b 100644 --- a/components/common/Table.module.css +++ b/components/common/Table.module.css @@ -4,7 +4,6 @@ } .header { - display: flex; border-bottom: 1px solid var(--gray300); } @@ -21,7 +20,6 @@ } .row { - display: flex; border-bottom: 1px solid var(--gray300); padding: 10px 0; } diff --git a/components/common/Tag.module.css b/components/common/Tag.module.css index 38d66692..5e145ea1 100644 --- a/components/common/Tag.module.css +++ b/components/common/Tag.module.css @@ -1,5 +1,4 @@ .tag { - font-size: var(--font-size-small); padding: 2px 4px; border: 1px solid var(--gray300); border-radius: 4px; diff --git a/components/metrics/BarChart.js b/components/metrics/BarChart.js index f32691fa..05183e1b 100644 --- a/components/metrics/BarChart.js +++ b/components/metrics/BarChart.js @@ -5,17 +5,17 @@ import ChartJS from 'chart.js'; import { formatLongNumber } from 'lib/format'; import { dateFormat } from 'lib/lang'; import useLocale from 'hooks/useLocale'; -import styles from './BarChart.module.css'; import useTheme from 'hooks/useTheme'; -import { THEME_COLORS } from 'lib/constants'; +import { DEFAUL_CHART_HEIGHT, DEFAULT_ANIMATION_DURATION, THEME_COLORS } from 'lib/constants'; +import styles from './BarChart.module.css'; export default function BarChart({ chartId, datasets, unit, records, - height = 400, - animationDuration = 300, + height = DEFAUL_CHART_HEIGHT, + animationDuration = DEFAULT_ANIMATION_DURATION, className, stacked = false, loading = false, diff --git a/components/metrics/PageviewsChart.js b/components/metrics/PageviewsChart.js index 30e85e80..79fe4917 100644 --- a/components/metrics/PageviewsChart.js +++ b/components/metrics/PageviewsChart.js @@ -14,6 +14,7 @@ export default function PageviewsChart({ className, loading, animationDuration = DEFAULT_ANIMATION_DURATION, + ...props }) { const intl = useIntl(); const [theme] = useTheme(); @@ -56,6 +57,7 @@ export default function PageviewsChart({ {visible => ( + ); } diff --git a/components/metrics/RealtimeHeader.js b/components/metrics/RealtimeHeader.js new file mode 100644 index 00000000..09f83ff6 --- /dev/null +++ b/components/metrics/RealtimeHeader.js @@ -0,0 +1,53 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; +import PageHeader from '../layout/PageHeader'; +import DropDown from '../common/DropDown'; +import MetricCard from './MetricCard'; +import styles from './RealtimeHeader.module.css'; + +export default function RealtimeHeader({ websites, data, websiteId, onSelect }) { + const options = [ + { label: , value: 0 }, + ].concat(websites.map(({ name, website_id }) => ({ label: name, value: website_id }))); + + const { pageviews, sessions, events } = data; + const countries = sessions.reduce((obj, { country }) => { + if (country) { + if (!obj[country]) { + obj[country] = 1; + } else { + obj[country] += 1; + } + } + return obj; + }, {}); + + return ( + <> + +
+ +
+ +
+
+ } + value={pageviews.length} + /> + } + value={sessions.length} + /> + } + value={events.length} + /> + } + value={Object.keys(countries).length} + /> +
+ + ); +} diff --git a/components/metrics/RealtimeHeader.module.css b/components/metrics/RealtimeHeader.module.css new file mode 100644 index 00000000..8f948eb1 --- /dev/null +++ b/components/metrics/RealtimeHeader.module.css @@ -0,0 +1,3 @@ +.metrics { + display: flex; +} diff --git a/components/metrics/RealtimeLog.js b/components/metrics/RealtimeLog.js index 1ea0080e..6fddf71b 100644 --- a/components/metrics/RealtimeLog.js +++ b/components/metrics/RealtimeLog.js @@ -1,6 +1,7 @@ import React, { useMemo } from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; +import { FormattedMessage } from 'react-intl'; import { FixedSizeList } from 'react-window'; +import classNames from 'classnames'; import firstBy from 'thenby'; import { format } from 'date-fns'; import Icon from 'components/common/Icon'; @@ -14,8 +15,17 @@ import Visitor from 'assets/visitor.svg'; import Eye from 'assets/eye.svg'; import styles from './RealtimeLog.module.css'; +const TYPE_PAGEVIEW = 0; +const TYPE_SESSION = 1; +const TYPE_EVENT = 2; + +const TYPE_ICONS = { + [TYPE_PAGEVIEW]: , + [TYPE_SESSION]: , + [TYPE_EVENT]: , +}; + export default function RealtimeLog({ data, websites }) { - const intl = useIntl(); const [locale] = useLocale(); const countryNames = useCountryNames(locale); const logs = useMemo(() => { @@ -26,24 +36,21 @@ export default function RealtimeLog({ data, websites }) { const columns = [ { key: 'time', - label: , - className: 'col-1', - render: ({ created_at }) => format(new Date(created_at), 'H:mm:ss'), + className: classNames(styles.time, 'col-3 col-lg-1'), + render: ({ created_at }) => format(new Date(created_at), 'h:mm:ss'), }, { key: 'website', - label: , - className: 'col-2', + className: classNames(styles.website, 'col-9 col-lg-2'), render: getWebsite, }, { - key: 'type', - label: , - className: 'col-9', + key: 'detail', + className: classNames(styles.detail, 'col-12 col-lg-9'), render: row => ( <> - - {getDescription(row)} + + {getDetail(row)} ), }, @@ -51,35 +58,26 @@ export default function RealtimeLog({ data, websites }) { function getType({ view_id, session_id, event_id }) { if (event_id) { - return intl.formatMessage({ id: 'label.event', defaultMessage: 'Event' }); + return TYPE_EVENT; } if (view_id) { - return intl.formatMessage({ id: 'label.pageview', defaultMessage: 'Pageview' }); + return TYPE_PAGEVIEW; } if (session_id) { - return intl.formatMessage({ id: 'label.visitor', defaultMessage: 'Visitor' }); + return TYPE_SESSION; } return null; } - function getIcon({ view_id, session_id, event_id }) { - if (event_id) { - return ; - } - if (view_id) { - return ; - } - if (session_id) { - return ; - } - return null; + function getIcon(row) { + return TYPE_ICONS[getType(row)]; } function getWebsite({ website_id }) { return websites.find(n => n.website_id === website_id)?.name; } - function getDescription({ + function getDetail({ event_type, event_value, view_id, @@ -121,8 +119,14 @@ export default function RealtimeLog({ data, websites }) { return (
- - +
+ {Row}
diff --git a/components/metrics/RealtimeLog.module.css b/components/metrics/RealtimeLog.module.css index 5227be98..af100708 100644 --- a/components/metrics/RealtimeLog.module.css +++ b/components/metrics/RealtimeLog.module.css @@ -1,5 +1,5 @@ .table { - font-size: var(--font-size-small); + font-size: var(--font-size-xsmall); } .row { @@ -16,3 +16,19 @@ align-self: center; margin-right: 20px; } + +.website { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +.detail { + flex: 1; +} + +.detail span { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} diff --git a/components/pages/RealtimeDashboard.js b/components/pages/RealtimeDashboard.js index bb2948bc..fd123f8b 100644 --- a/components/pages/RealtimeDashboard.js +++ b/components/pages/RealtimeDashboard.js @@ -1,12 +1,12 @@ import React, { useState, useEffect, useMemo } from 'react'; -import { FormattedMessage } from 'react-intl'; +import classNames from 'classnames'; import { subMinutes, startOfMinute } from 'date-fns'; import Page from 'components/layout/Page'; -import PageHeader from 'components/layout/PageHeader'; -import DropDown from 'components/common/DropDown'; import useFetch from 'hooks/useFetch'; import RealtimeChart from '../metrics/RealtimeChart'; import RealtimeLog from '../metrics/RealtimeLog'; +import styles from './RealtimeDashboard.module.css'; +import RealtimeHeader from '../metrics/RealtimeHeader'; const REALTIME_RANGE = 30; const REALTIME_INTERVAL = 5000; @@ -24,28 +24,27 @@ function filterWebsite(data, id) { export default function RealtimeDashboard() { const [data, setData] = useState(); - const [website, setWebsite] = useState(); + const [websiteId, setWebsiteId] = useState(0); const { data: init, loading } = useFetch('/api/realtime', { params: { type: 'init' } }); const { data: updates } = useFetch('/api/realtime', { params: { type: 'update', start_at: data?.timestamp }, - disabled: !init?.token || !data, + disabled: !init?.websites?.length || !data, interval: REALTIME_INTERVAL, headers: { 'x-umami-token': init?.token }, }); const realtimeData = useMemo(() => { - if (website) { - const { website_id } = website; + if (websiteId) { const { pageviews, sessions, events, ...props } = data; return { - pageviews: filterWebsite(pageviews, website_id), - sessions: filterWebsite(sessions, website_id), - events: filterWebsite(events, website_id), + pageviews: filterWebsite(pageviews, websiteId), + sessions: filterWebsite(sessions, websiteId), + events: filterWebsite(events, websiteId), ...props, }; } return data; - }, [data, website]); + }, [data, websiteId]); useEffect(() => { if (init && !data) { @@ -68,33 +67,27 @@ export default function RealtimeDashboard() { const { websites } = init; - const options = [ - { label: , value: 0 }, - ].concat(websites.map(({ name, website_id }) => ({ label: name, value: website_id }))); - const selectedValue = options.find(({ value }) => value === website?.website_id)?.value || 0; - - function handleSelect(value) { - setWebsite(websites.find(({ website_id }) => website_id === value)); - } - return ( - -
- -
- -
- -
-
+
+ +
+
+
+
hi.
); diff --git a/components/pages/RealtimeDashboard.module.css b/components/pages/RealtimeDashboard.module.css index abde53a3..b9b5a632 100644 --- a/components/pages/RealtimeDashboard.module.css +++ b/components/pages/RealtimeDashboard.module.css @@ -1,3 +1,7 @@ .container { display: flex; } + +.chart { + margin-bottom: 30px; +} diff --git a/lang/da-DK.json b/lang/da-DK.json index 9d33fd7b..5532bf69 100644 --- a/lang/da-DK.json +++ b/lang/da-DK.json @@ -26,7 +26,6 @@ "label.default-date-range": "Default date range", "label.domain": "Domæne", "label.enable-share-url": "Aktivér delings-URL", - "label.event": "Event", "label.invalid": "Ugyldig", "label.invalid-domain": "Ugyldigt domæne", "label.last-days": "Sidste {x} dage", @@ -35,7 +34,6 @@ "label.logout": "Log ud", "label.name": "Navn", "label.new-password": "Ny adgangskode", - "label.pageview": "Pageview", "label.password": "Adgangskode", "label.passwords-dont-match": "Adgangskoder matcher ikke", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "Dette år", "label.timezone": "Timezone", "label.today": "Idag", - "label.type": "Type", "label.unknown": "Ukendt", "label.username": "Brugernavn", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Hjemmesider", "message.active-users": "{x} nuværende {x, plural, one {bruger} other {brugere}}", "message.confirm-delete": "Er du sikker på at du vil slette {target}?", diff --git a/lang/de-DE.json b/lang/de-DE.json index 7821f826..df5e6dd1 100644 --- a/lang/de-DE.json +++ b/lang/de-DE.json @@ -26,7 +26,6 @@ "label.default-date-range": "Voreingestellter Datumsbereich", "label.domain": "Domain", "label.enable-share-url": "Freigabe-URL aktivieren", - "label.event": "Event", "label.invalid": "Ungültig", "label.invalid-domain": "Ungültige Domain", "label.last-days": "Letzten {x} Tage", @@ -35,7 +34,6 @@ "label.logout": "Abmelden", "label.name": "Name", "label.new-password": "Neues Passwort", - "label.pageview": "Pageview", "label.password": "Passwort", "label.passwords-dont-match": "Passwörter stimmen nicht überein", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "Dieses Jahr", "label.timezone": "Zeitzone", "label.today": "Heute", - "label.type": "Type", "label.unknown": "Unbekannt", "label.username": "Benutzername", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Webseiten", "message.active-users": "{x} {x, plural, one {aktiver Besucher} other {aktive Besucher}}", "message.confirm-delete": "Sind sie sich sicher {target} zu löschen?", diff --git a/lang/el-GR.json b/lang/el-GR.json index 88d4a0e1..7fbdbfbf 100644 --- a/lang/el-GR.json +++ b/lang/el-GR.json @@ -26,7 +26,6 @@ "label.default-date-range": "Προεπιλεγμένο εύρος ημερομηνιών", "label.domain": "Τομέας", "label.enable-share-url": "Ενεργοποίηση κοινής χρήσης URL", - "label.event": "Event", "label.invalid": "Μη έγκυρο", "label.invalid-domain": "Μη έγκυρος τομέας", "label.last-days": "Τελευταίες {x} ημέρες", @@ -35,7 +34,6 @@ "label.logout": "Αποσύνδεση", "label.name": "Όνομα", "label.new-password": "Νέος κωδικός", - "label.pageview": "Pageview", "label.password": "Κωδικός", "label.passwords-dont-match": "Οι κωδικοί πρόσβασης δεν ταιριάζουν", "label.profile": "Προφίλ", @@ -47,11 +45,8 @@ "label.this-year": "Αυτή την χρονιά", "label.timezone": "Ζώνη ώρας", "label.today": "Σήμερα", - "label.type": "Type", "label.unknown": "Άγνωστο", "label.username": "Όνομα χρήστη", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Ιστότοποι", "message.active-users": "{x} ενεργοί {x, plural, one {επισκέπτης} other {επισκέπτες}}", "message.confirm-delete": "Είστε βέβαιοι ότι θέλετε να διαγράψετε το {target};", diff --git a/lang/en-US.json b/lang/en-US.json index cadd0512..07670232 100644 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -26,7 +26,6 @@ "label.default-date-range": "Default date range", "label.domain": "Domain", "label.enable-share-url": "Enable share URL", - "label.event": "Event", "label.invalid": "Invalid", "label.invalid-domain": "Invalid domain", "label.last-days": "Last {x} days", @@ -35,7 +34,6 @@ "label.logout": "Logout", "label.name": "Name", "label.new-password": "New password", - "label.pageview": "Pageview", "label.password": "Password", "label.passwords-dont-match": "Passwords don't match", "label.profile": "Profile", @@ -47,11 +45,8 @@ "label.this-year": "This year", "label.timezone": "Timezone", "label.today": "Today", - "label.type": "Type", "label.unknown": "Unknown", "label.username": "Username", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Websites", "message.active-users": "{x} current {x, plural, one {visitor} other {visitors}}", "message.confirm-delete": "Are your sure you want to delete {target}?", diff --git a/lang/es-MX.json b/lang/es-MX.json index 48efe589..61395fcf 100644 --- a/lang/es-MX.json +++ b/lang/es-MX.json @@ -26,7 +26,6 @@ "label.default-date-range": "Default date range", "label.domain": "Dominio", "label.enable-share-url": "Habilitar compartir URL", - "label.event": "Event", "label.invalid": "Inválido", "label.invalid-domain": "Dominio inválido", "label.last-days": "Últimos {x} días", @@ -35,7 +34,6 @@ "label.logout": "Cerrar sesión", "label.name": "Nombre", "label.new-password": "Nueva contraseña", - "label.pageview": "Pageview", "label.password": "Contraseña", "label.passwords-dont-match": "Las contraseñas no coinciden", "label.profile": "Perfil", @@ -47,11 +45,8 @@ "label.this-year": "Este año", "label.timezone": "Timezone", "label.today": "Hoy", - "label.type": "Type", "label.unknown": "Unknown", "label.username": "Nombre de usuario", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Sitios", "message.active-users": "{x} {x, plural, one {activo} other {activos}}", "message.confirm-delete": "¿Estás seguro(a) de querer eliminar {target}?", diff --git a/lang/fi-FI.json b/lang/fi-FI.json index 23f046d0..9f0c930b 100644 --- a/lang/fi-FI.json +++ b/lang/fi-FI.json @@ -18,6 +18,7 @@ "button.view-details": "Katso tiedot", "label.accounts": "Tilit", "label.administrator": "Järjestelmänvalvoja", + "label.all-websites": "All websites", "label.confirm-password": "Vahvista salasana", "label.current-password": "Nykyinen salasana", "label.custom-range": "Mukautettu jakso", @@ -36,6 +37,7 @@ "label.password": "Salasana", "label.passwords-dont-match": "Salasanat eivät täsmää", "label.profile": "Profiili", + "label.realtime": "Realtime", "label.required": "Vaaditaan", "label.settings": "Asetukset", "label.this-month": "Tämä kuukausi", @@ -55,6 +57,7 @@ "message.get-tracking-code": "Hanki seurantakoodi", "message.go-to-settings": "Mene asetuksiin", "message.incorrect-username-password": "Väärä käyttäjänimi/salasana.", + "message.log.visitor": "Visitor from {country} using {browser} on {os} {device}", "message.new-version-available": "Uusi versio umamista {version} on käytettävissä!", "message.no-data-available": "Tietoja ei ole käytettävissä.", "message.no-websites-configured": "Sinulla ei ole määritettyjä verkkosivustoja.", diff --git a/lang/fo-FO.json b/lang/fo-FO.json index 2969b83e..ee5ab8cb 100644 --- a/lang/fo-FO.json +++ b/lang/fo-FO.json @@ -26,7 +26,6 @@ "label.default-date-range": "Standard dato", "label.domain": "Økisnavn", "label.enable-share-url": "Virkja deili leinki", - "label.event": "Event", "label.invalid": "Ógilda", "label.invalid-domain": "Ógilt økisnavn", "label.last-days": "Seinastu {x} dagarnar", @@ -35,7 +34,6 @@ "label.logout": "Rita út", "label.name": "Navn", "label.new-password": "Nýtt loyniorð", - "label.pageview": "Pageview", "label.password": "Loyniorð", "label.passwords-dont-match": "Loyniorðini eru ikki eins", "label.profile": "Brúkari", @@ -47,11 +45,8 @@ "label.this-year": "Hetta árið", "label.timezone": "Tíðarsona", "label.today": "Í dag", - "label.type": "Type", "label.unknown": "Ókent", "label.username": "Brúkaranavn", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Heimasíður", "message.active-users": "{x} í løtuni {x, plural, one {vitjandi} other { vitjandi }}", "message.confirm-delete": "Ert tú sikkur at tú ynskir at sletta {target}?", diff --git a/lang/fr-FR.json b/lang/fr-FR.json index b62ce587..cb2cc103 100644 --- a/lang/fr-FR.json +++ b/lang/fr-FR.json @@ -26,7 +26,6 @@ "label.default-date-range": "Default date range", "label.domain": "Domaine", "label.enable-share-url": "Activer le partage d'URL", - "label.event": "Event", "label.invalid": "Invalide", "label.invalid-domain": "Domaine invalide", "label.last-days": "{x} derniers jours", @@ -35,7 +34,6 @@ "label.logout": "Déconnexion", "label.name": "Nom", "label.new-password": "Nouveau mot de passe", - "label.pageview": "Pageview", "label.password": "Mot de passe", "label.passwords-dont-match": "Les mots de passe ne correspondent pas", "label.profile": "Profile", @@ -47,11 +45,8 @@ "label.this-year": "Cette année", "label.timezone": "Timezone", "label.today": "Aujourd'hui", - "label.type": "Type", "label.unknown": "Unknown", "label.username": "Nom d'utilisateur", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Sites", "message.active-users": "{x} {x, plural, one {visiteur} other {visiteurs}} actuellement", "message.confirm-delete": "Êtes-vous sur de vouloir supprimer {target}?", diff --git a/lang/id-ID.json b/lang/id-ID.json index 8f12d762..7c7db298 100644 --- a/lang/id-ID.json +++ b/lang/id-ID.json @@ -26,7 +26,6 @@ "label.default-date-range": "Rentang tanggal default", "label.domain": "Domain", "label.enable-share-url": "Aktifkan URL berbagi", - "label.event": "Event", "label.invalid": "Tidak valid", "label.invalid-domain": "Domain tidak valid", "label.last-days": "{x} hari terakhir", @@ -35,7 +34,6 @@ "label.logout": "Keluar", "label.name": "Nama", "label.new-password": "Kata sandi baru", - "label.pageview": "Pageview", "label.password": "Kata sandi", "label.passwords-dont-match": "Kata sandi tidak cocok", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "Tahun ini", "label.timezone": "Zona waktu", "label.today": "Hari ini", - "label.type": "Type", "label.unknown": "Tidak diketahui", "label.username": "Nama pengguna", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Situs web", "message.active-users": "{x} pengunjung saat ini", "message.confirm-delete": "Apakah kamu yakin ingin menghapus {target}?", diff --git a/lang/ja-JP.json b/lang/ja-JP.json index fd276b26..09458224 100644 --- a/lang/ja-JP.json +++ b/lang/ja-JP.json @@ -26,7 +26,6 @@ "label.default-date-range": "最初に表示する期間", "label.domain": "ドメイン", "label.enable-share-url": "共有リンクを有効にする", - "label.event": "Event", "label.invalid": "無効", "label.invalid-domain": "無効なドメイン", "label.last-days": "過去{x}日間", @@ -35,7 +34,6 @@ "label.logout": "ログアウト", "label.name": "名前", "label.new-password": "新しいパスワード", - "label.pageview": "Pageview", "label.password": "パスワード", "label.passwords-dont-match": "パスワードが一致しません", "label.profile": "プロファイル", @@ -47,11 +45,8 @@ "label.this-year": "今年", "label.timezone": "タイムゾーン", "label.today": "今日", - "label.type": "Type", "label.unknown": "不明", "label.username": "ユーザー名", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Webサイト", "message.active-users": "{x}人が閲覧中です。", "message.confirm-delete": "{target}を削除してもよろしいですか?", diff --git a/lang/mn-MN.json b/lang/mn-MN.json index a6e632db..5e92c9c7 100644 --- a/lang/mn-MN.json +++ b/lang/mn-MN.json @@ -26,7 +26,6 @@ "label.default-date-range": "Өгөгдмөл хугацааны муж", "label.domain": "Домэйн", "label.enable-share-url": "Хуваалцах холбоос идэвхжүүлэх", - "label.event": "Event", "label.invalid": "Буруу", "label.invalid-domain": "Буруу домэйн", "label.last-days": "Сүүлийн {x} хоног", @@ -35,7 +34,6 @@ "label.logout": "Гарах", "label.name": "Нэр", "label.new-password": "Шинэ нууц үг", - "label.pageview": "Pageview", "label.password": "Нууц үг", "label.passwords-dont-match": "Нууц үг тохирохгүй байна", "label.profile": "Бүртгэл", @@ -47,11 +45,8 @@ "label.this-year": "Энэ жил", "label.timezone": "Цагийн бүс", "label.today": "Өнөөдөр", - "label.type": "Type", "label.unknown": "Тодорхойгүй", "label.username": "Хэрэглэгчийн нэр", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Вебүүд", "message.active-users": "одоо {x} {x, plural, one {зочин} other {зочин}} байна", "message.confirm-delete": "Та {target}-г устгахдаа итгэлтэй байна уу?", diff --git a/lang/nb-NO.json b/lang/nb-NO.json index fc2664f9..0af11471 100644 --- a/lang/nb-NO.json +++ b/lang/nb-NO.json @@ -26,7 +26,6 @@ "label.default-date-range": "Standard datoperiode", "label.domain": "Domene", "label.enable-share-url": "Aktiver delings-URL", - "label.event": "Event", "label.invalid": "Ugyldig", "label.invalid-domain": "Ugyldig domene", "label.last-days": "Siste {x} dager", @@ -35,7 +34,6 @@ "label.logout": "Logg ut", "label.name": "Navn", "label.new-password": "Nytt passord", - "label.pageview": "Pageview", "label.password": "Passord", "label.passwords-dont-match": "Passordene er ikke like", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "I år", "label.timezone": "Tidssone", "label.today": "I dag", - "label.type": "Type", "label.unknown": "Ukjent", "label.username": "Brukernavn", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Nettsteder", "message.active-users": "{x} {x, plural, one {besøkende} other {besøkende}} nå", "message.confirm-delete": "Er du sikker på at du vil slette {target}?", diff --git a/lang/nl-NL.json b/lang/nl-NL.json index cbedfc4c..4613ed33 100644 --- a/lang/nl-NL.json +++ b/lang/nl-NL.json @@ -26,7 +26,6 @@ "label.default-date-range": "Standaard bereik", "label.domain": "Domein", "label.enable-share-url": "Sta delen via openbare URL toe", - "label.event": "Event", "label.invalid": "Ongeldig", "label.invalid-domain": "Ongeldig domein", "label.last-days": "Laatste {x} dagen", @@ -35,7 +34,6 @@ "label.logout": "Uitloggen", "label.name": "Naam", "label.new-password": "Nieuw wachtwoord", - "label.pageview": "Pageview", "label.password": "Wachtwoord", "label.passwords-dont-match": "Wachtwoorden komen niet overeen", "label.profile": "Profiel", @@ -47,11 +45,8 @@ "label.this-year": "Dit jaar", "label.timezone": "Tijdzone", "label.today": "Vandaag", - "label.type": "Type", "label.unknown": "Onbekend", "label.username": "Gebruikersnaam", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Websites", "message.active-users": "{x} actieve {x, plural, one {bezoeker} other {bezoekers}}", "message.confirm-delete": "Weet je zeker dat je {target} wilt verwijderen?", diff --git a/lang/pt-PT.json b/lang/pt-PT.json index ca31437b..81e3a334 100644 --- a/lang/pt-PT.json +++ b/lang/pt-PT.json @@ -26,7 +26,6 @@ "label.default-date-range": "Intervalo de datas predefinido", "label.domain": "Domínio", "label.enable-share-url": "Ativar link de partilha", - "label.event": "Event", "label.invalid": "Inválido", "label.invalid-domain": "Domínio inválido", "label.last-days": "Últimos {x} dias", @@ -35,7 +34,6 @@ "label.logout": "Sair", "label.name": "Nome", "label.new-password": "Nova palavra-passe", - "label.pageview": "Pageview", "label.password": "Palavra-passe", "label.passwords-dont-match": "Palavra-passes não correspondem", "label.profile": "Perfil", @@ -47,11 +45,8 @@ "label.this-year": "Este ano", "label.timezone": "Fuso horário", "label.today": "Hoje", - "label.type": "Type", "label.unknown": "Desconhecido", "label.username": "Nome de utilizador", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Websites", "message.active-users": "{x} {x, plural, one {visitante} other {visitantes}} neste momento", "message.confirm-delete": "Tens a certeza que queres eliminar {target}?", diff --git a/lang/ro-RO.json b/lang/ro-RO.json index 7103759a..7e2f4800 100644 --- a/lang/ro-RO.json +++ b/lang/ro-RO.json @@ -26,7 +26,6 @@ "label.default-date-range": "Interval de date implicit", "label.domain": "Domeniu", "label.enable-share-url": "Activare adresa URL de distribuire", - "label.event": "Event", "label.invalid": "Invalid", "label.invalid-domain": "Invalid domain", "label.last-days": "Ultimele {x} zile", @@ -35,7 +34,6 @@ "label.logout": "Dezautentificare", "label.name": "Nume", "label.new-password": "Parola nouă", - "label.pageview": "Pageview", "label.password": "Parolă", "label.passwords-dont-match": "Parolele nu se potrivesc", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "Acest an", "label.timezone": "Fus orar", "label.today": "Astăzi", - "label.type": "Type", "label.unknown": "Necunoscut", "label.username": "Username", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Site-uri web", "message.active-users": "{x} {x, plural, one {vizitator activ} other {vizitatori activi}}", "message.confirm-delete": "Sunteți sigur că doriți să ștergeți {target}?", diff --git a/lang/ru-RU.json b/lang/ru-RU.json index fb2c4088..8a1ffb1d 100644 --- a/lang/ru-RU.json +++ b/lang/ru-RU.json @@ -26,7 +26,6 @@ "label.default-date-range": "Диапазон дат по-умолчанию", "label.domain": "Домен", "label.enable-share-url": "Разрешить делиться ссылкой", - "label.event": "Event", "label.invalid": "Некорректный", "label.invalid-domain": "Некорректный домен", "label.last-days": "Последние {x} дней", @@ -35,7 +34,6 @@ "label.logout": "Выйти", "label.name": "Имя", "label.new-password": "Новый пароль", - "label.pageview": "Pageview", "label.password": "Пароль", "label.passwords-dont-match": "Пароли не совпадают", "label.profile": "Профиль", @@ -47,11 +45,8 @@ "label.this-year": "Этот год", "label.timezone": "Часовой пояс", "label.today": "Сегодня", - "label.type": "Type", "label.unknown": "Неизвестно", "label.username": "Имя пользователя", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Сайты", "message.active-users": "{x} текущих посетителей", "message.confirm-delete": "Вы уверены, что хотите удалить {target}?", diff --git a/lang/sv-SE.json b/lang/sv-SE.json index 35e61fc7..7153a449 100644 --- a/lang/sv-SE.json +++ b/lang/sv-SE.json @@ -26,7 +26,6 @@ "label.default-date-range": "Standard datum-urval", "label.domain": "Domän", "label.enable-share-url": "Aktivera delnings-URL", - "label.event": "Event", "label.invalid": "Ogiltig", "label.invalid-domain": "Ogiltig domän", "label.last-days": "Senaste {x} dagarna", @@ -35,7 +34,6 @@ "label.logout": "Logga ut", "label.name": "Namn", "label.new-password": "Nytt lösenord", - "label.pageview": "Pageview", "label.password": "Lösenord", "label.passwords-dont-match": "Lösenorden är inte samma", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "Detta år", "label.timezone": "Tidszon", "label.today": "Idag", - "label.type": "Type", "label.unknown": "Okänd", "label.username": "Användarnamn", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Webbsajt", "message.active-users": "{x} {x, plural, one {besökare} other {besökare}} just nu", "message.confirm-delete": "Är du säker på att du vill radera {target}?", diff --git a/lang/tr-TR.json b/lang/tr-TR.json index c16ba8e5..8448303a 100644 --- a/lang/tr-TR.json +++ b/lang/tr-TR.json @@ -26,7 +26,6 @@ "label.default-date-range": "Varsayılan tarih aralığı", "label.domain": "Alan adı", "label.enable-share-url": "Anonim paylaşım URL'i aktif", - "label.event": "Event", "label.invalid": "Geçeriz", "label.invalid-domain": "Geçersiz alan adı", "label.last-days": "Son {x} gün", @@ -35,7 +34,6 @@ "label.logout": "Çıkış Yap", "label.name": "İsim", "label.new-password": "Yeni parola", - "label.pageview": "Pageview", "label.password": "Parola", "label.passwords-dont-match": "Parolalar uyuşmuyor", "label.profile": "Profil", @@ -47,11 +45,8 @@ "label.this-year": "Bu yıl", "label.timezone": "Zaman dilimi", "label.today": "Bugün", - "label.type": "Type", "label.unknown": "Bilinmeyen", "label.username": "Kullanıcı adı", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Web siteleri", "message.active-users": "{x} aktif ziyaretçi", "message.confirm-delete": "{target} kaydını silmek istediğinizden emin misiniz?", diff --git a/lang/uk-UA.json b/lang/uk-UA.json index 7f92162e..ce87cf68 100644 --- a/lang/uk-UA.json +++ b/lang/uk-UA.json @@ -26,7 +26,6 @@ "label.default-date-range": "Діапазон дат за умовчанням", "label.domain": "Домен", "label.enable-share-url": "Дозволити ділитися посиланням", - "label.event": "Event", "label.invalid": "Некоректний", "label.invalid-domain": "Некоректний домен", "label.last-days": "Останні {x} днів", @@ -35,7 +34,6 @@ "label.logout": "Вийти", "label.name": "Ім'я", "label.new-password": "Новий пароль", - "label.pageview": "Pageview", "label.password": "Пароль", "label.passwords-dont-match": "Паролі не співпадають", "label.profile": "Профіль", @@ -47,11 +45,8 @@ "label.this-year": "Поточний рік", "label.timezone": "Часовий пояс", "label.today": "Сьогодні", - "label.type": "Type", "label.unknown": "Невідомо", "label.username": "Ім'я користувача", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "Веб-сайти", "message.active-users": "{x} поточних відвідувачів", "message.confirm-delete": "Ви впевнені, що бажаєте видалити {target}?", diff --git a/lang/zh-CN.json b/lang/zh-CN.json index 6f7150d9..5b5653c5 100644 --- a/lang/zh-CN.json +++ b/lang/zh-CN.json @@ -26,7 +26,6 @@ "label.default-date-range": "默认日期范围", "label.domain": "域名", "label.enable-share-url": "激活共享链接", - "label.event": "Event", "label.invalid": "输入无效", "label.invalid-domain": "无效域名", "label.last-days": "最近 {x} 天", @@ -35,7 +34,6 @@ "label.logout": "退出", "label.name": "名字", "label.new-password": "新密码", - "label.pageview": "Pageview", "label.password": "密码", "label.passwords-dont-match": "密码不一致", "label.profile": "个人资料", @@ -47,11 +45,8 @@ "label.this-year": "今年", "label.timezone": "时区", "label.today": "今天", - "label.type": "Type", "label.unknown": "未知", "label.username": "用户名", - "label.visitor": "Visitor", - "label.website": "Website", "label.websites": "网站", "message.active-users": "当前在线 {x} 人", "message.confirm-delete": "你确定要删除{target}吗?", diff --git a/lib/constants.js b/lib/constants.js index 95d78f58..721f5e1c 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -51,6 +51,7 @@ export const EVENT_COLORS = [ '#ffec16', ]; +export const DEFAUL_CHART_HEIGHT = 400; export const DEFAULT_ANIMATION_DURATION = 300; export const DEFAULT_DATE_RANGE = '24hour'; diff --git a/package.json b/package.json index 5d4d077c..6ff5b687 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.88.0", + "version": "0.89.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT",