Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17],{82456:function(e,t,n){var l=n(85893),r=n(67294),o=n(67645),a=n(56211),i=n(41247),u=n(63071),s=n(6903),c=n(32576),d=n(7576),h=n(67978);let reduceHeader=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),l=1;l<t;l++)n[l-1]=arguments[l];return"function"==typeof e?e(...n):e};t.Z=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[g]=t,{addHeader:f,editHeader:v,entriesUrl:p,getAddLoading:m,getDeleteErrorMessage:b,getDeleteHeader:y,getDeletePromiseChain:k=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),l=1;l<t;l++)n[l-1]=arguments[l];return e(...n)},getDeleteSuccessMessage:Z,getEditLoading:C=e=>e,listEmpty:x,listProps:j,onItemClick:E=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),l=1;l<t;l++)n[l-1]=arguments[l];return e(...n)},refreshInterval:S=5e3,renderAddForm:M,renderDeleteItem:w,renderEditForm:A,renderListItem:P,entryUrlPrefix:O=p}=g,V=(0,r.useRef)(null),L=(0,r.useRef)(null),{confirmDialog:_,finishConfirm:W,setConfirmDialogLoading:F,setConfirmDialogOpen:H,setConfirmDialogProps:I}=(0,d.Z)({initial:{scrollContent:!0}}),[R,T]=(0,r.useState)(!1),[D,U]=(0,r.useState)(),{data:$,mutate:q,loading:J}=(0,h.Z)(p,{refreshInterval:S}),{fetch:N,loading:B}=(0,s.Z)({onData:e=>U(e),url:O}),K=(0,r.useMemo)(()=>reduceHeader(f),[f]),z=(0,r.useMemo)(()=>reduceHeader(v,D),[D,v]),X=(0,r.useMemo)(()=>({add:{open:function(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return null==V?void 0:null===(e=V.current)||void 0===e?void 0:e.setOpen(t)}},confirm:{finish:W,loading:F,open:function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return H(e)},prepare:I},edit:{open:function(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return null==L?void 0:null===(e=L.current)||void 0===e?void 0:e.setOpen(t)}}}),[W,F,H,I]),{buildDeleteDialogProps:G,checks:Q,getCheck:Y,hasAllChecks:ee,hasChecks:et,multipleItems:en,resetChecks:el,setAllChecks:er,setCheck:eo}=(0,c.Z)({list:$});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Z,{allowCheckAll:en,allowEdit:!0,allowItemButton:R,disableDelete:!et,edit:R,getListCheckboxProps:()=>({checked:ee,onChange:(e,t)=>er(t)}),getListItemCheckboxProps:e=>({checked:Y(e),onChange:(t,n)=>eo(e,n)}),header:!0,listEmpty:x,listItems:$,loading:J,onAdd:()=>{var e;return null==V?void 0:null===(e=V.current)||void 0===e?void 0:e.setOpen(!0)},onDelete:()=>{I(G({onProceedAppend:()=>{F(!0),Promise.all(k((e,t)=>e.map(e=>o.Z.delete("".concat(t,"/").concat(e))),Q,p)).then(()=>{W("Success",Z()),q()}).catch(e=>{let t=(0,i.Z)(e);W("Error",b(t))}).finally(()=>{el()})},getConfirmDialogTitle:y,renderEntry:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return w($,...t)}})),H(!0)},onEdit:()=>T(e=>!e),onItemClick:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return E((e,t)=>{var n;null==L||null===(n=L.current)||void 0===n||n.setOpen(!0),N("/".concat(t))},...t)},renderListItem:P,...j}),(0,l.jsx)(a.Js,{header:K,loading:null==m?void 0:m.call(null),ref:V,showClose:!0,children:M(X)}),(0,l.jsx)(a.Js,{header:z,loading:C(B),ref:L,showClose:!0,children:A(X,D)}),_]})}},15079:function(e,t,n){var l=n(85893),r=n(97212),o=n(78462),a=n(5616),i=n(55238),u=n(84154),s=n(5744);let renderEntryValueWithMono=e=>{let{entry:t}=e;return(0,l.jsx)(u.$_,{whiteSpace:"nowrap",children:String(t)})},renderEntryValueWithPassword=e=>{let{entry:t,key:n}=e;return/passw/i.test(n)?(0,l.jsx)(u.PJ,{revealButtonProps:{sx:{marginRight:0,padding:0}},monospaced:!0,textLineHeight:null,children:String(t)}):renderEntryValueWithMono(e)},buildEntryList=e=>{let{depth:t=0,entries:n,getEntryLabel:a,getListProps:i,getListItemProps:u,listKey:s,maxDepth:c,renderEntry:d,renderEntryValue:h,skip:g}=e,f=[];Object.entries(n).forEach(e=>{let[n,o]=e,i="form-summary-entry-".concat(n),s=null!==o&&"object"==typeof o,v=s?null:o,p={depth:t,entry:v,key:n};g(e=>{let{key:t}=e;return!/confirm/i.test(t)},p)&&f.push((0,l.jsx)(r.ZP,{sx:{paddingLeft:"".concat(t,"