Files
object-browser/portal-ui/build/static/js/1069.fd57043c.chunk.js
Daniel Valdivia 2321343d5e Release v0.15.5 (#1741)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-21 12:12:35 -07:00

2 lines
8.7 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1069],{82461:function(e,a,n){n.d(a,{Z:function(){return g}});var t=n(23430),s=n(18489),r=n(50390),i=n(38342),l=n.n(i),o=n(25594),c=n(36554),d=n(94187),u=n(95467),m=n(96589),p=n(94258),f=n(86509),x=n(4285),h=n(72462),v=n(97538),Z=n(82981),j=n(62559),g=(0,x.Z)((function(e){return(0,f.Z)((0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({},h.YI),h.Hr),{},{valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileInputField:{margin:"13px 0","@media (max-width: 900px)":{flexFlow:"column"}}},h.bV),{},{inputLabel:(0,s.Z)((0,s.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"}),textBoxContainer:(0,s.Z)((0,s.Z)({},h.YI.textBoxContainer),{},{maxWidth:"100%",border:"1px solid #eaeaea",paddingLeft:"15px"})}))}))((function(e){var a=e.label,n=e.classes,s=e.onChange,i=e.id,f=e.name,x=e.disabled,h=void 0!==x&&x,g=e.tooltip,b=void 0===g?"":g,C=e.required,S=e.error,N=void 0===S?"":S,k=e.accept,y=void 0===k?"":k,M=e.value,F=void 0===M?"":M,w=(0,r.useState)(!1),B=(0,t.Z)(w,2),E=B[0],z=B[1];return(0,j.jsx)(r.Fragment,{children:(0,j.jsxs)(o.ZP,{item:!0,xs:12,className:"".concat(n.fileInputField," ").concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==N?n.errorInField:""),children:[""!==a&&(0,j.jsxs)(c.Z,{htmlFor:i,className:"".concat(""!==N?n.fieldLabelError:""," ").concat(n.inputLabel),children:[(0,j.jsxs)("span",{children:[a,C?"*":""]}),""!==b&&(0,j.jsx)("div",{className:n.tooltipContainer,children:(0,j.jsx)(d.Z,{title:b,placement:"top-start",children:(0,j.jsx)("div",{className:n.tooltip,children:(0,j.jsx)(v.Z,{})})})})]}),E||""===F?(0,j.jsxs)("div",{className:n.textBoxContainer,children:[(0,j.jsx)("input",{type:"file",name:f,onChange:function(e){var a=l()(e,"target.files[0].name","");!function(e,a){var n=e.target.files[0],t=new FileReader;t.readAsDataURL(n),t.onload=function(){var e=t.result;if(e){var n=e.toString().split("base64,");2===n.length&&a(n[1])}}}(e,(function(e){s(e,a)}))},accept:y,required:C,disabled:h,className:n.fileInputField}),""!==F&&(0,j.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){z(!1)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,j.jsx)(p.Z,{})}),""!==N&&(0,j.jsx)(Z.Z,{errorMessage:N})]}):(0,j.jsxs)("div",{className:n.fileReselect,children:[(0,j.jsx)("div",{className:n.valueString,children:F}),(0,j.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){z(!0)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,j.jsx)(m.Z,{})})]})]})})}))},51002:function(e,a,n){var t=n(23430),s=n(18489),r=n(50390),i=n(34424),l=n(95467),o=n(97771),c=n(84402),d=n(78426),u=n(93085),m=n(86509),p=n(4285),f=n(72462),x=n(44149),h=n(21278),v=n(45980),Z=n(62559),j=(0,i.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:x.MK});a.Z=(0,p.Z)((function(e){return(0,m.Z)((0,s.Z)((0,s.Z)({},f.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},f.sN))}))(j((function(e){var a=e.onClose,n=e.modalOpen,i=e.title,m=e.children,p=e.classes,f=e.wideLimit,x=void 0===f||f,j=e.modalSnackMessage,g=e.noContentPadding,b=e.setModalSnackMessage,C=e.titleIcon,S=void 0===C?null:C,N=(0,r.useState)(!1),k=(0,t.Z)(N,2),y=k[0],M=k[1];(0,r.useEffect)((function(){b("")}),[b]),(0,r.useEffect)((function(){if(j){if(""===j.message)return void M(!1);"error"!==j.type&&M(!0)}}),[j]);var F=x?{classes:{paper:p.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},w="";return j&&(w=j.detailedErrorMsg,(""===j.detailedErrorMsg||j.detailedErrorMsg.length<5)&&(w=j.message)),(0,Z.jsxs)(c.Z,(0,s.Z)((0,s.Z)({open:n,classes:p},F),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&a()},className:p.root,children:[(0,Z.jsxs)(d.Z,{className:p.title,children:[(0,Z.jsxs)("div",{className:p.titleText,children:[S," ",i]}),(0,Z.jsx)("div",{className:p.closeContainer,children:(0,Z.jsx)(l.Z,{"aria-label":"close",id:"close",className:p.closeButton,onClick:a,disableRipple:!0,size:"small",children:(0,Z.jsx)(h.Z,{})})})]}),(0,Z.jsx)(v.Z,{isModal:!0}),(0,Z.jsx)(o.Z,{open:y,className:p.snackBarModal,onClose:function(){M(!1),b("")},message:w,ContentProps:{className:"".concat(p.snackBar," ").concat(j&&"error"===j.type?p.errorSnackBar:"")},autoHideDuration:j&&"error"===j.type?1e4:5e3}),(0,Z.jsx)(u.Z,{className:g?"":p.content,children:m})]}))})))},81069:function(e,a,n){n.r(a);var t=n(23430),s=n(18489),r=n(50390),i=n(38342),l=n.n(i),o=n(34424),c=n(86509),d=n(4285),u=n(66946),m=n(81378),p=n(25594),f=n(72462),x=n(44149),h=n(66964),v=n(82461),Z=n(30324),j=n(51002),g=n(14549),b=n(62559),C=(0,o.$j)(null,{setModalErrorSnackMessage:x.zb});a.default=(0,d.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({buttonContainer:{textAlign:"right"}},f.oO),f.DF))}))(C((function(e){var a=e.open,n=e.closeModalAndRefresh,s=e.classes,i=e.tierData,o=e.setModalErrorSnackMessage,c=(0,r.useState)(!1),d=(0,t.Z)(c,2),f=d[0],x=d[1],C=(0,r.useState)(""),S=(0,t.Z)(C,2),N=S[0],k=S[1],y=(0,r.useState)(""),M=(0,t.Z)(y,2),F=M[0],w=M[1],B=(0,r.useState)(""),E=(0,t.Z)(B,2),z=E[0],K=E[1],R=(0,r.useState)(""),A=(0,t.Z)(R,2),I=A[0],L=A[1],P=(0,r.useState)(""),D=(0,t.Z)(P,2),V=D[0],W=D[1],O=(0,r.useState)(""),T=(0,t.Z)(O,2),_=T[0],H=T[1],U=(0,r.useState)(!0),Y=(0,t.Z)(U,2),q=Y[0],$=Y[1],Q=l()(i,"type",""),G=l()(i,"".concat(Q,".name"),"");(0,r.useEffect)((function(){var e=!0;"s3"===Q||"azure"===Q?""!==V&&""!==_||(e=!1):"gcs"===Q&&""===I&&(e=!1),$(e)}),[_,V,I,Q]);return(0,b.jsx)(j.Z,{modalOpen:a,titleIcon:(0,b.jsx)(g.mB,{}),onClose:function(){n(!1)},title:"Update Credentials - ".concat(Q," / ").concat(G),children:(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),x(!0),function(){var e={};"s3"===Q||"azure"===Q?e={access_key:V,secret_key:_}:"gcs"===Q&&(e={creds:I}),""!==G?Z.Z.invoke("PUT","/api/v1/admin/tiers/".concat(Q,"/").concat(G,"/credentials"),e).then((function(){x(!1),n(!0)})).catch((function(e){x(!1),o(e)})):o({errorMessage:"There was an error retrieving tier information",detailedError:""})}()},children:(0,b.jsxs)(p.ZP,{container:!0,children:[(0,b.jsxs)(p.ZP,{item:!0,xs:12,children:["s3"===Q&&(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)("div",{className:s.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:N,onChange:function(e){k(e.target.value)}})}),(0,b.jsx)("div",{className:s.formFieldRow,children:(0,b.jsx)(h.Z,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:F,onChange:function(e){w(e.target.value)}})})]}),"gcs"===Q&&(0,b.jsx)(r.Fragment,{children:(0,b.jsx)(v.Z,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,a){L(e),K(a)},value:z})}),"azure"===Q&&(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)("div",{className:s.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:V,onChange:function(e){W(e.target.value)}})}),(0,b.jsx)("div",{className:s.formFieldRow,children:(0,b.jsx)(h.Z,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:_,onChange:function(e){H(e.target.value)}})})]})]}),(0,b.jsx)(p.ZP,{item:!0,xs:12,className:s.buttonContainer,children:(0,b.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:f||!q,children:"Save"})}),f&&(0,b.jsx)(p.ZP,{item:!0,xs:12,children:(0,b.jsx)(m.Z,{})})]})})})})))},82981:function(e,a,n){var t=n(50390),s=n(35477),r=n(86509),i=n(4285),l=n(62559);a.Z=(0,i.Z)((function(e){var a;return(0,r.Z)({errorBlock:{color:(null===(a=e.palette)||void 0===a?void 0:a.error.main)||"#C83B51"}})}))((function(e){var a=e.classes,n=e.errorMessage,r=e.withBreak,i=void 0===r||r;return(0,l.jsxs)(t.Fragment,{children:[i&&(0,l.jsx)("br",{}),(0,l.jsx)(s.Z,{component:"p",variant:"body1",className:a.errorBlock,children:n})]})}))},96589:function(e,a,n){var t=n(64119);a.Z=void 0;var s=t(n(66830)),r=n(62559),i=(0,s.default)((0,r.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}),"AttachFile");a.Z=i},94258:function(e,a,n){var t=n(64119);a.Z=void 0;var s=t(n(66830)),r=n(62559),i=(0,s.default)((0,r.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");a.Z=i},21278:function(e,a,n){var t=n(64119);a.Z=void 0;var s=t(n(66830)),r=n(62559),i=(0,s.default)((0,r.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");a.Z=i}}]);
//# sourceMappingURL=1069.fd57043c.chunk.js.map