Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

remove "refresh interval" option from time selector #153

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);

Expand Down Expand Up @@ -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);
};
Expand All @@ -201,11 +191,6 @@ export function TimeRangeSelect(props) {
setIsLoading(false);
};

const onRefreshChange = ({ isPaused, refreshInterval }) => {
setIsPaused(isPaused);
setRefreshInterval(refreshInterval);
};

return (
<div>
<div>
Expand All @@ -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}
/>
</EuiFormRow>
Expand Down