/*! 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.uptime_bundle_jsonpfunction=window.uptime_bundle_jsonpfunction||[]).push([[13],{121:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(23),s=n(52),r=n(65);const i=({query:e,filters:t})=>{const n=void 0===t||"string"==typeof t?"":JSON.stringify(Array.from(Object.entries(t))),[i,o]=Object(s.c)(e,n,void 0,!0),{data:c,loading:u}=Object(a.useFetcher)((()=>Object(r.i)({dateRangeStart:"now-24h",dateRangeEnd:"now",filters:o?void 0:i})),[i,e]);return{count:c||{total:0,up:0,down:0},loading:u}}},237:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return R}));var a=n(57),s=n.n(a),r=n(1),i=n.n(r),o=n(50),c=n(21),u=n(99),l=n(66),d=n(62),f=n(53),m=n(100),b=n(55),O=n(60),v=n(121),j=n(51);const{TYPE:g,TAGS:p,LOCATION:h,PORT:E}=j.j,w=({id:e,enabled:t,numTimes:n,setRuleParams:a,timerange:s,ruleParams:c,stackVersion:u})=>{const l=Object(o.useDispatch)();Object(r.useEffect)((()=>{c.search&&l(Object(b.z)(c.search))}),[c,l]),Object(r.useEffect)((()=>{e||!u||c.stackVersion||a("stackVersion",u)}),[c,e,u,a]);const{count:j,loading:w}=Object(v.a)({query:c.search,filters:c.filters}),P=i.a.useMemo((()=>Object.entries(c).length>0&&!Object(d.isRight)(O.a.decode(c))&&!Object(d.isRight)(O.e.decode(c))),[c]),R=Object(o.useSelector)(f.C);return Object(r.useEffect)((()=>{var e,t,n,s;c.filters||null===R||a("filters",{[E]:null!==(e=null==R?void 0:R.ports)&&void 0!==e?e:[],[h]:null!==(t=null==R?void 0:R.locations)&&void 0!==t?t:[],[g]:null!==(n=null==R?void 0:R.schemes)&&void 0!==n?n:[],[p]:null!==(s=null==R?void 0:R.tags)&&void 0!==s?s:[]})}),[c,a,R]),i.a.createElement(m.b,{ruleParams:c,enabled:t,isOldAlert:P,numTimes:n,setRuleParams:a,snapshotCount:j.total,snapshotLoading:w,timerange:s})};var P=n(64);function R({core:e,plugins:t,params:n,stackVersion:a}){return l.a.core=e,i.a.createElement(o.Provider,{store:u.b},i.a.createElement(c.KibanaContextProvider,{services:{...e,...t}},i.a.createElement(P.a,{dataViews:t.dataViews},i.a.createElement(w,s()({},n,{autocomplete:t.unifiedSearch.autocomplete,stackVersion:a})))))}}}]);