feat(ui) - session settings - cleanup
This commit is contained in:
parent
18e932e5e9
commit
690577407d
5 changed files with 7 additions and 25 deletions
|
|
@ -26,7 +26,6 @@ import { fetchList as fetchMetadata } from 'Duck/customField';
|
|||
import { fetchList as fetchSiteList } from 'Duck/site';
|
||||
import { fetchList as fetchAnnouncements } from 'Duck/announcements';
|
||||
import { fetchList as fetchAlerts } from 'Duck/alerts';
|
||||
import { fetchWatchdogStatus } from 'Duck/watchdogs';
|
||||
import { dashboardService } from "App/services";
|
||||
import { withStore } from 'App/mstore'
|
||||
|
||||
|
|
@ -107,7 +106,6 @@ const ONBOARDING_REDIRECT_PATH = routes.onboarding(OB_DEFAULT_TAB);
|
|||
fetchSiteList,
|
||||
fetchAnnouncements,
|
||||
fetchAlerts,
|
||||
fetchWatchdogStatus,
|
||||
})
|
||||
class Router extends React.Component {
|
||||
state = {
|
||||
|
|
@ -132,7 +130,6 @@ class Router extends React.Component {
|
|||
this.props.fetchMetadata()
|
||||
this.props.fetchAnnouncements();
|
||||
this.props.fetchAlerts();
|
||||
this.props.fetchWatchdogStatus();
|
||||
}, 100);
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import React, { useEffect } from 'react'
|
||||
import React from 'react'
|
||||
import { connect } from 'react-redux';
|
||||
import cn from 'classnames';
|
||||
import { SideMenuitem, SavedSearchList, Progress, Popup } from 'UI'
|
||||
import stl from './sessionMenu.css';
|
||||
import { fetchWatchdogStatus } from 'Duck/watchdogs';
|
||||
import { clearEvents } from 'Duck/filters';
|
||||
import { issues_types } from 'Types/session/issue'
|
||||
import { fetchList as fetchSessionList } from 'Duck/sessions';
|
||||
|
|
@ -11,18 +10,12 @@ import { useModal } from 'App/components/Modal';
|
|||
import SessionSettings from 'Shared/SessionSettings/SessionSettings'
|
||||
|
||||
function SessionsMenu(props) {
|
||||
const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel } = props;
|
||||
const { hideModal, showModal } = useModal();
|
||||
const { activeTab } = props;
|
||||
const { showModal } = useModal();
|
||||
|
||||
const onMenuItemClick = (filter) => {
|
||||
props.onMenuItemClick(filter)
|
||||
}
|
||||
|
||||
const capturingAll = props.captureRate && props.captureRate.get('captureAll');
|
||||
|
||||
// useEffect(() => {
|
||||
// showModal(<SessionSettings />, {});
|
||||
// }, [])
|
||||
|
||||
return (
|
||||
<div className={stl.wrapper}>
|
||||
|
|
@ -49,9 +42,6 @@ function SessionsMenu(props) {
|
|||
/>
|
||||
)} */}
|
||||
</div>
|
||||
{/* <div className="text-sm color-gray-medium cursor-pointer mb-4" style={{ textDecoration: 'underline dotted'}} onClick={() => showModal(<SessionSettings />, {})}>
|
||||
Capture, Listing, and Timezone Settings
|
||||
</div> */}
|
||||
|
||||
<div>
|
||||
<SideMenuitem
|
||||
|
|
@ -96,5 +86,5 @@ export default connect(state => ({
|
|||
filters: state.getIn([ 'filters', 'appliedFilter' ]),
|
||||
sessionsLoading: state.getIn([ 'sessions', 'fetchLiveListRequest', 'loading' ]),
|
||||
}), {
|
||||
fetchWatchdogStatus, clearEvents, fetchSessionList
|
||||
clearEvents, fetchSessionList
|
||||
})(SessionsMenu);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import NewSiteForm from '../Client/Sites/NewSiteForm';
|
|||
import { clearSearch } from 'Duck/search';
|
||||
import { fetchList as fetchIntegrationVariables } from 'Duck/customField';
|
||||
import { fetchList as fetchAlerts } from 'Duck/alerts';
|
||||
import { fetchWatchdogStatus } from 'Duck/watchdogs';
|
||||
import { withStore } from 'App/mstore'
|
||||
|
||||
@withStore
|
||||
|
|
@ -28,7 +27,6 @@ import { withStore } from 'App/mstore'
|
|||
clearSearch,
|
||||
fetchIntegrationVariables,
|
||||
fetchAlerts,
|
||||
fetchWatchdogStatus,
|
||||
})
|
||||
export default class SiteDropdown extends React.PureComponent {
|
||||
state = { showProductModal: false }
|
||||
|
|
@ -54,7 +52,6 @@ export default class SiteDropdown extends React.PureComponent {
|
|||
this.props.clearSearch();
|
||||
this.props.fetchIntegrationVariables();
|
||||
this.props.fetchAlerts();
|
||||
this.props.fetchWatchdogStatus();
|
||||
|
||||
mstore.initClient();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,14 +8,10 @@ import DefaultTimezone from './components/DefaultTimezone';
|
|||
import CaptureRate from './components/CaptureRate';
|
||||
|
||||
function SessionSettings(props) {
|
||||
const { settingsStore } = useStore();
|
||||
const sessionSettings = useObserver(() => settingsStore.sessionSettings)
|
||||
|
||||
|
||||
return useObserver(() => (
|
||||
<div className="bg-white box-shadow h-screen" style={{ width: '450px'}}>
|
||||
<div className="p-6">
|
||||
<h1 className="text-2xl">Session Settings</h1>
|
||||
<h1 className="text-2xl">Sessions Settings</h1>
|
||||
</div>
|
||||
|
||||
<div className="p-6 border-b py-8">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { toast } from 'react-toastify';
|
|||
export default class SettingsStore {
|
||||
loadingCaptureRate: boolean = false;
|
||||
sessionSettings: SessionSettings = new SessionSettings()
|
||||
captureRateFetched: boolean = false;
|
||||
constructor() {
|
||||
makeAutoObservable(this, {
|
||||
sessionSettings: observable,
|
||||
|
|
@ -33,6 +34,7 @@ export default class SettingsStore {
|
|||
captureRate: data.rate,
|
||||
captureAll: data.captureAll
|
||||
})
|
||||
this.captureRateFetched = true;
|
||||
}).finally(() => {
|
||||
this.loadingCaptureRate = false;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue