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/LocalImageList-DljAIIGg.js
import{K as T,d as o,r as L,s as F,j as e,D as B,t as v,B as S,c as U,w as z,R as D,ap as q,h as M,aq as _,e as O,f as Y,S as P,L as H,J as V,ar as J,o as X}from"./index-C5moRkRM.js";import{d as G,b as W,e as Z,f as ee,a as te}from"./useImages-B2pew3-d.js";import{R as K}from"./ResourceLabel-5vQU6ndJ.js";import{u as E}from"./images-CsQzj70E.js";import{d as R,l as ae,e as se,f as oe,h as ie}from"./images-CQST2R8G.js";import{C as ne}from"./CreateInstanceFromImageBtn-BF271NOM.js";import{u as le}from"./useSortTableData-DOqSqaiW.js";import{S as re}from"./SelectableMainTable-wRMsxkIr.js";import{g as ce}from"./promises-DrIa_NWl.js";import{B as me}from"./BulkDeleteButton--AqObKRB.js";import{u as de}from"./useBulkDetails-lYUt51kB.js";import{E as ue}from"./ExpandableList-Z2D161-q.js";import{E as pe}from"./ExplanationTooltip-AfbgOckm.js";import{P as k}from"./PageHeader-BRr9_J16.js";import{S as ge}from"./SelectedTableNotification-DR6-T9f2.js";import{R as he}from"./ResourceLink-CSSa-WON.js";import{P as fe}from"./ProgressBar-DkFjDALx.js";import{u as Q}from"./projects-BYXh-TO0.js";import"./index-BCn5QfZZ.js";import"./imageRegistry-DUJSvWII.js";import"./image-registries-CGiwo-wc.js";const be=({image:s,project:i})=>{const p=T(),n=o.useToastNotification(),[m,r]=L.useState(!1),c=F(),{canDeleteImage:d}=E(),f=R(s),h=()=>{r(!0);const g=e.jsx(K,{bold:!0,type:"image",value:f});G(s,i).then(y=>{p.set(y.metadata.id,()=>{c.invalidateQueries({predicate:b=>b.queryKey[0]===v.images}),c.invalidateQueries({queryKey:[v.projects,i]}),n.success(e.jsxs(e.Fragment,{children:["Image ",g," deleted."]}))},b=>n.failure(`Image ${f} deletion failed`,new Error(b),g),()=>{r(!1)})}).catch(y=>{n.failure(`Image ${f} deletion failed`,y,g),r(!1)})};return e.jsx(o.ConfirmationButton,{loading:m,confirmationModalProps:{title:"Confirm delete",children:e.jsxs("p",{children:["This will permanently delete image"," ",e.jsx(K,{type:"image",value:f,bold:!0}),".",e.jsx("br",{}),"This action cannot be undone, and can result in data loss."]}),confirmButtonLabel:d(s)?"Delete":"You do not have permission to delete this image",onConfirm:h},className:"has-icon",appearance:"base",disabled:m||!d(s),shiftClickEnabled:!0,showShiftClickHint:!0,children:e.jsx(B,{icon:"delete"})})},xe=({images:s,project:i,onStart:p,onFinish:n})=>{const m=T(),r=o.useToastNotification(),[c,d]=L.useState(!1),f=F(),{canDeleteImage:h}=E(),g=de(),y=s.length,b=s.filter(u=>h(u)),l=b.map(u=>u.fingerprint),a=b.length,x=()=>{d(!0),p(),W(l,i,m).then(u=>{const{fulfilledCount:I,rejectedCount:t}=ce(u);I===a?r.success(e.jsxs(e.Fragment,{children:[e.jsx("b",{children:l.length})," ",S("image",l.length)," deleted."]}),g(u)):t===a?r.failure("Image bulk deletion failed",void 0,e.jsxs(e.Fragment,{children:[e.jsx("b",{children:a})," ",S("image",a)," could not be deleted."]}),g(u)):r.failure("Image bulk deletion partially failed",void 0,e.jsxs(e.Fragment,{children:[e.jsx("b",{children:I})," ",S("image",I)," ","deleted.",e.jsx("br",{}),e.jsx("b",{children:t})," ",S("image",t)," could not be deleted."]}),g(u)),f.invalidateQueries({predicate:N=>{const C=N.queryKey[0];return C===v.images||C===v.projects}}),d(!1),n()}).catch(u=>{d(!1),r.failure("Image bulk deletion failed",u)})},j=()=>{if(a===y)return;const u=y-a;return[`${a} ${S("image",a)} will be deleted.`,`${u} ${S("image",u)} that you do not have permission to delete will be ignored.`]};return e.jsx(me,{entities:s,deletableEntities:b,entityType:"image",onDelete:x,disabledReason:a===0?`You do not have permission to delete the selected ${S("image",a)}`:void 0,buttonLabel:`Delete ${S("image",y)}`,confirmationButtonProps:{appearance:"",disabled:c||a===0,loading:c},bulkDeleteBreakdown:j(),className:"u-no-margin--bottom"})},je=({children:s})=>e.jsx(pe,{explanation:"Local images are images stored on the LXD server.",docPath:"/image-handling/",docLabel:"Learn more about images",children:s}),ye=({project:s})=>{const i=U(),p=`${D}/ui/project/${encodeURIComponent(s)}/storage/custom-isos`,n=z(),m=()=>r=>{r.preventDefault(),i(p)};return e.jsxs(o.Button,{className:"u-no-margin--bottom u-float-right",hasIcon:!n,href:p,onClick:m,element:"a",children:[!n&&e.jsx(B,{icon:"iso"}),e.jsx("span",{children:"Custom ISOs"})]})},Ie=({image:s,project:i})=>{const p=o.useToastNotification(),[n,m]=L.useState(!1),r=R(s),c=s.update_source==null,d=`${D}/1.0/images/${encodeURIComponent(s.fingerprint)}/export?project=${encodeURIComponent(i)}`,f=()=>{m(!0);const h=e.jsx(he,{to:`${D}/ui/project/${encodeURIComponent(i)}/local-images`,type:"image",value:r});try{const g=document.createElement("a");g.href=d,g.download="download",g.click(),window.URL.revokeObjectURL(d),p.success(e.jsxs(e.Fragment,{children:["Image ",h," download started. Please check your downloads folder."]}))}catch(g){p.failure(`Image ${r} was unable to download.`,g,h)}finally{m(!1)}};return e.jsx(o.ActionButton,{title:c?"Export image":"Cannot export this image format.","aria-label":"export image",loading:n,onClick:f,className:"has-icon",appearance:"base",disabled:!c||n,children:e.jsx(B,{icon:"export"})})},Ne=({close:s,projectName:i})=>{const p=T(),n=o.useToastNotification(),[m,r]=L.useState(null),c=F(),{canCreateImageAliases:d}=Q(),{data:f}=q(i),h=()=>{const a=e.jsx(H,{to:`${D}/ui/project/${encodeURIComponent(i)}/local-images`,children:"imported"});n.success(e.jsxs(e.Fragment,{children:["Image ",a,"."]}))},g=a=>{a.target.files&&l.setFieldValue("fileList",a.target.files)},y=a=>{if(a.length===1)return a[0];{const x=new FormData,j=Array.from(a).sort((u,I)=>u.size-I.size);return x.append("metadata",j[0]),x.append("rootfs.img",j[1]),x}},b=()=>{c.invalidateQueries({predicate:a=>a.queryKey[0]===v.images})},l=M({initialValues:{alias:"",isPublic:!1,fileList:null},validationSchema:O().shape({alias:Y()}),onSubmit:a=>{if(a.fileList){if(a.fileList.length>2){s(),n.failure("Image import failed.",new Error("Too many files selected"));return}Z(y(a.fileList),a.isPublic,r,i).then(x=>{n.info(e.jsx(e.Fragment,{children:"Creation of image from file started."})),p.set(x.metadata.id,j=>{if(a.alias){const u=_(j);ee(u,a.alias,i).then(b).catch(I=>{n.failure("Image import succeeded. Failed to create an alias.",I)})}b(),h()},j=>{n.failure("Image import failed.",new Error(j))})}).catch(x=>{const j=new Error(x.response?.data.error);n.failure("Image import failed",j)}).finally(()=>{s()})}else s(),n.failure("Image import failed",new Error("Missing files"))}});return e.jsx(o.Modal,{close:s,title:"Import image from file",className:"import-image-modal",buttonRow:e.jsxs(e.Fragment,{children:[m&&e.jsxs(e.Fragment,{children:[e.jsx(fe,{percentage:Math.floor(m.percentage)}),e.jsxs("p",{children:[P(m.loaded)," loaded of"," ",P(m.total??0)]})]}),e.jsx(o.Button,{appearance:"base",className:"u-no-margin--bottom",type:"button",onClick:s,children:"Cancel"}),e.jsx(o.ActionButton,{appearance:"positive",className:"u-no-margin--bottom",loading:l.isSubmitting,disabled:!l.isValid||l.isSubmitting||!l.values.fileList,onClick:()=>{l.submitForm()},children:"Import image"})]}),children:e.jsxs(o.Form,{className:m?"u-hide":"",onSubmit:l.handleSubmit,children:[e.jsx(o.Input,{type:"file",name:"fileList",label:"Image backup file",onChange:g,multiple:!0}),e.jsx(o.Input,{...l.getFieldProps("alias"),type:"text",label:"Alias",placeholder:"Enter alias",error:l.touched.alias?l.errors.alias:null,disabled:!d(f),title:d(f)?"":"You do not have permission to create image aliases"}),e.jsx(o.CheckboxInput,{...l.getFieldProps("isPublic"),label:"Make the image publicly available",error:l.touched.isPublic?l.errors.isPublic:null}),e.jsx(o.Input,{type:"submit",hidden:!0,value:"Hidden input",disabled:!l.isValid||!l.values.fileList})]})})},Ce=({projectName:s})=>{const{openPortal:i,closePortal:p,isOpen:n,Portal:m}=o.usePortal(),r=z(),{data:c}=q(s),{canCreateImages:d}=Q();return e.jsxs(e.Fragment,{children:[n&&e.jsx(m,{children:e.jsx(Ne,{close:p,projectName:s})}),e.jsxs(o.Button,{className:"u-no-margin--bottom",onClick:i,hasIcon:!r,disabled:!d(c),title:d(c)?"":"You do not have permission to create images",children:[!r&&e.jsx(B,{icon:"import"}),e.jsx("span",{children:r?"Import":"Import image"})]})]})},Oe=()=>{const s=o.useNotify(),{project:i}=V(),[p,n]=L.useState(""),[m,r]=L.useState([]),[c,d]=L.useState([]),{canDeleteImage:f}=E();if(!i)return e.jsx(e.Fragment,{children:"Missing project"});const{data:h=[],error:g,isLoading:y}=te(i);g&&s.failure("Loading images failed",g),L.useEffect(()=>{const t=new Set(h?.map(C=>C.fingerprint)),N=c.filter(C=>t.has(C));N.length!==c.length&&d(N)},[h]);const b=[{content:"Name",sortKey:"name"},{content:"Alias",sortKey:"alias",className:"aliases"},{content:"Architecture",sortKey:"architecture",className:"architecture"},{content:"Cached",sortKey:"cached",className:"cached"},{content:"Type",sortKey:"type",className:"type"},{content:"Import date",sortKey:"uploaded_at",className:"uploaded_at"},{content:"Size",sortKey:"size",className:"u-align--right size"},{"aria-label":"Actions",className:"actions"}],l=h.filter(t=>!p||(t.properties?.description??"").toLowerCase().includes(p.toLowerCase())||t.aliases.map(N=>N.name).join(", ").toLowerCase().includes(p.toLowerCase())),a=l.filter(f).map(t=>t.fingerprint),x=h.filter(t=>c.includes(t.fingerprint)),j=l.map(t=>{const N=e.jsx(o.List,{inline:!0,className:"actions-list u-no-margin--bottom",items:[e.jsx(ne,{projectName:i,image:ae(t)},"launch"),e.jsx(Ie,{image:t,project:i},"download"),e.jsx(be,{image:t,project:i},"delete")]}),C=se(t),$=R(t),A=t.aliases&&Array.isArray(t.aliases)?t.aliases.filter(w=>w&&w.name).map(w=>e.jsx("div",{className:"u-truncate",title:w.name,children:w.name},w.name)):[];return{key:t.fingerprint,name:t.fingerprint,className:"u-row",columns:[{content:$,role:"rowheader","aria-label":"Name"},{content:A.length>0?e.jsx(ue,{items:A,displayCount:2}):null,role:"cell","aria-label":"Aliases",className:"aliases"},{content:oe(t.architecture),role:"cell","aria-label":"Architecture",className:"architecture"},{content:t.cached?"Yes":"No",role:"cell","aria-label":"Cached",className:"cached"},{content:ie(t),role:"cell","aria-label":"Type",className:"type"},{content:J(t.uploaded_at),role:"cell","aria-label":"Import date",className:"uploaded_at"},{content:P(t.size),role:"cell","aria-label":"Size",className:"u-align--right size"},{content:N,role:"cell","aria-label":"Actions",className:"u-align--right actions"}],sortData:{name:$.toLowerCase(),alias:C.toLowerCase(),architecture:t.architecture,cached:t.cached,type:t.type,size:+t.size,uploaded_at:new Date(t.uploaded_at).getTime()}}}),{rows:u,updateSort:I}=le({rows:j});return y?e.jsx(o.Spinner,{className:"u-loader",text:"Loading...",isMainComponent:!0}):e.jsxs(o.CustomLayout,{mainClassName:"images-list",contentClassName:"u-no-padding--bottom",header:e.jsxs(k,{children:[e.jsxs(k.Left,{children:[e.jsx(k.Title,{children:e.jsx(je,{children:"Local images"})}),c.length===0&&h.length>0&&e.jsx(k.Search,{children:e.jsx(o.SearchBox,{name:"search-images",className:"search-box u-no-margin--bottom",type:"text",onChange:t=>{n(t)},placeholder:"Search",value:p,"aria-label":"Search for images"})}),x.length>0&&e.jsx(xe,{images:x,project:i,onStart:()=>{r(c)},onFinish:()=>{r([])}})]}),e.jsxs(k.BaseActions,{children:[e.jsx(Ce,{projectName:i}),e.jsx(ye,{project:i})]})]}),children:[e.jsx(X,{}),e.jsxs(o.Row,{children:[h.length===0&&e.jsx(o.EmptyState,{className:"empty-state",image:e.jsx(B,{icon:"image",className:"empty-state-icon"}),title:"No local images found in this project",children:e.jsx("p",{children:"Local images will appear here, when launching an instance from a remote."})}),h.length>0&&e.jsx(o.ScrollableTable,{dependencies:[h],tableId:"image-table",belowIds:["status-bar"],children:e.jsx(o.TablePagination,{data:u,id:"pagination",itemName:"image",className:"u-no-margin--top","aria-label":"Table pagination control",description:c.length>0&&e.jsx(ge,{totalCount:a.length??0,itemName:"image",parentName:"project",selectedNames:c,setSelectedNames:d,filteredNames:a}),children:e.jsx(re,{id:"image-table",headers:b,sortable:!0,className:"image-table",defaultSortKey:"uploaded_at",emptyStateMsg:"No images found matching this search",onUpdateSort:I,selectedNames:c,setSelectedNames:d,itemName:"image",parentName:"project",filteredNames:l.map(t=>t.fingerprint),disabledNames:m,rows:[]})})})]})]})};export{Oe as default};

Youez - 2016 - github.com/yon3zu
LinuXploit