mirror of
https://github.com/plausible/analytics.git
synced 2024-12-20 08:01:48 +03:00
ba19f9530e
* copy relevant files from b2ace16540
* make it work and set site.funnels to empty list
* make Behaviours a functional component
* add UI for a setup hint and always display conversions by default
* cherry-pick migration commit
* update site schema with new fields
* backend: implement disable-feature action
* switch between tabs in the behaviors section
Introduces template components to build props and funnels on. Both
only show a setup notice atm, and both are behind feature flags.
* extend API for disabling props and funnels
* render feature setup note directly from the Behaviours component
* fix UI behavior when features are hidden
* update setup notices
* add conversions feature switch to Site Settings > Goals
* mix format
* remove IO.inspect
* change setup notice - use buttons + popup confirmation
* optimize for light mode
* restrict access to setup notices
* some styling improvements
* allow super-admins to enable/disable features
* only show conversions (last 30min) in realtime mode
* use shorter display names for tabs
* optimize for mobile screens
* note about sending custom events
* changelog update + fix CI
* change HTTP verb for the disable-feature action
* change UI label for show/hide goals
46 lines
2.1 KiB
JavaScript
46 lines
2.1 KiB
JavaScript
import React from 'react';
|
|
|
|
import Datepicker from './datepicker'
|
|
import SiteSwitcher from './site-switcher'
|
|
import Filters from './filters'
|
|
import VisitorGraph from './stats/graph/visitor-graph'
|
|
import Sources from './stats/sources'
|
|
import Pages from './stats/pages'
|
|
import Locations from './stats/locations'
|
|
import Devices from './stats/devices'
|
|
import Behaviours from './stats/behaviours'
|
|
import { withPinnedHeader } from './pinned-header-hoc';
|
|
|
|
class Realtime extends React.Component {
|
|
render() {
|
|
const navClass = this.props.site.embedded ? 'relative' : 'sticky'
|
|
|
|
return (
|
|
<div className="mb-12">
|
|
<div id="stats-container-top"></div>
|
|
<div className={`${navClass} top-0 sm:py-3 py-2 z-10 ${this.props.stuck && !this.props.site.embedded ? 'fullwidth-shadow bg-gray-50 dark:bg-gray-850' : ''}`}>
|
|
<div className="items-center w-full flex">
|
|
<div className="flex items-center w-full">
|
|
<SiteSwitcher site={this.props.site} loggedIn={this.props.loggedIn} currentUserRole={this.props.currentUserRole} />
|
|
<Filters className="flex" site={this.props.site} query={this.props.query} history={this.props.history} />
|
|
</div>
|
|
<Datepicker site={this.props.site} query={this.props.query} />
|
|
</div>
|
|
</div>
|
|
<VisitorGraph site={this.props.site} query={this.props.query} lastLoadTimestamp={this.props.lastLoadTimestamp} />
|
|
<div className="items-start justify-between block w-full md:flex">
|
|
<Sources site={this.props.site} query={this.props.query} />
|
|
<Pages site={this.props.site} query={this.props.query} />
|
|
</div>
|
|
<div className="items-start justify-between block w-full md:flex">
|
|
<Locations site={this.props.site} query={this.props.query} />
|
|
<Devices site={this.props.site} query={this.props.query} />
|
|
</div>
|
|
<Behaviours site={this.props.site} query={this.props.query} currentUserRole={this.props.currentUserRole} />
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default withPinnedHeader(Realtime, '#stats-container-top');
|