All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.bb8c8232-290.21ce9471c62feeb912e9.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-290"],{SfPIQIJE:(I,E,t)=>{t.d(E,{A:()=>M});var e=t("Z7aTuO5B"),n=t("J6y4/h8P"),i=t("rIl5IEuP"),r=t("ty2gyrHp"),m=t("IOI9nV80"),c=t("NV1/EHMi");const _=(0,n.default)(i.ButtonToolbar)`
  margin-bottom: 10px;
`,d=(0,n.default)(i.Button)(({theme:l})=>(0,n.css)`
  font-family: ${l.fonts.family.navigation};
  font-size: ${l.fonts.size.navigation};
  color: ${l.colors.variant.darker.default};
  
  &:hover,
  &:focus {
    background: inherit;
    text-decoration: none;
  }

  &:hover {
    color: inherit;
    ${(0,c.WS)(l)}
  }

  &.active {
    color: ${l.colors.global.textDefault};

    ${(0,c.at)(l)}

    &:hover,
    &:focus {
      ${(0,c.at)(l)}
    }
`);d.displayName="Button";const M=({items:l})=>e.createElement(_,null,l.map(({path:P,title:y,permissions:u,exactPathMatch:A})=>P?e.createElement(m.Wj,{permissions:u!=null?u:[],key:P},e.createElement(r.m,{to:P,relativeActive:!A},e.createElement(d,{bsStyle:"link"},e.createElement(c.Ay,null,y)))):null))},orGoq0ZB:(I,E,t)=>{t.d(E,{A:()=>D});var e=t("Z7aTuO5B"),n=t("DUKaTDO2"),i=t("UiXZqrDE"),r=t("J6y4/h8P"),m=t("13uboeDm"),c=t.n(m),_=t("9oVghaOd"),d=t.n(_),g=t("rp7UD7rK"),M=t("jAGDuYSC"),l=t("rIl5IEuP"),P=t("ibdPvtmL"),y=t("i+sOEQiN"),u=t("IOI9nV80"),A=t("8OvTct/Z"),$=t("hhdCSTZj"),R=t("0t7Ye+61"),B=t("MdYBRjRJ"),Q=t("v4GbOr/o"),N=t("9GOsZwoo");const L=["hours","days","months","years"].map(o=>o.toLocaleUpperCase()),j=r.default.dl.attrs({className:"deflist"})(({theme:o})=>(0,r.css)`
  &&.deflist {
    dt {
      float: left;
    }

    dd {
      padding-left: ${o.spacings.md};
      margin-left: 200px;
    }
  }
`),W=async o=>P.t.update(y.H.CERTIFICATE_RENEWAL_POLICY_CONFIG,o),K=o=>{if(o.endsWith("H"))return"hours";if(o.endsWith("D"))return"days";if(o.endsWith("M"))return"months";if(o.endsWith("Y"))return"years";throw new Error(`Invalid duration specified: ${o}`)},x=()=>P.t.list(y.H.CERTIFICATE_RENEWAL_POLICY_CONFIG),w=({createPolicy:o})=>e.createElement("span",null,"There is no Certificate Renewal Policy yet. Click\xA0",e.createElement(l.Button,{onClick:o,bsSize:"xsmall",bsStyle:"primary"},"here")," to create one."),F=["AUTOMATIC","MANUAL"].map(o=>({label:c()(o),value:o})),b={mode:"AUTOMATIC",lifetimeUnit:"days",lifetimeValue:30},G=["config","certificate-renewal-policy"],h='Setting the renewal policy to "Automatic" will renew all expiring certificates without any user interaction. Setting it to "Manual" will create a system notification when one or more certificates are about to expire, allowing you to confirm their renewal.',a="The certificate lifetime will be used for the length of the validity of newly created certificates.",s=({className:o})=>{const[v,f]=(0,e.useState)(!1),{data:O,isLoading:V}=(0,n.useQuery)(G,x),X=(0,A.A)(),{pathname:k}=(0,R.A)(),Z=(0,n.useQueryClient)(),{mutateAsync:q}=(0,n.useMutation)(W,{onSuccess:()=>{Z.invalidateQueries(G),Z.invalidateQueries(N.A),f(!1)},onError:C=>{M.A.error(`Error Updating Detector Definition: ${C.toString()}`,"Unable to update detector definition")}}),Y=(0,e.useMemo)(()=>{if(V)return;if(!O)return b;const{mode:C,certificate_lifetime:T}=O,S=K(T),z=d().duration(T).as(S);return{mode:C,lifetimeUnit:S,lifetimeValue:z}},[O,V]);if(V)return e.createElement(u.y$,null);const ee="Configure Certificate Renewal Policy",H=()=>{f(!1)},te=C=>{X(Q.g.CONFIGURATIONS.CERTIFICATE_RENEWAL_POLICY_UPDATED,{app_pathname:(0,B.i)(k),app_section:"certificate-renewal-policy",app_action_value:"configuration-save"});const T={mode:C.mode,certificate_lifetime:d().duration(C.lifetimeValue,C.lifetimeUnit).toJSON()};return q(T)};return e.createElement("div",{className:o},e.createElement("h2",null,"Certificate Renewal Policy Configuration"),e.createElement("p",null,"These settings will be used when detecting expiration of certificates and/or when renewing them."),O?e.createElement(e.Fragment,null,e.createElement(j,null,e.createElement("dt",null,"Renewal Mode:"),e.createElement("dd",null,c()(O.mode)),e.createElement("dd",null,e.createElement("i",null,h)),e.createElement("dt",null,"Certificate Lifetime:"),e.createElement("dd",null,Y.lifetimeValue," ",Y.lifetimeUnit),e.createElement("dd",null,e.createElement("i",null,a))),e.createElement("p",{className:"no-bm"},e.createElement(u.Wj,{permissions:"indices:changestate"},e.createElement(l.Button,{bsStyle:"info",bsSize:"xs",onClick:()=>{f(!0)}},"Edit configuration")))):e.createElement(w,{createPolicy:()=>f(!0)}),e.createElement(l.Modal,{show:v,onHide:H,"aria-modal":"true","aria-labelledby":"dialog_label"},e.createElement(i.Formik,{onSubmit:te,initialValues:Y},({values:C,setFieldValue:T,isSubmitting:S,isValid:z,isValidating:ne})=>e.createElement(i.Form,null,e.createElement(l.Modal.Header,{closeButton:!0},e.createElement(l.Modal.Title,{id:"dialog_label"},ee)),e.createElement(l.Modal.Body,null,e.createElement("div",null,e.createElement(l.Row,null,e.createElement(l.Col,{md:12},e.createElement(i.Field,{name:"mode"},({field:{name:p,value:U,onChange:ae}})=>e.createElement(l.Input,{id:p,label:"Certificate Renewal Mode",help:h},e.createElement($.A,{options:F,clearable:!1,name:p,value:U!=null?U:"AUTOMATIC","aria-label":"Select certificate renewal mode",size:"small",onChange:le=>ae({target:{name:p,value:le}})}))),e.createElement(u.gM,{label:"Certificate Lifetime",help:a,update:(p,U)=>{T("lifetimeValue",p),T("lifetimeUnit",U)},value:C.lifetimeValue,unit:C.lifetimeUnit.toLocaleUpperCase(),enabled:!0,hideCheckbox:!0,units:L}))))),e.createElement(l.Modal.Footer,null,e.createElement(g.A,{onCancel:H,disabledSubmit:ne||!z,isSubmitting:S,isAsyncSubmit:!0,submitLoadingText:"Updating configuration",submitButtonText:"Update configuration"}))))))};s.defaultProps={className:void 0};const D=s},pSEhaN5V:(I,E,t)=>{t.d(E,{A:()=>g});var e=t("Z7aTuO5B"),n=t("RCNj0OY4"),i=t("SfPIQIJE"),r=t("d4kzUuQm"),m=t("rIl5IEuP");const c=n.A.isFeatureEnabled("data_node_migration"),_=[{title:"Data Nodes",path:r.Ay.SYSTEM.DATANODES.LIST,exactPathMatch:!0},{title:"Cluster Management",path:r.Ay.SYSTEM.DATANODES.CLUSTER},{title:"Configuration",path:r.Ay.SYSTEM.DATANODES.CONFIGURATION},c&&{title:"Migration",path:r.Ay.SYSTEM.DATANODES.MIGRATION}],g=()=>e.createElement(m.Row,null,e.createElement(i.A,{items:_}))},"9GOsZwoo":(I,E,t)=>{t.d(E,{A:()=>r,h:()=>c});var e=t("DUKaTDO2"),n=t("jAGDuYSC"),i=t("xAuw/bbM");const r=["migration-state"],c=(_=!1)=>{const{data:d,isLoading:g}=(0,e.useQuery)(r,()=>i.Nh.status(),{onError:M=>n.A.error(M.message),retry:2,refetchInterval:_});return{currentStep:d,isLoading:g}}},PShDXqyY:(I,E,t)=>{t.r(E),t.d(E,{default:()=>h});var e=t("Z7aTuO5B"),n=t("rIl5IEuP"),i=t("IOI9nV80"),r=t("E+CaPsQD"),m=t("J6y4/h8P"),c=t("UiXZqrDE"),_=t("DUKaTDO2"),d=t("jAGDuYSC"),g=t("eFxcQyPT"),M=t("MdYBRjRJ");const l=a=>(0,g.Ay)("POST",(0,M.H3)("ca/clientcert"),a,!1),y=()=>{const{mutateAsync:a,isLoading:s,error:D,isError:o}=(0,_.useMutation)(l,{onError:v=>d.A.error(v.message)});return{onCreateClientCert:a,isLoading:s,isError:o,error:D}};var u=t("VVS+7KXv");const A=m.default.textarea(({theme:a})=>(0,m.css)`
  width: 100%;
  padding: 3px;
  resize: none;
  flex: 1;
  margin: 15px 0 7px;
  border: 1px solid ${a.colors.variant.lighter.default};
  font-family: ${a.fonts.family.monospace};
  font-size: ${a.fonts.size.body};

  &:focus {
    border-color: ${a.colors.variant.light.info};
    outline: none;
  }
`),R=({clientCerts:a})=>e.createElement(e.Fragment,null,e.createElement("dt",null,"Principal:"),e.createElement("dd",null,a.principal),e.createElement("dt",null,"Role:"),e.createElement("dd",null,a.role),e.createElement("dt",null,"CA certificate ",e.createElement(n.Button,{bsStyle:"info",bsSize:"xs",onClick:()=>(0,u.A)(a.ca_certificate)},"Copy to clipboard")),e.createElement("dd",null,e.createElement(A,{id:"ca_certificate",value:a.ca_certificate,spellCheck:!1})),e.createElement("dt",null,"Private key ",e.createElement(n.Button,{bsStyle:"info",bsSize:"xs",onClick:()=>(0,u.A)(a.private_key)},"Copy to clipboard")),e.createElement("dd",null,e.createElement(A,{id:"private_key",value:a.private_key,spellCheck:!1})),e.createElement("dt",null,"Certificate ",e.createElement(n.Button,{bsStyle:"info",bsSize:"xs",onClick:()=>(0,u.A)(a.certificate)},"Copy to clipboard")),e.createElement("dd",null,e.createElement(A,{id:"certificate",value:a.certificate,spellCheck:!1})));var B=t("rp7UD7rK");const N=({onCancel:a})=>{const[s,D]=(0,e.useState)(null),{onCreateClientCert:o}=y(),v=f=>o(f).then(O=>D(O)).catch(()=>{});return e.createElement(e.Fragment,null,e.createElement(n.Modal.Header,{closeButton:!0},e.createElement(n.Modal.Title,null,"Create client certificate")),!s&&e.createElement(c.Formik,{initialValues:{principal:"",role:"all_access",password:""},onSubmit:f=>v(f)},({isSubmitting:f})=>e.createElement(c.Form,null,e.createElement(n.Modal.Body,null,e.createElement(i.jF,{id:"principal",placeholder:"principal",name:"principal",label:"Principal",required:!0}),e.createElement(i.jF,{id:"role",placeholder:"role",name:"role",help:"Represent OpenSearch roles mapping.",label:"Role",required:!0}),e.createElement(i.jF,{id:"password",placeholder:"*******",name:"password",type:"password",label:"Password",required:!0})),e.createElement(n.Modal.Footer,null,e.createElement(B.A,{onCancel:()=>a(),isSubmitting:f,isAsyncSubmit:!0,submitButtonText:"Create Certificate",submitLoadingText:"Creating certificate..."})))),s&&e.createElement(e.Fragment,null,e.createElement(n.Modal.Body,null,e.createElement(R,{clientCerts:s})),e.createElement(n.Modal.Footer,null,e.createElement(n.ButtonToolbar,null,e.createElement(n.Button,{bsStyle:"success",onClick:()=>a()},"Close")))))},L=()=>{const[a,s]=(0,e.useState)(!1),D=()=>s(!1);return e.createElement(e.Fragment,null,e.createElement(n.Button,{bsStyle:"info",bsSize:"xs",onClick:()=>s(!0)},"Generate client certificate"),a&&e.createElement(n.BootstrapModalWrapper,{showModal:a,onHide:()=>D(),bsSize:"lg"},e.createElement(N,{onCancel:D})))},W=()=>e.createElement("div",null,e.createElement("h2",null,"Client Certificate"),e.createElement("p",null,"Generate client certificates for 3rd party tool"),e.createElement(L,null));var K=t("orGoq0ZB");const x=m.default.div`
  display: flex;
  flex-direction: column;
  gap: 20px;
`,F=()=>e.createElement(x,null,e.createElement(K.A,null),e.createElement(W,null));var b=t("pSEhaN5V");const h=()=>e.createElement(i.Qc,{title:"Data Nodes Cluster Configuration"},e.createElement(b.A,null),e.createElement(i.zY,{title:"Data Nodes Cluster Configuration",documentationLink:{title:"Data Nodes documentation",path:r.A.PAGES.GRAYLOG_DATA_NODE}},e.createElement("span",null,"Graylog Data Nodes offer a better integration with Graylog and simplify future updates. They allow you to index and search through all the messages in your Graylog message database.")),e.createElement(n.Row,{className:"content"},e.createElement(n.Col,{md:12},e.createElement(F,null))))}}]);})();

//# sourceMappingURL=bb8c8232-290.21ce9471c62feeb912e9.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy