mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fixes hiding the global date picker on anomaly detection settings pages.
This commit is contained in:
parent
ded85fc5b5
commit
169626b272
7 changed files with 47 additions and 9 deletions
|
@ -4,10 +4,11 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { useEffect, FC } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
import { MlRoute, PageLoader, PageProps } from '../router';
|
||||
import { useResolver } from '../use_resolver';
|
||||
import { OverviewPage } from '../../overview';
|
||||
|
@ -42,6 +43,11 @@ const PageWrapper: FC<PageProps> = ({ config }) => {
|
|||
loadMlServerInfo,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.enableAutoRefreshSelector();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<PageLoader context={context}>
|
||||
<OverviewPage />
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { useEffect, FC } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
import { MlRoute, PageLoader, PageProps } from '../../router';
|
||||
import { useResolver } from '../../use_resolver';
|
||||
|
||||
|
@ -45,6 +47,11 @@ const PageWrapper: FC<PageProps> = ({ config }) => {
|
|||
getMlNodeCount,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.disableAutoRefreshSelector();
|
||||
}, []);
|
||||
|
||||
const canCreateCalendar = checkPermission('canCreateCalendar');
|
||||
const canDeleteCalendar = checkPermission('canDeleteCalendar');
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { useEffect, FC } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
import { MlRoute, PageLoader, PageProps } from '../../router';
|
||||
import { useResolver } from '../../use_resolver';
|
||||
|
||||
|
@ -81,6 +83,11 @@ const PageWrapper: FC<NewCalendarPageProps> = ({ location, config, mode }) => {
|
|||
checkMlNodesAvailable,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.disableAutoRefreshSelector();
|
||||
}, []);
|
||||
|
||||
const canCreateCalendar = checkPermission('canCreateCalendar');
|
||||
const canDeleteCalendar = checkPermission('canDeleteCalendar');
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { useEffect, FC } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
import { MlRoute, PageLoader, PageProps } from '../../router';
|
||||
import { useResolver } from '../../use_resolver';
|
||||
|
||||
|
@ -46,6 +48,11 @@ const PageWrapper: FC<PageProps> = ({ config }) => {
|
|||
getMlNodeCount,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.disableAutoRefreshSelector();
|
||||
}, []);
|
||||
|
||||
const canCreateFilter = checkPermission('canCreateFilter');
|
||||
const canDeleteFilter = checkPermission('canDeleteFilter');
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { useEffect, FC } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
import { MlRoute, PageLoader, PageProps } from '../../router';
|
||||
import { useResolver } from '../../use_resolver';
|
||||
|
||||
|
@ -81,6 +83,11 @@ const PageWrapper: FC<NewFilterPageProps> = ({ location, config, mode }) => {
|
|||
checkMlNodesAvailable,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.disableAutoRefreshSelector();
|
||||
}, []);
|
||||
|
||||
const canCreateFilter = checkPermission('canCreateFilter');
|
||||
const canDeleteFilter = checkPermission('canDeleteFilter');
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import React, { useEffect, FC } from 'react';
|
||||
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
import { MlRoute, PageLoader, PageProps } from '../../router';
|
||||
import { useResolver } from '../../use_resolver';
|
||||
|
@ -35,6 +37,11 @@ const PageWrapper: FC<PageProps> = ({ config }) => {
|
|||
getMlNodeCount,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.disableAutoRefreshSelector();
|
||||
}, []);
|
||||
|
||||
const canGetFilters = checkPermission('canGetFilters');
|
||||
const canGetCalendars = checkPermission('canGetCalendars');
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { PropTypes } from 'prop-types';
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
import { injectI18n } from '@kbn/i18n/react';
|
||||
|
||||
|
@ -53,8 +52,6 @@ export const NewCalendar = injectI18n(
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
timefilter.disableTimeRangeSelector();
|
||||
timefilter.disableAutoRefreshSelector();
|
||||
this.formSetup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue