"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[9137],{25163:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var a=r(51995),s=r(11965),o=r(61988),l=r(30381),n=r.n(l),c=r(67294),i=r(5977),u=r(73727),d=r(98289),g=r(20755),Z=r(14114),m=r(1836),p=r(46714),b=r(34858);const h=a.iK.div`
  ${({theme:e})=>s.iv`
    display: flex;
    flex-direction: row;

    a,
    Link {
      margin-left: ${4*e.gridUnit}px;
      font-size: ${e.typography.sizes.s};
      font-weight: ${e.typography.weights.normal};
      text-decoration: underline;
    }
  `}
`,f=(0,Z.ZP)((function({addDangerToast:e,isReportEnabled:t}){const{alertId:r}=(0,i.UO)(),{state:{loading:a,resourceCount:l,resourceCollection:Z},fetchData:f}=(0,b.Yi)(`report/${r}/log`,(0,o.t)("log"),e,!1),{state:{loading:k,resource:S},fetchResource:w}=(0,b.LE)("report",(0,o.t)("reports"),e);(0,c.useEffect)((()=>{null===r||k||w(r)}),[r]);const C=(0,c.useMemo)((()=>[{Cell:({row:{original:{state:e}}})=>(0,s.tZ)(p.Z,{state:e,isReportEnabled:t}),accessor:"state",Header:(0,o.t)("State"),size:"xs",disableSortBy:!0},{Cell:({row:{original:{uuid:e}}})=>e?e.slice(0,6):"none",accessor:"uuid",Header:(0,o.t)("Execution ID"),size:"xs",disableSortBy:!0},{Cell:({row:{original:{scheduled_dttm:e}}})=>n()(new Date(e)).format("YYYY-MM-DD hh:mm:ss a"),accessor:"scheduled_dttm",Header:(0,o.t)("Scheduled at (UTC)")},{Cell:({row:{original:{start_dttm:e}}})=>n()(new Date(e)).format("YYYY-MM-DD hh:mm:ss a"),Header:(0,o.t)("Start at (UTC)"),accessor:"start_dttm"},{Cell:({row:{original:{start_dttm:e,end_dttm:t}}})=>(0,m.zQ)(new Date(e).getTime(),new Date(t).getTime()),Header:(0,o.t)("Duration"),disableSortBy:!0},{accessor:"value",Header:(0,o.t)("Value")},{accessor:"error_message",Header:(0,o.t)("Error message")}]),[t]),E=`/${t?"report":"alert"}/list/`;return(0,s.tZ)(c.Fragment,null,(0,s.tZ)(g.Z,{name:(0,s.tZ)(h,null,(0,s.tZ)("span",null,null==S?void 0:S.type," ",null==S?void 0:S.name),(0,s.tZ)("span",null,(0,s.tZ)(u.rU,{to:E},"Back to all")))}),(0,s.tZ)(d.Z,{className:"execution-log-list-view",columns:C,count:l,data:Z,fetchData:f,initialSort:[{id:"start_dttm",desc:!0}],loading:a,pageSize:25}))}))},46714:(e,t,r)=>{r.d(t,{Z:()=>u});var a=r(51995),s=r(61988),o=(r(67294),r(58593)),l=r(70163),n=r(28745),c=r(11965);function i(e,t,r){switch(e){case n.Z.Working:return r.colors.primary.base;case n.Z.Error:return r.colors.error.base;case n.Z.Success:return t?r.colors.success.base:r.colors.alert.base;case n.Z.Noop:return r.colors.success.base;case n.Z.Grace:return r.colors.alert.base;default:return r.colors.grayscale.base}}function u({state:e,isReportEnabled:t=!1}){const r=(0,a.Fg)(),u={icon:l.Z.Check,label:"",status:""};switch(e){case n.Z.Success:u.icon=t?l.Z.Check:l.Z.AlertSolidSmall,u.label=t?(0,s.t)("Report sent"):(0,s.t)("Alert triggered, notification sent"),u.status=n.Z.Success;break;case n.Z.Working:u.icon=l.Z.Running,u.label=t?(0,s.t)("Report sending"):(0,s.t)("Alert running"),u.status=n.Z.Working;break;case n.Z.Error:u.icon=l.Z.XSmall,u.label=t?(0,s.t)("Report failed"):(0,s.t)("Alert failed"),u.status=n.Z.Error;break;case n.Z.Noop:u.icon=l.Z.Check,u.label=(0,s.t)("Nothing triggered"),u.status=n.Z.Noop;break;case n.Z.Grace:u.icon=l.Z.AlertSolidSmall,u.label=(0,s.t)("Alert Triggered, In Grace Period"),u.status=n.Z.Grace;break;default:u.icon=l.Z.Check,u.label=(0,s.t)("Nothing triggered"),u.status=n.Z.Noop}const d=u.icon;return(0,c.tZ)(o.u,{title:u.label,placement:"bottomLeft"},(0,c.tZ)(d,{iconColor:i(u.status,t,r)}))}},28745:(e,t,r)=>{var a,s;r.d(t,{Z:()=>a,u:()=>s}),function(e){e.Success="Success",e.Working="Working",e.Error="Error",e.Noop="Not triggered",e.Grace="On Grace"}(a||(a={})),function(e){e.Email="Email",e.Slack="Slack"}(s||(s={}))}}]);