/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.securitySolution_bundle_jsonpfunction=window.securitySolution_bundle_jsonpfunction||[]).push([[39],{1672:function(e,t,n){"use strict";n.r(t),n.d(t,"EndpointGenericErrorsList",(function(){return k}));var i=n(2),o=n.n(i),r=n(40),a=n(102),c=n(0),s=n.n(c),u=n(5),d=n(215);const l=Object.freeze(new Map([["es_connection",u.i18n.translate("xpack.securitySolution.endpoint.details.packageActions.es_connection.title",{defaultMessage:"Elasticsearch connection failure"})],["policy_failure",u.i18n.translate("xpack.securitySolution.endpoint.details.packageActions.policy_failure.title",{defaultMessage:"Policy response failure"})]])),p=Object.freeze(new Map([["es_connection",u.i18n.translate("xpack.securitySolution.endpoint.details.packageActions.es_connection.description",{defaultMessage:"The endpoint's connection to Elasticsearch is either down or misconfigured. Make sure it is configured correctly."})],["policy_failure",u.i18n.translate("xpack.securitySolution.endpoint.details.packageActions.policy_failure.description",{defaultMessage:"The Endpoint did not apply the Policy correctly. Expand the Policy response above for more details."})]])),f=Object.freeze(new Map([["es_connection",u.i18n.translate("xpack.securitySolution.endpoint.details.packageActions.link.text.es_connection",{defaultMessage:" Read more."})]]));class package_action_formatter_PackageActionFormatter{constructor(e,t){var n,i,o,r,a;s()(this,"key",void 0),s()(this,"title",void 0),s()(this,"description",void 0),s()(this,"linkText",void 0),this.docLinks=t,this.key=this.getKeyFromErrorCode(null===(n=e.payload)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.code,e.status),this.title=null!==(o=l.get(this.key))&&void 0!==o?o:this.key,this.description=p.get(this.key)||(null===(r=e.payload)||void 0===r||null===(a=r.error)||void 0===a?void 0:a.message),this.linkText=f.get(this.key)}get linkUrl(){return this.docLinks[this.key]}getKeyFromErrorCode(e,t){if(e===d.j.ES_CONNECTION_ERROR||e===d.j.OUTPUT_SERVER_ERROR)return"es_connection";if("FAILED"===t||"DEGRADED"===t)return"policy_failure";throw new Error(`Invalid error code ${e}`)}}var E=n(41),m=n.n(E);const _=m()(r.EuiCallOut).withConfig({displayName:"StyledEuiCallout",componentId:"sc-huktdy-0"})(["padding:",";"],(({theme:e})=>e.eui.euiSizeS)),g=m()(r.EuiText).withConfig({displayName:"StyledEuiText",componentId:"sc-huktdy-1"})(["white-space:break-spaces;text-align:left;line-height:inherit;"]),h=Object(i.memo)((({actionFormatter:e})=>o.a.createElement(_,{title:e.title,color:"danger",iconType:"warning","data-test-subj":"packageItemErrorCallOut"},o.a.createElement(g,{size:"s","data-test-subj":"packageItemErrorCallOutMessage"},e.description,e.linkText&&e.linkUrl&&o.a.createElement(r.EuiLink,{target:"_blank",href:e.linkUrl,"data-test-subj":"packageItemErrorCallOutLink"},e.linkText)))));h.displayName="PackageActionItemError";const k=Object(i.memo)((({packageErrors:e})=>{const{docLinks:t}=Object(a.j)().services,n=Object(i.useMemo)((()=>{const n=[];return e.forEach((e=>{"FAILED"!==e.status&&"DEGRADED"!==e.status||n.push(new package_action_formatter_PackageActionFormatter(e,t.links.securitySolution.packageActionTroubleshooting))})),n}),[e,t.links.securitySolution.packageActionTroubleshooting]);return o.a.createElement(o.a.Fragment,null,n.map((e=>o.a.createElement(o.a.Fragment,{key:e.key},o.a.createElement(h,{actionFormatter:e}),o.a.createElement(r.EuiSpacer,{size:"m"})))))}));k.displayName="EndpointGenericErrorsList"},185:function(e,t,n){"use strict";let i,o,r,a,c,s,u;n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u})),function(e){e.windows="windows",e.mac="mac",e.linux="linux"}(i||(i={})),function(e){e.is="is",e.matches="matches"}(o||(o={})),function(e){e.enrolled="enrolled",e.unenrolled="unenrolled"}(r||(r={})),function(e){e.UNHEALTHY="unhealthy",e.HEALTHY="healthy",e.OFFLINE="offline",e.UPDATING="updating",e.INACTIVE="inactive",e.UNENROLLED="unenrolled"}(a||(a={})),function(e){e.detect="detect",e.prevent="prevent",e.off="off"}(c||(c={})),function(e){e.success="success",e.failure="failure",e.warning="warning",e.unsupported="unsupported"}(s||(s={})),function(e){e.ENROLLED_AT="enrolled_at",e.HOSTNAME="metadata.host.hostname",e.HOST_STATUS="host_status",e.POLICY_NAME="metadata.Endpoint.policy.applied.name",e.POLICY_STATUS="metadata.Endpoint.policy.applied.status",e.HOST_OS_NAME="metadata.host.os.name",e.HOST_IP="metadata.host.ip",e.AGENT_VERSION="metadata.agent.version",e.LAST_SEEN="last_checkin"}(u||(u={}))},215:function(e,t,n){"use strict";n.d(t,"z",(function(){return r})),n.d(t,"A",(function(){return a})),n.d(t,"B",(function(){return c})),n.d(t,"u",(function(){return s})),n.d(t,"q",(function(){return d})),n.d(t,"p",(function(){return l})),n.d(t,"t",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"v",(function(){return E})),n.d(t,"f",(function(){return m})),n.d(t,"r",(function(){return _})),n.d(t,"x",(function(){return g})),n.d(t,"o",(function(){return h})),n.d(t,"s",(function(){return k})),n.d(t,"w",(function(){return y})),n.d(t,"n",(function(){return O})),n.d(t,"m",(function(){return T})),n.d(t,"y",(function(){return S})),n.d(t,"e",(function(){return A})),n.d(t,"c",(function(){return N})),n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return R})),n.d(t,"i",(function(){return b})),n.d(t,"h",(function(){return I})),n.d(t,"j",(function(){return L})),n.d(t,"k",(function(){return x})),n.d(t,"l",(function(){return $}));var i=n(65),o=n(185);const r="logs-endpoint.events.*",a="metrics-endpoint.metadata_current_*",c="endpoint.metadata_current-default",s=".metrics-endpoint.metadata_united_default",u=(Object(i.getFileMetadataIndexName)("endpoint"),Object(i.getFileDataIndexName)("endpoint"),"/api/endpoint"),d=`${u}/metadata`,l=`${d}/{id}`,p=`${u}/metadata/transforms`,f=`${u}/policy_response`,E=`${u}/suggestions/{suggestion_type}`,m=`${u}/action`,_=`${m}/isolate`,g=`${m}/unisolate`,h=`${m}/running_procs`,k=`${m}/kill_process`,y=`${m}/suspend_process`,O=`${m}/get_file`,T=`${m}/execute`,S=`${m}/upload`,A=`${u}/action_status`,N=`${m}/{action_id}`,v=`${m}/{action_id}/file/{file_id}`,w=`${m}/{action_id}/file/{file_id}/download`,R=`${m}/state`,b=o.a.ENROLLED_AT,I="desc",L={ES_CONNECTION_ERROR:-272,OUTPUT_SERVER_ERROR:-273},x="endpointFields",$="endpointSearchStrategy"}}]);