GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘ޝpß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Аè•m"сœn|@›U¶ÆÎž—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X ÓØ)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oа^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 143.110.188.43  /  Your IP : 216.73.217.31
Web Server : Apache/2.4.57 (Ubuntu)
System : Linux Client-Droplet 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.10-2ubuntu2.2
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /snap/lxd/41228/share/lxd-ui/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/lxd/41228/share/lxd-ui/assets//StorageVolumeForm-CGooyDb1.js
import{r as f,j as e,d as a,u as E,L,R,D as j,H as y,bq as q,S as F,a2 as I,W as A,J as O,b as Z,a3 as g}from"./index-C5moRkRM.js";import{F as v,e as H}from"./FormMenuItem-C57SBRlg.js";import{l as U,m as $,h as W,n as w,z as B,p as K,u as Y}from"./useStoragePools-Crzn42fh.js";import{C as G,g as d}from"./ConfigurationTable-CbP4ksvx.js";import{D as J}from"./DiskSizeSelector-T95OK-_Q.js";import{o as h}from"./options-DGWNjuoa.js";import{S as Q}from"./StoragePoolSelector-B2DFQOGf.js";import{S as X}from"./ScrollableForm-B4FKGNcE.js";import{a as k,u as ee}from"./useClusterMembers-DYP3yC8I.js";import{u as se}from"./StoragePoolSize-BVlyAxMa.js";import{R as te}from"./ResourceLink-CSSa-WON.js";import{P as ae}from"./ProjectRichChip-CJO1yxV_.js";import{b as z,c as le,a as c,d as oe,e as ne}from"./storageVolume-D_kSLHXQ.js";import{S as V}from"./StoragePoolExplanationTooltip-CY366rOX.js";import{C}from"./ClusterMemberExplanationTooltip-DgqwBVWT.js";import{i as re}from"./snapshots-DbU7kFr9.js";import{S as _}from"./ScrollableConfigurationTable-Co066DBV.js";import{C as M}from"./instanceAndProfilePayloads-OWzzIEo8.js";const ie=[{label:"Every minute",value:"* * * * *"},{label:"Hourly",value:"@hourly"},{label:"Daily",value:"@daily"},{label:"Weekly",value:"@weekly"},{label:"Monthly",value:"@monthly"},{label:"Yearly",value:"@yearly"}],ue=({value:s,setValue:t})=>{const[l,o]=f.useState(!s?.startsWith("@"));return e.jsxs("div",{children:[e.jsxs("div",{className:"snapshot-schedule",children:[e.jsx(a.RadioInput,{label:"Cron syntax",checked:l,onChange:()=>{o(!0),t("")}}),e.jsx(a.RadioInput,{label:"Choose interval",checked:!l,onChange:()=>{o(!1),t("@daily")}})]}),l?e.jsx(a.Input,{id:"snapshots_schedule",name:"snapshots_schedule",placeholder:"Enter cron expression",help:"<minute> <hour> <dom> <month> <dow>, a comma-separated list of schedule aliases (@hourly, @daily, @midnight, @weekly, @monthly, @annually, @yearly), or empty to disable automatic snapshots (the default)",type:"text",value:s,onChange:n=>{t(n.target.value)}}):e.jsx(a.Select,{id:"snapshots_schedule",name:"snapshots_schedule",value:s,onChange:n=>{t(n.target.value)},options:ie})]})},ce=({project:s})=>{const{isRestricted:t}=E();return t?e.jsx(e.Fragment,{children:"Please ask your project administrator to change this setting."}):e.jsxs(e.Fragment,{children:["You can change this setting in"," ",e.jsxs(L,{to:`${R}/ui/project/${encodeURIComponent(s?.name??"")}/configuration`,children:["project configuration",e.jsx(j,{className:"external-link-icon",icon:"external-link"})]})]})},de=(s,t,l,o)=>{const n=Math.min(...s),r=Math.max(...s);return s.length===0||o&&Number(o)<n?{min:Number(o),max:Number(o),sourceType:o?"project":void 0,sourceName:o?l?.name??"default":void 0}:!o||r<o?{min:n,max:r,sourceType:t?"cluster-member":void 0,sourceName:t}:{min:n,max:o,sourceType:void 0,sourceName:void 0}},me=({source:s,sourceType:t})=>t==="project"?e.jsxs(e.Fragment,{children:["in project ",e.jsx(ae,{projectName:s})]}):t==="cluster-member"?e.jsxs(e.Fragment,{children:["on cluster member ",e.jsx(te,{type:"cluster-member",value:s,to:`${R}/ui/cluster/member/${encodeURIComponent(s)}`})]}):null,pe=({driver:s})=>{const l=s===U?e.jsxs(e.Fragment,{children:["Size limit might not be applied. See"," ",e.jsx(y,{docPath:"/reference/storage_dir/#quotas",children:"directory driver quotas"}),"."]}):s===$?e.jsxs(e.Fragment,{children:["Size limit might not be applied. See"," ",e.jsx(y,{docPath:"/reference/storage_btrfs/#quotas",children:"btrfs driver quotas"}),"."]}):null;return l?e.jsxs(e.Fragment,{children:[e.jsx(j,{icon:"warning",style:{marginRight:"0.5rem"}}),l," Use a storage pool with another driver for full quota support.",e.jsx("br",{}),e.jsx("br",{})]}):null},he=(s,t)=>{const l=a.useNotify(),{data:o}=k(t??""),{data:n,isLoading:r,error:i}=se(s,o);if(i)return l.failure("Loading resources failed",i),null;if(r||!n)return null;const u=q(n).map(p=>p.space.total-(p.space.used??0));return de(u,!t||t==="none"?"":t)},be=({pool:s,clusterMember:t})=>{const l=he(s,t);if(!l)return null;const{min:o,max:n,sourceName:r}=l,i=o!==n;return e.jsxs(e.Fragment,{children:["Available space:"," ",e.jsxs("b",{children:[F(o),o!==n&&` - ${F(n)}`,i&&e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{title:"The available space depends on the target cluster member.",children:e.jsx(j,{icon:"information"})})]})]}),r&&W(s?.driver??"")&&e.jsxs(e.Fragment,{children:[" ",e.jsx(me,{source:r,sourceType:"cluster-member"})]}),"."]})},T="Main configuration",N="Snapshots",P="Filesystem",D="ZFS",xe=({active:s,setActive:t,formik:l,poolDriver:o,contentType:n})=>{const r=a.useNotify(),i={active:s,setActive:t},u=l.values.name.length>0?void 0:"Please enter a volume name to enable this section",p=()=>{I("form-navigation","p-bottom-controls")};return f.useEffect(p,[r.notification?.message]),a.useListener(window,p,"resize",!0),e.jsx("div",{className:"p-side-navigation--accordion form-navigation",children:e.jsx("nav",{"aria-label":"Storage volume form navigation",children:e.jsxs("ul",{className:"p-side-navigation__list",children:[e.jsx(v,{label:T,...i}),e.jsx(v,{label:N,...i,disableReason:u}),n==="filesystem"&&w.includes(o)&&e.jsx(v,{label:P,...i,disableReason:u}),o===B&&e.jsx(v,{label:D,...i,disableReason:u})]})})})},ge=(s,t,l)=>{const o=t.find(r=>r.name===s),n=l?.environment?.storage_supported_drivers.find(r=>r.Name===o?.driver);return n?!n.Remote:!1},ve=({formik:s,clusterMembers:t})=>s.values.clusterMember===void 0||s.values.clusterMember==="none"?null:s.values.isCreating?e.jsx(a.Select,{id:"clusterMember",label:e.jsx(C,{children:"Cluster member"}),onChange:l=>{s.setFieldValue("clusterMember",l.target.value)},value:s.values.clusterMember,options:t.map(l=>({label:l.server_name,value:l.server_name})),disabled:s.values.isClusterMemberLocked,required:!0}):e.jsxs(e.Fragment,{children:[e.jsx(a.Label,{forId:"clusterMember",children:e.jsx(C,{children:"Cluster member"})}),e.jsx(a.OutputField,{id:"clusterMember",label:"",value:s.values.clusterMember,help:"Use the migrate button in the header to move the storage volume to another cluster member."})]}),ye=({formik:s,poolError:t,clusterMembers:l=[],pools:o=[],settings:n})=>{const r=o.find(u=>u.name===s.values.pool),i=r?.driver,m=s.values.isCreating;return e.jsxs(X,{children:[e.jsx(a.Row,{children:e.jsxs(a.Col,{size:12,children:[m?e.jsxs(e.Fragment,{children:[e.jsx(a.Label,{forId:"storage-pool-selector-volume",required:m,children:e.jsx(V,{children:"Storage pool"})}),e.jsx(Q,{value:s.values.pool,setValue:u=>{s.setFieldValue("pool",u),ge(u,o,n)&&l.length>0?s.setFieldValue("clusterMember",l[0].server_name):s.setFieldValue("clusterMember",void 0)},selectProps:{id:"storage-pool-selector-volume",error:t}})]}):e.jsxs(e.Fragment,{children:[e.jsx(a.Label,{forId:"storage-pool-selector-volume",children:e.jsx(V,{children:"Storage pool"})}),e.jsx(a.OutputField,{id:"storage-pool-selector-volume",label:"",value:s.values.pool,help:"Use the migrate button in the header to move the volume to a different storage pool."})]}),e.jsx(ve,{formik:s,clusterMembers:l}),m?e.jsx(a.Input,{...z(s,"name"),type:"text",label:"Name",required:!0}):e.jsx(a.OutputField,{id:"storage-volume-name",label:"Name",value:s.values.name,help:"Click the name in the header to rename the volume."}),e.jsx(J,{label:"Size",value:s.values.size,help:e.jsxs(e.Fragment,{children:[e.jsx(pe,{driver:i}),s.values.volumeType==="custom"?"If empty, volume will not have a size limit within its storage pool.":"Size is immutable for non-custom volumes.",e.jsx("br",{}),e.jsx(be,{pool:r,clusterMember:s.values.clusterMember})]}),setMemoryLimit:u=>{H(s),s.setFieldValue("size",u)},disabled:!!s.values.editRestriction||s.values.volumeType!=="custom"}),m?e.jsx(a.Select,{...z(s,"content_type"),options:[{label:"filesystem",value:"filesystem"},{label:"block",value:"block"}],label:"Content type",help:"Type filesystem is ready to mount and write files to. Type block can only be attached to VMs, and is treated like an empty block device.",onChange:u=>{u.target.value==="block"&&(s.setFieldValue("block_filesystem",void 0),s.setFieldValue("block_mount_options",void 0),s.setFieldValue("block_type",void 0),s.setFieldValue("security_shifted",void 0),s.setFieldValue("security_unmapped",void 0)),s.setFieldValue("content_type",u.target.value)}}):e.jsx(a.OutputField,{id:"storage-volume-content-type",label:"Content type",value:s.values.content_type,help:"Content type is immutable after creation."})]})}),s.values.content_type==="filesystem"&&e.jsx("div",{children:e.jsx(G,{rows:[d({formik:s,label:"Security shifted",name:"security_shifted",defaultValue:"",disabled:s.values.security_unmapped==="true",disabledReason:"This setting can't be changed while security unmapped is set to true",children:e.jsx(a.Select,{options:h})}),d({formik:s,label:"Security unmapped",name:"security_unmapped",defaultValue:"",disabled:s.values.security_shifted==="true",disabledReason:"This setting can't be changed while security shifted is set to true",children:e.jsx(a.Select,{options:h})})]})})]})},fe=({formik:s})=>{const{project:t}=A(),l=re(t);return e.jsxs(e.Fragment,{children:[l&&e.jsx(a.Notification,{severity:"caution",title:`Snapshot creation has been disabled for volumes in the project ${t?.name}`,children:e.jsx(ce,{project:t})}),e.jsx(_,{rows:[d({formik:s,label:"Snapshot name pattern",name:"snapshots_pattern",defaultValue:"",children:e.jsx(a.Input,{placeholder:"Enter name pattern",help:e.jsxs(e.Fragment,{children:["Pongo2 template string that represents the snapshot name (used for scheduled snapshots and unnamed snapshots), see"," ",e.jsx(y,{docPath:"/reference/instance_options/#instance-options-snapshots-names",children:"Automatic snapshot names"})]}),type:"text"})}),d({formik:s,label:"Expire after",name:"snapshots_expiry",defaultValue:"",children:e.jsx(a.Input,{placeholder:"Enter expiry expression",type:"text",help:"Expects an expression like 1M 2H 3d 4w 5m 6y"})}),d({formik:s,label:"Schedule",name:"snapshots_schedule",defaultValue:"",children:e.jsx(ue,{value:s.values.snapshots_schedule,setValue:o=>{s.setFieldValue("snapshots_schedule",o)}})})]})]})},je=({formik:s,poolDriver:t})=>e.jsx(_,{rows:[d({formik:s,label:"Block filesystem",name:"block_filesystem",defaultValue:"",children:e.jsx(a.Select,{options:[{label:"auto",value:""},{label:"btrfs",value:"btrfs"},{label:"ext4",value:"ext4"},{label:"xfs",value:"xfs"}]})}),d({formik:s,label:"Block mount options",name:"block_mount_options",defaultValue:"",children:e.jsx(a.Input,{type:"text",help:e.jsxs(e.Fragment,{children:["For a list of available options visit"," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://manpages.ubuntu.com/manpages/jammy/en/man8/mount.8.html#filesystem-independent%20mount%20options",children:"mount manpages"})]})})}),...t===K?[d({formik:s,label:"Block type",name:"block_type",defaultValue:"thin",children:e.jsx(a.Select,{options:[{label:"thin",value:"thin"},{label:"thick",value:"thick"}]})})]:[]]}),_e=({formik:s})=>e.jsx(_,{rows:[d({formik:s,label:"ZFS blocksize",name:"zfs_blocksize",defaultValue:"",children:e.jsx(a.Select,{options:[{label:"default",value:""},{label:"512",value:"512"},{label:"1024",value:"1024"},{label:"2048",value:"2048"},{label:"4096",value:"4096"},{label:"8192",value:"8192"},{label:"16384",value:"16384"}]})}),d({formik:s,label:"ZFS block mode",name:"zfs_block_mode",defaultValue:"",children:e.jsx(a.Select,{options:h})}),d({formik:s,label:"ZFS delegate",name:"zfs_delegate",defaultValue:"",children:e.jsx(a.Select,{options:h})}),d({formik:s,label:"ZFS remove snapshots",name:"zfs_remove_snapshots",defaultValue:"",children:e.jsx(a.Select,{options:h})}),d({formik:s,label:"ZFS use refquota",name:"zfs_use_refquota",defaultValue:"",children:e.jsx(a.Select,{options:h})}),d({formik:s,label:"ZFS reserve space",name:"zfs_reserve_space",defaultValue:"",children:e.jsx(a.Select,{options:h})})]}),Ze=(s,t,l)=>{const o=s.size?.match(/^\d/),n=M(l?.config||{},le()),r={name:s.name,config:{size:o?s.size:void 0,[c("security_shifted")]:s.security_shifted,[c("security_unmapped")]:s.security_unmapped,[c("snapshots_expiry")]:s.snapshots_expiry,[c("snapshots_pattern")]:s.snapshots_pattern,[c("snapshots_schedule")]:s.snapshots_schedule,[c("block_filesystem")]:s.block_filesystem,[c("block_mount_options")]:s.block_mount_options,[c("block_type")]:s.block_type,[c("zfs_blocksize")]:s.zfs_blocksize,[c("zfs_block_mode")]:s.zfs_block_mode,[c("zfs_delegate")]:s.zfs_delegate,[c("zfs_remove_snapshots")]:s.zfs_remove_snapshots,[c("zfs_use_refquota")]:s.zfs_use_refquota,[c("zfs_reserve_space")]:s.zfs_reserve_space,...n},project:t,type:s.volumeType,content_type:s.content_type,description:"",location:"",created_at:"",pool:s.pool},i=Object.keys(r),m=M(l||{},new Set(i));return{...r,...m}},He=({formik:s,section:t,setSection:l})=>{const o=a.useNotify(),{project:n}=O();if(!n)return e.jsx(e.Fragment,{children:"Missing project"});const{data:r=[]}=ee(),{data:i=[],error:m}=Y(),{data:u}=Z();m&&o.failure("Loading storage pools failed",m);const p=()=>{I("form","p-bottom-controls")};f.useEffect(p,[o.notification?.message]),a.useListener(window,p,"resize",!0);const x=i.find(b=>b.name===s.values.pool)?.driver??"";if(i.length>0){const b=[];w.includes(x)||b.push(...oe()),x!=="zfs"&&b.push(...ne());for(const S of b)s.values[S]!==void 0&&s.setFieldValue(S,void 0)}return e.jsxs(a.Form,{onSubmit:s.handleSubmit,className:"form",children:[e.jsx(a.Input,{type:"submit",hidden:!0,value:"Hidden input"}),e.jsx(xe,{active:t,setActive:l,formik:s,poolDriver:x,contentType:s.values.content_type}),e.jsx(a.Row,{className:"form-contents",children:e.jsxs(a.Col,{size:12,children:[t===g(T)&&e.jsx(ye,{formik:s,clusterMembers:r,pools:i,settings:u}),t===g(N)&&e.jsx(fe,{formik:s}),t===g(P)&&e.jsx(je,{formik:s,poolDriver:x}),t===g(D)&&e.jsx(_e,{formik:s})]})})]})};export{pe as D,T as M,me as R,ce as S,ue as a,be as b,ye as c,He as d,fe as e,de as g,ge as h,Ze as v};

Youez - 2016 - github.com/yon3zu
LinuXploit