mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* [Monitoring/No Data] Show a "still waiting" link after 19s * minor bug fix: spinner if _interval_ updating * update "we tried" * some wording changes on activating / trying to activate monitoring * cancel the setTimeout when component gets unmounted * more wording tweaks * update snapshot
This commit is contained in:
parent
bffe876587
commit
4a3609ae30
5 changed files with 43 additions and 36 deletions
|
@ -23,11 +23,25 @@ export class ExplainCollectionEnabled extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.handleClick = this.handleClick.bind(this);
|
||||
this.waitedTooLongTimer = null;
|
||||
|
||||
this.state = {
|
||||
waitedTooLong: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
clearInterval(this.waitedTooLongTimer);
|
||||
}
|
||||
|
||||
handleClick() {
|
||||
const { enabler } = this.props;
|
||||
enabler.enableCollectionEnabled();
|
||||
|
||||
// wait 19 seconds, show link to reload
|
||||
this.waitedTooLongTimer = setTimeout(() => {
|
||||
this.setState({ waitedTooLong: true });
|
||||
}, 19 * 1000);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -72,6 +86,13 @@ export class ExplainCollectionEnabled extends React.Component {
|
|||
</EuiFlexGroup>
|
||||
</Fragment>
|
||||
);
|
||||
|
||||
const stillWaiting = this.state.waitedTooLong ? (
|
||||
<p>
|
||||
<a href="#/">Still waiting?</a>
|
||||
</p>
|
||||
) : null;
|
||||
|
||||
const renderSuccess = () => (
|
||||
<Fragment>
|
||||
<EuiTitle size="l" data-test-subj="monitoringCollectionEnabledMessage">
|
||||
|
@ -80,13 +101,14 @@ export class ExplainCollectionEnabled extends React.Component {
|
|||
<EuiHorizontalRule size="half" />
|
||||
<EuiText>
|
||||
<p>
|
||||
When the data is in your
|
||||
cluster, your monitoring
|
||||
dashboard will show up here. This only takes a few seconds.
|
||||
When the data is in your cluster, your monitoring dashboard will
|
||||
show up here. This might take a few seconds.
|
||||
</p>
|
||||
</EuiText>
|
||||
<EuiSpacer />
|
||||
<EuiLoadingSpinner size="l" />
|
||||
<EuiSpacer />
|
||||
{stillWaiting}
|
||||
</Fragment>
|
||||
);
|
||||
|
||||
|
|
|
@ -199,18 +199,28 @@ exports[`ExplainCollectionInterval collection interval setting updates should sh
|
|||
data-test-subj="enableCollectionInterval"
|
||||
fill={true}
|
||||
iconSide="left"
|
||||
isLoading={true}
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<button
|
||||
className="euiButton euiButton--primary euiButton--fill"
|
||||
data-test-subj="enableCollectionInterval"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
className="euiButton__content"
|
||||
>
|
||||
<EuiLoadingSpinner
|
||||
className="euiButton__spinner"
|
||||
size="m"
|
||||
>
|
||||
<div
|
||||
className="euiLoadingSpinner euiLoadingSpinner--medium euiButton__spinner"
|
||||
/>
|
||||
</EuiLoadingSpinner>
|
||||
<span
|
||||
className="euiButton__text"
|
||||
>
|
||||
|
@ -367,6 +377,7 @@ exports[`ExplainCollectionInterval should explain about xpack.monitoring.collect
|
|||
data-test-subj="enableCollectionInterval"
|
||||
fill={true}
|
||||
iconSide="left"
|
||||
isLoading={false}
|
||||
onClick={[Function]}
|
||||
type="button"
|
||||
>
|
||||
|
|
|
@ -36,7 +36,7 @@ export class ExplainCollectionInterval extends React.Component {
|
|||
property,
|
||||
data,
|
||||
isCollectionIntervalUpdated,
|
||||
isCollectionEnabledUpdating
|
||||
isCollectionIntervalUpdating
|
||||
} = this.props;
|
||||
|
||||
const renderButton = () => (
|
||||
|
@ -68,7 +68,7 @@ export class ExplainCollectionInterval extends React.Component {
|
|||
onClick={this.handleClick}
|
||||
type="button"
|
||||
data-test-subj="enableCollectionInterval"
|
||||
isLoading={isCollectionEnabledUpdating}
|
||||
isLoading={isCollectionIntervalUpdating}
|
||||
>
|
||||
Turn on monitoring
|
||||
</EuiButton>
|
||||
|
|
|
@ -7,17 +7,6 @@ Array [
|
|||
>
|
||||
We couldn't activate monitoring
|
||||
</h2>,
|
||||
<span
|
||||
class="euiTextColor euiTextColor--subdued"
|
||||
>
|
||||
<div
|
||||
class="euiText"
|
||||
>
|
||||
<p>
|
||||
Here might be some things to check
|
||||
</p>
|
||||
</div>
|
||||
</span>,
|
||||
<hr
|
||||
class="euiHorizontalRule euiHorizontalRule--half euiHorizontalRule--marginLarge"
|
||||
/>,
|
||||
|
@ -25,13 +14,10 @@ Array [
|
|||
class="euiText noData__alignLeft"
|
||||
>
|
||||
<p>
|
||||
No Monitoring data could be found for the selected time period, but we could not find the cluster setting that makes the data unavailable.
|
||||
No monitoring data found. Try setting the time filter to "Last 1 hour" or check if data is available for a different time period.
|
||||
</p>
|
||||
<p>
|
||||
There may be data available for a different time period than we have selected. Try adjusting the time filter controls to a time range where the Monitoring data is expected.
|
||||
</p>
|
||||
<p>
|
||||
We are refreshing the search for data in the background. If cluster data is found, we will redirect to the cluster overview page.
|
||||
If data is in your cluster, your monitoring dashboards will show up here.
|
||||
</p>
|
||||
</div>,
|
||||
]
|
||||
|
|
|
@ -8,7 +8,6 @@ import React, { Fragment } from 'react';
|
|||
import {
|
||||
EuiText,
|
||||
EuiHorizontalRule,
|
||||
EuiTextColor,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
|
||||
|
@ -18,25 +17,14 @@ export function WeTried() {
|
|||
<EuiTitle size="l">
|
||||
<h2>We couldn't activate monitoring</h2>
|
||||
</EuiTitle>
|
||||
<EuiTextColor color="subdued">
|
||||
<EuiText>
|
||||
<p>Here might be some things to check</p>
|
||||
</EuiText>
|
||||
</EuiTextColor>
|
||||
<EuiHorizontalRule size="half" />
|
||||
<EuiText className="noData__alignLeft">
|
||||
<p>
|
||||
No Monitoring data could be found for the selected time period, but we
|
||||
could not find the cluster setting that makes the data unavailable.
|
||||
No monitoring data found. Try setting the time filter to "Last 1
|
||||
hour" or check if data is available for a different time period.
|
||||
</p>
|
||||
<p>
|
||||
There may be data available for a different time period than we have
|
||||
selected. Try adjusting the time filter controls to a time range where
|
||||
the Monitoring data is expected.
|
||||
</p>
|
||||
<p>
|
||||
We are refreshing the search for data in the background. If cluster data
|
||||
is found, we will redirect to the cluster overview page.
|
||||
If data is in your cluster, your monitoring dashboards will show up here.
|
||||
</p>
|
||||
</EuiText>
|
||||
</Fragment>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue