(window.telemetryManagementSection_bundle_jsonpfunction=window.telemetryManagementSection_bundle_jsonpfunction||[]).push([[2],{12:function(e,t,s){e.exports=s(5)(1465)},13:function(e,t,s){"use strict";s.r(t),s.d(t,"OptInExampleFlyout",(function(){return opt_in_example_flyout_OptInExampleFlyout}));var i=s(12),a=s.n(i),o=s(0),l=s(3),r=s(9),n=s(1);const c=Object(n.jsx)(l.EuiFlexGroup,{justifyContent:"spaceAround"},Object(n.jsx)(l.EuiFlexItem,{grow:!1},Object(n.jsx)(l.EuiLoadingSpinner,{size:"xl"})));class opt_in_example_flyout_OptInExampleFlyout extends o.PureComponent{constructor(...e){super(...e),a()(this,"_isMounted",!1),a()(this,"state",{data:null,isLoading:!0,hasPrivilegeToRead:!1})}async componentDidMount(){this._isMounted=!0;try{const{fetchExample:e}=this.props,t=await e();this._isMounted&&this.setState({data:Array.isArray(t)?t:null,isLoading:!1,hasPrivilegeToRead:!0})}catch(e){this.setState({isLoading:!1,hasPrivilegeToRead:403!==e.status})}}componentWillUnmount(){this._isMounted=!1}renderBody({data:e,isLoading:t,hasPrivilegeToRead:s}){return t?c:s?null===e?Object(n.jsx)(l.EuiCallOut,{title:Object(n.jsx)(r.FormattedMessage,{id:"telemetry.callout.errorLoadingClusterStatisticsTitle",defaultMessage:"Error loading cluster statistics"}),color:"danger",iconType:"cross"},Object(n.jsx)(r.FormattedMessage,{id:"telemetry.callout.errorLoadingClusterStatisticsDescription",defaultMessage:"An unexpected error occurred while attempting to fetch the cluster statistics. This can occur because Elasticsearch failed, Kibana failed, or there is a network error. Check Kibana, then reload the page and try again."})):Object(n.jsx)(l.EuiCodeBlock,{language:"json",isCopyable:!0},JSON.stringify(e,null,2)):Object(n.jsx)(l.EuiCallOut,{title:Object(n.jsx)(r.FormattedMessage,{id:"telemetry.callout.errorUnprivilegedUserTitle",defaultMessage:"Error displaying cluster statistics"}),color:"danger",iconType:"cross"},Object(n.jsx)(r.FormattedMessage,{id:"telemetry.callout.errorUnprivilegedUserDescription",defaultMessage:"You do not have access to see unencrypted cluster statistics."}))}render(){return Object(n.jsx)(l.EuiPortal,null,Object(n.jsx)(l.EuiFlyout,{ownFocus:!0,onClose:this.props.onClose,maxWidth:!0},Object(n.jsx)(l.EuiFlyoutHeader,null,Object(n.jsx)(l.EuiTitle,null,Object(n.jsx)("h2",null,Object(n.jsx)(r.FormattedMessage,{id:"telemetry.callout.clusterStatisticsTitle",defaultMessage:"Cluster statistics"}))),Object(n.jsx)(l.EuiTextColor,{color:"subdued"},Object(n.jsx)(l.EuiText,null,Object(n.jsx)(r.FormattedMessage,{id:"telemetry.callout.clusterStatisticsDescription",defaultMessage:"This is an example of the basic cluster statistics that we'll collect. It includes the number of indices, shards, and nodes. It also includes high-level usage statistics, such as whether monitoring is turned on."})))),Object(n.jsx)(l.EuiFlyoutBody,null,this.renderBody(this.state))))}}}}]);