diff --git a/frontend/app/components/Funnels/FunnelDetails/FunnelDetails.js__ b/frontend/app/components/Funnels/FunnelDetails/FunnelDetails.js__ deleted file mode 100644 index 59e172c54..000000000 --- a/frontend/app/components/Funnels/FunnelDetails/FunnelDetails.js__ +++ /dev/null @@ -1,159 +0,0 @@ -import React, { useState, useEffect } from 'react' -import { Tabs, Loader } from 'UI' -import FunnelHeader from 'Components/Funnels/FunnelHeader' -import FunnelGraph from 'Components/Funnels/FunnelGraph' -import FunnelSessionList from 'Components/Funnels/FunnelSessionList' -import FunnelOverview from 'Components/Funnels/FunnelOverview' -import FunnelIssues from 'Components/Funnels/FunnelIssues' -import { connect } from 'react-redux'; -import { - fetch, fetchInsights, fetchList, fetchFiltered, fetchIssuesFiltered, fetchSessionsFiltered, fetchIssueTypes, resetFunnel, refresh -} from 'Duck/funnels'; -import { applyFilter, setFilterOptions, resetFunnelFilters, setInitialFilters } from 'Duck/funnelFilters'; -import { withRouter } from 'react-router'; -import { sessions as sessionsRoute, funnel as funnelRoute, withSiteId } from 'App/routes'; -import FunnelSearch from 'Shared/FunnelSearch'; -import cn from 'classnames'; -import IssuesEmptyMessage from 'Components/Funnels/IssuesEmptyMessage' - -const TAB_ISSUES = 'ANALYSIS'; -const TAB_SESSIONS = 'SESSIONS'; - -const TABS = [ TAB_ISSUES, TAB_SESSIONS ].map(tab => ({ - text: tab, - disabled: false, - key: tab, -})); - -const FunnelDetails = (props) => { - const { insights, funnels, funnel, funnelId, loading, liveFilters, issuesLoading, sessionsLoading, refresh } = props; - const [activeTab, setActiveTab] = useState(TAB_ISSUES) - const [showFilters, setShowFilters] = useState(false) - const [mounted, setMounted] = useState(false); - const onTabClick = activeTab => setActiveTab(activeTab) - - useEffect(() => { - if (funnels.size === 0) { - props.fetchList(); - } - props.fetchIssueTypes() - - props.fetch(funnelId).then(() => { - setMounted(true); - }).then(() => { - props.refresh(funnelId); - }) - - }, []); - - // useEffect(() => { - // if (funnel && funnel.filter && liveFilters.events.size === 0) { - // props.setInitialFilters(); - // } - // }, [funnel]) - - const onBack = () => { - props.history.push(sessionsRoute()); - } - - const redirect = funnelId => { - const { siteId, history } = props; - props.resetFunnel(); - props.resetFunnelFilters(); - - history.push(withSiteId(funnelRoute(parseInt(funnelId)), siteId)); - } - - const renderActiveTab = (tab, hasNoStages) => { - switch(tab) { - case TAB_ISSUES: - return !hasNoStages && - case TAB_SESSIONS: - return - } - } - - const hasNoStages = !loading && insights.stages.length <= 1; - const showEmptyMessage = hasNoStages && activeTab === TAB_ISSUES && !loading; - - return ( -
- setShowFilters(!showFilters)} - showFilters={showFilters} - /> -
- {showFilters && ( - - ) - } -
- -
- - setShowFilters(true)} show={showEmptyMessage}> -
-
-
- -
-
- -
-
-
- - { renderActiveTab(activeTab, hasNoStages) } - -
- - - -
- ) -} - -export default connect((state, props) => { - const insightsLoading = state.getIn(['funnels', 'fetchInsights', 'loading']); - const issuesLoading = state.getIn(['funnels', 'fetchIssuesRequest', 'loading']); - const funnelLoading = state.getIn(['funnels', 'fetchRequest', 'loading']); - const sessionsLoading = state.getIn(['funnels', 'fetchSessionsRequest', 'loading']); - return { - funnels: state.getIn(['funnels', 'list']), - funnel: state.getIn(['funnels', 'instance']), - insights: state.getIn(['funnels', 'insights']), - loading: funnelLoading || (insightsLoading && (issuesLoading || sessionsLoading)), - issuesLoading, - sessionsLoading, - funnelId: props.match.params.funnelId, - activeStages: state.getIn(['funnels', 'activeStages']), - funnelFilters: state.getIn(['funnels', 'funnelFilters']), - siteId: state.getIn([ 'site', 'siteId' ]), - liveFilters: state.getIn(['funnelFilters', 'appliedFilter']), - } -}, { - fetch, - fetchInsights, - fetchFiltered, - fetchIssuesFiltered, - fetchList, - applyFilter, - setFilterOptions, - fetchIssuesFiltered, - fetchSessionsFiltered, - fetchIssueTypes, - resetFunnel, - resetFunnelFilters, - setInitialFilters, - refresh, -})(withRouter((FunnelDetails))) diff --git a/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js b/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js deleted file mode 100644 index 221a59e8f..000000000 --- a/frontend/app/components/Funnels/FunnelGraph/FunnelGraph.js +++ /dev/null @@ -1,303 +0,0 @@ -import React, { useState } from 'react'; -import { Icon, Tooltip as AppTooltip } from 'UI'; -import { numberCompact } from 'App/utils'; -import { - BarChart, - Bar, - Cell, - XAxis, - YAxis, - CartesianGrid, - Tooltip, - LabelList, - -} from 'recharts'; -import { connect } from 'react-redux'; -import { setActiveStages } from 'Duck/funnels'; -import { Styles } from '../../Dashboard/Widgets/common'; -import { numberWithCommas } from 'App/utils'; -import { truncate } from 'App/utils'; - -const MIN_BAR_HEIGHT = 20; - -function CustomTick(props) { - const { x, y, payload } = props; - return ( - - - {payload.value} - - - ); -} - -function FunnelGraph(props) { - const { data, activeStages, funnelId, liveFilters } = props; - const [activeIndex, setActiveIndex] = useState(activeStages); - - const renderPercentage = (props) => { - const { x, y, width, height, value } = props; - const radius = 10; - const _x = x + width / 2 + 45; - - return ( - - - - - - - - {numberCompact(value)} - - - ); - }; - - const renderCustomizedLabel = (props) => { - const { x, y, width, height, value, textColor = '#fff' } = props; - const radius = 10; - - if (value === 0) return; - - return ( - - - {numberCompact(value)} - - - ); - }; - - const handleClick = (data, index) => { - if (activeStages.length === 1 && activeStages.includes(index)) { - // selecting the same bar - props.setActiveStages([], null); - return; - } - - if (activeStages.length === 2) { - // already having two bars - return; - } - - // new selection - const arr = activeStages.concat([index]); - props.setActiveStages(arr.sort(), arr.length === 2 && liveFilters, funnelId); - }; - - const resetActiveSatges = () => { - props.setActiveStages([], liveFilters, funnelId, true); - }; - - const renderDropLabel = ({ x, y, width, value }) => { - if (value === 0) return; - return ( - - {value} - - ); - }; - - const renderMainLabel = ({ x, y, width, value }) => { - return ( - - {numberWithCommas(value)} - - ); - }; - - const CustomBar = (props) => { - const { fill, x, y, width, height, sessionsCount, index, dropDueToIssues } = props; - const yp = sessionsCount < MIN_BAR_HEIGHT ? MIN_BAR_HEIGHT - 1 : dropDueToIssues; - const tmp = (height <= 20 ? 20 : height) - (TEMP[index].height > 20 ? 0 : TEMP[index].height); - return ( - - - - ); - }; - const MainBar = (props) => { - const { - fill, - x, - y, - width, - height, - sessionsCount, - index, - dropDueToIssues, - hasSelection = false, - } = props; - const yp = sessionsCount < MIN_BAR_HEIGHT ? MIN_BAR_HEIGHT - 1 : dropDueToIssues; - - TEMP[index] = { height, y }; - - return ( - - - - ); - }; - - const renderDropPct = (props) => { - // TODO - const { fill, x, y, width, height, value, totalBars } = props; - const barW = x + 730 / totalBars / 2; - - return ( - - - - ); - }; - - const CustomTooltip = (props) => { - const { payload } = props; - if (payload.length === 0) return null; - const { value, headerText } = payload[0].payload; - - // const value = payload[0].payload.value; - if (!value) return null; - return ( -
-
{headerText}
- {value.map((i) => ( -
{truncate(i, 30)}
- ))} -
- ); - }; - // const CustomTooltip = ({ active, payload, msg = '' }) => { - // return ( - //
- //

{msg}

- //
- // ); - // }; - - const TEMP = {}; - - return ( -
- {activeStages.length === 2 && ( -
- - - -
- )} - - - {/* {activeStages.length < 2 && 0 ? 'Select one more event.' : 'Select any two events to analyze in depth.'} />} />} */} - - - } - cursor="pointer" - minPointSize={MIN_BAR_HEIGHT} - background={false} - > - - {data.map((entry, index) => { - const selected = - activeStages.includes(index) || (index > activeStages[0] && index < activeStages[1]); - const opacity = activeStages.length > 0 && !selected ? 0.4 : 1; - return ( - - ); - })} - - - } - minPointSize={MIN_BAR_HEIGHT} - > - - {data.map((entry, index) => { - const selected = - activeStages.includes(index) || (index > activeStages[0] && index < activeStages[1]); - const opacity = activeStages.length > 0 && !selected ? 0.4 : 1; - return ( - - ); - })} - - - } - xAxisId={0} - /> - {/* '"' + val + '"'} - /> */} - Styles.tickFormatter(val)} - /> - -
- ); -} - -export default connect( - (state) => ({ - activeStages: state.getIn(['funnels', 'activeStages']).toJS(), - liveFilters: state.getIn(['funnelFilters', 'appliedFilter']), - }), - { setActiveStages } -)(FunnelGraph); diff --git a/frontend/app/components/Funnels/FunnelGraph/index.js b/frontend/app/components/Funnels/FunnelGraph/index.js deleted file mode 100644 index 990d34099..000000000 --- a/frontend/app/components/Funnels/FunnelGraph/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './FunnelGraph' \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelHeader/FunnelDropdown.js b/frontend/app/components/Funnels/FunnelHeader/FunnelDropdown.js deleted file mode 100644 index a5b3bf445..000000000 --- a/frontend/app/components/Funnels/FunnelHeader/FunnelDropdown.js +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react' -import { connect } from 'react-redux' -import { withRouter } from 'react-router' -import { Dropdown } from 'UI' -import { funnel as funnelRoute, withSiteId } from 'App/routes'; - -function FunnelDropdown(props) { - const { options, funnel } = props; - - const writeOption = (e, { name, value }) => { - const { siteId, history } = props; - history.push(withSiteId(funnelRoute(parseInt(value)), siteId)); - } - - return ( -
- -
- ) -} - -export default connect((state, props) => ({ - funnels: state.getIn(['funnels', 'list']), - funnel: state.getIn(['funnels', 'instance']), - siteId: state.getIn([ 'site', 'siteId' ]), -}), { })(withRouter(FunnelDropdown)) diff --git a/frontend/app/components/Funnels/FunnelHeader/FunnelHeader.js b/frontend/app/components/Funnels/FunnelHeader/FunnelHeader.js deleted file mode 100644 index 58e64d295..000000000 --- a/frontend/app/components/Funnels/FunnelHeader/FunnelHeader.js +++ /dev/null @@ -1,149 +0,0 @@ -import React, { useState } from 'react'; -import { Icon, BackLink, IconButton, Dropdown, Tooltip, TextEllipsis, Button } from 'UI'; -import { - remove as deleteFunnel, - fetch, - fetchInsights, - fetchIssuesFiltered, - fetchSessionsFiltered, -} from 'Duck/funnels'; -import { editFilter, editFunnelFilter, refresh } from 'Duck/funnels'; -import DateRange from 'Shared/DateRange'; -import { connect } from 'react-redux'; -import { confirm } from 'UI'; -import FunnelSaveModal from 'Components/Funnels/FunnelSaveModal'; -import stl from './funnelHeader.module.css'; - -const Info = ({ label = '', value = '', className = 'mx-4' }) => { - return ( -
- {label} - {value} -
- ); -}; - -const FunnelHeader = (props) => { - const { - funnel, - insights, - funnels, - onBack, - funnelId, - showFilters = false, - funnelFilters, - renameHandler, - } = props; - const [showSaveModal, setShowSaveModal] = useState(false); - - const writeOption = (e, { name, value }) => { - props.redirect(value); - props.fetch(value).then(() => props.refresh(value)); - }; - - const deleteFunnel = async (e, funnel) => { - e.preventDefault(); - e.stopPropagation(); - - if ( - await confirm({ - header: 'Delete Funnel', - confirmButton: 'Delete', - confirmation: `Are you sure you want to permanently delete "${funnel.name}"?`, - }) - ) { - props.deleteFunnel(funnel.funnelId).then(props.onBack); - } else { - } - }; - - const onDateChange = (e) => { - props.editFunnelFilter(e, funnelId); - }; - - const options = funnels.map(({ funnelId, name }) => ({ text: name, value: funnelId })).toJS(); - const selectedFunnel = funnels.filter((i) => i.funnelId === parseInt(funnelId)).first() || {}; - const eventsCount = funnel.filter.filters.filter((i) => i.isEvent).size; - - return ( -
-
- - setShowSaveModal(false)} /> -
- - -
- } - options={options} - className={stl.dropdown} - name="funnel" - value={parseInt(funnelId)} - // icon={null} - onChange={writeOption} - selectOnBlur={false} - icon={ - - } - /> - - - - - - -
-
-
- - setShowSaveModal(true)} /> - - - deleteFunnel(e, funnel)} - className="ml-2 mr-2" - /> - -
- -
-
-
- ); -}; - -export default connect( - (state) => ({ - funnelFilters: state.getIn(['funnels', 'funnelFilters']).toJS(), - funnel: state.getIn(['funnels', 'instance']), - }), - { - editFilter, - editFunnelFilter, - deleteFunnel, - fetch, - fetchInsights, - fetchIssuesFiltered, - fetchSessionsFiltered, - refresh, - } -)(FunnelHeader); diff --git a/frontend/app/components/Funnels/FunnelHeader/funnelHeader.module.css b/frontend/app/components/Funnels/FunnelHeader/funnelHeader.module.css deleted file mode 100644 index 7ab834b76..000000000 --- a/frontend/app/components/Funnels/FunnelHeader/funnelHeader.module.css +++ /dev/null @@ -1,30 +0,0 @@ -.dropdown { - display: flex !important; - align-items: center; - padding: 0 20px; - border-radius: 0; - border-radius: 0; - color: $gray-darkest; - font-weight: 500; - height: 54px; - padding-right: 20px; - border-right: solid thin #eee; - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; - &:hover { - background-color: $gray-lightest; - } -} - -.dropdownTrigger { - padding: 4px 8px; - border-radius: 3px; - &:hover { - background-color: $gray-light; - } -} - -.dropdownIcon { - margin-top: 4px; - margin-left: 6px; -} \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelHeader/index.js b/frontend/app/components/Funnels/FunnelHeader/index.js deleted file mode 100644 index a5efa97af..000000000 --- a/frontend/app/components/Funnels/FunnelHeader/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './FunnelHeader'; \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelIssueDetails/FunnelIssueDetails.js b/frontend/app/components/Funnels/FunnelIssueDetails/FunnelIssueDetails.js deleted file mode 100644 index 77017e4ac..000000000 --- a/frontend/app/components/Funnels/FunnelIssueDetails/FunnelIssueDetails.js +++ /dev/null @@ -1,43 +0,0 @@ -import React, { useEffect } from 'react' -import IssueItem from 'Components/Funnels/IssueItem' -import FunnelSessionList from 'Components/Funnels/FunnelSessionList' -import { connect } from 'react-redux' -import { withRouter } from 'react-router' -import { fetchIssue, setNavRef, resetIssue } from 'Duck/funnels' -import { funnel as funnelRoute, withSiteId } from 'App/routes' -import { Loader } from 'UI' - -function FunnelIssueDetails(props) { - const { issue, issueId, funnelId, loading = false } = props; - - useEffect(() => { - props.fetchIssue(funnelId, issueId) - - return () => { - props.resetIssue(); - } - }, [issueId]) - - const onBack = () => { - const { siteId, history } = props; - history.push(withSiteId(funnelRoute(parseInt(funnelId)), siteId)); - } - - return ( -
- - -
- - -
- ) -} - -export default connect((state, props) => ({ - loading: state.getIn(['funnels', 'fetchIssueRequest', 'loading']), - issue: state.getIn(['funnels', 'issue']), - issueId: props.match.params.issueId, - funnelId: props.match.params.funnelId, - siteId: state.getIn([ 'site', 'siteId' ]), -}), { fetchIssue, setNavRef, resetIssue })(withRouter(FunnelIssueDetails)) diff --git a/frontend/app/components/Funnels/FunnelIssueDetails/index.js b/frontend/app/components/Funnels/FunnelIssueDetails/index.js index 3ac32a034..0c66aec5b 100644 --- a/frontend/app/components/Funnels/FunnelIssueDetails/index.js +++ b/frontend/app/components/Funnels/FunnelIssueDetails/index.js @@ -1 +1 @@ -export { default } from './FunnelIssueDetails' \ No newline at end of file +//export { default } from './FunnelIssueDetails' diff --git a/frontend/app/components/Funnels/FunnelIssues/FunnelIssues.js b/frontend/app/components/Funnels/FunnelIssues/FunnelIssues.js deleted file mode 100644 index 3a6070afe..000000000 --- a/frontend/app/components/Funnels/FunnelIssues/FunnelIssues.js +++ /dev/null @@ -1,89 +0,0 @@ -import React, { useState } from 'react' -import { connect } from 'react-redux' -import { fetchIssues, fetchIssuesFiltered } from 'Duck/funnels' -import { LoadMoreButton, NoContent } from 'UI' -import FunnelIssuesHeader from '../FunnelIssuesHeader' -import IssueItem from '../IssueItem'; -import { funnelIssue as funnelIssueRoute, withSiteId } from 'App/routes' -import { withRouter } from 'react-router' -import IssueFilter from '../IssueFilter'; -import SortDropdown from './SortDropdown'; -import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; - -const PER_PAGE = 10; - -function FunnelIssues(props) { - const { - funnel, list, loading = false, - criticalIssuesCount, issueFilters, sort - } = props; - - const [showPages, setShowPages] = useState(1) - - const addPage = () => setShowPages(showPages + 1); - - const onClick = ({ issueId }) => { - const { siteId, history } = props; - history.push(withSiteId(funnelIssueRoute(funnel.funnelId, issueId), siteId)); - } - - let filteredList = issueFilters.size > 0 ? list.filter(item => issueFilters.includes(item.type)) : list; - filteredList = sort.sort ? filteredList.sortBy(i => i[sort.sort]) : filteredList; - filteredList = sort.order === 'desc' ? filteredList.reverse() : filteredList; - const displayedCount = Math.min(showPages * PER_PAGE, filteredList.size); - - return ( -
- -
- -
- Sort By - -
-
- - -
No Issues Found!
-
- } - subtext="Please try changing your search parameters." - // animatedIcon="no-results" - show={ !loading && filteredList.size === 0} - > - { filteredList.take(displayedCount).map(issue => ( -
- onClick(issue)} - /> -
- ))} - - - -
- ) -} - -export default connect(state => ({ - list: state.getIn(['funnels', 'issues']), - criticalIssuesCount: state.getIn(['funnels', 'criticalIssuesCount']), - loading: state.getIn(['funnels', 'fetchIssuesRequest', 'loading']), - siteId: state.getIn([ 'site', 'siteId' ]), - funnel: state.getIn(['funnels', 'instance']), - activeStages: state.getIn(['funnels', 'activeStages']), - funnelFilters: state.getIn(['funnels', 'funnelFilters']), - liveFilters: state.getIn(['funnelFilters', 'appliedFilter']), - issueFilters: state.getIn(['funnels', 'issueFilters', 'filters']), - sort: state.getIn(['funnels', 'issueFilters', 'sort']), -}), { fetchIssues, fetchIssuesFiltered })(withRouter(FunnelIssues)) diff --git a/frontend/app/components/Funnels/FunnelIssues/SortDropdown/SortDropdown.js b/frontend/app/components/Funnels/FunnelIssues/SortDropdown/SortDropdown.js deleted file mode 100644 index a9d22f2f0..000000000 --- a/frontend/app/components/Funnels/FunnelIssues/SortDropdown/SortDropdown.js +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import Select from 'Shared/Select' -import { sort } from 'Duck/sessions'; -import { applyIssueFilter } from 'Duck/funnels'; - -const sortOptionsMap = { - 'afectedUsers-desc': 'Affected Users (High)', - 'afectedUsers-asc': 'Affected Users (Low)', - 'conversionImpact-desc': 'Conversion Impact (High)', - 'conversionImpact-asc': 'Conversion Impact (Low)', - 'lostConversions-desc': 'Lost Conversions (High)', - 'lostConversions-asc': 'Lost Conversions (Low)', -}; - -const sortOptions = Object.entries(sortOptionsMap) - .map(([ value, label ]) => ({ value, label })); - -@connect(state => ({ - sorts: state.getIn(['funnels', 'issueFilters', 'sort']) -}), { sort, applyIssueFilter }) -export default class SortDropdown extends React.PureComponent { - state = { value: null } - sort = ({ value }) => { - this.setState({ value: value }) - const [ sort, order ] = value.split('-'); - const sign = order === 'desc' ? -1 : 1; - this.props.applyIssueFilter({ sort: { order, sort } }); - - this.props.sort(sort, sign) - setTimeout(() => this.props.sort(sort, sign), 3000); //AAA - } - - render() { - const { sorts } = this.props; - - return ( - - - - -
- -
this.props.edit({ isPublic: !funnel.isPublic })} - > - - Team Visible -
-
-
- - - - - - - - ); - } -} diff --git a/frontend/app/components/Funnels/FunnelSaveModal/funnelSaveModal.module.css b/frontend/app/components/Funnels/FunnelSaveModal/funnelSaveModal.module.css deleted file mode 100644 index ed2600745..000000000 --- a/frontend/app/components/Funnels/FunnelSaveModal/funnelSaveModal.module.css +++ /dev/null @@ -1,15 +0,0 @@ -@import 'mixins.css'; - -.modalHeader { - display: flex !important; - align-items: center; - justify-content: space-between; -} - -.cancelButton { - @mixin plainButton; -} - -.applyButton { - @mixin basicButton; -} \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelSaveModal/index.js b/frontend/app/components/Funnels/FunnelSaveModal/index.js deleted file mode 100644 index 1265b5b10..000000000 --- a/frontend/app/components/Funnels/FunnelSaveModal/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './FunnelSaveModal' \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelSessionList/FunnelSessionList.js b/frontend/app/components/Funnels/FunnelSessionList/FunnelSessionList.js deleted file mode 100644 index c7aca3149..000000000 --- a/frontend/app/components/Funnels/FunnelSessionList/FunnelSessionList.js +++ /dev/null @@ -1,68 +0,0 @@ -import React, { useState, useEffect } from 'react' -import { connect } from 'react-redux' -import SessionItem from 'Shared/SessionItem' -import { fetchSessions, fetchSessionsFiltered } from 'Duck/funnels' -import { setFunnelPage } from 'Duck/sessions' -import { LoadMoreButton, NoContent } from 'UI' -import FunnelSessionsHeader from '../FunnelSessionsHeader' -import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; - -const PER_PAGE = 10; - -function FunnelSessionList(props) { - const { funnelId, issueId, list, sessionsTotal, sessionsSort, inDetails = false } = props; - - const [showPages, setShowPages] = useState(1) - const displayedCount = Math.min(showPages * PER_PAGE, list.size); - - const addPage = () => setShowPages(showPages + 1); - - useEffect(() => { - props.setFunnelPage({ - funnelId, - issueId - }) - }, []) - - return ( -
- -
- - -
No recordings found!
-
- } - subtext="Please try changing your search parameters." - // animatedIcon="no-results" - show={ list.size === 0} - > - { list.take(displayedCount).map(session => ( - - ))} - - - -
- ) -} - -export default connect(state => ({ - list: state.getIn(['funnels', 'sessions']), - sessionsTotal: state.getIn(['funnels', 'sessionsTotal']), - funnel: state.getIn(['funnels', 'instance']), - activeStages: state.getIn(['funnels', 'activeStages']).toJS(), - liveFilters: state.getIn(['funnelFilters', 'appliedFilter']), - funnelFilters: state.getIn(['funnels', 'funnelFilters']), - sessionsSort: state.getIn(['funnels', 'sessionsSort']), -}), { fetchSessions, fetchSessionsFiltered, setFunnelPage })(FunnelSessionList) diff --git a/frontend/app/components/Funnels/FunnelSessionList/index.js b/frontend/app/components/Funnels/FunnelSessionList/index.js deleted file mode 100644 index 45c8e472e..000000000 --- a/frontend/app/components/Funnels/FunnelSessionList/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './FunnelSessionList' \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelSessionsHeader/DateRange.js b/frontend/app/components/Funnels/FunnelSessionsHeader/DateRange.js deleted file mode 100644 index c532f5af6..000000000 --- a/frontend/app/components/Funnels/FunnelSessionsHeader/DateRange.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { applyFilter, fetchList } from 'Duck/filters'; -import { fetchList as fetchFunnelsList } from 'Duck/funnels'; -import DateRangeDropdown from 'Shared/DateRangeDropdown'; - -@connect(state => ({ - rangeValue: state.getIn([ 'filters', 'appliedFilter', 'rangeValue' ]), - startDate: state.getIn([ 'filters', 'appliedFilter', 'startDate' ]), - endDate: state.getIn([ 'filters', 'appliedFilter', 'endDate' ]), -}), { - applyFilter, fetchList, fetchFunnelsList -}) -export default class DateRange extends React.PureComponent { - render() { - const { startDate, endDate, rangeValue, className } = this.props; - return ( - - ); - } -} \ No newline at end of file diff --git a/frontend/app/components/Funnels/FunnelSessionsHeader/SortDropdown/SortDropdown.js b/frontend/app/components/Funnels/FunnelSessionsHeader/SortDropdown/SortDropdown.js deleted file mode 100644 index b865a6b57..000000000 --- a/frontend/app/components/Funnels/FunnelSessionsHeader/SortDropdown/SortDropdown.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import Select from 'Shared/Select'; -import { setSessionsSort as sort } from 'Duck/funnels'; -import { setSessionsSort } from 'Duck/funnels'; - -@connect(state => ({ - sessionsSort: state.getIn(['funnels','sessionsSort']) -}), { sort, setSessionsSort }) -export default class SortDropdown extends React.PureComponent { - state = { value: null } - sort = ({ value }) => { - this.setState({ value: value }) - const [ sort, order ] = value.split('-'); - const sign = order === 'desc' ? -1 : 1; - setTimeout(() => this.props.sort(sort, sign), 100); - } - - render() { - const { options, issuesSort } = this.props; - return ( -