mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[4414],{90282:function(e,a,n){n.d(a,{Z:function(){return g}});var t=n(29439),i=n(1413),o=n(72791),l=n(26181),s=n.n(l),r=n(61889),c=n(30829),d=n(20068),u=n(13400),p=n(99663),v=n(86711),m=n(11135),x=n(25787),h=n(23814),f=n(29945),Z=n(20890),j=n(80184),b=(0,x.Z)((function(e){var a;return(0,m.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,t=e.withBreak,i=void 0===t||t;return(0,j.jsxs)(o.Fragment,{children:[i&&(0,j.jsx)("br",{}),(0,j.jsx)(Z.Z,{component:"p",variant:"body1",className:a.errorBlock,children:n})]})})),g=(0,x.Z)((function(e){return(0,m.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.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,i.Z)((0,i.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"}),textBoxContainer:(0,i.Z)((0,i.Z)({},h.YI.textBoxContainer),{},{maxWidth:"100%",border:"1px solid #eaeaea",paddingLeft:"15px"})}))}))((function(e){var a=e.label,n=e.classes,i=e.onChange,l=e.id,m=e.name,x=e.disabled,h=void 0!==x&&x,Z=e.tooltip,g=void 0===Z?"":Z,C=e.required,y=e.error,F=void 0===y?"":y,N=e.accept,w=void 0===N?"":N,z=e.value,R=void 0===z?"":z,S=(0,o.useState)(!1),K=(0,t.Z)(S,2),L=K[0],M=K[1];return(0,j.jsx)(o.Fragment,{children:(0,j.jsxs)(r.ZP,{item:!0,xs:12,className:"".concat(n.fileInputField," ").concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==F?n.errorInField:""),children:[""!==a&&(0,j.jsxs)(c.Z,{htmlFor:l,className:"".concat(""!==F?n.fieldLabelError:""," ").concat(n.inputLabel),children:[(0,j.jsxs)("span",{children:[a,C?"*":""]}),""!==g&&(0,j.jsx)("div",{className:n.tooltipContainer,children:(0,j.jsx)(d.Z,{title:g,placement:"top-start",children:(0,j.jsx)("div",{className:n.tooltip,children:(0,j.jsx)(f.byK,{})})})})]}),L||""===R?(0,j.jsxs)("div",{className:n.textBoxContainer,children:[(0,j.jsx)("input",{type:"file",name:m,onChange:function(e){var a=s()(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){i(e,a)}))},accept:w,required:C,disabled:h,className:n.fileInputField}),""!==R&&(0,j.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){M(!1)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,j.jsx)(v.Z,{})}),""!==F&&(0,j.jsx)(b,{errorMessage:F})]}):(0,j.jsxs)("div",{className:n.fileReselect,children:[(0,j.jsx)("div",{className:n.valueString,children:R}),(0,j.jsx)(u.Z,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){M(!0)},disableRipple:!1,disableFocusRipple:!1,size:"small",children:(0,j.jsx)(p.Z,{})})]})]})})}))},21435:function(e,a,n){var t=n(29439),i=n(1413),o=n(72791),l=n(27391),s=n(61889),r=n(30829),c=n(20068),d=n(13400),u=n(20165),p=n(3579),v=n(11135),m=n(72455),x=n(25787),h=n(23814),f=n(29945),Z=n(28182),j=n(80184),b=(0,m.Z)((function(e){return(0,v.Z)((0,i.Z)({},h.gM))}));function g(e){var a=b();return(0,j.jsx)(l.Z,(0,i.Z)({InputProps:{classes:a}},e))}a.Z=(0,x.Z)((function(e){return(0,v.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},h.YI),h.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var a=e.label,n=e.onChange,l=e.value,v=e.id,m=e.name,x=e.type,h=void 0===x?"text":x,b=e.autoComplete,C=void 0===b?"off":b,y=e.disabled,F=void 0!==y&&y,N=e.multiline,w=void 0!==N&&N,z=e.tooltip,R=void 0===z?"":z,S=e.index,K=void 0===S?0:S,L=e.error,M=void 0===L?"":L,A=e.required,I=void 0!==A&&A,k=e.placeholder,P=void 0===k?"":k,B=e.min,E=e.max,V=e.overlayId,W=e.overlayIcon,T=void 0===W?null:W,O=e.overlayObject,D=void 0===O?null:O,H=e.extraInputProps,Y=void 0===H?{}:H,_=e.overlayAction,q=e.noLabelMinWidth,U=void 0!==q&&q,G=e.pattern,J=void 0===G?"":G,Q=e.autoFocus,X=void 0!==Q&&Q,$=e.classes,ee=e.className,ae=void 0===ee?"":ee,ne=e.onKeyPress,te=e.onFocus,ie=e.onPaste,oe=(0,i.Z)({"data-index":K},Y),le=(0,o.useState)(!1),se=(0,t.Z)(le,2),re=se[0],ce=se[1];"number"===h&&B&&(oe.min=B),"number"===h&&E&&(oe.max=E),""!==J&&(oe.pattern=J);var de=T,ue=h;return"password"===h&&null===T&&(de=re?(0,j.jsx)(u.Z,{}):(0,j.jsx)(p.Z,{}),ue=re?"text":"password"),(0,j.jsx)(o.Fragment,{children:(0,j.jsxs)(s.ZP,{container:!0,className:(0,Z.Z)(""!==ae?ae:"",""!==M?$.errorInField:$.inputBoxContainer),children:[""!==a&&(0,j.jsxs)(r.Z,{htmlFor:v,className:U?$.noMinWidthLabel:$.inputLabel,children:[(0,j.jsxs)("span",{children:[a,I?"*":""]}),""!==R&&(0,j.jsx)("div",{className:$.tooltipContainer,children:(0,j.jsx)(c.Z,{title:R,placement:"top-start",children:(0,j.jsx)("div",{className:$.tooltip,children:(0,j.jsx)(f.byK,{})})})})]}),(0,j.jsxs)("div",{className:$.textBoxContainer,children:[(0,j.jsx)(g,{id:v,name:m,fullWidth:!0,value:l,autoFocus:X,disabled:F,onChange:n,type:ue,multiline:w,autoComplete:C,inputProps:oe,error:""!==M,helperText:M,placeholder:P,className:$.inputRebase,onKeyPress:ne,onFocus:te,onPaste:ie}),de&&(0,j.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==a?"withLabel":""),children:(0,j.jsx)(d.Z,{onClick:_?function(){_()}:function(){return ce(!re)},id:V,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:de})}),D&&(0,j.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==a?"withLabel":""),children:D})]})]})})}))},34414:function(e,a,n){n.r(a);var t=n(29439),i=n(1413),o=n(72791),l=n(26181),s=n.n(l),r=n(29945),c=n(11135),d=n(25787),u=n(40986),p=n(61889),v=n(23814),m=n(21435),x=n(90282),h=n(56028),f=n(87995),Z=n(81551),j=n(31776),b=n(82342),g=n(80184);a.default=(0,d.Z)((function(e){return(0,c.Z)((0,i.Z)((0,i.Z)({buttonContainer:{display:"flex",justifyContent:"flex-end"}},v.oO),v.DF))}))((function(e){var a=e.open,n=e.closeModalAndRefresh,i=e.classes,l=e.tierData,c=(0,Z.TL)(),d=(0,o.useState)(!1),v=(0,t.Z)(d,2),C=v[0],y=v[1],F=(0,o.useState)(""),N=(0,t.Z)(F,2),w=N[0],z=N[1],R=(0,o.useState)(""),S=(0,t.Z)(R,2),K=S[0],L=S[1],M=(0,o.useState)(""),A=(0,t.Z)(M,2),I=A[0],k=A[1],P=(0,o.useState)(""),B=(0,t.Z)(P,2),E=B[0],V=B[1],W=(0,o.useState)(!0),T=(0,t.Z)(W,2),O=T[0],D=T[1],H=s()(l,"type",""),Y=s()(l,"".concat(H,".name"),"");(0,o.useEffect)((function(){var e=!0;"s3"===H||"azure"===H||"minio"===H?""!==I&&""!==E||(e=!1):"gcs"===H&&""===K&&(e=!1),D(e)}),[E,I,K,H]);return(0,g.jsx)(h.Z,{modalOpen:a,titleIcon:(0,g.jsx)(r.mBM,{}),onClose:function(){n(!1)},title:"Update Credentials - ".concat(H," / ").concat(Y),children:(0,g.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),y(!0),function(){var e={};"s3"===H||"azure"===H||"minio"===H?e={access_key:I,secret_key:E}:"gcs"===H&&(e={creds:K}),""!==Y?j.h.admin.editTierCredentials(H,Y,e).then((function(){y(!1),n(!0)})).catch((function(e){y(!1),c((0,f.zb)((0,b.g)(e.error)))})):(0,f.zb)({errorMessage:"There was an error retrieving tier information",detailedError:""})}()},children:(0,g.jsxs)(p.ZP,{container:!0,children:[(0,g.jsxs)(p.ZP,{item:!0,xs:12,children:[("s3"===H||"minio"===H)&&(0,g.jsxs)(o.Fragment,{children:[(0,g.jsx)("div",{className:i.formFieldRow,children:(0,g.jsx)(m.Z,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:I,onChange:function(e){k(e.target.value)}})}),(0,g.jsx)("div",{className:i.formFieldRow,children:(0,g.jsx)(m.Z,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:E,onChange:function(e){V(e.target.value)}})})]}),"gcs"===H&&(0,g.jsx)(o.Fragment,{children:(0,g.jsx)(x.Z,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,a){L(e),z(a)},value:w})}),"azure"===H&&(0,g.jsxs)(o.Fragment,{children:[(0,g.jsx)("div",{className:i.formFieldRow,children:(0,g.jsx)(m.Z,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:I,onChange:function(e){k(e.target.value)}})}),(0,g.jsx)("div",{className:i.formFieldRow,children:(0,g.jsx)(m.Z,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:E,onChange:function(e){V(e.target.value)}})})]})]}),(0,g.jsx)(p.ZP,{item:!0,xs:12,className:i.buttonContainer,children:(0,g.jsx)(r.zxk,{id:"save-credentials",type:"submit",variant:"callAction",disabled:C||!O,label:"Save"})}),C&&(0,g.jsx)(p.ZP,{item:!0,xs:12,children:(0,g.jsx)(u.Z,{})})]})})})}))},99663:function(e,a,n){var t=n(64836);a.Z=void 0;var i=t(n(45649)),o=n(80184),l=(0,i.default)((0,o.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=l},86711:function(e,a,n){var t=n(64836);a.Z=void 0;var i=t(n(45649)),o=n(80184),l=(0,i.default)((0,o.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=l},3579:function(e,a,n){var t=n(64836);a.Z=void 0;var i=t(n(45649)),o=n(80184),l=(0,i.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"RemoveRedEye");a.Z=l},20165:function(e,a,n){var t=n(64836);a.Z=void 0;var i=t(n(45649)),o=n(80184),l=(0,i.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");a.Z=l}}]);
|
|
//# sourceMappingURL=4414.930d89fc.chunk.js.map
|