"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3098],{64047:(F,w,n)=>{n.d(w,{e:()=>a});var e=n(96540),M=n(55852);const a=({isCollapsed:u,onToggle:I,idControlled:R,className:p,text:S,size:O="xl",...$})=>e.createElement(M.$n,{type:"button",fill:"text",variant:"secondary","aria-expanded":!u,"aria-controls":R,className:p,icon:u?"angle-right":"angle-down",onClick:()=>I(!u),...$},S)},14591:(F,w,n)=>{n.d(w,{i:()=>I});var e=n(32196),M=n(96540),a=n(40845),u=n(64047);const I=({label:p,description:S,children:O,className:$,size:N="xl"})=>{const E=(0,a.of)(R),[T,U]=(0,M.useState)(!0),s=()=>U(!T);return M.createElement("div",{className:(0,e.cx)(E.wrapper,$)},M.createElement(u.e,{className:E.toggle,size:N,onToggle:s,isCollapsed:T,text:p}),S&&M.createElement("p",{className:E.description},S),M.createElement("div",{className:T?E.hidden:E.content},O))},R=p=>({wrapper:(0,e.css)`
    margin-top: ${p.spacing(1)};
    padding-bottom: ${p.spacing(1)};
  `,toggle:(0,e.css)`
    margin: ${p.spacing(1,0)};
    padding: 0;
  `,hidden:(0,e.css)`
    display: none;
  `,description:(0,e.css)`
    color: ${p.colors.text.secondary};
    font-size: ${p.typography.size.sm};
    font-weight: ${p.typography.fontWeightRegular};
    margin: 0;
  `,content:(0,e.css)`
    padding-left: ${p.spacing(3)};
  `})},71854:(F,w,n)=>{n.d(w,{e:()=>B});var e=n(32196),M=n(2543),a=n(96540),u=n(49785),I=n(88575),R=n(40845),p=n(10880),S=n(10354),O=n(88323),$=n(5173),N=n(21744),E=n(55852),T=n(72275);const U=({value:t,onChange:f,readOnly:c=!1})=>{const P=(0,R.of)(s),[_,d]=(0,a.useState)(r(t));(0,a.useEffect)(()=>d(r(t)),[t]);const m=A=>{f(i(A))},k=A=>{const C=_.slice(),x=C.splice(A,1)[0];d(C),x[0]&&m(C)},b=(A,C)=>{const x=_[C],h=_.map((y,W)=>W===C?A:y);d(h),(A[0]||x[0])&&m(h)};return a.createElement("div",null,!!_.length&&a.createElement("table",{className:P.table},a.createElement("thead",null,a.createElement("tr",null,a.createElement("th",null,"Name"),a.createElement("th",null,"Value"),!c&&a.createElement("th",null))),a.createElement("tbody",null,_.map(([A,C],x)=>a.createElement("tr",{key:x},a.createElement("td",null,a.createElement(S.p,{readOnly:c,value:A,onChange:h=>b([h.currentTarget.value,C],x)})),a.createElement("td",null,a.createElement(S.p,{readOnly:c,value:C,onChange:h=>b([A,h.currentTarget.value],x)})),!c&&a.createElement("td",null,a.createElement(T.M,{icon:"trash-alt",tooltip:"delete",onClick:()=>k(x)})))))),!c&&a.createElement(E.$n,{className:P.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>d([..._,["",""]])},"Add"))},s=t=>({addButton:(0,e.css)`
    margin-top: ${t.spacing(1)};
  `,table:(0,e.css)`
    tbody td {
      padding: 0 ${t.spacing(1)} ${t.spacing(1)} 0;
    }
  `}),i=t=>{const f={};for(const[c,P]of t)c&&(f[c]=P);return f},r=t=>Object.entries(t??{}),o=({value:t,onChange:f,readOnly:c=!1})=>{const P=(0,R.of)(l),_=m=>{if(!t)return;const k=t.slice();k.splice(m,1),f(k)},d=(m,k)=>{t&&f(t.map((b,A)=>A===k?m:b))};return a.createElement("div",null,!!t?.length&&t.map((m,k)=>a.createElement("div",{key:k,className:P.row},a.createElement(S.p,{readOnly:c,value:m,onChange:b=>d(b.currentTarget.value,k)}),!c&&a.createElement(T.M,{className:P.deleteIcon,icon:"trash-alt",tooltip:"delete",onClick:()=>_(k)}))),!c&&a.createElement(E.$n,{className:P.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>f([...t??[],""])},"Add"))},l=t=>({row:(0,e.css)`
    display: flex;
    flex-direction: row;
    margin-bottom: ${t.spacing(1)};
    align-items: center;
  `,deleteIcon:(0,e.css)`
    margin-left: ${t.spacing(1)};
  `,addButton:(0,e.css)`
    margin-top: ${t.spacing(1)};
  `});var g=n(45124),v=n(14591);const L=t=>({collapsibleSection:(0,e.css)`
    margin: 0;
    padding: 0;
  `,wrapper:(0,e.css)`
    margin: ${t.spacing(2,0)};
    padding: ${t.spacing(1)};
    border: solid 1px ${t.colors.border.medium};
    border-radius: ${t.shape.radius.default};
    position: relative;
  `,description:(0,e.css)`
    color: ${t.colors.text.secondary};
    font-size: ${t.typography.size.sm};
    font-weight: ${t.typography.fontWeightRegular};
    margin: 0;
  `,deleteIcon:(0,e.css)`
    position: absolute;
    right: ${t.spacing(1)};
    top: ${t.spacing(1)};
  `,addButton:(0,e.css)`
    margin-top: ${t.spacing(1)};
  `}),D=({option:t,pathPrefix:f,errors:c,defaultValues:P,readOnly:_=!1})=>{const d=(0,R.of)(L),m=`${f}${t.propertyName}`,k=(0,u.xW)(),{fields:b,append:A,remove:C}=(0,g.r)({name:m,formAPI:k,defaults:P});return a.createElement("div",{className:d.wrapper},a.createElement(v.i,{className:d.collapsibleSection,label:`${t.label} (${b.length})`,description:t.description},(b??P??[]).map((x,h)=>a.createElement("div",{key:h,className:d.wrapper},!_&&a.createElement(T.M,{"data-testid":`${m}.${h}.delete-button`,icon:"trash-alt",tooltip:"delete",onClick:()=>C(h),className:d.deleteIcon}),t.subformOptions?.map(y=>a.createElement(B,{readOnly:_,defaultValue:x?.[y.propertyName],key:y.propertyName,option:y,pathPrefix:`${m}.${h}.`,error:c?.[h]?.[y.propertyName]})))),!_&&a.createElement(E.$n,{"data-testid":`${m}.add-button`,className:d.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>A({__id:String(Math.random())})},"Add")))},V=({option:t,pathPrefix:f,errors:c,defaultValue:P,readOnly:_=!1})=>{const d=(0,R.of)(L),m=`${f}${t.propertyName}`,{watch:k}=(0,u.xW)(),b=k(m),A=b===void 0?P:b,[C,x]=(0,a.useState)(!!A);return a.createElement("div",{className:d.wrapper,"data-testid":`${m}.container`},a.createElement("h6",null,t.label),t.description&&a.createElement("p",{className:d.description},t.description),C&&a.createElement(a.Fragment,null,!_&&a.createElement(T.M,{"data-testid":`${m}.delete-button`,icon:"trash-alt",tooltip:"delete",onClick:()=>x(!1),className:d.deleteIcon}),(t.subformOptions??[]).map(h=>a.createElement(B,{readOnly:_,defaultValue:P?.[h.propertyName],key:h.propertyName,option:h,pathPrefix:`${m}.`,error:c?.[h.propertyName]}))),!C&&!_&&a.createElement(E.$n,{className:d.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>x(!0),"data-testid":`${m}.add-button`},"Add"))},B=({option:t,invalid:f,pathPrefix:c,pathSuffix:P="",error:_,defaultValue:d,readOnly:m=!1,customValidator:k})=>{const b=`${c}${P}`;return t.element==="subform"?a.createElement(V,{readOnly:m,defaultValue:d,option:t,errors:_,pathPrefix:b}):t.element==="subform_array"?a.createElement(D,{readOnly:m,defaultValues:d,option:t,pathPrefix:b,errors:_}):a.createElement(I.D,{label:t.element!=="checkbox"&&t.element!=="radio"?t.label:void 0,description:t.description||void 0,invalid:!!_,error:_?.message,"data-testid":`${b}${t.propertyName}`},a.createElement(q,{id:`${b}${t.propertyName}`,defaultValue:d,option:t,invalid:f,pathPrefix:b,readOnly:m,pathIndex:c,customValidator:k}))},q=({option:t,invalid:f,id:c,pathPrefix:P="",pathIndex:_="",readOnly:d=!1,customValidator:m})=>{const k=(0,R.of)(K),{control:b,register:A,unregister:C,getValues:x}=(0,u.xW)(),h=`${P}${t.propertyName}`;switch((0,a.useEffect)(()=>()=>{C(h,{keepValue:!1})},[C,h]),t.element){case"checkbox":return a.createElement(p.S,{id:c,readOnly:d,disabled:d,className:k.checkbox,...A(h),label:t.label,description:t.description});case"input":return a.createElement(S.p,{id:c,readOnly:d||H(t,x,_),invalid:f,type:t.inputType,...A(h,{required:G(t,x,_),validate:{validationRule:y=>t.validationRule?z(y,t.validationRule,t.required):!0,customValidator:y=>m?m(y):!0},setValueAs:t.setValueAs}),placeholder:t.placeholder});case"select":return a.createElement(u.xI,{render:({field:{onChange:y,ref:W,...j}})=>a.createElement(O.l6,{disabled:d,options:t.selectOptions??void 0,invalid:f,onChange:Y=>y(Y.value),...j}),control:b,name:h,defaultValue:t.defaultValue,rules:{validate:{customValidator:y=>m?m(y):!0}}});case"radio":return a.createElement(a.Fragment,null,a.createElement("legend",{className:k.legend},t.label),a.createElement(u.xI,{render:({field:{ref:y,...W}})=>a.createElement($.a,{disabled:d,options:t.selectOptions??[],...W}),control:b,defaultValue:t.defaultValue?.value,name:h,rules:{required:t.required?"Option is required":!1,validate:{validationRule:y=>t.validationRule?z(y,t.validationRule,t.required):!0,customValidator:y=>m?m(y):!0}}}));case"textarea":return a.createElement(N.f,{id:c,readOnly:d,invalid:f,placeholder:t.placeholder,...A(h,{required:t.required?"Required":!1,validate:y=>t.validationRule!==""?z(y,t.validationRule,t.required):!0})});case"string_array":return a.createElement(u.xI,{render:({field:{value:y,onChange:W}})=>a.createElement(o,{readOnly:d,value:y,onChange:W}),control:b,name:h});case"key_value_map":return a.createElement(u.xI,{render:({field:{value:y,onChange:W}})=>a.createElement(U,{readOnly:d,value:y,onChange:W}),control:b,name:h});default:return console.error("Element not supported",t.element),null}},K=t=>({checkbox:(0,e.css)`
    height: auto; // native checkbox has fixed height which does not take into account description
  `,legend:(0,e.css)`
    font-size: ${t.typography.h6.fontSize};
  `}),z=(t,f,c)=>t===""&&!c||RegExp(f).test(t)?!0:"Invalid format",G=(t,f,c)=>t.dependsOn?(0,M.isEmpty)(f(`${c}secureFields`))?!f(`${c}secureSettings.${t.dependsOn}`)&&t.required?"Required":!1:!f(`${c}secureFields.${t.dependsOn}`)&&t.required?"Required":!1:t.required?"Required":!1,H=(t,f,c)=>t.dependsOn?(0,M.isEmpty)(f(`${c}secureFields`))?f(`${c}secureSettings.${t.dependsOn}`):f(`${c}secureFields.${t.dependsOn}`):!1},72275:(F,w,n)=>{n.d(w,{M:()=>u});var e=n(96540),M=n(56034),a=n(55852);const u=({tooltip:I,icon:R,to:p,target:S,onClick:O,className:$,tooltipPlacement:N="top",...E})=>{const T=typeof I=="string"?I:void 0;return e.createElement(M.m,{content:I,placement:N},p?e.createElement(a.z9,{variant:"secondary",fill:"text",icon:R,href:p,size:"sm",target:S,...E,"aria-label":T}):e.createElement(a.$n,{className:$,variant:"secondary",fill:"text",size:"sm",icon:R,type:"button",onClick:O,...E,"aria-label":T}))}},45124:(F,w,n)=>{n.d(w,{r:()=>I});var e=n(2543),M=n.n(e),a=n(96540);const u=[];function I(R){const{name:p,formAPI:S,defaults:O,softDelete:$}=R,{watch:N,getValues:E,reset:T,setValue:U}=S,s=N(p)??O??u,i=(0,a.useCallback)(r=>{const o=JSON.parse(JSON.stringify(E())),l=r(s??[]);T((0,e.set)(o,p,l))},[E,p,T,s]);return{fields:s,append:(0,a.useCallback)(r=>i(o=>[...o,r]),[i]),remove:(0,a.useCallback)(r=>{$?U(`${p}.${r}.__deleted`,!0):i(o=>{const l=o.slice();return l.splice(r,1),l})},[i,p,U,$])}}},21607:(F,w,n)=>{n.d(w,{U:()=>R,r:()=>I});var e=n(79851);const M=(0,e.u)("basic_auth","Basic auth","Sets the `Authorization` header with the configured username and password. Password and password_file are mutually exclusive.",{element:"subform",subformOptions:[(0,e.u)("username","Username",""),(0,e.u)("password","Password",""),(0,e.u)("password_file","Password file","")]}),a=(0,e.u)("tls_config","TLS config","Configures the TLS settings.",{element:"subform",subformOptions:[(0,e.u)("ca_file","CA file","CA certificate to validate the server certificate with."),(0,e.u)("cert_file","Cert file","Certificate for client cert authentication to the server."),(0,e.u)("key_file","Key file","Key file for client cert authentication to the server."),(0,e.u)("server_name","Server name","ServerName extension to indicate the name of the server."),(0,e.u)("insecure_skip_verify","Skip verify","Disable validation of the server certificate.",{element:"checkbox"})]}),u=(0,e.u)("http_config","HTTP Config","Note that `basic_auth`, `bearer_token` and `bearer_token_file` options are mutually exclusive.",{element:"subform",subformOptions:[(0,e.u)("bearer_token","Bearer token","Sets the `Authorization` header with the configured bearer token."),(0,e.u)("bearer_token_file","Bearer token file","Sets the `Authorization` header with the bearer token read from the configured file."),(0,e.u)("proxy_url","Proxy URL","Optional proxy URL."),M,a]}),I=[{name:"Email",description:"Send notification over SMTP",type:"email",info:"",heading:"Email settings",options:[(0,e.u)("to","To",'The email address to send notifications to. You can enter multiple addresses using a "," separator',{required:!0}),(0,e.u)("from","From","The sender address."),(0,e.u)("smarthost","SMTP host","The SMTP host through which emails are sent."),(0,e.u)("hello","Hello","The hostname to identify to the SMTP server."),(0,e.u)("auth_username","Username","SMTP authentication information"),(0,e.u)("auth_password","Password","SMTP authentication information"),(0,e.u)("auth_secret","Secret","SMTP authentication information"),(0,e.u)("auth_identity","Identity","SMTP authentication information"),(0,e.u)("require_tls","Require TLS","The SMTP TLS requirement",{element:"checkbox"}),(0,e.u)("html","Email HTML body","The HTML body of the email notification.",{placeholder:'{{ template "email.default.html" . }}',element:"textarea"}),(0,e.u)("text","Email text body","The text body of the email notification.",{element:"textarea"}),(0,e.u)("headers","Headers","Further headers email header key/value pairs. Overrides any headers previously set by the notification implementation.",{element:"key_value_map"}),a]},{name:"PagerDuty",description:"Send notifications to PagerDuty",type:"pagerduty",info:"",heading:"PagerDuty settings",options:[(0,e.u)("routing_key","Routing key","The PagerDuty integration key (when using PagerDuty integration type `Events API v2`)"),(0,e.u)("service_key","Service key","The PagerDuty integration key (when using PagerDuty integration type `Prometheus`)."),(0,e.u)("url","URL","The URL to send API requests to"),(0,e.u)("client","Client","The client identification of the Alertmanager.",{placeholder:'{{ template "pagerduty.default.client" . }}'}),(0,e.u)("client_url","Client URL","A backlink to the sender of the notification.",{placeholder:'{{ template "pagerduty.default.clientURL" . }}'}),(0,e.u)("description","Description","A description of the incident.",{placeholder:'{{ template "pagerduty.default.description" .}}'}),(0,e.u)("severity","Severity","Severity of the incident.",{placeholder:"error"}),(0,e.u)("details","Details","A set of arbitrary key/value pairs that provide further detail about the incident.",{element:"key_value_map"}),(0,e.u)("images","Images","Images to attach to the incident.",{element:"subform_array",subformOptions:[(0,e.u)("href","URL","",{required:!0}),(0,e.u)("source","Source","",{required:!0}),(0,e.u)("alt","Alt","",{required:!0})]}),(0,e.u)("links","Links","Links to attach to the incident.",{element:"subform_array",subformOptions:[(0,e.u)("href","URL","",{required:!0}),(0,e.u)("text","Text","",{required:!0})]}),u]},{name:"Pushover",description:"Send notifications to Pushover",type:"pushover",info:"",heading:"Pushover settings",options:[(0,e.u)("user_key","User key","The recipient user\u2019s user key.",{required:!0}),(0,e.u)("token","Token","Your registered application\u2019s API token, see https://pushover.net/app",{required:!0}),(0,e.u)("title","Title","Notification title.",{placeholder:'{{ template "pushover.default.title" . }}'}),(0,e.u)("message","Message","Notification message.",{placeholder:'{{ template "pushover.default.message" . }}'}),(0,e.u)("url","URL","A supplementary URL shown alongside the message.",{placeholder:'{{ template "pushover.default.url" . }}'}),(0,e.u)("priority","Priority","Priority, see https://pushover.net/api#priority",{placeholder:'{{ if eq .Status "firing" }}2{{ else }}0{{ end }}'}),(0,e.u)("retry","Retry","How often the Pushover servers will send the same notification to the user. Must be at least 30 seconds.",{placeholder:"1m"}),(0,e.u)("expire","Expire","How long your notification will continue to be retried for, unless the user acknowledges the notification.",{placeholder:"1h"}),(0,e.u)("ttl","TTL","The number of seconds before a message expires and is deleted automatically. Examples: 10s, 5m30s, 8h.",{validationRule:"^(\\d+[s|m|h])+$|^$",element:"input"}),u]},{name:"Slack",description:"Send notifications to Slack",type:"slack",info:"",heading:"Slack settings",options:[(0,e.u)("api_url","Webhook URL","The Slack webhook URL."),(0,e.u)("channel","Channel","The #channel or @user to send notifications to.",{required:!0}),(0,e.u)("icon_emoji","Emoji icon",""),(0,e.u)("icon_url","Icon URL",""),(0,e.u)("link_names","Names link","",{element:"checkbox"}),(0,e.u)("username","Username","",{placeholder:'{{ template "slack.default.username" . }}'}),(0,e.u)("callback_id","Callback ID","",{placeholder:'{{ template "slack.default.callbackid" . }}'}),(0,e.u)("color","Color","",{placeholder:'{{ if eq .Status "firing" }}danger{{ else }}good{{ end }}'}),(0,e.u)("fallback","Fallback","",{placeholder:'{{ template "slack.default.fallback" . }}'}),(0,e.u)("footer","Footer","",{placeholder:'{{ template "slack.default.footer" . }}'}),(0,e.u)("mrkdwn_in","Mrkdwn fields","An array of field names that should be formatted by mrkdwn syntax.",{element:"string_array"}),(0,e.u)("pretext","Pre-text","",{placeholder:'{{ template "slack.default.pretext" . }}'}),(0,e.u)("short_fields","Short fields","",{element:"checkbox"}),(0,e.u)("text","Message body","",{element:"textarea",placeholder:'{{ template "slack.default.text" . }}'}),(0,e.u)("title","Title","",{placeholder:'{{ template "slack.default.title" . }}'}),(0,e.u)("title_link","Title link","",{placeholder:'{{ template "slack.default.titlelink" . }}'}),(0,e.u)("image_url","Image URL",""),(0,e.u)("thumb_url","Thumbnail URL",""),(0,e.u)("actions","Actions","",{element:"subform_array",subformOptions:[(0,e.u)("text","Text","",{required:!0}),(0,e.u)("type","Type","",{required:!0}),(0,e.u)("url","URL","Either url or name and value are mandatory."),(0,e.u)("name","Name",""),(0,e.u)("value","Value",""),(0,e.u)("confirm","Confirm","",{element:"subform",subformOptions:[(0,e.u)("text","Text","",{required:!0}),(0,e.u)("dismiss_text","Dismiss text",""),(0,e.u)("ok_text","OK text",""),(0,e.u)("title","Title","")]}),(0,e.u)("style","Style","")]}),(0,e.u)("fields","Fields","",{element:"subform_array",subformOptions:[(0,e.u)("title","Title","",{required:!0}),(0,e.u)("value","Value","",{required:!0}),(0,e.u)("short","Short","",{element:"checkbox"})]}),u]},{name:"OpsGenie",description:"Send notifications to OpsGenie",type:"opsgenie",info:"",heading:"OpsGenie settings",options:[(0,e.u)("api_key","API key","The API key to use when talking to the OpsGenie API."),(0,e.u)("api_url","API URL","The host to send OpsGenie API requests to."),(0,e.u)("message","Message","Alert text limited to 130 characters."),(0,e.u)("description","Description","A description of the incident.",{placeholder:'{{ template "opsgenie.default.description" . }}'}),(0,e.u)("source","Source","A backlink to the sender of the notification.",{placeholder:'{{ template "opsgenie.default.source" . }}'}),(0,e.u)("details","Details","A set of arbitrary key/value pairs that provide further detail about the incident.",{element:"key_value_map"}),(0,e.u)("tags","Tags","Comma separated list of tags attached to the notifications."),(0,e.u)("note","Note","Additional alert note."),(0,e.u)("priority","Priority","Priority level of alert. Possible values are P1, P2, P3, P4, and P5."),(0,e.u)("responders","Responders","List of responders responsible for notifications.",{element:"subform_array",subformOptions:[(0,e.u)("type","Type",'"team", "user", "escalation" or schedule".',{required:!0}),(0,e.u)("id","ID","Exactly one of these fields should be defined."),(0,e.u)("name","Name","Exactly one of these fields should be defined."),(0,e.u)("username","Username","Exactly one of these fields should be defined.")]}),u]},{name:"VictorOps",description:"Send notifications to VictorOps",type:"victorops",info:"",heading:"VictorOps settings",options:[(0,e.u)("api_key","API key","The API key to use when talking to the VictorOps API."),(0,e.u)("api_url","API URL","The VictorOps API URL."),(0,e.u)("routing_key","Routing key","A key used to map the alert to a team.",{required:!0}),(0,e.u)("message_type","Message type","Describes the behavior of the alert (CRITICAL, WARNING, INFO)."),(0,e.u)("entity_display_name","Entity display name","Contains summary of the alerted problem.",{placeholder:'{{ template "victorops.default.entity_display_name" . }}'}),(0,e.u)("state_message","State message","Contains long explanation of the alerted problem.",{placeholder:'{{ template "victorops.default.state_message" . }}'}),(0,e.u)("monitoring_tool","Monitoring tool","The monitoring tool the state message is from.",{placeholder:'{{ template "victorops.default.monitoring_tool" . }}'}),u]},{name:"Webhook",description:"Send notifications to a webhook",type:"webhook",info:"",heading:"Webhook settings",options:[(0,e.u)("url","URL","The endpoint to send HTTP POST requests to.",{required:!0}),(0,e.u)("max_alerts","Max alerts","The maximum number of alerts to include in a single webhook message. Alerts above this threshold are truncated. When leaving this at its default value of 0, all alerts are included.",{placeholder:"0",inputType:"number",validationRule:"(^\\d+$|^$)",setValueAs:p=>{const S=Number(p);return Number.isFinite(S)?S:0}}),u]},{name:"Discord",description:"Sends notifications to Discord",type:"discord",info:"",heading:"Discord settings",options:[(0,e.u)("title","Title","Templated title of the message",{placeholder:'{{ template "discord.default.title" . }}'}),(0,e.u)("message","Message Content","Mention a group using @ or a user using <@ID> when notifying in a channel",{placeholder:'{{ template "discord.default.message" . }}'}),(0,e.u)("webhook_url","Webhook URL","",{placeholder:"Discord webhook URL",required:!0}),u]},{name:"Cisco Webex Teams",description:"Sends notifications to Cisco Webex Teams",type:"webex",info:"",heading:"Cisco Webex Teams settings",options:[(0,e.u)("api_url","API URL","The Webex Teams API URL",{placeholder:"https://webexapis.com/v1/messages"}),(0,e.u)("room_id","Room ID","ID of the Webex Teams room where to send the messages",{required:!0}),(0,e.u)("message","Message","Message template",{placeholder:'{{ template "webex.default.message" .}}'}),{...u,required:!0}]},{name:"Telegram",description:"Sends notifications to Telegram",type:"telegram",info:"",heading:"Telegram settings",options:[(0,e.u)("api_url","API URL","The Telegram API URL",{placeholder:"https://api.telegram.org"}),(0,e.u)("bot_token","Bot token","Telegram bot token",{required:!0}),(0,e.u)("chat_id","Chat ID","ID of the chat where to send the messages",{required:!0,setValueAs:p=>typeof p=="string"?parseInt(p,10):0}),(0,e.u)("message","Message","Message template",{placeholder:'{{ template "webex.default.message" .}}'}),(0,e.u)("disable_notifications","Disable notifications","Disable telegram notifications",{element:"checkbox"}),(0,e.u)("parse_mode","Parse mode","Parse mode for telegram message",{element:"select",defaultValue:{label:"MarkdownV2",value:"MarkdownV2"},selectOptions:[{label:"MarkdownV2",value:"MarkdownV2"},{label:"Markdown",value:"Markdown"},{label:"HTML",value:"HTML"},{label:"plain text",value:""}]}),u]},{name:"Amazon SNS",description:"Sends notifications to Amazon SNS",type:"sns",info:"",heading:"Amazon SNS settings",options:[(0,e.u)("api_url","API URL","The Amazon SNS API URL"),(0,e.u)("sigv4","SigV4 authentication","Configures AWS's Signature Verification 4 signing process to sign requests",{element:"subform",subformOptions:[(0,e.u)("region","Region","The AWS region. If blank, the region from the default credentials chain is used"),(0,e.u)("access_key","Access key",'The AWS API access_key. If blank the environment variable "AWS_ACCESS_KEY_ID" is used'),(0,e.u)("secret_key","Secret key",'The AWS API secret_key. If blank the environment variable "AWS_ACCESS_SECRET_ID" is used'),(0,e.u)("profile","Profile","Named AWS profile used to authenticate"),(0,e.u)("role_arn","Rule ARN","AWS Role ARN, an alternative to using AWS API keys")]}),(0,e.u)("topic_arn","SNS topic ARN","If you don't specify this value, you must specify a value for the phone_number or target_arn. If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes to prevent messages with the same group key being deduplicated by the SNS default deduplication window"),(0,e.u)("phone_number","Phone number","Phone number if message is delivered via SMS in E.164 format. If you don't specify this value, you must specify a value for the topic_arn or target_arn"),(0,e.u)("target_arn","Target ARN","The  mobile platform endpoint ARN if message is delivered via mobile notifications. If you don't specify this value, you must specify a value for the topic_arn or phone_number"),(0,e.u)("subject","Subject","Subject line when the message is delivered to email endpoints",{placeholder:'{{ template "sns.default.subject" .}}'}),(0,e.u)("message","Message","The message content of the SNS notification",{placeholder:'{{ template "sns.default.message" .}}'}),(0,e.u)("attributes","Attributes","SNS message attributes",{element:"key_value_map"}),u]},{name:"WeChat",description:"Sends notifications to WeChat",type:"wechat",info:"",heading:"WeChat settings",options:[(0,e.u)("api_url","API URL","The WeChat API URL"),(0,e.u)("api_secret","API Secret","The API key to use when talking to the WeChat API"),(0,e.u)("corp_id","Corp ID","The corp id for authentication"),(0,e.u)("message","Message","API request data as defined by the WeChat API",{placeholder:'{{ template "wechat.default.message" . }}'}),(0,e.u)("message_type","Message type","Type of the message type",{element:"select",defaultValue:{label:"Text",value:"text"},selectOptions:[{label:"Text",value:"text"},{label:"Markdown",value:"markdown"}]}),(0,e.u)("agent_id","Agent ID","",{placeholder:'{{ template "wechat.default.agent_id" . }}'}),(0,e.u)("to_user","to user","",{placeholder:'{{ template "wechat.default.to_user" . }}'}),(0,e.u)("to_party","to party","",{placeholder:'{{ template "wechat.default.to_party" . }}'}),(0,e.u)("to_tag","to tag","",{placeholder:'{{ template "wechat.default.to_tag" . }}'})]},{name:"Microsoft Teams",description:"Sends notifications to Microsoft Teams",type:"msteams",info:"",heading:"Microsoft Teams settings",options:[(0,e.u)("webhook_url","Webhook URL","The incoming webhook URL."),(0,e.u)("title","Title","Message title template.",{placeholder:'{{ template "teams.default.title" . }}'}),(0,e.u)("text","Text","Message body template.",{placeholder:'{{ template "teams.default.text" . }}'})]}],R=[(0,e.u)("smtp_from","SMTP from","The default SMTP From header field."),(0,e.u)("smtp_smarthost","SMTP smarthost","The default SMTP smarthost used for sending emails, including port number. Port number usually is 25, or 587 for SMTP over TLS (sometimes referred to as STARTTLS). Example: smtp.example.org:587"),(0,e.u)("smtp_hello","SMTP hello","The default hostname to identify to the SMTP server.",{placeholder:"localhost"}),(0,e.u)("smtp_auth_username","SMTP auth username","SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn't authenticate to the SMTP server."),(0,e.u)("smtp_auth_password","SMTP auth password","SMTP Auth using LOGIN and PLAIN."),(0,e.u)("smtp_auth_identity","SMTP auth identity","SMTP Auth using PLAIN."),(0,e.u)("smtp_auth_secret","SMTP auth secret","SMTP Auth using CRAM-MD5."),(0,e.u)("smtp_require_tls","SMTP require TLS","The default SMTP TLS requirement. Note that Go does not support unencrypted connections to remote SMTP endpoints.",{element:"checkbox"}),(0,e.u)("slack_api_url","Slack API URL",""),(0,e.u)("victorops_api_key","VictorOps API key",""),(0,e.u)("victorops_api_url","VictorOps API URL","",{placeholder:"https://alert.victorops.com/integrations/generic/20131114/alert/"}),(0,e.u)("pagerduty_url","PagerDuty URL","https://events.pagerduty.com/v2/enqueue"),(0,e.u)("opsgenie_api_key","OpsGenie API key",""),(0,e.u)("opsgenie_api_url","OpsGenie API URL","",{placeholder:"https://api.opsgenie.com/"}),(0,e.u)("wechat_api_url","WeChat API URL","",{placeholder:"https://qyapi.weixin.qq.com/cgi-bin/"}),(0,e.u)("wechat_api_secret","WeChat API secret",""),(0,e.u)("wechat_api_corp_id","WeChat API corp id",""),(0,e.u)("webex_api_url","Cisco Webex Teams API URL",""),(0,e.u)("telegram_api_url","The Telegram API URL",""),u,(0,e.u)("resolve_timeout","Resolve timeout","ResolveTimeout is the default value used by alertmanager if the alert does not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. This has no impact on alerts from Prometheus, as they always include EndsAt.",{placeholder:"5m"})]},79851:(F,w,n)=>{n.d(w,{u:()=>e});function e(M,a,u,I={}){return{propertyName:M,label:a,description:u,element:"input",inputType:"",required:!1,secure:!1,placeholder:"",validationRule:"",showWhen:{field:"",is:""},dependsOn:"",...I}}},72399:(F,w,n)=>{n.d(w,{FN:()=>T,Iq:()=>u,QX:()=>R,Xo:()=>a,bB:()=>I,jS:()=>p,qg:()=>N});var e=n(2543),M=n.n(e);function a(s,i){const r={};let o=1;return[{name:s.name,items:s.grafana_managed_receiver_configs?.map(g=>{const v=String(o++);r[v]=g;const L=i.find(({type:D})=>D===g.type);return $(v,g,L)})??[]},r]}function u(s,i){const r={};let o=1;const l=Object.entries(s).filter(([v])=>v.endsWith("_configs")&&v!=="grafana_managed_receiver_configs").map(([v,L])=>[v.replace("_configs",""),L]).map(([v,L])=>L.map(D=>{const V=String(o++);if(r[V]={type:v,config:D},!i.find(q=>q.type===v))throw new Error(`unknown cloud notifier: ${v}`);return O(V,v,D)})).flat();return[{name:s.name,items:l},r]}function I(s,i,r,o){return{name:s.name,grafana_managed_receiver_configs:(s.items??[]).map(l=>{const g=i[l.__id],v=o.find(L=>L.type===l.type);return N(l,r,s.name,g,v)})}}function R(s,i){const r={name:s.name};return s.items.forEach(({__id:o,type:l,settings:g,sendResolved:v})=>{const L=T({...g,send_resolved:v??i.sendResolved});`${l}_configs`in r?r[`${l}_configs`]?.push(L):r[`${l}_configs`]=[L]}),r}function p(s,i,r){const o=s.alertmanager_config.receivers??[];if(i.name!==r&&o.find(({name:g})=>g===i.name))throw new Error(`Duplicate receiver name ${i.name}`);if(r&&!o.find(({name:g})=>g===r))throw new Error(`Expected receiver ${r} to exist, but did not find it in the config`);const l={...s,alertmanager_config:{...s.alertmanager_config,receivers:r?o.map(g=>g.name===r?i:g):[...o,i]}};return l.alertmanager_config.route&&r&&i.name!==r&&(l.alertmanager_config.route=S(l.alertmanager_config.route,r,i.name)),l}function S(s,i,r){const o={...s};return o.receiver===i&&(o.receiver=r),o.routes&&(o.routes=o.routes.map(l=>S(l,i,r))),o}function O(s,i,r){return{__id:s,type:i,settings:{...r},secureFields:{},secureSettings:{},sendResolved:r.send_resolved}}function $(s,i,r){const o={__id:s,type:i.type,provenance:i.provenance,secureSettings:{},settings:{...i.settings},secureFields:{...i.secureFields},disableResolveMessage:i.disableResolveMessage};return r?.options.forEach(l=>{l.secure&&o.secureSettings[l.propertyName]&&(delete o.settings[l.propertyName],o.secureFields[l.propertyName]=!0),l.secure&&o.settings[l.propertyName]&&(o.secureSettings[l.propertyName]=o.settings[l.propertyName],delete o.settings[l.propertyName])}),o}function N(s,i,r,o,l){const g={settings:T({...o&&o.type===s.type?o.settings??{}:{},...s.settings??{}}),secureSettings:U(s.secureSettings,o?.secureFields),type:s.type,name:r,disableResolveMessage:s.disableResolveMessage??o?.disableResolveMessage??i.disableResolveMessage},v=l?.options.filter(D=>D.secure).map(D=>D.propertyName)??[],L=(0,e.pick)(g.settings,v);return g.secureSettings={...L,...g.secureSettings},g.settings=(0,e.omit)(g.settings,v),o&&(g.uid=o.uid),g}const E=s=>(0,e.isNil)(s)||s==="";function T(s){return(0,e.isArray)(s)?s.forEach(T):typeof s=="object"&&s!==null&&Object.entries(s).forEach(([i,r])=>{E(r)?delete s[i]:T(r)}),s}function U(s={},i={}){return(0,e.omitBy)(s,(r,o)=>E(r)&&!(o in i))}}}]);

//# sourceMappingURL=3098.fc2707d6310eedf8d141.js.map