403Webshell
Server IP : 13.213.54.232  /  Your IP : 216.73.217.11
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets//CreateProfile-fa64def5.js
import{e as F,d as o,m as E,i as I,r as n,j as e,z as D,A as O,B as R,b as k,J as L,q as f}from"./index-13b2882d.js";import{c as A,a as M,u as T}from"./index.esm-82c30f37.js";import{S as w,u as Y}from"./updateMaxHeight-325b3cd4.js";import{Y as q,h as B,a as _,y as V,d as K}from"./instanceValidation-45cfba9a.js";import{D as U,N as $,R as z,S as H,a as Q,C as G,f as J,b as W,s as X,c as Z,d as ee}from"./NetworkDevicesForm-bcf4be77.js";import{M as p,P as se,D as te,N as ie,R as ae,S as oe,a as re,C as ne,Y as y}from"./ProfileFormMenu-3458e77a.js";import{P as le,p as ce}from"./ProfileDetailsForm-809e7c02.js";import"./instanceConfigInheritance-fbf987f8.js";import"./formFields-fc140429.js";import"./ConfigurationTable-1a9d4d6f.js";import"./ConfigFieldDescription-00c1a193.js";import"./StorageVolumeForm-228515f8.js";import"./StorageVolumeFormMenu-e90b9f5c.js";import"./FormMenuItem-c8a1a121.js";import"./DiskSizeSelector-dd5e138a.js";import"./networks-5caac489.js";import"./AutoExpandingTextArea-3a779a81.js";const Ee=()=>{var u;const l=F(),r=o.useNotify(),{project:a}=E(),c=I(),h=n.useState(null),[i,S]=n.useState(p),[j,x]=n.useState(!1);if(!a)return e.jsx(e.Fragment,{children:"Missing project"});const C=A().shape({name:M().test("deduplicate","A profile with this name already exists",s=>D(s,a,h,"profiles")).required()}),m=()=>{Y("form-contents","p-bottom-controls")};n.useEffect(m,[(u=r.notification)==null?void 0:u.message,i]),O("resize",m);const t=T({initialValues:{name:"",devices:[],readOnly:!1,type:"profile"},validationSchema:C,onSubmit:s=>{const b=s.yaml?V(s.yaml):d(s);L(JSON.stringify(b),a).then(()=>{l(`/ui/project/${a}/profiles`,r.queue(r.success(`Profile ${s.name} created.`)))}).catch(v=>{t.setSubmitting(!1),r.failure("Profile creation failed",v)}).finally(()=>{c.invalidateQueries({queryKey:[f.profiles]}),c.invalidateQueries({queryKey:[f.projects,a]})})}}),d=s=>({...ce(s),devices:J(s.devices),config:{...W(s),...X(s),...Z(s),...ee(s)}}),g=s=>{t.values.yaml&&s!==y&&t.setFieldValue("yaml",void 0),S(s)},N=()=>{x(s=>!s)};function P(){const s=d(t.values);return K(s)}return e.jsxs(R,{title:"Create a profile",contentClassName:"create-profile",children:[e.jsxs(o.Form,{onSubmit:t.handleSubmit,stacked:!0,className:"form",children:[e.jsx(se,{active:i,setActive:g,isConfigOpen:j,toggleConfigOpen:N,hasName:!!t.values.name,formik:t}),e.jsx(o.Row,{className:"form-contents",children:e.jsxs(o.Col,{size:12,children:[e.jsx(k,{}),i===p&&e.jsx(le,{formik:t,isEdit:!1}),i===te&&e.jsx(U,{formik:t,project:a}),i===ie&&e.jsx($,{formik:t,project:a}),i===ae&&e.jsx(z,{formik:t}),i===oe&&e.jsx(H,{formik:t}),i===re&&e.jsx(Q,{formik:t}),i===ne&&e.jsx(G,{formik:t}),i===y&&e.jsx(q,{yaml:P(),setYaml:s=>void t.setFieldValue("yaml",s),children:e.jsx(o.Notification,{severity:"caution",title:"Before you edit the YAML",children:"Changes will be discarded, when switching back to the guided forms."})})]})},i)]}),e.jsxs("div",{className:"p-bottom-controls",id:"form-footer",children:[e.jsx("hr",{}),e.jsx(o.Row,{className:"u-align--right",children:e.jsxs(o.Col,{size:12,children:[e.jsx(o.Button,{appearance:"base",onClick:()=>l(`/ui/project/${a}/profiles`),children:"Cancel"}),e.jsx(w,{isSubmitting:t.isSubmitting,isDisabled:!t.isValid||!t.values.name||B(t)||_(t),buttonLabel:"Create",onClick:()=>void t.submitForm()})]})})]})]})};export{Ee as default};

Youez - 2016 - github.com/yon3zu
LinuXploit