2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2850],{92217:function(e,n,i){var t=i(1413),o=i(72791),r=i(61889),s=i(30829),a=i(20068),c=i(64554),l=i(11135),d=i(25787),x=i(84570),p=i(23814),u=i(38734),f=i(40603),h=i(78029),m=i.n(h),j=i(85457),g=i(80184);n.Z=(0,d.Z)((function(e){return(0,l.Z)((0,t.Z)({},p.YI))}))((function(e){var n=e.value,i=e.label,t=void 0===i?"":i,l=e.tooltip,d=void 0===l?"":l,p=e.mode,h=void 0===p?"json":p,y=e.classes,Z=e.onBeforeChange,b=(e.readOnly,e.editorHeight),v=void 0===b?"250px":b;return(0,g.jsxs)(o.Fragment,{children:[(0,g.jsx)(r.ZP,{item:!0,xs:12,children:(0,g.jsxs)(s.Z,{className:y.inputLabel,children:[(0,g.jsx)("span",{children:t}),""!==d&&(0,g.jsx)("div",{className:y.tooltipContainer,children:(0,g.jsx)(a.Z,{title:d,placement:"top-start",children:(0,g.jsx)("div",{className:y.tooltip,children:(0,g.jsx)(x.Z,{})})})})]})}),(0,g.jsx)(r.ZP,{item:!0,xs:12,style:{maxHeight:v,overflow:"auto"},children:(0,g.jsx)(j.Z,{value:n,language:h,onChange:function(e){Z(null,null,e.target.value)},id:"code_wrapper",padding:15,style:{fontSize:12,backgroundColor:"#fefefe",fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace"}})}),(0,g.jsx)(r.ZP,{item:!0,xs:12,sx:{borderTop:"1px solid #eaeaea",background:"#f7f7f7"},children:(0,g.jsx)(c.Z,{sx:{display:"flex",alignItems:"center",padding:"2px",paddingRight:"5px",justifyContent:"flex-end","& button":{height:"26px",width:"26px",padding:"2px"," .min-icon":{marginLeft:"0"}}},children:(0,g.jsx)(m(),{text:n,children:(0,g.jsx)(f.Z,{tooltip:"Copy to Clipboard",onClick:function(){},text:"",icon:(0,g.jsx)(u.TIy,{}),color:"primary",variant:"outlined"})})})})]})}))},25739:function(e,n,i){i(72791);var t=i(64554),o=i(50896),r=i(80184);n.Z=function(e){var n=e.children,i=e.title,s=e.helpbox,a=e.icon;return(0,r.jsxs)(t.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"},border:"1px solid #eaeaea"},children:[(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(o.Z,{icon:a,children:i}),(0,r.jsx)(t.Z,{sx:{height:16}}),n]}),s]})}},52545:function(e,n,i){i.r(n),i.d(n,{default:function(){return C}});var t=i(29439),o=i(72791),r=i(61889),s=i(64554),a=i(36151),c=i(32291),l=i(74794),d=i(21435),x=i(38734),p=i(80184),u=function(e){var n=e.icon,i=e.description;return(0,p.jsxs)(s.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[n," ",(0,p.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:i})]})},f=function(){return(0,p.jsxs)(s.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px"},children:[(0,p.jsxs)(s.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,p.jsx)(x.M9A,{}),(0,p.jsx)("div",{children:"Learn more about Policies"})]}),(0,p.jsxs)(s.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:[(0,p.jsxs)(s.Z,{sx:{paddingBottom:"20px"},children:[(0,p.jsx)(u,{icon:(0,p.jsx)(x.v42,{}),description:"Create Policies"}),(0,p.jsxs)(s.Z,{sx:{paddingTop:"20px"},children:["MinIO uses Policy-Based Access Control (PBAC) to define the authorized actions and resources to which an authenticated user has access. Each policy describes one or more actions and conditions that outline the permissions of a user or group of users."," "]})]}),(0,p.jsx)(s.Z,{sx:{paddingBottom:"20px"},children:"MinIO PBAC is built for compatibility with AWS IAM policy syntax, structure, and behavior."}),(0,p.jsx)(s.Z,{sx:{paddingBottom:"20px"},children:"Each user can access only those resources and operations which are explicitly granted by the built-in role. MinIO denies access to any other resource or action by default."})]})]})},h=i(92217),m=i(84669),j=i(56087),g=i(81207),y=i(25739),Z=i(87995),b=i(16871),v=i(25469),C=function(){var e=(0,v.TL)(),n=(0,b.s0)(),i=(0,o.useState)(!1),u=(0,t.Z)(i,2),C=u[0],P=u[1],w=(0,o.useState)(""),O=(0,t.Z)(w,2),S=O[0],I=O[1],B=(0,o.useState)(""),k=(0,t.Z)(B,2),A=k[0],E=k[1],M=""!==S.trim()&&-1===S.indexOf(" ");return(0,p.jsx)(o.Fragment,{children:(0,p.jsxs)(r.ZP,{item:!0,xs:12,children:[(0,p.jsx)(c.Z,{label:(0,p.jsx)(m.Z,{to:j.gA.POLICIES,label:"Policies"})}),(0,p.jsx)(l.Z,{children:(0,p.jsx)(y.Z,{title:"Create Policy",icon:(0,p.jsx)(x.sR0,{}),helpbox:(0,p.jsx)(f,{}),children:(0,p.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(i){i.preventDefault(),C||(P(!0),g.Z.invoke("POST","/api/v1/policies",{name:S,policy:A}).then((function(e){P(!1),n("".concat(j.gA.POLICIES))})).catch((function(n){P(!1),e((0,Z.Ih)(n))})))},children:(0,p.jsxs)(r.ZP,{container:!0,item:!0,spacing:1,children:[(0,p.jsx)(r.ZP,{item:!0,xs:12,children:(0,p.jsx)(d.Z,{id:"policy-name",name:"policy-name",label:"Policy Name",autoFocus:!0,value:S,error:function(e){return-1!==e.indexOf(" ")?"Policy name cannot contain spaces":""}(S),onChange:function(e){I(e.target.value)}})}),(0,p.jsx)(r.ZP,{item:!0,xs:12,children:(0,p.jsx)(h.Z,{label:"Write Policy",value:A,onBeforeChange:function(e,n,i){E(i)},editorHeight:"350px"})}),(0,p.jsx)(r.ZP,{item:!0,xs:12,textAlign:"right",children:(0,p.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"20px",gap:"15px"},children:[(0,p.jsx)(a.Z,{type:"button",variant:"outlined",color:"primary",onClick:function(){I(""),E("")},children:"Clear"}),(0,p.jsx)(a.Z,{type:"submit",variant:"contained",color:"primary",disabled:C||!M,children:"Save"})]})})]})})})})]})})}},61120:function(e,n,i){function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}i.d(n,{Z:function(){return t}})},60136:function(e,n,i){i.d(n,{Z:function(){return o}});var t=i(89611);function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&(0,t.Z)(e,n)}},82963:function(e,n,i){i.d(n,{Z:function(){return r}});var t=i(71002),o=i(97326);function r(e,n){if(n&&("object"===(0,t.Z)(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}}]);
|
|
//# sourceMappingURL=2850.0df9a9cb.chunk.js.map
|