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
5.7 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(5075)}])},5741:function(e,r,n){"use strict";var t=n(5893),o=n(1714),i=n(122),c=n(7169),a=n(4690);function s(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function u(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(r){s(e,r,n[r])}))}return e}function l(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],r.indexOf(n)>=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}r.Z=function(e){var r=e.children,n=e.sx,s=l(e,["children","sx"]);return(0,t.jsx)(i.Z,u({underline:"hover",variant:"subtitle1"},s,{sx:u({color:c.lD,textDecorationColor:c.s7},n),children:(0,t.jsxs)(a.Z,{row:!0,children:[r,(0,t.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},5075:function(e,r,n){"use strict";n.r(r);var t=n(5893),o=n(9008),i=n(1163),c=n(7294),a=n(7357),s=n(7720),u=n(2428),l=n(2029),f=n(7169),v=n(5094),d=n(1200),h=n(5521),m=n(1706),p=n(5741),b=n(9),x=n(3679),y=n(1905),g=n(4968),j=n(2152),w=n(9370);function O(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function S(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),t.forEach((function(r){S(e,r,n[r])}))}return e}function Z(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(!e)return;if("string"===typeof e)return O(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,r)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var P=function(e,r){return(0,t.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap","& > *":{width:{xs:"20em",md:"24em"}},"& > :not(:last-child)":{marginRight:"2em"}},children:e.map((function(e){var n=e.anvilName,o=e.anvilUUID,i=e.isScreenshotStale,c=e.loading,a=e.screenshot,s=e.serverName,u=e.serverState,l=e.serverUUID,f=e.timestamp;return(0,t.jsx)(v.M,{externalPreview:a,externalTimestamp:f,headerEndAdornment:[(0,t.jsx)(p.Z,{href:"/server?uuid=".concat(l,"&server_name=").concat(s,"&server_state=").concat(u),children:s},"server_list_to_server_".concat(l)),(0,t.jsx)(p.Z,{href:"/anvil?anvil_uuid=".concat(o),sx:{opacity:.7},children:n},"server_list_server_".concat(l,"_to_anvil_").concat(o))],isExternalLoading:c,isExternalPreviewStale:i,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){r.push("/server?uuid=".concat(l,"&server_name=").concat(s,"&server_state=").concat(u,"&vnc=1"))},serverState:u,serverUUID:l},"server-preview-".concat(l))}))})},E=function(e,r){return""===r?{exclude:e,include:[]}:e.reduce((function(e,n){return n.serverName.includes(r)?e.include.push(n):e.exclude.push(n),e}),{exclude:[],include:[]})};r.default=function(){var e=(0,c.useRef)(!0),r=(0,i.useRouter)(),n=(0,c.useState)([]),v=n[0],p=n[1],O=(0,c.useState)([]),S=O[0],U