(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{4727:function(e,t,a){"use strict";var r,s;a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return s})),function(e){e.success="Success",e.working="Working",e.error="Error",e.noop="Not triggered",e.grace="On Grace"}(r||(r={})),function(e){e.email="Email",e.slack="Slack"}(s||(s={}))},4766:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var r=a(40),s=a(13),c=(a(0),a(51)),o=a(31),n=a(4727),l=a(1);function i(e,t,a){switch(e){case n.a.working:return a.colors.primary.base;case n.a.error:return a.colors.error.base;case n.a.success:return t?a.colors.success.base:a.colors.alert.base;case n.a.noop:return a.colors.success.base;case n.a.grace:return a.colors.alert.base;default:return a.colors.grayscale.base}}function u({state:e,isReportEnabled:t=!1}){const a=Object(r.i)(),u={icon:o.a.Check,label:"",status:""};switch(e){case n.a.success:u.icon=t?o.a.Check:o.a.AlertSolidSmall,u.label=t?Object(s.e)("Report sent"):Object(s.e)("Alert triggered, notification sent"),u.status=n.a.success;break;case n.a.working:u.icon=o.a.Running,u.label=t?Object(s.e)("Report sending"):Object(s.e)("Alert running"),u.status=n.a.working;break;case n.a.error:u.icon=o.a.XSmall,u.label=t?Object(s.e)("Report failed"):Object(s.e)("Alert failed"),u.status=n.a.error;break;case n.a.noop:u.icon=o.a.Check,u.label=Object(s.e)("Nothing triggered"),u.status=n.a.noop;break;case n.a.grace:u.icon=o.a.AlertSolidSmall,u.label=Object(s.e)("Alert Triggered, In Grace Period"),u.status=n.a.grace;break;default:u.icon=o.a.Check,u.label=Object(s.e)("Nothing triggered"),u.status=n.a.noop}const b=u.icon;return Object(l.jsx)(c.a,{title:u.label,placement:"bottomLeft"},Object(l.jsx)(b,{iconColor:i(u.status,t,a)}))}},5043:function(e,t,a){"use strict";a.r(t);var r=a(36),s=a.n(r),c=a(40),o=a(13),n=a(37),l=a.n(n),i=a(0),u=a.n(i),b=a(365),d=a(349),g=a(4669),j=a(720),O=a(142),m=a(187),f=a(4766),p=a(418),w=a(1);const k=c.g.div`
  display: flex;
  flex-direction: row;

  a,
  Link {
    margin-left: 16px;
    font-size: 12px;
    font-weight: normal;
    text-decoration: underline;
  }
`;t.default=Object(O.a)((function({addDangerToast:e,isReportEnabled:t}){const{alertId:a}=Object(b.g)(),{state:{loading:r,resourceCount:c,resourceCollection:n},fetchData:O}=Object(p.k)(`report/${a}/log`,Object(o.e)("log"),e,!1),{state:{loading:h,resource:x},fetchResource:S}=Object(p.l)("report",Object(o.e)("reports"),e);Object(i.useEffect)(()=>{null===a||h||S(a)},[a]);const C=Object(i.useMemo)(()=>[{Cell:({row:{original:{state:e}}})=>Object(w.jsx)(f.a,{state:e,isReportEnabled:t}),accessor:"state",Header:Object(o.e)("State"),size:"xs",disableSortBy:!0},{Cell:({row:{original:{uuid:e}}})=>e?s()(e).call(e,0,6):"none",accessor:"uuid",Header:Object(o.e)("Execution ID"),size:"xs",disableSortBy:!0},{Cell:({row:{original:{scheduled_dttm:e}}})=>l()(new Date(e)).format("YYYY-MM-DD hh:mm:ss a"),accessor:"scheduled_dttm",Header:Object(o.e)("Scheduled at (UTC)")},{Cell:({row:{original:{start_dttm:e}}})=>l()(new Date(e)).format("YYYY-MM-DD hh:mm:ss a"),Header:Object(o.e)("Start at (UTC)"),accessor:"start_dttm"},{Cell:({row:{original:{start_dttm:e,end_dttm:t}}})=>Object(m.d)(new Date(e).getTime(),new Date(t).getTime()),Header:Object(o.e)("Duration"),disableSortBy:!0},{accessor:"value",Header:Object(o.e)("Value")},{accessor:"error_message",Header:Object(o.e)("Error message")}],[t]),D=`/${t?"report":"alert"}/list/`;return Object(w.jsx)(u.a.Fragment,null,Object(w.jsx)(j.a,{name:Object(w.jsx)(k,null,Object(w.jsx)("span",null,Object(o.e)(`${null==x?void 0:x.type}`)," ",null==x?void 0:x.name),Object(w.jsx)("span",null,Object(w.jsx)(d.b,{to:D},"Back to all")))}),Object(w.jsx)(g.b,{className:"execution-log-list-view",columns:C,count:c,data:n,fetchData:O,initialSort:[{id:"start_dttm",desc:!0}],loading:r,pageSize:25}))}))}}]);