From d20eb7af6fd38334ae3c914ff544476f160d864f Mon Sep 17 00:00:00 2001 From: Zhongnan Su Date: Mon, 26 Oct 2020 22:01:49 -0700 Subject: [PATCH] remove redundant options from time selector --- .../report_settings/time_range.tsx | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx b/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx index 3a029d86..1d56a8c2 100644 --- a/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx +++ b/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx @@ -37,8 +37,6 @@ export function TimeRangeSelect(props) { const [isLoading, setIsLoading] = useState(false); const [start, setStart] = useState('now-30m'); const [end, setEnd] = useState('now'); - const [isPaused, setIsPaused] = useState(true); - const [refreshInterval, setRefreshInterval] = useState(); const [toasts, setToasts] = useState([]); @@ -185,14 +183,6 @@ export function TimeRangeSelect(props) { reportDefinitionRequest.report_params.core_params.time_duration = timeDuration.toISOString(); }; - const onRefresh = ({ start, end, refreshInterval }) => { - return new Promise((resolve) => { - setTimeout(resolve, 100); - }).then(() => { - console.log(start, end, refreshInterval); - }); - }; - const startLoading = () => { setTimeout(stopLoading, 1000); }; @@ -201,11 +191,6 @@ export function TimeRangeSelect(props) { setIsLoading(false); }; - const onRefreshChange = ({ isPaused, refreshInterval }) => { - setIsPaused(isPaused); - setRefreshInterval(refreshInterval); - }; - return (
@@ -220,11 +205,6 @@ export function TimeRangeSelect(props) { start={start} end={end} onTimeChange={onTimeChange} - onRefresh={onRefresh} - isPaused={isPaused} - refreshInterval={refreshInterval} - onRefreshChange={onRefreshChange} - recentlyUsedRanges={recentlyUsedRanges} showUpdateButton={false} />