1"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[696],{94141:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(65043),r=a(22166),s=a(89923),c=a(21383),l=a(64159),o=a(49555),i=a(70579);const d=e=>{let{onClose:t,modalOpen:a,title:d,children:u,wideLimit:m=!0,titleIcon:h=null,iconColor:x="default",sx:p}=e;const g=(0,c.jL)(),[j,y]=(0,n.useState)(!1),f=(0,r.d4)((e=>e.system.modalSnackBar));(0,n.useEffect)((()=>{g((0,l.h0)(""))}),[g]),(0,n.useEffect)((()=>{if(f){if(""===f.message)return void y(!1);"error"!==f.type&&y(!0)}}),[f]);let v="";return f&&(v=f.detailedErrorMsg,(""===v||v&&v.length<5)&&(v=f.message)),(0,i.jsxs)(s.ngX,{onClose:t,open:a,title:d,titleIcon:h,widthLimit:m,sx:p,iconColor:x,children:[(0,i.jsx)(o.A,{isModal:!0}),(0,i.jsx)(s.qb_,{onClose:()=>{y(!1),g((0,l.h0)(""))},open:j,message:v,mode:"inline",variant:"error"===f.type?"error":"default",autoHideDuration:"error"===f.type?10:5,condensed:!0}),u]})}},20696:(e,t,a)=>{a.r(t),a.d(t,{default:()=>x});var n=a(65043),r=a(33097),s=a.n(r),c=a(89923),l=a(56629),o=a(53518),i=a(77403),d=a(64159),u=a(21383),m=a(94141),h=a(70579);const x=e=>{let{open:t,closeModalAndRefresh:a,tierData:r}=e;const x=(0,u.jL)(),[p,g]=(0,n.useState)(!1),[j,y]=(0,n.useState)(""),[f,v]=(0,n.useState)(""),[C,b]=(0,n.useState)(""),[S,A]=(0,n.use
1State)(""),[K,E]=(0,n.useState)(!0),_=s()(r,"type",""),w=s()(r,"".concat(_,".name"),"");(0,n.useEffect)((()=>{let e=!0;"s3"===_||"azure"===_||"minio"===_?""!==C&&""!==S||(e=!1):"gcs"===_&&""===f&&(e=!1),E(e)}),[S,C,f,_]);return(0,h.jsx)(m.A,{modalOpen:t,titleIcon:(0,h.jsx)(c.XAi,{}),onClose:()=>{a(!1)},title:"Update Credentials - ".concat(_," / ").concat(w),children:(0,h.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{e.preventDefault(),g(!0),(()=>{let e={};"s3"===_||"azure"===_||"minio"===_?e={access_key:C,secret_key:S}:"gcs"===_&&(e={creds:f}),""!==w?l.F.admin.editTierCredentials(_,w,e).then((()=>{g(!1),a(!0)})).catch((e=>{g(!1),x((0,d.Dy)((0,o.S)(e.error)))})):(0,d.Dy)({errorMessage:"There was an error retrieving tier information",detailedError:""})})()},children:[(0,h.jsxs)(c.Hbc,{withBorders:!1,containerPadding:!1,children:[("s3"===_||"minio"===_)&&(0,h.jsxs)(n.Fragment,{children:[(0,h.jsx)(c.cl_,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:C,onChange:e=>{b(e.target.value)}}),(0,h.jsx)(c.cl_,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:S,onChange:e=>{A(e.target.value)}})]}),"gcs"===_&&(0,h.jsx)(n.Fragment,{children:(0,h.jsx)(c.SxS,{accept:".json",id:"creds",label:"Credentials",name:"creds",returnEncodedData:!0,onChange:(e,t,a)=>{a&&(v(a),y(t))},value:j})}),"azure"===_&&(0,h.jsxs)(n.Fragment,{children:[(0,h.jsx)(c.cl_,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:C,onChange:e=>{b(e.target.value)}}),(0,h.jsx)(c.cl_,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:S,onChange:e=>{A(e.target.value)}})]})]}),p&&(0,h.jsx)(c.xA9,{item:!0,xs:12,children:(0,h.jsx)(c.z21,{})}),(0,h.jsx)(c.xA9,{item:!0,xs:12,sx:i.Uz.modalButtonBar,children:(0,h.jsx)(c.$nd,{id:"save-credentials",type:"submit",variant:"callAction",disabled:p||!K,label:"Save"})})]})})}}}]); 2//# sourceMappingURL=696.8dec9292.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.