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/current/share/lxd-ui/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/lxd/current/share/lxd-ui/assets/Overview-DIxizlDz.js
import{j as e,d,x as U,ab as ae,q as k,L as h,R as y,D as w,B as L,r as G,F as R,W as M,ac as A,ad as J,a1 as $,ae as q,af as ne,ag as oe,ah as ie,v as D,ai as le,aj as ce,u as me,w as de}from"./index-C5moRkRM.js";import{u as O}from"./useClusterMembers-DYP3yC8I.js";import{u as ue,a as Y,C as ge}from"./ClusterMemberMemoryUsage-CgQORnHF.js";import{C as pe,a as je,b as xe,d as he}from"./ClusterMemberStatus-CyZ_jfn4.js";import{u as ve}from"./useSortTableData-DOqSqaiW.js";import{M as F}from"./Meter-BW_a3lG4.js";import{g as Z,a as fe}from"./resourceDetails-XsDjMA3V.js";import{C as be}from"./ClusterMemberExplanationTooltip-DgqwBVWT.js";import{S as Ne}from"./ServerExplanationTooltip-Dmr0w-c9.js";import{a as Ce}from"./useInstances-B6o12EBG.js";import{I as we}from"./InstanceExplanationTooltip-Bvex_VST.js";import{I as Se}from"./InstanceStatus-BeAPw0ld.js";import{u as ye}from"./projects-BYXh-TO0.js";import{B as Ie}from"./Breadcrumb-CpbG2SRs.js";import{a as X,g as Le,d as Pe}from"./devices-DziiOcJy.js";import{P as Te}from"./ProjectExplanationTooltip-Dj4mCukp.js";import{E as Me}from"./ExplanationTooltip-AfbgOckm.js";import{g as ee,h as _e,u as Ee}from"./useStoragePools-Crzn42fh.js";import{S as $e}from"./StoragePoolSize-BVlyAxMa.js";import{i as Fe}from"./identity-vaJmuAxa.js";import{P as Ue}from"./PermissionGroupExplanationTooltip-C7iAtra7.js";import{u as Re,g as Ae,a as De,W as Oe}from"./warnings-B-W2Dr5h.js";import"./cluster-members-B9SkLa7e.js";import"./promises-DrIa_NWl.js";import"./index-BCn5QfZZ.js";const ke=({member:s})=>{const{data:t,isLoading:r}=ue(s.server_name,s.status==="Online"),a=t?.sysinfo?.logical_cpus??0,l=t?.sysinfo?.load_averages?.[0]??0;if(r)return e.jsx(d.Spinner,{className:"u-loader"});if(!a)return e.jsx("span",{className:"u-text--muted",children:"-"});const c=Math.min(100,l/a*100),i=`member-cpu-${encodeURIComponent(s.server_name)}`;return e.jsxs(e.Fragment,{children:[e.jsx("span",{id:i,className:"u-off-screen",children:`CPU load average for ${s.server_name}`}),e.jsx(F,{percentage:c,text:Z(c,!0),ariaLabelledby:i})]})},We=()=>{const s=U(),{data:t=[],isLoading:r}=O(),a=t.filter(o=>o.status==="Online").map(o=>o.server_name),l=t.some(o=>o.status!=="Online"),c=Y(a),{data:i,isLoading:n}=ae(!s),m=s?r||c.some(o=>o.isLoading):n,j=(s?c:[i]).reduce((o,C)=>{const b=s?C.data?.sysinfo:i?.sysinfo;return b&&(o.memory.total+=b.total_ram,o.memory.used+=Math.max(0,b.total_ram-b.free_ram-b.buffered_ram),o.cpu.total+=b.logical_cpus||0,o.cpu.used+=b.load_averages?.[0]||0),o},{memory:{total:0,used:0},cpu:{total:0,used:0}}),f=j.memory.total?j.memory.used/j.memory.total*100:0,u=j.cpu.total?Math.min(100,j.cpu.used/j.cpu.total*100):0;return e.jsxs(e.Fragment,{children:[s&&e.jsxs(e.Fragment,{children:[e.jsx("h5",{className:k({"u-no-margin--bottom":l}),children:"Resource usage"}),l&&e.jsx("p",{children:"Resource usage includes data from online members only"})]}),e.jsxs("div",{className:k("total-resources",{"with-margin-bottom":!s,"with-border":s}),children:[e.jsxs("div",{className:"total-memory",children:[e.jsx("label",{id:"total-memory-label",children:"Total memory"}),m?e.jsx("div",{children:e.jsx(d.Spinner,{text:"Loading..."})}):e.jsx(F,{percentage:f,text:fe(j.memory.used,j.memory.total,f),ariaLabelledby:"total-memory-label"})]}),e.jsxs("div",{className:"total-cpu",children:[e.jsx("label",{id:"total-cpu-label",children:"Total CPU"}),m?e.jsx("div",{children:e.jsx(d.Spinner,{text:"Loading..."})}):e.jsx(F,{percentage:u,text:Z(u),ariaLabelledby:"total-cpu-label"})]})]})]})},S=4,x=(s,t,r,a)=>e.jsxs(d.Card,{className:s,title:t,children:[r,e.jsx("div",{className:"card-footer",children:a})]}),W=()=>{const s=U(),{data:t=[],error:r,isLoading:a}=O(),l=t.filter(g=>g.status==="Online").map(g=>g.server_name),c=Y(l),i=l.reduce((g,I,v)=>{const N=c[v]?.data;return N&&(g[I]=N),g},{}),n=[{content:"Members",sortKey:"name"},{content:"Status",sortKey:"status",className:"status-header"},{content:"Memory",sortKey:"memory"},{content:"CPU",sortKey:"cpu"}],m=t.map(g=>{const I=g.server_name,v=i[g.server_name]?.sysinfo,N=v?.total_ram??0,P=N?Math.max(0,N-(v?.free_ram??0)-(v?.buffered_ram??0))/N*100:0,T=v?.logical_cpus??0,E=T?Math.min(100,(v?.load_averages?.[0]??0)/T*100):0;return{key:I,name:I,className:"u-row",columns:[{content:e.jsx(h,{to:`${y}/ui/cluster/member/${encodeURIComponent(g.server_name)}`,className:"u-truncate",children:g.server_name}),role:"rowheader","aria-label":"Member",title:`Cluster member ${g.server_name}`},{content:e.jsx(pe,{member:g}),"aria-label":"Status"},{content:e.jsx(ge,{member:g}),"aria-label":"Memory"},{content:e.jsx(ke,{member:g}),"aria-label":"CPU"}],sortData:{name:g.server_name.toLowerCase(),status:g.status.toLowerCase(),memory:P,cpu:E}}}),{rows:p,updateSort:j}=ve({rows:m}),f=g=>{if(!g.length)return[];const I=xe(g);return Object.entries(I).map(([N,P])=>e.jsxs(G.Fragment,{children:[e.jsx(d.Icon,{name:he(N),className:"status-icon"}),P," ",N]},N))},u="overview-card clustering",o=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"overview-card-title",children:[e.jsx(w,{icon:"cluster-host"})," ",s?"Clustering":"Server"]}),s?e.jsx(be,{}):e.jsx(Ne,{})]}),C=e.jsx(h,{to:`${y}/ui/cluster/${s?"members":"server"}`,children:s?"Clustering details":"Server details"});if(a)return x(u,o,e.jsx(d.Spinner,{className:"u-loader",text:`Loading ${s?"cluster":"server"} details...`}),C);if(r)return x(u,o,e.jsxs(e.Fragment,{children:[e.jsx(w,{icon:"error-fill",className:"margin-right--large"})," Error while loading ",s?"cluster":"server"," details: ",r.message]}),C);const b=e.jsx(d.MainTable,{className:"overview-table","aria-label":"Cluster members",headers:n,rows:t.length>S?void 0:p,sortable:!0,onUpdateSort:j,responsive:!0});return x(u,o,e.jsxs(e.Fragment,{children:[s&&e.jsx(d.List,{inline:!0,middot:!0,items:[`${t.length} ${L("member",t.length)}`,`leader: ${je(t)?.server_name??"-"}`,...f(t)]}),e.jsx(We,{}),s&&(t.length>S?e.jsx(d.TablePagination,{id:"cluster-members-pagination",data:p,pageLimits:[S],itemName:"cluster member",position:"below",className:"u-no-margin--bottom","aria-label":"Cluster members pagination control",children:b}):b)]}),C)},se=["running","stopped","frozen","error"],ze={running:"var(--vf-color-button-positive-default)",stopped:"var(--vf-color-text-default)",frozen:"var(--vf-color-link-default)",error:"var(--vf-color-button-negative-default)"},Be=s=>ze[s],te=(s,t)=>{const r=new URLSearchParams;return r.append("status",R(s)),`${t}?${r.toString()}`},Ve=new Set(["Freezing","Frozen"]),z={status:{running:0,stopped:0,frozen:0,error:0},containerCount:0,virtualMachineCount:0},Ke=s=>s.reduce((t,r)=>{const{status:a,type:l}=r;return a==="Running"?t.status.running+=1:a==="Stopped"?t.status.stopped+=1:Ve.has(a)?t.status.frozen+=1:a==="Error"&&(t.status.error+=1),l==="container"?t.containerCount+=1:l==="virtual-machine"&&(t.virtualMachineCount+=1),t},{...z,status:{...z.status}}),He=(s,t)=>se.filter(r=>s[r]>0).map(r=>({color:Be(r),href:te(r,t),tooltip:`${s[r]} ${R(r)}`,value:s[r]})),_=({title:s,subtitle:t})=>e.jsx(e.Fragment,{children:e.jsxs("div",{className:"overview-empty-state",children:[e.jsx("p",{className:"overview-card-subtitle u-no-margin--bottom",children:s}),t&&e.jsx("p",{children:t})]})}),B=()=>{const{project:s,projectName:t}=M(),r=t===q,{data:a=[],error:l,isLoading:c}=Ce(r?null:t),{canCreateInstances:i}=ye(),{data:n=[]}=A(),m=G.useMemo(()=>Ke(a),[a]),{containerCount:p,virtualMachineCount:j,status:f}=m,u="overview-card instances",o=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"overview-card-title",children:[e.jsx(w,{icon:"pods"})," Instances",!c&&!l&&a.length>0&&` (${a.length})`]}),e.jsx(we,{})]}),C=$(t),b=e.jsx(h,{to:C,children:"Instances list"});if(c)return x(u,o,e.jsx(d.Spinner,{className:"u-loader",text:"Loading instances..."}),b);if(l)return x(u,o,e.jsxs(e.Fragment,{children:[e.jsx(w,{icon:"error-fill",className:"margin-right--large"})," Error while loading instances: ",l.message]}),b);if(a.length===0){const v=J(n),N=n.find(re=>re.name===v),P=r?N:s,T=$(P?.name??"default"),E=i(P);return x(u,o,e.jsx(_,{title:"No instances found",subtitle:E&&e.jsxs(e.Fragment,{children:["Create an instance on the"," ",e.jsx(h,{to:T,children:"instances list"})," page"]})}),b)}const g=He(f,C),I=se.map(v=>({key:v,name:v,className:"u-row",columns:[{content:e.jsx(Se,{status:R(v)}),role:"rowheader","aria-label":"Status"},{content:e.jsx(h,{className:"status-link p-link--soft",to:te(v,C),children:f[v]}),className:"u-align--right","aria-label":"Instances"}]}));return x(u,o,e.jsxs(e.Fragment,{children:[e.jsx(d.List,{inline:!0,middot:!0,items:[`${j} ${L("VM",j)}`,`${p} ${L("container",p)}`],className:"u-no-margin--bottom"}),e.jsxs("div",{className:"card-content",children:[e.jsxs("div",{className:"group-by-status-chart",children:[e.jsx("p",{className:"chart-title",children:"Instances by status"}),e.jsx(d.DoughnutChart,{segments:g,size:150,segmentHoverWidth:45,segmentThickness:40,chartID:"dashboard-instances-by-status-doughnut-chart",className:"group-by-status-doughnut-chart"})]}),e.jsx(d.MainTable,{className:"overview-table group-by-status-table","aria-label":"Instances by status",headers:[{content:"Status",className:"overview-card-subtitle status-header"},{content:"Instances",className:"overview-card-subtitle u-align--right"}],rows:I,responsive:!0})]})]}),b)},Qe=({project:s})=>{const{data:t,isLoading:r}=X("default",s),a=t&&Le(t);return r?e.jsx(d.Spinner,{}):a==="none"||!a?e.jsx(e.Fragment,{children:"-"}):e.jsx(h,{to:`${y}/ui/project/${encodeURIComponent(s)}/network/${encodeURIComponent(a)}`,className:"u-truncate",title:a,children:a})},Ge=({project:s})=>{const{data:t,isLoading:r}=X("default",s),a=t&&Pe(t);return r?e.jsx(d.Spinner,{}):a?e.jsx(h,{to:`${y}/ui/project/${encodeURIComponent(s)}/storage/pool/${encodeURIComponent(a)}`,className:"u-truncate",title:a,children:a}):e.jsx(e.Fragment,{children:"-"})},Je=({projects:s,isAllProjects:t=!1})=>{const r=[{content:"Name"},{content:"Description"},{content:"Instances",className:"instances u-align--right"},{content:"Default root storage",className:"pre-wrap"},{content:"Default network",className:"pre-wrap"}],a=new Map(s.map(n=>[n.name,ne(n).length])),c=(t?[...s].sort((n,m)=>{const p=(a.get(m.name)??0)-(a.get(n.name)??0);return p!==0?p:oe(n,m)||n.name.localeCompare(m.name)}):s).map(n=>{const m=a.get(n.name)??0;return{key:n.name,className:"u-row",columns:[{content:t?e.jsx(h,{to:ie(n.name),className:"u-truncate",title:n.name,children:n.name}):e.jsx("span",{className:"u-truncate",title:n.name,children:n.name}),role:"rowheader","aria-label":"Name"},{content:e.jsx("span",{className:"description",title:n.description,children:n.description||"-"}),role:"cell","aria-label":"Description"},{content:e.jsx(h,{to:`${y}/ui/project/${encodeURIComponent(n.name)}/instances`,className:"u-truncate",title:n.name,children:m}),role:"cell","aria-label":"Instances",className:"u-align--right"},{content:e.jsx(Ge,{project:n.name}),role:"cell","aria-label":"Default root storage"},{content:e.jsx(Qe,{project:n.name}),role:"cell","aria-label":"Default network"}]}}),i=e.jsx(d.MainTable,{id:"projects-table",headers:r,rows:!t||s.length<=S?c:void 0,className:"overview-table",emptyStateMsg:"No projects found",responsive:!0});return t&&s.length>S?e.jsx(d.TablePagination,{id:"projects-pagination",data:c,pageLimits:[S],itemName:"project",position:"below",className:"u-no-margin--bottom","aria-label":"Projects pagination control",children:i}):i},V=()=>{const{project:s,projectName:t}=M(),r=t===q,{canCreateProjects:a}=D(),{data:l=[],error:c,isLoading:i}=A(),n=r?l:s?[s]:[],m="overview-card projects",p=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"overview-card-title",children:[e.jsx(w,{icon:"folder"}),e.jsx("span",{className:r?void 0:"u-off-screen",children:r?e.jsxs(e.Fragment,{children:["All projects",!i&&!c&&n.length>0&&` (${n.length})`]}):"Projects"})]}),e.jsx(Te,{})]}),j=r?e.jsx(h,{to:ce,children:"All instances list"}):e.jsx(h,{to:$(t),children:"Project instances list"}),f=!r&&e.jsxs(Ie,{className:"projects-breadcrumb",children:[e.jsx("li",{className:"u-no-margin--bottom continuous-breadcrumb p-heading--3",children:e.jsx(h,{to:le,children:"All projects"})}),e.jsx("li",{className:"u-no-margin--bottom continuous-breadcrumb p-heading--3",children:t})]}),u=o=>e.jsxs("div",{className:"projects-card",children:[f,x(m,p,o,j)]});return i?u(e.jsx(d.Spinner,{className:"u-loader",text:"Loading projects..."})):c?u(e.jsxs("div",{className:"error-message",children:[e.jsx(w,{icon:"error-fill",className:"margin-right--large"})," Error while loading projects: ",c.message]})):n.length===0?u(e.jsx(_,{title:"No projects found",subtitle:a()&&e.jsx(e.Fragment,{children:"Create a project in the navigation menu project dropdown"})})):u(e.jsx(Je,{projects:n,isAllProjects:r}))},qe=({pool:s,project:t})=>{const r=U(),{data:a=[]}=O(),l=ee(s).length,c=r&&_e(s.driver)&&a.length>1,i=`${y}/ui/project/${encodeURIComponent(t)}/storage/pool/${encodeURIComponent(s.name)}`;return e.jsxs("div",{className:"storage-pool-details",children:[e.jsxs("p",{className:"u-truncate",title:s.name,children:[e.jsx(h,{to:i,children:e.jsx("b",{children:s.name})}),s.status==="Errored"&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(d.Chip,{className:"u-no-margin",appearance:"negative",value:"Errored",isReadOnly:!0})]})]}),e.jsxs("p",{children:[l," ",L("volume",l)]}),c?e.jsxs("p",{className:"u-no-margin--bottom",children:["Usage varies per member.",e.jsx("br",{}),e.jsx(h,{to:i,children:"See pool details"})]}):e.jsx($e,{pool:s,hasMeterBar:!0,hasPercentage:!0})]})},K=()=>{const{data:s=[],error:t,isLoading:r}=Ee(),{projectName:a,isAllProjects:l}=M(),{data:c=[]}=A(),{canCreateStoragePools:i}=D(),n=s.reduce((o,C)=>o+ee(C).length,0),m="overview-card storage",p=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"overview-card-title",children:[e.jsx(d.Icon,{name:"storage-pool"})," Storage"]}),e.jsx(Me,{explanation:e.jsxs(e.Fragment,{children:["Storage pools host instance and image data. ",e.jsx("br",{}),"Storage volumes provide storage for instances."]}),docPath:"/storage"})]}),j=l?c.find(o=>o.name===J(c))?.name??"default":a,f=`${y}/ui/project/${encodeURIComponent(j)}/storage/pools`,u=l?null:e.jsx(h,{to:f,children:"Storage pools list"});if(r)return x(m,p,e.jsx(d.Spinner,{className:"u-loader",text:"Loading storage pools..."}),u);if(t)return x(m,p,e.jsxs("div",{className:"error-message",children:[e.jsx(w,{icon:"error-fill",className:"margin-right--large"})," Error loading storage pools: ",t.message]}),u);if(s.length===0){const o=i();return x(m,p,e.jsx(_,{title:"No storage pools found",subtitle:o&&e.jsxs(e.Fragment,{children:["Create a storage pool on the"," ",e.jsx(h,{to:f,children:"storage pools list"})," page"]})}),u)}return x(m,p,e.jsxs(e.Fragment,{children:[e.jsx(d.List,{inline:!0,middot:!0,items:[`${s.length} ${L("pool",s.length)}`,`${n} ${L("volume",n)}`]}),e.jsx("div",{className:"storage-pools-container",children:s.map(o=>e.jsx(qe,{pool:o,project:j},o.name))})]}),u)},H=()=>{const{currentIdentity:s,effectiveGroups:t,isAuthLoading:r}=me(),a=t?.includes("admins")??!1,l=s&&Fe(s);if(r||a||l)return null;const c="overview-card permissions",i=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"overview-card-title",children:[e.jsx(w,{icon:"user"})," Permissions"]}),e.jsx(Ue,{})]}),n=e.jsx(h,{to:`${y}/ui/permissions/groups`,children:"Auth group details"}),m=e.jsx("p",{className:"u-no-margin--bottom",children:"Overview information is filtered by your auth groups."});return t?.length?x(c,i,e.jsxs(e.Fragment,{children:[m,e.jsxs("div",{children:[e.jsxs("span",{children:["Your ",L("group",t?.length),": "]}),e.jsx(d.List,{inline:!0,middot:!0,items:t,className:"effective-groups-list u-no-margin--bottom"})]})]}),n):x(c,i,m,n)},Q=()=>{const{canViewWarnings:s}=D(),{data:t=[],error:r,isLoading:a}=Re(s()),{project:l,isAllProjects:c}=M(),i=t.filter(u=>u.status==="new"&&(!u.project||c||u.project===l?.name)),n=e.jsx(h,{to:`${y}/ui/warnings?status=new`,children:"Warnings list"}),m="overview-card warnings",p=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"overview-card-title",children:[e.jsx(w,{icon:"warning"})," Warnings"]}),e.jsx(Oe,{})]});if(a)return x(m,p,e.jsx(d.Spinner,{className:"u-loader",text:"Loading warnings..."}),n);if(r&&s())return x(m,p,e.jsxs("div",{className:"error-message",children:[e.jsx(w,{icon:"error-fill",className:"margin-right--large"})," Error while loading warnings: ",r.message]}),n);if(i.length===0||!s())return x(m,p,e.jsx(_,{title:"No warnings found"}),n);const j=Ae(i,"overview"),f=e.jsx(d.MainTable,{id:"warning-table",headers:De("overview"),rows:i.length>S?void 0:j,sortable:!0,defaultSort:"severity",defaultSortDirection:"descending",className:"warnings-table overview-table",responsive:!0});return x(m,p,i.length>S?e.jsx(d.TablePagination,{id:"warnings-pagination",data:j,pageLimits:[S],itemName:"warning",position:"below",className:"u-no-margin--bottom","aria-label":"Warnings pagination control",children:f}):f,n)},Cs=()=>{const s=de(1091);return e.jsx(d.CustomLayout,{mainClassName:"overview",contentClassName:"overview-content",children:e.jsx("div",{className:"overview-columns",children:s?e.jsxs("div",{className:"overview-column",children:[e.jsx(H,{}),e.jsx(V,{}),e.jsx(W,{}),e.jsx(B,{}),e.jsx(K,{}),e.jsx(Q,{})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"overview-column",children:[e.jsx(V,{}),e.jsx(W,{}),e.jsx(Q,{})]}),e.jsxs("div",{className:"overview-column",children:[e.jsx(H,{}),e.jsx(B,{}),e.jsx(K,{})]})]})})})};export{Cs as default};

Youez - 2016 - github.com/yon3zu
LinuXploit