diff --git a/striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_buildManifest.js b/striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_buildManifest.js deleted file mode 100644 index 6a4247c4..00000000 --- a/striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,n,i,f,d,b,u,k,h,j,r,g){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,a,e,i,f,k,"static/chunks/717-8bd60b96d67fd464.js",c,t,n,d,h,j,"static/chunks/pages/index-1f8f0ad3b3894dbc.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,a,e,i,f,k,c,t,n,d,h,"static/chunks/pages/anvil-c1177b17efcafc34.js"],"/config":[s,a,e,b,c,t,n,u,"static/chunks/pages/config-0ecdb2b2b3f8c089.js"],"/file-manager":[s,a,e,i,"static/chunks/768-9ee3dcb62beecb53.js",c,t,"static/chunks/pages/file-manager-1a707639a4834587.js"],"/init":[s,a,i,f,b,r,c,t,n,d,g,"static/chunks/pages/init-7428606d331bc1dd.js"],"/login":[s,a,e,c,t,n,u,"static/chunks/pages/login-b5de0cd2f49998d6.js"],"/manage-element":[s,a,e,i,f,b,r,"static/chunks/195-d5fd184cc249f755.js",c,t,n,d,u,g,"static/chunks/pages/manage-element-2b1d8792c2a5bf47.js"],"/server":[s,e,"static/chunks/227-a3756585a7ef09ae.js",c,j,"static/chunks/pages/server-db52258419acacf3.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/382-f51344f6f9208507.js","static/chunks/62-532ed713980da8db.js","static/chunks/483-f8013e38dca1620d.js","static/chunks/894-e57948de523bcf96.js","static/chunks/780-e8b3396d257460a4.js","static/chunks/899-83e9de2a35c6bcf0.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/614-0ce04fd295045ffe.js","static/chunks/140-ec935fb15330b98a.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/903-dc2a40be612a10c3.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/825-d34974d169ea09cc.js","static/chunks/94-db0af749b6e45543.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/692-64941f28ab144919.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_buildManifest.js b/striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_buildManifest.js new file mode 100644 index 00000000..919e219c --- /dev/null +++ b/striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(s,c,a,e,t,n,i,d,f,b,u,k,h,j,r,g){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,a,e,i,d,k,"static/chunks/717-8bd60b96d67fd464.js",c,t,n,f,h,j,"static/chunks/pages/index-7c2cb48473145987.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,a,e,i,d,k,c,t,n,f,h,"static/chunks/pages/anvil-c0917177269e4c45.js"],"/config":[s,a,e,b,c,t,n,u,"static/chunks/pages/config-af002475ca739544.js"],"/file-manager":[s,a,e,i,"static/chunks/768-9ee3dcb62beecb53.js",c,t,"static/chunks/pages/file-manager-1a707639a4834587.js"],"/init":[s,a,i,d,b,r,c,t,n,f,g,"static/chunks/pages/init-7428606d331bc1dd.js"],"/login":[s,a,e,c,t,n,u,"static/chunks/pages/login-b5de0cd2f49998d6.js"],"/manage-element":[s,a,e,i,d,b,r,"static/chunks/195-d5fd184cc249f755.js",c,t,n,f,u,g,"static/chunks/pages/manage-element-3b79eff498885bcb.js"],"/server":[s,e,"static/chunks/227-a3756585a7ef09ae.js",c,j,"static/chunks/pages/server-db52258419acacf3.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/382-f51344f6f9208507.js","static/chunks/62-532ed713980da8db.js","static/chunks/483-f8013e38dca1620d.js","static/chunks/894-e57948de523bcf96.js","static/chunks/780-e8b3396d257460a4.js","static/chunks/899-ec535b0f0a173e21.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/614-0ce04fd295045ffe.js","static/chunks/140-ec935fb15330b98a.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/903-dc2a40be612a10c3.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/825-f20d177b43a24683.js","static/chunks/94-e103c3735f0e061b.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/692-e32ff331a198ffb5.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_middlewareManifest.js b/striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_middlewareManifest.js similarity index 100% rename from striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_middlewareManifest.js rename to striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_middlewareManifest.js diff --git a/striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_ssgManifest.js b/striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_ssgManifest.js similarity index 100% rename from striker-ui/out/_next/static/8B2qFvgX8u8D8ZWgE33V8/_ssgManifest.js rename to striker-ui/out/_next/static/E2IG-69g4AQF1Cz2zUpmh/_ssgManifest.js diff --git a/striker-ui/out/_next/static/chunks/692-64941f28ab144919.js b/striker-ui/out/_next/static/chunks/692-e32ff331a198ffb5.js similarity index 82% rename from striker-ui/out/_next/static/chunks/692-64941f28ab144919.js rename to striker-ui/out/_next/static/chunks/692-e32ff331a198ffb5.js index 9c4aec3c..a2a3554e 100644 --- a/striker-ui/out/_next/static/chunks/692-64941f28ab144919.js +++ b/striker-ui/out/_next/static/chunks/692-e32ff331a198ffb5.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[692],{1939:function(e,n,t){var r=t(5893),o=t(7357),i=t(7169);function u(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c="Decorator",s={ok:"".concat(c,"-ok"),warning:"".concat(c,"-warning"),error:"".concat(c,"-error"),off:"".concat(c,"-off")};n.Z=function(e){var n,t=e.colour,c=e.sx,f=l(e,["colour","sx"]);return(0,r.jsx)(o.Z,a({},f,{className:s[t],sx:a((n={borderRadius:i.n_,height:"100%",width:"1.4em"},u(n,"&.".concat(s.ok),{backgroundColor:i.Ej}),u(n,"&.".concat(s.warning),{backgroundColor:i.Wd}),u(n,"&.".concat(s.error),{backgroundColor:i.hM}),u(n,"&.".concat(s.off),{backgroundColor:i.s7}),n),c)}))}},5741:function(e,n,t){var r=t(5893),o=t(1714),i=t(122),u=t(7169),a=t(4690);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,l=s(e,["children","sx"]);return(0,r.jsx)(i.Z,c({underline:"hover",variant:"subtitle1"},l,{sx:c({color:u.lD,textDecorationColor:u.s7},t),children:(0,r.jsxs)(a.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},8461:function(e,n,t){t.d(n,{Z:function(){return de}});var r=t(5893),o=t(7357),i=t(2734),u=t(8396),a=t(6239),l=t(9699),c=t(2026),s=t(5537),f=t(2428),d=t(2275),v=t(3490),p=t(8951),m=t(7294),b=t(5934),g=t(2029),y=t(7169),h=t(3106),w=t(1250),k=t(4390),x=t(4799),I=t(1939),j=t(7750);function C(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var S=function(e){var n=e.isFloating,t=e.networkInterface,i=t.networkInterfaceName,u=t.networkInterfaceState,a=e.onClose,l=e.sx,c=M(e,["isFloating","networkInterface","onClose","sx"]),f=n?{borderColor:y.s7,borderRadius:y.n_,borderStyle:"solid",borderWidth:"1px",backgroundColor:y.E5,padding:".6em 1.2em"}:{};return(0,r.jsxs)(o.Z,O({sx:O({display:"flex",flexDirection:"row","& > :not(:first-child)":{alignSelf:"center",marginLeft:".5em"}},f,l)},c,{children:[(0,r.jsx)(I.Z,{colour:"up"===u?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(j.Ac,{text:i}),a&&(0,r.jsx)(x.Z,{onClick:a,size:"small",sx:{color:y.s7},children:(0,r.jsx)(s.Z,{})})]}))};S.defaultProps={isFloating:!1,onClose:void 0};var U=S,Z=(0,t(1496).ZP)(o.Z)((function(){return{borderColor:y.s7,borderStyle:"dashed",borderWidth:"4px",display:"flex",flexDirection:"column",padding:".6em","& > :not(:first-child)":{marginTop:".3em"}}})),D=t(4690),P=t(1770),A=t(1706),N=t(9099),R=t(7869),E=t(6284),T=t(3679),V=t(1905),F=t(7783),L=t(2152),q=function(e){for(var n=0,t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function J(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],u=!0,a=!1;try{for(t=t.call(e);!(u=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);u=!0);}catch(l){a=!0,o=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw o}}return i}}(e,n)||X(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||X(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.")}()}function X(e,n){if(e){if("string"===typeof e)return B(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?B(e,n):void 0}}var z={ifaceNotApplied:"".concat("NetworkInitForm","-network-interface-not-applied")},K=[void 0,void 0],Y="dns",Q="gateway",ee=function(e){return"".concat(e,"Interface")},ne=function(e){return"".concat(e,"IPAddress")},te=function(e){return"".concat(e,"Name")},re=function(e){return"".concat(e,"SubnetMask")},oe=function(e){return"".concat(e,"NetworkSubnetConflict")},ie=Array.from({length:2},(function(e,n){return n+1})),ue={bcn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.20".concat(e,".").concat(n)},mask:"255.255.0.0"},ifn:{ip:function(){return""},mask:""},mn:{ip:function(){return"10.199."},mask:"255.255.0.0"},sn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.10".concat(e,".").concat(n)},mask:"255.255.0.0"}},ae=function(e){return"network".concat(e)},le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.inputUUID,t=void 0===n?(0,b.Z)():n,r=e.interfaces,o=void 0===r?W(K):r,i=e.ipAddress,u=void 0===i?"":i,a=e.name,l=e.subnetMask,c=void 0===l?"":l,s=e.type,f=void 0===s?"":s,d=e.typeCount,v=void 0===d?0:d,p=$(e,["inputUUID","interfaces","ipAddress","name","subnetMask","type","typeCount"]),m=a;return a||(m=h.Z[f]&&v>0?"".concat(h.Z[f]," ").concat(v):"Unknown Network"),G({inputUUID:t,interfaces:o,ipAddress:u,name:m,subnetMask:c,type:f,typeCount:v},p)},ce=function(e,n){return[{align:"center",field:"",renderCell:function(t){var i,u=t.row,a=(null!==(i=n[u.networkInterfaceUUID])&&void 0!==i&&i).isApplied,s="grab",f=function(){for(var n=arguments.length,t=new Array(n),r=0;r :not(:first-child)":{marginLeft:".5em"}},children:[(0,r.jsx)(I.Z,{colour:"up"===t?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(j.KI,{text:i})]})},sortComparator:function(e,n){return q(e)-q(n)}},{field:"networkInterfaceMACAddress",flex:1,headerName:"MAC",renderCell:function(e){var n=e.value;return(0,r.jsx)(j.$_,{text:n})}},{field:"networkInterfaceState",flex:1,headerName:"State",renderCell:function(e){var n=e.value,t=String(n);return(0,r.jsx)(j.KI,{text:"".concat(t.charAt(0).toUpperCase()).concat(t.substring(1))})}},{field:"networkInterfaceSpeed",flex:1,headerName:"Speed",renderCell:function(e){var n=e.value;return(0,r.jsx)(j.KI,{text:"".concat(parseFloat(n).toLocaleString()," Mbps")})}},{field:"networkInterfaceOrder",flex:1,headerName:"Order"}]},se=function(e){var n=e.allowMigrationNetwork,t=e.createDropMouseUpHandler,a=e.getNetworkTypeCount,l=e.hostDetail,c=void 0===l?{}:l,d=c.hostType,v=c.sequence,p=e.networkIndex,b=e.networkInput,g=e.networkInterfaceCount,w=e.networkInterfaceInputMap,k=e.removeNetwork,x=e.setMessageRe,I=e.setNetworkInputs,C=e.setNetworkInterfaceInputMap,O=e.testInput,M=e.testInputToToggleSubmitDisabled,S=(0,i.Z)(),D=(0,u.Z)(S.breakpoints.up("md")),P=(0,u.Z)(S.breakpoints.up("lg")),R=(0,m.useRef)({}),V=(0,m.useRef)({}),L=b.inputUUID,q=b.interfaces,H=b.ipAddress,B=b.isRequired,$=b.subnetMask,X=b.type,z=b.typeCount,K=(0,m.useMemo)((function(){return ae(L)}),[L]),Y=(0,m.useMemo)((function(){return ee(K)}),[K]),Q=(0,m.useMemo)((function(){return ne(K)}),[K]),te=(0,m.useMemo)((function(){return re(K)}),[K]),le=(0,m.useMemo)((function(){return oe(K)}),[K]),ce=(0,m.useMemo)((function(){return"node"===d}),[d]),se=(0,m.useMemo)((function(){return!ce&&g<=2?[1]:ie}),[ce,g]),fe=(0,m.useMemo)((function(){var e=h.Z.bcn,t=h.Z.ifn,r=h.Z.mn,o=h.Z.sn;return ce&&g>=8&&(n||"mn"===X)?{bcn:e,ifn:t,mn:r,sn:o}:{bcn:e,ifn:t,sn:o}}),[n,ce,g,X]),de=(0,m.useCallback)((function(e,n,t){var r=R.current,o=r.getIsChangedByUser,i=r.setValue,u=V.current,a=u.getIsChangedByUser,l=u.setValue;(null===o||void 0===o?void 0:o.call(null))||(e.ipAddress=n,null===i||void 0===i||i.call(null,n)),(null===a||void 0===a?void 0:a.call(null))||(e.subnetMask=t,null===l||void 0===l||l.call(null,t))}),[]);return(0,m.useEffect)((function(){var e,n;"striker"===d&&"ifn"!==X&&(!(null===(e=R.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))&&Number(v)&&(null===(n=R.current.setValue)||void 0===n||n.call(null,H.replace(/^((?:\d+\.){3})\d*$/,"$1".concat(v)))))}),[d,H,v,X]),(0,m.useEffect)((function(){var e=b.ipAddressInputRef,n=b.subnetMaskInputRef;e===R&&n===V||(b.ipAddressInputRef=R,b.subnetMaskInputRef=V,I((function(e){return W(e)})))}),[b,I]),(0,r.jsxs)(T.Lg,{children:[(0,r.jsxs)(T.CH,{children:[(0,r.jsx)(F.Z,{id:"network-".concat(L,"-name"),isReadOnly:B,inputLabelProps:{isNotifyRequired:!0},label:"Network name",selectItems:Object.entries(fe).map((function(e){var n=J(e,2),t=n[0],r=n[1],o=a(t,{lastIndex:p});return t!==X&&(o+=1),{value:t,displayValue:"".concat(r," ").concat(o)}})),selectProps:{onChange:function(e){var n=e.target.value,t=String(n);b.type=t;var r=a(t,{lastIndex:p});b.typeCount=r,b.name="".concat(h.Z[t]," ").concat(r);var o=ue[t];if(o){var i,u=o.ip,l=o.mask;"striker"===d&&"bcn"===t&&(i="4."),de(b,u(r,i),l)}I((function(e){return W(e)}))},renderValue:P?void 0:function(e){return"".concat(String(e).toUpperCase()," ").concat(z)},value:X}}),!B&&(0,r.jsx)(A.Z,{onClick:function(){k(p)},sx:{padding:".2em",position:"absolute",right:"-9px",top:"-4px"},children:(0,r.jsx)(s.Z,{fontSize:"small"})})]}),(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",margin:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[se.map((function(e){var n="Link ".concat(e),i=e-1,u=q[i],a=(null!==u&&void 0!==u?u:{}).networkInterfaceUUID,l=void 0===a?"":a,c=D?(0,r.jsx)(j.Ac,{text:"Drop to add interface."}):(0,r.jsx)(f.Z,{sx:{alignSelf:"center",color:y.s7}});return(0,r.jsxs)(o.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","& > :not(:first-child)":{marginLeft:"1em"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(j.Ac,{sx:{whiteSpace:"nowrap"},text:n}),(0,r.jsx)(Z,{onMouseUp:function(){for(var e=arguments.length,n=new Array(e),r=0;r=xe.length||Object.values(B).every((function(e){return e.isApplied}))||"node"===t&&xe.length<=6}),[t,K,xe,B]),Ce=(0,m.useMemo)((function(){return u&&!l}),[u,l]),Oe=(0,m.useMemo)((function(){return K.every((function(e){return"mn"!==e.type}))}),[K]),Me=(0,m.useCallback)((function(e,n){var t;return null===(t=he.current.setMessage)||void 0===t?void 0:t.call(null,e,n)}),[]),Se=(0,m.useCallback)((function(e,n){var t;return null===(t=he.current.setMessageRe)||void 0===t?void 0:t.call(null,e,n)}),[]),Ue=(0,m.useCallback)((function(e){return Me(Y,e)}),[Me]),Ze=(0,m.useCallback)((function(e){return Me(Q,e)}),[Me]),De=(0,m.useCallback)((function(e){var n,t=e.fn,r=void 0===t?"every":t,o=e.ip,i=void 0===o?"":o,u=e.mask,a=void 0===u?"":u,l=e.isNegateMatch,c=void 0===l?"every"===r:l,s=e.onMatch,f=e.onMiss,d=e.skipUUID,v="every"===r;try{n=new p.Netmask("".concat(i,"/").concat(a))}catch(m){}return K[r]((function(e){var t,r,o=e.inputUUID,u=e.ipAddressInputRef,a=e.subnetMaskInputRef;if(o===d)return v;var l=null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null),b=null===(r=null===a||void 0===a?void 0:a.current.getValue)||void 0===r?void 0:r.call(null),g=!1;try{g=function(e,n){var t=n.b,r=n.bIP,o=void 0===r?"":r;return e.contains(null!==t&&void 0!==t?t:o)||void 0!==t&&t.contains(e)}(new p.Netmask("".concat(l,"/").concat(b)),{b:n,bIP:i})}catch(m){}return g?null===s||void 0===s||s.call(null,e):null===f||void 0===f||f.call(null,e),c?!g:g}))}),[K]),Pe=(0,m.useCallback)((function(e){k.Z.put("/init/set-map-network",{value:e}).catch((function(n){var t=(0,P.Z)(n);t.children=(0,r.jsxs)(r.Fragment,{children:["Failed to ",e?"enable":"disable"," network mapping."," ",t.children]}),Me("api",t)}))}),[Me]),Ae=(0,m.useMemo)((function(){var e,n=(_(e={},Y,{defaults:{getValue:function(){var e;return null===(e=be.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Ue()}},tests:[{onFailure:function(){Ue({children:"Domain name servers should be a comma-separated list of IPv4 addresses without trailing comma(s)."})},test:function(e){var n=e.value;return w.ah.test(n)}},{test:H.HJ}]}),_(e,Q,{defaults:{getValue:function(){var e;return null===(e=ge.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Ze()}},tests:[{onFailure:function(){Ze({children:"Gateway should be a valid IPv4 address."})},test:function(e){var n=e.value;return w.tf.test(n)}},{test:function(e){var n=e.value,t=!0,r=De({fn:"some",ip:n,onMatch:function(e){var r=e.ipAddress,o=e.name,i=e.type,u=e.typeCount;if(n===r)return t=!1,void Ze({children:"Gateway cannot be the same as IP address in ".concat(o,".")});me("".concat(i).concat(u))}});return r||Ze({children:"Gateway must be in one network's subnet."}),r&&t}},{test:H.HJ}]}),e);return K.forEach((function(e){var t,r,o=e.inputUUID,i=e.interfaces,u=e.ipAddressInputRef,a=e.name,l=e.subnetMaskInputRef,c=ae(o),s=ee(c),f=ne(c),d=re(c),v=function(e){return Me(s,e)},p=function(e){return Me(f,e)},m=function(e){return Me(d,e)},b=function(e,n,t){var r,o="".concat(oe(c),"-").concat(n),i="".concat(oe(ae(n)),"-").concat(e);Me((null===(r=he.current.exists)||void 0===r?void 0:r.call(null,i))?i:o,t)},g=function(e){var n=e.ip,i=void 0===n?null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null):n,c=e.mask,s=void 0===c?null===(r=null===l||void 0===l?void 0:l.current.getValue)||void 0===r?void 0:r.call(null):c;return De({ip:i,mask:s,onMatch:function(e){var n=e.inputUUID,t=e.name;b(o,n,{children:'"'.concat(a,'" and "').concat(t,'" cannot be in the same subnet.')})},onMiss:function(e){var n=e.inputUUID;b(o,n)},skipUUID:o})};n[s]={defaults:{getCompare:function(){return i.map((function(e){return void 0!==e}))},onSuccess:function(){v()}},tests:[{onFailure:function(){v({children:"".concat(a," must have at least 1 interface.")})},test:function(e){return e.compare.some((function(e){return e}))}},{onFailure:function(){v({children:"".concat(a," must have a Link 1 interface.")})},test:function(e){var n=J(e.compare,2),t=n[0];return!(n[1]&&!t)}}]},n[f]={defaults:{getValue:function(){var e;return null===(e=null===u||void 0===u?void 0:u.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){p()}},tests:[{onFailure:function(){p({children:"IP address in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return w.tf.test(n)}},{test:function(e){var n=e.value;return g({ip:n})}},{test:H.HJ}]},n[te(c)]={defaults:{value:a},tests:[{test:H.HJ}]},n[d]={defaults:{getValue:function(){var e;return null===(e=null===l||void 0===l?void 0:l.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){m()}},tests:[{onFailure:function(){m({children:"Subnet mask in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return w.tf.test(n)}},{test:function(e){var n=e.value;return g({mask:n})}},{test:H.HJ}]}})),n}),[K,Ue,Ze,Me,De]),Ne=(0,m.useMemo)((function(){return(0,H.LT)(Ae)}),[Ae]),Re=(0,m.useCallback)((function(e){null===s||void 0===s||s.call(null,Ne(G({isIgnoreOnCallbacks:!0,isTestAll:!0},e)))}),[Ne,s]),Ee=(0,m.useCallback)((function(){de(void 0)}),[]),Te=(0,m.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};K.unshift(le(e)),null===s||void 0===s||s.call(null,!1),ie(W(K))}),[K,s]),Ve=(0,m.useCallback)((function(e){var n=J(K.splice(e,1),1)[0],t=n.inputUUID;n.interfaces.forEach((function(e){if(void 0!==e){var n=e.networkInterfaceUUID;B[n].isApplied=!1}})),Re({excludeTestIdsRe:RegExp(t)}),ie(W(K)),$((function(e){return G({},e)}))}),[K,B,Re]),Fe=(0,m.useCallback)((function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.inputs,r=void 0===t?K:t,o=n.lastIndex,i=void 0===o?0:o,u=0,a=r.length-1;a>=i;a-=1)r[a].type===e&&(u+=1);return u}),[K]),Le=(0,m.useMemo)((function(){if(void 0!==fe){var e=fe.networkInterfaceUUID;return function(n,t){return function(){var r,o=(null!==(r=n[t])&&void 0!==r?r:{}).networkInterfaceUUID;o&&o!==e&&(B[o].isApplied=!1),n[t]=fe,B[e].isApplied=!0}}}}),[fe,B]),qe=(0,m.useMemo)((function(){return fe?{cursor:"grabbing",userSelect:"none"}:{}}),[fe]),He=(0,m.useMemo)((function(){if(void 0===fe)return(0,r.jsx)(r.Fragment,{});var e=T.x,n=T.y;return(0,r.jsx)(U,{isFloating:!0,networkInterface:fe,sx:{left:"calc(".concat(e,"px + .4em)"),position:"absolute",top:"calc(".concat(n,"px - 1.6em)"),zIndex:20}})}),[T,fe]),Be=(0,m.useMemo)((function(){return fe?function(){Ee()}:void 0}),[Ee,fe]),_e=(0,m.useMemo)((function(){return fe?function(e){var n=e.currentTarget,t=e.nativeEvent,r=t.clientX,o=t.clientY,i=n.getBoundingClientRect(),u=i.left,a=i.top;F({x:r-u,y:o-a})}:void 0}),[fe]),Ge=(0,m.useMemo)((function(){return fe?function(){Ee()}:void 0}),[Ee,fe]);(0,m.useEffect)((function(){if([Object.keys(B).length>0,u,l,ye.current,be.current,ge.current].every((function(e){return Boolean(e)}))){var e,n;ye.current=!1;var t=l.dns,r=l.gateway,o=l.gatewayInterface,i=l.networks;null===(e=be.current.setValue)||void 0===e||e.call(null,t),null===(n=ge.current.setValue)||void 0===n||n.call(null,r);var a=[],c=Object.values(i).reduce((function(e,n){var t,r,o=n.ip,i=n.link1Uuid,u=n.link2Uuid,l=void 0===u?"":u,c=n.subnetMask,s=n.type,f=Fe(s,{inputs:e})+1,d=S[s]===f,v="".concat(h.Z[s]," ").concat(f);return a.push(i,l),e.push({inputUUID:(0,b.Z)(),interfaces:[null===(t=B[i])||void 0===t?void 0:t.metadata,null===(r=B[l])||void 0===r?void 0:r.metadata],ipAddress:o,isRequired:d,name:v,subnetMask:c,type:s,typeCount:f}),e}),[]);me(o),$((function(e){var n=G({},e);return a.forEach((function(e){n[e]&&(n[e].isApplied=!0)})),n})),ie(c),Re()}}),[Te,u,Fe,l,K,B,S,Re]),(0,m.useEffect)((function(){return Pe(1),window&&window.addEventListener("beforeunload",(function(){var e=new XMLHttpRequest;e.open("PUT","".concat(g.Z,"/init/set-map-network"),!1),e.send(null)}),{once:!0}),function(){Pe(0)}}),[Pe]),(0,m.useImperativeHandle)(n,(function(){return G({},he.current,{get:function(){var e,n;return{dns:null===(e=be.current.getValue)||void 0===e?void 0:e.call(null),gateway:null===(n=ge.current.getValue)||void 0===n?void 0:n.call(null),gatewayInterface:pe,networks:K.map((function(e){var n,t,r=e.inputUUID,o=e.interfaces,i=e.ipAddressInputRef,u=e.name,a=e.subnetMaskInputRef,l=e.type,c=e.typeCount;return{inputUUID:r,interfaces:o,ipAddress:null!==(C=null===(n=null===i||void 0===i?void 0:i.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==C?C:"",name:u,subnetMask:null!==(O=null===(t=null===a||void 0===a?void 0:a.current.getValue)||void 0===t?void 0:t.call(null))&&void 0!==O?O:"",type:l,typeCount:c}}))}}})}),[pe,K]);var $e,Je="13em";return Ie?(0,r.jsx)(L.Z,{}):(0,r.jsxs)(o.Z,{onMouseDown:function(e){var n=e.clientX,t=e.clientY,r=e.currentTarget.getBoundingClientRect(),o=r.left,i=r.top;F({x:n-o,y:t-i})},onMouseLeave:Be,onMouseMove:_e,onMouseUp:Ge,sx:G({position:"relative"},qe),children:[He,(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child, :nth-child(3))":{marginTop:"1em"}},children:[(0,r.jsx)(d._,{autoHeight:!0,columns:ce((function(e){de(e)}),B),componentsProps:{row:{onMouseDown:function(e){var n=e.target,t=(void 0===n?{}:n).parentElement,r=(void 0===t?{}:t).dataset,o=(void 0===r?{}:r).id,i=void 0===o?void 0:o;if(i){var u=B[i],a=u.isApplied,l=u.metadata;a||de(l)}}}},disableColumnMenu:!0,disableSelectionOnClick:!0,getRowClassName:function(e){var n,t=e.row.networkInterfaceUUID,r="";return(null!==(n=B[t])&&void 0!==n&&n).isApplied||(r+=" ".concat(z.ifaceNotApplied)),r},getRowId:function(e){return e.networkInterfaceUUID},hideFooter:!0,rows:xe,sx:($e={color:y.s7},_($e,"& .".concat(a.Z.root),{color:"inherit"}),_($e,"& .".concat(v._.cell,":focus"),{outline:"none"}),_($e,"& .".concat(v._.row,".").concat(z.ifaceNotApplied,":hover"),_({cursor:"grab"},"& .".concat(v._.cell," p"),{cursor:"auto"})),$e)}),!Ce&&(0,r.jsx)(D.Z,{row:!0,sx:{"& > :first-child":{alignSelf:"start",marginTop:".7em"},"& > :last-child":{flexGrow:1}},children:(0,r.jsx)(o.Z,{sx:{alignItems:"strech",display:"flex",flexDirection:"row",overflowX:"auto",paddingLeft:".3em","& > div":{marginBottom:".8em",marginTop:".4em",minWidth:Je,width:"25%"},"& > :not(:first-child)":{marginLeft:"1em"}},children:K.map((function(e,n){var o=e.inputUUID;return(0,r.jsx)(se,{allowMigrationNetwork:Oe,createDropMouseUpHandler:Le,getNetworkTypeCount:Fe,hostDetail:{hostType:t,sequence:I},networkIndex:n,networkInput:e,networkInterfaceCount:xe.length,networkInterfaceInputMap:B,removeNetwork:Ve,setMessageRe:Se,setNetworkInputs:ie,setNetworkInterfaceInputMap:$,testInput:Ne,testInputToToggleSubmitDisabled:Re},"network-".concat(o))}))})}),(0,r.jsxs)(D.Z,{sm:"row",sx:{marginTop:".2em","& > :not(button)":{minWidth:Je,width:{sm:"25%"}}},children:[(0,r.jsx)(A.Z,{disabled:je,onClick:function(){Te()},children:(0,r.jsx)(f.Z,{})}),(0,r.jsx)(N.Z,{input:(0,r.jsx)(E.Z,{id:"network-init-gateway",inputProps:{onBlur:function(e){var n=e.target.value;Ne({inputs:_({},Q,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Re({inputs:_({},Q,{value:n})}),Ze()},label:"Gateway"}),ref:ge}),(0,r.jsx)(N.Z,{input:(0,r.jsx)(E.Z,{id:"network-init-dns-csv",inputProps:{onBlur:function(e){var n=e.target.value;Ne({inputs:_({},Y,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Re({inputs:_({},Y,{value:n})}),Ue()},label:"Domain name server(s)"}),ref:be})]}),(0,r.jsx)(R.Z,{count:1,defaultMessageType:"warning",ref:he})]})]})}));fe.defaultProps={expectHostDetail:!1,hostDetail:void 0,hostSequence:void 0,toggleSubmitDisabled:void 0},fe.displayName="NetworkInitForm";var de=fe},3106:function(e,n){n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[692],{1939:function(e,n,t){var r=t(5893),o=t(7357),i=t(7169);function u(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c="Decorator",s={ok:"".concat(c,"-ok"),warning:"".concat(c,"-warning"),error:"".concat(c,"-error"),off:"".concat(c,"-off")};n.Z=function(e){var n,t=e.colour,c=e.sx,f=l(e,["colour","sx"]);return(0,r.jsx)(o.Z,a({},f,{className:s[t],sx:a((n={borderRadius:i.n_,height:"100%",width:"1.4em"},u(n,"&.".concat(s.ok),{backgroundColor:i.Ej}),u(n,"&.".concat(s.warning),{backgroundColor:i.Wd}),u(n,"&.".concat(s.error),{backgroundColor:i.hM}),u(n,"&.".concat(s.off),{backgroundColor:i.s7}),n),c)}))}},5741:function(e,n,t){var r=t(5893),o=t(1714),i=t(122),u=t(7169),a=t(4690);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,l=s(e,["children","sx"]);return(0,r.jsx)(i.Z,c({underline:"hover",variant:"subtitle1"},l,{sx:c({color:u.lD,textDecorationColor:u.s7},t),children:(0,r.jsxs)(a.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},8461:function(e,n,t){t.d(n,{Z:function(){return de}});var r=t(5893),o=t(7357),i=t(2734),u=t(8396),a=t(6239),l=t(9699),c=t(2026),s=t(5537),f=t(2428),d=t(2275),v=t(3490),p=t(8951),m=t(7294),b=t(5934),g=t(2029),y=t(7169),h=t(3106),w=t(1250),k=t(4390),x=t(4799),I=t(1939),j=t(7750);function C(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var S=function(e){var n=e.isFloating,t=e.networkInterface,i=t.networkInterfaceName,u=t.networkInterfaceState,a=e.onClose,l=e.sx,c=M(e,["isFloating","networkInterface","onClose","sx"]),f=n?{borderColor:y.s7,borderRadius:y.n_,borderStyle:"solid",borderWidth:"1px",backgroundColor:y.E5,padding:".6em 1.2em"}:{};return(0,r.jsxs)(o.Z,O({sx:O({display:"flex",flexDirection:"row","& > :not(:first-child)":{alignSelf:"center",marginLeft:".5em"}},f,l)},c,{children:[(0,r.jsx)(I.Z,{colour:"up"===u?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(j.Ac,{text:i}),a&&(0,r.jsx)(x.Z,{onClick:a,size:"small",sx:{color:y.s7},children:(0,r.jsx)(s.Z,{})})]}))};S.defaultProps={isFloating:!1,onClose:void 0};var U=S,Z=(0,t(1496).ZP)(o.Z)((function(){return{borderColor:y.s7,borderStyle:"dashed",borderWidth:"4px",display:"flex",flexDirection:"column",padding:".6em","& > :not(:first-child)":{marginTop:".3em"}}})),D=t(4690),P=t(1770),A=t(1706),N=t(9099),R=t(7869),E=t(6284),T=t(3679),V=t(1905),F=t(7783),L=t(2152),q=function(e){for(var n=0,t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function J(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],u=!0,a=!1;try{for(t=t.call(e);!(u=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);u=!0);}catch(l){a=!0,o=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw o}}return i}}(e,n)||X(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||X(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.")}()}function X(e,n){if(e){if("string"===typeof e)return B(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?B(e,n):void 0}}var z={ifaceNotApplied:"".concat("NetworkInitForm","-network-interface-not-applied")},K=[void 0,void 0],Y="dns",Q="gateway",ee=function(e){return"".concat(e,"Interface")},ne=function(e){return"".concat(e,"IPAddress")},te=function(e){return"".concat(e,"Name")},re=function(e){return"".concat(e,"SubnetMask")},oe=function(e){return"".concat(e,"NetworkSubnetConflict")},ie=Array.from({length:2},(function(e,n){return n+1})),ue={bcn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.20".concat(e,".").concat(n)},mask:"255.255.0.0"},ifn:{ip:function(){return""},mask:""},mn:{ip:function(){return"10.199."},mask:"255.255.0.0"},sn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.10".concat(e,".").concat(n)},mask:"255.255.0.0"}},ae=function(e){return"network".concat(e)},le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.inputUUID,t=void 0===n?(0,b.Z)():n,r=e.interfaces,o=void 0===r?W(K):r,i=e.ipAddress,u=void 0===i?"":i,a=e.name,l=e.subnetMask,c=void 0===l?"":l,s=e.type,f=void 0===s?"":s,d=e.typeCount,v=void 0===d?0:d,p=$(e,["inputUUID","interfaces","ipAddress","name","subnetMask","type","typeCount"]),m=a;return a||(m=h.Z[f]&&v>0?"".concat(h.Z[f]," ").concat(v):"Unknown Network"),G({inputUUID:t,interfaces:o,ipAddress:u,name:m,subnetMask:c,type:f,typeCount:v},p)},ce=function(e,n){return[{align:"center",field:"",renderCell:function(t){var i,u=t.row,a=(null!==(i=n[u.networkInterfaceUUID])&&void 0!==i&&i).isApplied,s="grab",f=function(){for(var n=arguments.length,t=new Array(n),r=0;r :not(:first-child)":{marginLeft:".5em"}},children:[(0,r.jsx)(I.Z,{colour:"up"===t?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(j.KI,{text:i})]})},sortComparator:function(e,n){return q(e)-q(n)}},{field:"networkInterfaceMACAddress",flex:1,headerName:"MAC",renderCell:function(e){var n=e.value;return(0,r.jsx)(j.$_,{text:n})}},{field:"networkInterfaceState",flex:1,headerName:"State",renderCell:function(e){var n=e.value,t=String(n);return(0,r.jsx)(j.KI,{text:"".concat(t.charAt(0).toUpperCase()).concat(t.substring(1))})}},{field:"networkInterfaceSpeed",flex:1,headerName:"Speed",renderCell:function(e){var n=e.value;return(0,r.jsx)(j.KI,{text:"".concat(parseFloat(n).toLocaleString()," Mbps")})}},{field:"networkInterfaceOrder",flex:1,headerName:"Order"}]},se=function(e){var n=e.allowMigrationNetwork,t=e.createDropMouseUpHandler,a=e.getNetworkTypeCount,l=e.hostDetail,c=void 0===l?{}:l,d=c.hostType,v=c.sequence,p=e.networkIndex,b=e.networkInput,g=e.networkInterfaceCount,w=e.networkInterfaceInputMap,k=e.removeNetwork,x=e.setMessageRe,I=e.setNetworkInputs,C=e.setNetworkInterfaceInputMap,O=e.testInput,M=e.testInputToToggleSubmitDisabled,S=(0,i.Z)(),D=(0,u.Z)(S.breakpoints.up("md")),P=(0,u.Z)(S.breakpoints.up("lg")),R=(0,m.useRef)({}),V=(0,m.useRef)({}),L=b.inputUUID,q=b.interfaces,H=b.ipAddress,B=b.isRequired,$=b.subnetMask,X=b.type,z=b.typeCount,K=(0,m.useMemo)((function(){return ae(L)}),[L]),Y=(0,m.useMemo)((function(){return ee(K)}),[K]),Q=(0,m.useMemo)((function(){return ne(K)}),[K]),te=(0,m.useMemo)((function(){return re(K)}),[K]),le=(0,m.useMemo)((function(){return oe(K)}),[K]),ce=(0,m.useMemo)((function(){return"node"===d}),[d]),se=(0,m.useMemo)((function(){return!ce&&g<=2?[1]:ie}),[ce,g]),fe=(0,m.useMemo)((function(){var e=h.Z.bcn,t=h.Z.ifn,r=h.Z.mn,o=h.Z.sn;return ce&&g>=8&&(n||"mn"===X)?{bcn:e,ifn:t,mn:r,sn:o}:{bcn:e,ifn:t,sn:o}}),[n,ce,g,X]),de=(0,m.useCallback)((function(e,n,t){var r=R.current,o=r.getIsChangedByUser,i=r.setValue,u=V.current,a=u.getIsChangedByUser,l=u.setValue;(null===o||void 0===o?void 0:o.call(null))||(e.ipAddress=n,null===i||void 0===i||i.call(null,n)),(null===a||void 0===a?void 0:a.call(null))||(e.subnetMask=t,null===l||void 0===l||l.call(null,t))}),[]);return(0,m.useEffect)((function(){var e,n;"striker"===d&&"ifn"!==X&&(!(null===(e=R.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))&&Number(v)&&(null===(n=R.current.setValue)||void 0===n||n.call(null,H.replace(/^((?:\d+\.){3})\d*$/,"$1".concat(v)))))}),[d,H,v,X]),(0,m.useEffect)((function(){var e=b.ipAddressInputRef,n=b.subnetMaskInputRef;e===R&&n===V||(b.ipAddressInputRef=R,b.subnetMaskInputRef=V,I((function(e){return W(e)})))}),[b,I]),(0,r.jsxs)(T.Lg,{children:[(0,r.jsxs)(T.CH,{children:[(0,r.jsx)(F.Z,{id:"network-".concat(L,"-name"),isReadOnly:B,inputLabelProps:{isNotifyRequired:!0},label:"Network name",selectItems:Object.entries(fe).map((function(e){var n=J(e,2),t=n[0],r=n[1],o=a(t,{lastIndex:p});return t!==X&&(o+=1),{value:t,displayValue:"".concat(r," ").concat(o)}})),selectProps:{onChange:function(e){var n=e.target.value,t=String(n);b.type=t;var r=a(t,{lastIndex:p});b.typeCount=r,b.name="".concat(h.Z[t]," ").concat(r);var o=ue[t];if(o){var i,u=o.ip,l=o.mask;"striker"===d&&"bcn"===t&&(i="4."),de(b,u(r,i),l)}I((function(e){return W(e)}))},renderValue:P?void 0:function(e){return"".concat(String(e).toUpperCase()," ").concat(z)},value:X}}),!B&&(0,r.jsx)(A.Z,{onClick:function(){k(p)},sx:{padding:".2em",position:"absolute",right:"-9px",top:"-4px"},children:(0,r.jsx)(s.Z,{fontSize:"small"})})]}),(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",margin:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[se.map((function(e){var n="Link ".concat(e),i=e-1,u=q[i],a=(null!==u&&void 0!==u?u:{}).networkInterfaceUUID,l=void 0===a?"":a,c=D?(0,r.jsx)(j.Ac,{text:"Drop to add interface."}):(0,r.jsx)(f.Z,{sx:{alignSelf:"center",color:y.s7}});return(0,r.jsxs)(o.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","& > :not(:first-child)":{marginLeft:"1em"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(j.Ac,{sx:{whiteSpace:"nowrap"},text:n}),(0,r.jsx)(Z,{onMouseUp:function(){for(var e=arguments.length,n=new Array(e),r=0;r=xe.length||Object.values(B).every((function(e){return e.isApplied}))||"node"===t&&xe.length<=6}),[t,K,xe,B]),Ce=(0,m.useMemo)((function(){return u&&!l}),[u,l]),Oe=(0,m.useMemo)((function(){return K.every((function(e){return"mn"!==e.type}))}),[K]),Me=(0,m.useCallback)((function(e,n){var t;return null===(t=he.current.setMessage)||void 0===t?void 0:t.call(null,e,n)}),[]),Se=(0,m.useCallback)((function(e,n){var t;return null===(t=he.current.setMessageRe)||void 0===t?void 0:t.call(null,e,n)}),[]),Ue=(0,m.useCallback)((function(e){return Me(Y,e)}),[Me]),Ze=(0,m.useCallback)((function(e){return Me(Q,e)}),[Me]),De=(0,m.useCallback)((function(e){var n,t=e.fn,r=void 0===t?"every":t,o=e.ip,i=void 0===o?"":o,u=e.mask,a=void 0===u?"":u,l=e.isNegateMatch,c=void 0===l?"every"===r:l,s=e.onMatch,f=e.onMiss,d=e.skipUUID,v="every"===r;try{n=new p.Netmask("".concat(i,"/").concat(a))}catch(m){}return K[r]((function(e){var t,r,o=e.inputUUID,u=e.ipAddressInputRef,a=e.subnetMaskInputRef;if(o===d)return v;var l=null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null),b=null===(r=null===a||void 0===a?void 0:a.current.getValue)||void 0===r?void 0:r.call(null),g=!1;try{g=function(e,n){var t=n.b,r=n.bIP,o=void 0===r?"":r;return e.contains(null!==t&&void 0!==t?t:o)||void 0!==t&&t.contains(e)}(new p.Netmask("".concat(l,"/").concat(b)),{b:n,bIP:i})}catch(m){}return g?null===s||void 0===s||s.call(null,e):null===f||void 0===f||f.call(null,e),c?!g:g}))}),[K]),Pe=(0,m.useCallback)((function(e){k.Z.put("/init/set-map-network",{value:e}).catch((function(n){var t=(0,P.Z)(n);t.children=(0,r.jsxs)(r.Fragment,{children:["Failed to ",e?"enable":"disable"," network mapping."," ",t.children]}),Me("api",t)}))}),[Me]),Ae=(0,m.useMemo)((function(){var e,n=(_(e={},Y,{defaults:{getValue:function(){var e;return null===(e=be.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Ue()}},tests:[{onFailure:function(){Ue({children:"Domain name servers should be a comma-separated list of IPv4 addresses without trailing comma(s)."})},test:function(e){var n=e.value;return w.ah.test(n)}},{test:H.HJ}]}),_(e,Q,{defaults:{getValue:function(){var e;return null===(e=ge.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Ze()}},tests:[{onFailure:function(){Ze({children:"Gateway should be a valid IPv4 address."})},test:function(e){var n=e.value;return w.tf.test(n)}},{test:function(e){var n=e.value,t=!0,r=De({fn:"some",ip:n,onMatch:function(e){var r=e.ipAddress,o=e.name,i=e.type,u=e.typeCount;if(n===r)return t=!1,void Ze({children:"Gateway cannot be the same as IP address in ".concat(o,".")});me("".concat(i).concat(u))}});return r||Ze({children:"Gateway must be in one network's subnet."}),r&&t}},{test:H.HJ}]}),e);return K.forEach((function(e){var t,r,o=e.inputUUID,i=e.interfaces,u=e.ipAddressInputRef,a=e.name,l=e.subnetMaskInputRef,c=ae(o),s=ee(c),f=ne(c),d=re(c),v=function(e){return Me(s,e)},p=function(e){return Me(f,e)},m=function(e){return Me(d,e)},b=function(e,n,t){var r,o="".concat(oe(c),"-").concat(n),i="".concat(oe(ae(n)),"-").concat(e);Me((null===(r=he.current.exists)||void 0===r?void 0:r.call(null,i))?i:o,t)},g=function(e){var n=e.ip,i=void 0===n?null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null):n,c=e.mask,s=void 0===c?null===(r=null===l||void 0===l?void 0:l.current.getValue)||void 0===r?void 0:r.call(null):c;return De({ip:i,mask:s,onMatch:function(e){var n=e.inputUUID,t=e.name;b(o,n,{children:'"'.concat(a,'" and "').concat(t,'" cannot be in the same subnet.')})},onMiss:function(e){var n=e.inputUUID;b(o,n)},skipUUID:o})};n[s]={defaults:{getCompare:function(){return i.map((function(e){return void 0!==e}))},onSuccess:function(){v()}},tests:[{onFailure:function(){v({children:"".concat(a," must have at least 1 interface.")})},test:function(e){return e.compare.some((function(e){return e}))}},{onFailure:function(){v({children:"".concat(a," must have a Link 1 interface.")})},test:function(e){var n=J(e.compare,2),t=n[0];return!(n[1]&&!t)}}]},n[f]={defaults:{getValue:function(){var e;return null===(e=null===u||void 0===u?void 0:u.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){p()}},tests:[{onFailure:function(){p({children:"IP address in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return w.tf.test(n)}},{test:function(e){var n=e.value;return g({ip:n})}},{test:H.HJ}]},n[te(c)]={defaults:{value:a},tests:[{test:H.HJ}]},n[d]={defaults:{getValue:function(){var e;return null===(e=null===l||void 0===l?void 0:l.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){m()}},tests:[{onFailure:function(){m({children:"Subnet mask in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return w.tf.test(n)}},{test:function(e){var n=e.value;return g({mask:n})}},{test:H.HJ}]}})),n}),[K,Ue,Ze,Me,De]),Ne=(0,m.useMemo)((function(){return(0,H.LT)(Ae)}),[Ae]),Re=(0,m.useCallback)((function(e){null===s||void 0===s||s.call(null,Ne(G({isIgnoreOnCallbacks:!0,isTestAll:!0},e)))}),[Ne,s]),Ee=(0,m.useCallback)((function(){de(void 0)}),[]),Te=(0,m.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};K.unshift(le(e)),null===s||void 0===s||s.call(null,!1),ie(W(K))}),[K,s]),Ve=(0,m.useCallback)((function(e){var n=J(K.splice(e,1),1)[0],t=n.inputUUID;n.interfaces.forEach((function(e){if(void 0!==e){var n=e.networkInterfaceUUID;B[n].isApplied=!1}})),Re({excludeTestIdsRe:RegExp(t)}),ie(W(K)),$((function(e){return G({},e)}))}),[K,B,Re]),Fe=(0,m.useCallback)((function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.inputs,r=void 0===t?K:t,o=n.lastIndex,i=void 0===o?0:o,u=0,a=r.length-1;a>=i;a-=1)r[a].type===e&&(u+=1);return u}),[K]),Le=(0,m.useMemo)((function(){if(void 0!==fe){var e=fe.networkInterfaceUUID;return function(n,t){return function(){var r,o=(null!==(r=n[t])&&void 0!==r?r:{}).networkInterfaceUUID;o&&o!==e&&(B[o].isApplied=!1),n[t]=fe,B[e].isApplied=!0}}}}),[fe,B]),qe=(0,m.useMemo)((function(){return fe?{cursor:"grabbing",userSelect:"none"}:{}}),[fe]),He=(0,m.useMemo)((function(){if(void 0===fe)return(0,r.jsx)(r.Fragment,{});var e=T.x,n=T.y;return(0,r.jsx)(U,{isFloating:!0,networkInterface:fe,sx:{left:"calc(".concat(e,"px + .4em)"),position:"absolute",top:"calc(".concat(n,"px - 1.6em)"),zIndex:20}})}),[T,fe]),Be=(0,m.useMemo)((function(){return fe?function(){Ee()}:void 0}),[Ee,fe]),_e=(0,m.useMemo)((function(){return fe?function(e){var n=e.currentTarget,t=e.nativeEvent,r=t.clientX,o=t.clientY,i=n.getBoundingClientRect(),u=i.left,a=i.top;F({x:r-u,y:o-a})}:void 0}),[fe]),Ge=(0,m.useMemo)((function(){return fe?function(){Ee()}:void 0}),[Ee,fe]);(0,m.useEffect)((function(){if([Object.keys(B).length>0,u,l,ye.current,be.current,ge.current].every((function(e){return Boolean(e)}))){var e,n;ye.current=!1;var t=l.dns,r=l.gateway,o=l.gatewayInterface,i=l.networks;if([t,r,o,i].some((function(e){return!e})))return;null===(e=be.current.setValue)||void 0===e||e.call(null,t),null===(n=ge.current.setValue)||void 0===n||n.call(null,r);var a=[],c=Object.values(i).reduce((function(e,n){var t,r,o=n.ip,i=n.link1Uuid,u=n.link2Uuid,l=void 0===u?"":u,c=n.subnetMask,s=n.type,f=Fe(s,{inputs:e})+1,d=S[s]===f,v="".concat(h.Z[s]," ").concat(f);return a.push(i,l),e.push({inputUUID:(0,b.Z)(),interfaces:[null===(t=B[i])||void 0===t?void 0:t.metadata,null===(r=B[l])||void 0===r?void 0:r.metadata],ipAddress:o,isRequired:d,name:v,subnetMask:c,type:s,typeCount:f}),e}),[]);me(o),$((function(e){var n=G({},e);return a.forEach((function(e){n[e]&&(n[e].isApplied=!0)})),n})),ie(c),Re()}}),[u,Fe,l,B,S,Re]),(0,m.useEffect)((function(){return Pe(1),window&&window.addEventListener("beforeunload",(function(){var e=new XMLHttpRequest;e.open("PUT","".concat(g.Z,"/init/set-map-network"),!1),e.send(null)}),{once:!0}),function(){Pe(0)}}),[Pe]),(0,m.useImperativeHandle)(n,(function(){return G({},he.current,{get:function(){var e,n;return{dns:null===(e=be.current.getValue)||void 0===e?void 0:e.call(null),gateway:null===(n=ge.current.getValue)||void 0===n?void 0:n.call(null),gatewayInterface:pe,networks:K.map((function(e){var n,t,r=e.inputUUID,o=e.interfaces,i=e.ipAddressInputRef,u=e.name,a=e.subnetMaskInputRef,l=e.type,c=e.typeCount;return{inputUUID:r,interfaces:o,ipAddress:null!==(C=null===(n=null===i||void 0===i?void 0:i.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==C?C:"",name:u,subnetMask:null!==(O=null===(t=null===a||void 0===a?void 0:a.current.getValue)||void 0===t?void 0:t.call(null))&&void 0!==O?O:"",type:l,typeCount:c}}))}}})}),[pe,K]);var $e,Je="13em";return Ie?(0,r.jsx)(L.Z,{}):(0,r.jsxs)(o.Z,{onMouseDown:function(e){var n=e.clientX,t=e.clientY,r=e.currentTarget.getBoundingClientRect(),o=r.left,i=r.top;F({x:n-o,y:t-i})},onMouseLeave:Be,onMouseMove:_e,onMouseUp:Ge,sx:G({position:"relative"},qe),children:[He,(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child, :nth-child(3))":{marginTop:"1em"}},children:[(0,r.jsx)(d._,{autoHeight:!0,columns:ce((function(e){de(e)}),B),componentsProps:{row:{onMouseDown:function(e){var n=e.target,t=(void 0===n?{}:n).parentElement,r=(void 0===t?{}:t).dataset,o=(void 0===r?{}:r).id,i=void 0===o?void 0:o;if(i){var u=B[i],a=u.isApplied,l=u.metadata;a||de(l)}}}},disableColumnMenu:!0,disableSelectionOnClick:!0,getRowClassName:function(e){var n,t=e.row.networkInterfaceUUID,r="";return(null!==(n=B[t])&&void 0!==n&&n).isApplied||(r+=" ".concat(z.ifaceNotApplied)),r},getRowId:function(e){return e.networkInterfaceUUID},hideFooter:!0,rows:xe,sx:($e={color:y.s7},_($e,"& .".concat(a.Z.root),{color:"inherit"}),_($e,"& .".concat(v._.cell,":focus"),{outline:"none"}),_($e,"& .".concat(v._.row,".").concat(z.ifaceNotApplied,":hover"),_({cursor:"grab"},"& .".concat(v._.cell," p"),{cursor:"auto"})),$e)}),!Ce&&(0,r.jsx)(D.Z,{row:!0,sx:{"& > :first-child":{alignSelf:"start",marginTop:".7em"},"& > :last-child":{flexGrow:1}},children:(0,r.jsx)(o.Z,{sx:{alignItems:"strech",display:"flex",flexDirection:"row",overflowX:"auto",paddingLeft:".3em","& > div":{marginBottom:".8em",marginTop:".4em",minWidth:Je,width:"25%"},"& > :not(:first-child)":{marginLeft:"1em"}},children:K.map((function(e,n){var o=e.inputUUID;return(0,r.jsx)(se,{allowMigrationNetwork:Oe,createDropMouseUpHandler:Le,getNetworkTypeCount:Fe,hostDetail:{hostType:t,sequence:I},networkIndex:n,networkInput:e,networkInterfaceCount:xe.length,networkInterfaceInputMap:B,removeNetwork:Ve,setMessageRe:Se,setNetworkInputs:ie,setNetworkInterfaceInputMap:$,testInput:Ne,testInputToToggleSubmitDisabled:Re},"network-".concat(o))}))})}),(0,r.jsxs)(D.Z,{sm:"row",sx:{marginTop:".2em","& > :not(button)":{minWidth:Je,width:{sm:"25%"}}},children:[(0,r.jsx)(A.Z,{disabled:je,onClick:function(){Te()},children:(0,r.jsx)(f.Z,{})}),(0,r.jsx)(N.Z,{input:(0,r.jsx)(E.Z,{id:"network-init-gateway",inputProps:{onBlur:function(e){var n=e.target.value;Ne({inputs:_({},Q,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Re({inputs:_({},Q,{value:n})}),Ze()},label:"Gateway"}),ref:ge}),(0,r.jsx)(N.Z,{input:(0,r.jsx)(E.Z,{id:"network-init-dns-csv",inputProps:{onBlur:function(e){var n=e.target.value;Ne({inputs:_({},Y,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Re({inputs:_({},Y,{value:n})}),Ue()},label:"Domain name server(s)"}),ref:be})]}),(0,r.jsx)(R.Z,{count:1,defaultMessageType:"warning",ref:he})]})]})}));fe.defaultProps={expectHostDetail:!1,hostDetail:void 0,hostSequence:void 0,toggleSubmitDisabled:void 0},fe.displayName="NetworkInitForm";var de=fe},3106:function(e,n){n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js b/striker-ui/out/_next/static/chunks/825-f20d177b43a24683.js similarity index 86% rename from striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js rename to striker-ui/out/_next/static/chunks/825-f20d177b43a24683.js index 3e01f672..992233f9 100644 --- a/striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js +++ b/striker-ui/out/_next/static/chunks/825-f20d177b43a24683.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[825],{4594:function(e,t,n){var r=n(5893),o=n(6514),i=n(5113),a=n(4656),s=n(482),l=n(2994),u=n(7357),c=n(9890),p=n(7169),d=n(1363),f=n(6284);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,m({},e))})};t.Z=function(e){var t=e.componentsProps,n=e.extendRenderInput,o=e.label,i=e.messageBoxProps,h=e.renderInput,b=e.sx,y=x(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),U=m({paper:{sx:{backgroundColor:p.lD}}},t),S=null!==h&&void 0!==h?h:function(e){var t=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,s=e.inputProps,l={formControlProps:{fullWidth:t,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:s,startAdornment:i.startAdornment},label:o};return null===n||void 0===n||n.call(null,l,e),(0,r.jsx)(f.Z,m({},l))},j=m(v({},"& .".concat(a.Z.root," .").concat(s.Z.endAdornment),v({right:"7px"},"& .".concat(l.Z.root),{color:p.s7})),b);return(0,r.jsxs)(u.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(c.Z,m({PaperComponent:g},y,{componentsProps:U,renderInput:S,sx:j})),(0,r.jsx)(d.Z,m({},i))]})}},5521:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(5893),o=n(1113),i=n(1496),a=n(2293),s=n(7357),l=n(2992),u=n(4799),c=n(7294),p=n(7169),d=n(4433),f=n(9029),v=n(7533),m=n(8462),x=n(7212),g=n(8619),h=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],b={width:"40em",height:"40em"},y=n(4390),U=n(582),S=n(4690),j=n(1770),I=n(7750),P=n(1081);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return n["".concat(t).concat(e)]}),[n]),i=(0,c.useCallback)((function(){return o("user")}),[o]);return(0,c.useEffect)((function(){if(e){var t=document.cookie.split(/\s*;\s*/);r(t.reduce((function(e,t){var n,r=w(t.split("=",2),2),o=r[0],i=r[1],a=decodeURIComponent(i);if(a.startsWith("j:"))try{n=JSON.parse(a.substring(2))}catch(s){n=i}else n=i;return e[o]=n,e}),{}))}}),[e]),{cookieJar:n,getCookie:o,getSessionUser:i}};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){for(var t=1;t0)},ref:t})]})}},4968:function(e,t,n){n.d(t,{Z:function(){return Ue}});var r=n(5893),o=n(7294),a=n(7357),s=n(6886),l=n(8262),u=n(5537),c=n(5934),p=n(7169),d=n(4390),f=n(4594),v=n(157),m=n(4825),x=n(5737),g=n(1706),h=n(8187),b=n(6284),y=n(7120),U=n(4656),S=n(1363),j=n(7783);function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){for(var t=1;t :first-child":{flexGrow:1},"& > :not(:last-child)":{marginRight:".5em"}},"&:hover\n .".concat(y.Z.root,"\n .").concat(U.Z.root,"\n .").concat(U.Z.notchedOutline),{borderColor:p.s7}),children:[(0,r.jsx)(b.Z,P({id:t,label:n},i)),(0,r.jsx)(j.Z,P({formControlProps:{fullWidth:!1},id:"".concat(t,"-nested-select"),selectItems:u},d))]}),(0,r.jsx)(S.Z,P({},l))]})};w.defaultProps=D;var Z=w,O=n(3679),A=n(3640),M=n(6727),C=n(1184),k=n(9),G=n(192),B=n(7750);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function E(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);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 z(e,t)}(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 W={inputLabelProps:{},isAllowTextInput:!1,labelId:"",messageBoxProps:{},sliderProps:{}},V={root:"".concat("SliderInputLabelDecorator","-root")},R=function(e){var t=e.isFocused,n=e.label,o=p.s7,i="solid",s="0",l="0 .6em 0 .4em",u="1px 0 0 0",c="0.3";return t&&(s="-1px",l="0 1em 0 1em",u="2px 0 0 0",c="1"),(0,r.jsxs)(a.Z,{className:V.root,sx:{display:"flex",flexDirection:"row",position:"absolute",top:s,width:"calc(100% - 6px)","> :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c,width:".6em"}}),(0,r.jsx)(B.Ac,{sx:{fontSize:".75em",margin:l,visibility:"hidden"},text:n}),(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c}})]})},_=function(e,t){var n=Number.parseFloat(e);return Number.isNaN(n)?t:n},Q=function(e){return N(e,Array)?e.map((function(e){return String(e)})):[String(e)]},q=function(e){var t,n=e.messageBoxProps,i=void 0===n?W.messageBoxProps:n,s=e.isAllowTextInput,l=void 0===s?W.isAllowTextInput:s,u=e.label,c=e.labelId,d=void 0===c?W.labelId:c,f=e.inputLabelProps,v=void 0===f?W.inputLabelProps:f,m=e.sliderProps,x=void 0===m?W.sliderProps:m,g=e.value,h=x.max,b=x.min,y=x.onChange,j=x.sx,I=x.valueLabelDisplay,P=g,D=(0,o.useState)({range:Q(g)}),w=D[0],Z=D[1],O=(0,o.useState)(!1),B=O[0],z=O[1],q=function(){z(!1)},H=function(){z(!0)},$=function(){P=function(e,t){return N(t,Array)?e.map((function(e,n){return _(e,t[n])})):_(e[0],t)}(w.range,P),null===y||void 0===y||y.call(null,P)};return(0,r.jsxs)(A.Z,{sx:{display:"flex",flexDirection:"column","&:hover":(t={},T(t,"& .".concat(V.root," div"),{opacity:1}),T(t,"& .".concat(U.Z.notchedOutline),{borderColor:p.s7}),t)},children:[(0,r.jsx)(G.Z,F({className:B?M.Z.focused:"",id:d,shrink:!0},v,{children:u})),R({isFocused:B,label:u}),(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","> :first-child":{flexGrow:1}},children:[(0,r.jsx)(C.ZP,{"aria-labelledby":d,max:h,min:b,onBlur:q,onChange:function(e,t){Z({range:Q(t)}),null===y||void 0===y||y.call(null,t)},onFocus:H,sx:F(T({color:p.s7,marginLeft:"1em",marginRight:"1em"},"& .".concat(C.TW.thumb),{borderRadius:p.n_,transform:"translate(-50%, -50%) rotate(45deg)"}),j),value:P,valueLabelDisplay:I}),w.range.map((function(e,t){return function(e){var t=e.key,n=e.isFocused,o=L(e,["key","isFocused"]);return(0,r.jsx)(k.Z,F({key:t,className:n?U.Z.focused:"",type:"number"},o))}({key:"slider-nested-text-input-".concat(t),inputProps:{max:h,min:b},isFocused:B,onBlur:q,onChange:function(){for(var e=arguments.length,n=new Array(e),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oe(e,t){return K(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||se(e,t)||te()}function ie(e){return K(e)||ee(e)||se(e,i)||te()}function ae(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||ee(e)||se(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.")}()}function se(e,t){if(e){if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}var le,ue,ce=BigInt(0),pe=[{value:"B"},{value:"KiB"},{value:"MiB"},{value:"GiB"},{value:"TiB"}],de="GiB",fe=BigInt(65536),ve=BigInt(104857600),me={backgroundColor:p.Ej,color:p.lD,"&:hover":{backgroundColor:p.Ej}},xe=function(e,t){var n=t.onButtonClick;return(0,r.jsx)(m.Z,{disabled:void 0===n,onClick:n,sx:{minWidth:"unset",whiteSpace:"nowrap"},children:"Max: ".concat(e)})},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.endAdornment,n=e.mainLabel,o=e.subLabel;return(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row",width:"100%","& > :first-child":{flexGrow:1}},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[n&&(0,r.jsx)(B.Ac,{inverted:!0,text:n}),o&&(0,r.jsx)(B.Ac,{inverted:!0,text:o})]}),t]})},he=function(e,t,n,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=s.includeAnvilUUIDs,u=void 0===l?[]:l,c=s.includeFileUUIDs,p=void 0===c?[]:c,d=s.includeStorageGroupUUIDs,f=void 0===d?[]:d,v=function(){return!0},m=function(){return!0},x=function(){return!0};u.length>0&&(v=function(e){return u.includes(e)}),p.length>0&&(m=function(e){return p.includes(e)}),f.length>0&&(x=function(e){return f.includes(e)});var g={},h=i.reduce((function(e,t,n){var r,i=null!==(r=o[n])&&void 0!==r?r:ce;return e.all+=i,""===t||(void 0===e[t]&&(e[t]=ce),e[t]+=i),e}),{all:ce}),b=e.reduce((function(e,s){var l=s.anvilUUID;if(v(l)){var u,c=s.anvilTotalCPUCores,p=s.anvilTotalAvailableMemory,d=s.files,f=s.fileUUIDs,b=s.storageGroups,y=[],U=ce,S=ce;if(b.forEach((function(e){var t=e.storageGroupUUID,n=e.storageGroupFree;x(t)&&(y.push(t),S+=n,n>U&&(U=n))})),[function(){return b.length>0},function(){return n<=c},function(){return r<=p},function(){return i.every((function(e,n){var r,i=null!==(r=o[n])&&void 0!==r?r:ce,a=!0,s=i<=U;return""!==e&&(a=y.includes(e),s=i<=t[e].storageGroupFree),a&&s}))},function(){return Object.entries(h).every((function(e){var n=oe(e,2),r=n[0],o=n[1];return"all"===r?o<=S:o<=t[r].storageGroupFree}))},function(){return a.every((function(e){return""===e||f.includes(e)}))}].every((function(e){return e()})))e.anvils.push(s),e.anvilUUIDs.push(l),e.maxCPUCores=Math.max(c,e.maxCPUCores),p>e.maxMemory&&(e.maxMemory=p),d.forEach((function(e){var t=e.fileUUID;m(t)&&(g[t]=!0)})),(u=e.storageGroupUUIDs).push.apply(u,ae(y)),e.maxVirtualDiskSizes.fill(U)}return e}),{anvils:[],anvilUUIDs:[],fileUUIDs:[],maxCPUCores:0,maxMemory:ce,maxVirtualDiskSizes:i.map((function(){return ce})),storageGroupUUIDs:[]});return b.fileUUIDs=Object.keys(g),i.forEach((function(e,n){""!==e&&(b.maxVirtualDiskSizes[n]=t[e].storageGroupFree)})),b},be=function(e){return e.filter((function(e){return""!==e}))},ye=function(e){return{fromUnit:"B",onSuccess:{string:e},precision:0,toUnit:"ibyte"}};(0,x.Bh)(fe,ye((function(e,t){le="".concat(e," ").concat(t)}))),(0,x.Bh)(ve,ye((function(e,t){ue="".concat(e," ").concat(t)})));var Ue=function(e){var t=e.dialogProps.open,n=e.onClose,i=(0,o.useState)([]),y=i[0],U=i[1],S=(0,o.useState)({}),I=S[0],P=S[1],D=(0,o.useState)({}),w=D[0],A=D[1],M=(0,o.useState)({}),C=M[0],k=M[1],G=(0,o.useState)({}),z=G[0],T=G[1],N=(0,o.useState)([]),F=N[0],L=N[1],E=(0,o.useState)([]),W=E[0],V=E[1],R=(0,o.useState)([]),_=R[0],Q=R[1],q=(0,o.useState)([]),Y=q[0],K=q[1],ee=(0,o.useState)(""),te=ee[0],se=ee[1],ye=(0,o.useState)(),Ue=ye[0],Se=ye[1],je=(0,o.useState)(1),Ie=je[0],Pe=je[1],De=(0,o.useState)(0),we=De[0],Ze=De[1],Oe=(0,o.useState)(),Ae=Oe[0],Me=Oe[1],Ce=(0,o.useState)(ce),ke=Ce[0],Ge=Ce[1],Be=(0,o.useState)(ce),ze=Be[0],Te=Be[1],Ne=(0,o.useState)(),Fe=Ne[0],Le=Ne[1],Ee=(0,o.useState)("0"),We=Ee[0],Ve=Ee[1],Re=(0,o.useState)(""),_e=Re[0],Qe=Re[1],qe=(0,o.useState)(de),He=qe[0],$e=qe[1],Je=(0,o.useState)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.existingVirtualDisks,n=void 0===t?{stateIds:[],inputMaxes:[],inputSizeMessages:[],inputSizes:[],inputStorageGroupUUIDMessages:[],inputStorageGroupUUIDs:[],inputUnits:[],maxes:[],sizes:[]}:t,r=e.stateId,o=void 0===r?(0,c.Z)():r,i=e.inputMax,a=void 0===i?"0":i,s=e.inputSize,l=void 0===s?"":s,u=e.inputSizeMessage,p=void 0===u?void 0:u,d=e.inputStorageGroupUUID,f=void 0===d?"":d,v=e.inputStorageGroupUUIDMessage,m=void 0===v?void 0:v,x=e.inputUnit,g=void 0===x?de:x,h=e.max,b=void 0===h?ce:h,y=e.setVirtualDisks,U=e.size,S=void 0===U?ce:U,j=n.stateIds,I=n.inputMaxes,P=n.inputSizeMessages,D=n.inputSizes,w=n.inputStorageGroupUUIDMessages,Z=n.inputStorageGroupUUIDs,O=n.inputUnits,A=n.maxes,M=n.sizes;return j.push(o),I.push(a),P.push(p),D.push(l),w.push(m),Z.push(f),O.push(g),A.push(b),M.push(S),null===y||void 0===y||y.call(null,ne({},n)),n}()),Ye=Je[0],Ke=Je[1],Xe=(0,o.useState)(""),et=Xe[0],tt=Xe[1],nt=(0,o.useState)(),rt=nt[0],ot=nt[1],it=(0,o.useState)(""),at=it[0],st=it[1],lt=(0,o.useState)()[0],ut=(0,o.useState)(""),ct=ut[0],pt=ut[1],dt=(0,o.useState)(),ft=dt[0],vt=dt[1],mt=(0,o.useState)(null),xt=mt[0],gt=mt[1],ht=(0,o.useState)(),bt=ht[0],yt=ht[1],Ut=(0,o.useState)([]),St=Ut[0],jt=Ut[1],It=(0,o.useState)([]),Pt=It[0],Dt=It[1],wt=(0,o.useState)([]),Zt=wt[0],Ot=wt[1],At=(0,o.useState)(!1),Mt=At[0],Ct=At[1],kt=(0,o.useState)(!1),Gt=kt[0],Bt=kt[1],zt=(0,o.useState)(!1),Tt=zt[0],Nt=zt[1],Ft=(0,o.useState)(0),Lt=Ft[0],Et=Ft[1],Wt={serverName:{defaults:{onSuccess:function(){Se(void 0)},value:te},tests:[{onFailure:function(){Se({text:"The server name length must be 1 to 16 characters.",type:"warning"})},test:function(e){var t=e.value.length;return t>=1&&t<=16}},{onFailure:function(){Se({text:"The server name is expected to only contain alphanumeric, hyphen, or underscore characters.",type:"warning"})},test:function(e){var t=e.value;return/^[a-zA-Z0-9_-]+$/.test(t)}},{onFailure:function(){Se({text:"This server name already exists, please choose another name.",type:"warning"})},test:function(e){var t=e.value;return void 0===C[t]}}]},cpuCores:{defaults:{max:we,min:1,onSuccess:function(){Me(void 0)},value:Ie},tests:[{onFailure:function(){Me({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var t=e.displayMax,n=e.displayMin;Me({text:"The number of CPU cores is expected to be between ".concat(n," and ").concat(t,"."),type:"warning"})},test:J.SQ}]},memory:{defaults:{displayMax:"".concat(We," ").concat(He),displayMin:le,max:ze,min:fe,onSuccess:function(){Le(void 0)},value:ke},tests:[{onFailure:function(){Le({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var t=e.displayMax,n=e.displayMin;Le({text:"Memory is expected to be between ".concat(n," and ").concat(t,"."),type:"warning"})},test:J.SQ}]},installISO:{defaults:{onSuccess:function(){ot(void 0)},value:et},tests:[{test:J.HJ}]},anvil:{defaults:{onSuccess:function(){vt(void 0)},value:ct},tests:[{test:J.HJ}]},optimizeForOS:{defaults:{onSuccess:function(){yt(void 0)},value:null===xt||void 0===xt?void 0:xt.key},tests:[{test:J.HJ}]}};Ye.inputSizeMessages.forEach((function(e,t){Wt["vd".concat(t,"Size")]={defaults:{displayMax:"".concat(Ye.inputMaxes[t]," ").concat(Ye.inputUnits[t]),displayMin:ue,max:Ye.maxes[t],min:ve,onSuccess:function(){Ye.inputSizeMessages[t]=void 0},value:Ye.sizes[t]},onFinishBatch:function(){Ke(ne({},Ye))},tests:[{onFailure:function(){Ye.inputSizeMessages[t]={text:"Non available.",type:"warning"}},test:J.X7},{onFailure:function(e){var n=e.displayMax,r=e.displayMin;Ye.inputSizeMessages[t]={text:"Virtual disk ".concat(t," size is expected to be between ").concat(r," and ").concat(n,"."),type:"warning"}},test:J.SQ}]},Wt["vd".concat(t,"StorageGroup")]={defaults:{onSuccess:function(){Ye.inputStorageGroupUUIDMessages[t]=void 0},value:Ye.inputStorageGroupUUIDs[t]},onFinishBatch:function(){Ke(ne({},Ye))},tests:[{test:J.HJ}]}}));var Vt,Rt,_t,Qt,qt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allAnvils,n=void 0===t?y:t,r=e.cpuCores,o=void 0===r?Ie:r,i=e.fileUUIDs,a=void 0===i?[et,at]:i,s=e.includeAnvilUUIDs,l=void 0===s?be([ct]):s,u=e.includeFileUUIDs,c=e.includeStorageGroupUUIDs,p=e.inputMemoryUnit,d=void 0===p?He:p,f=e.memory,v=void 0===f?ke:f,m=e.storageGroupUUIDMapToData,g=void 0===m?z:m,h=e.virtualDisks,b=void 0===h?Ye:h,U=he(n,g,o,v,b.sizes,b.inputStorageGroupUUIDs,a,{includeAnvilUUIDs:l,includeFileUUIDs:u,includeStorageGroupUUIDs:c}),S=U.anvilUUIDs,j=U.fileUUIDs,I=U.maxCPUCores,P=U.maxMemory,D=U.maxVirtualDiskSizes,w=U.storageGroupUUIDs;Ze(I),Te(P);var Z=[];b.maxes=D,b.maxes.forEach((function(e,t){(0,x.Bh)(e,{fromUnit:"B",onSuccess:{string:function(e,n){b.inputMaxes[t]=e,Z[t]="".concat(e," ").concat(n)}},toUnit:b.inputUnits[t]})})),Ke(ne({},b)),jt(S),Dt(j),Ot(w);var O="";return(0,x.Bh)(P,{fromUnit:"B",onSuccess:{string:function(e,t){Ve(e),O="".concat(e," ").concat(t)}},toUnit:d}),{formattedMaxMemory:O,formattedMaxVDSizes:Z,maxCPUCores:I,maxMemory:P,maxVirtualDiskSizes:D}},Ht=(0,o.useCallback)(qt,[]),$t=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.cmValue,n=void 0===t?ce:t,r=e.cmUnit,o=void 0===r?He:r;Ge(n);var i=qt({inputMemoryUnit:o,memory:n}),a=i.formattedMaxMemory,s=i.maxMemory;$t({inputs:{memory:{displayMax:a,max:s,value:n}}})},Yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.value,n=void 0===t?_e:t,r=e.unit,o=void 0===r?He:r;n!==_e&&Qe(n),o!==He&&$e(o),(0,x.KY)(n,o,(function(e){return Jt({cmValue:e,cmUnit:o})}),(function(){return Jt({cmUnit:o})}))},Kt=function(e){tt(e),qt({fileUUIDs:[e,at]})},Xt=function(e){st(e),qt({fileUUIDs:[et,e]})},en=function(e){var t=be([e]);pt(e),qt({includeAnvilUUIDs:t})};return(0,o.useEffect)((function(){d.Z.get("/anvil",{params:{anvilUUIDs:"all",isForProvisionServer:!0}}).then((function(e){var t=e.data,n=function(e){var t={},n=e.reduce((function(e,n){var o=n.anvilUUID,i=n.anvilName,s=n.anvilTotalMemory,l=n.anvilTotalAllocatedMemory,u=n.anvilTotalAvailableMemory,c=n.hosts,p=n.servers,d=n.storageGroups,f=n.files,v=d.reduce((function(t,n){var a=ne({},n,{anvilUUID:o,anvilName:i,storageGroupSize:BigInt(n.storageGroupSize),storageGroupFree:BigInt(n.storageGroupFree),humanizedStorageGroupFree:""});return(0,x.Bh)(n.storageGroupFree,{fromUnit:"B",onSuccess:{string:function(e,t){a.humanizedStorageGroupFree="".concat(e," ").concat(t)}},precision:0,toUnit:"ibyte"}),t.anvilStorageGroupUUIDs.push(n.storageGroupUUID),t.anvilStorageGroups.push(a),e.storageGroups.push(a),e.storageGroupSelectItems.push({displayValue:ge({endAdornment:(0,r.jsx)(B.Ac,{inverted:!0,text:"~".concat(a.humanizedStorageGroupFree," free")}),mainLabel:n.storageGroupName,subLabel:i}),value:n.storageGroupUUID}),e.storageGroupUUIDMapToData[n.storageGroupUUID]=a,t}),{anvilStorageGroups:[],anvilStorageGroupUUIDs:[]}),m=v.anvilStorageGroups,g=v.anvilStorageGroupUUIDs,h=[];f.forEach((function(e){var n=e.fileUUID;h.push(n),t[n]=e}));var b=ne({},n,{anvilTotalMemory:BigInt(s),anvilTotalAllocatedMemory:BigInt(l),anvilTotalAvailableMemory:BigInt(u),humanizedAnvilTotalAvailableMemory:"",hosts:c.map((function(e){return ne({},e,{hostMemory:BigInt(e.hostMemory)})})),servers:p.map((function(t){var n=t.serverMemory,r=t.serverName,o=ne({},re(t,["serverMemory","serverName"]),{serverMemory:BigInt(n),serverName:r});return e.serverNameMapToData[r]=o,o})),storageGroupUUIDs:g,storageGroups:m,fileUUIDs:h});return(0,x.Bh)(u,{fromUnit:"B",onSuccess:{string:function(e,t){b.humanizedAnvilTotalAvailableMemory="".concat(e," ").concat(t)}},precision:0,toUnit:"ibyte"}),e.anvils.push(b),e.anvilSelectItems.push({displayValue:ge({endAdornment:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",width:"8rem"},children:[(0,r.jsx)(B.Ac,{inverted:!0,text:"CPU: ".concat(b.anvilTotalCPUCores," cores")}),(0,r.jsx)(B.Ac,{inverted:!0,text:"Memory: ~".concat(b.humanizedAnvilTotalAvailableMemory)})]}),mainLabel:b.anvilName,subLabel:b.anvilDescription}),value:o}),e.anvilUUIDMapToData[o]=b,e}),{anvils:[],anvilSelectItems:[],anvilUUIDMapToData:{},files:[],fileSelectItems:[],fileUUIDMapToData:{},serverNameMapToData:{},storageGroups:[],storageGroupSelectItems:[],storageGroupUUIDMapToData:{}});return Object.values(t).forEach((function(e){n.files.push(e),n.fileSelectItems.push({displayValue:e.fileName,value:e.fileUUID}),n.fileUUIDMapToData[e.fileUUID]=e})),n}(t.anvils),o=n.anvils,i=n.anvilSelectItems,s=n.anvilUUIDMapToData,l=n.fileSelectItems,u=n.fileUUIDMapToData,c=n.serverNameMapToData,p=n.storageGroupSelectItems,d=n.storageGroupUUIDMapToData;U(o),P(s),A(u),k(c),T(d),L(i),V(l),K(p),Ht({allAnvils:o,storageGroupUUIDMapToData:d}),Q(t.osList.map((function(e){var t=oe(e.replace(/^key=([^\s]+),name=['"](.*)['"]$/,"$1,$2").split(","),2),n=t[0];return{label:t[1],key:n}}))),Ct(!0)}))}),[Ht]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Z,{fullWidth:!0,maxWidth:"sm",open:t,PaperComponent:O.s_,PaperProps:{sx:{overflow:"visible"}},children:[(0,r.jsxs)(O.V9,{children:[(0,r.jsx)(B.z,{text:"Provision a Server"}),(0,r.jsx)(g.Z,{onClick:n,sx:{backgroundColor:p.hM,color:p.lD,"&:hover":{backgroundColor:p.hM}},children:(0,r.jsx)(u.Z,{})})]}),Mt?(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",maxHeight:"50vh",overflowY:"scroll",paddingTop:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(b.Z,{id:"ps-server-name",label:"Server name",inputProps:{onChange:function(e){var t=e.target.value;se(t),$t({inputs:{serverName:{value:t}}})},value:te},inputLabelProps:{isNotifyRequired:0===te.length},messageBoxProps:Ue})}),(Vt="ps-cpu-cores",Rt="CPU cores",_t=Ie,Qt={messageBoxProps:Ae,sliderProps:{onChange:function(e){var t=e;if(t!==Ie){Pe(t);var n=qt({cpuCores:t}).maxCPUCores;$t({inputs:{cpuCores:{max:n,value:t}}})}},max:we,min:1}},(0,r.jsx)(H,ne({isAllowTextInput:!0,label:Rt,labelId:"".concat(Vt,"-label"),value:_t},Qt))),(0,r.jsx)(Z,{id:"ps-memory",label:"Memory",messageBoxProps:Fe,inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(We," ").concat(He),{onButtonClick:function(){Qe(We),Jt({cmValue:ze})}}),onChange:function(e){var t=e.target.value;Yt({value:t})},type:"number",value:_e},inputLabelProps:{isNotifyRequired:ke===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var t=e.target.value;Yt({unit:t})},value:He}}}),Ye.stateIds.map((function(e,t){return function(e,t,n,o,i,s,l,u){var c=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return e[n][r]},p=function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;e[r][i]=o,n(ne({},e))},d=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce;p("sizes",n);var r=s({virtualDisks:e}),o=r.formattedMaxVDSizes,i=r.maxVirtualDiskSizes;u({inputs:X({},"vd".concat(t,"Size"),{displayMax:"".concat(o[t]),max:i[t],value:n})})},f=function(e){var t=e.value,n=void 0===t?c("inputSizes"):t,r=e.unit,o=void 0===r?c("inputUnits"):r;n!==c("inputSizes")&&p("inputSizes",n),o!==c("inputUnits")&&p("inputUnits",o),(0,x.KY)(n,o,(function(e){return d(e)}),(function(){return d()}))},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c("inputStorageGroupUUIDs");t!==c("inputStorageGroupUUIDs")&&p("inputStorageGroupUUIDs",t),s({virtualDisks:e})};return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(Z,{id:"ps-virtual-disk-size-".concat(t),label:"Virtual disk size",messageBoxProps:c("inputSizeMessages"),inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(c("inputMaxes")," ").concat(c("inputUnits")),{onButtonClick:function(){p("inputSizes",c("inputMaxes")),d(c("maxes"))}}),onChange:function(e){var t=e.target.value;f({value:t})},type:"number",value:c("inputSizes")},inputLabelProps:{isNotifyRequired:c("sizes")===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var t=e.target.value;f({unit:t})},value:c("inputUnits")}}})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(j.Z,{id:"ps-storage-group-".concat(t),label:"Storage group",disableItem:function(e){return!(i.includes(e)&&c("sizes")<=l[e].storageGroupFree)},inputLabelProps:{isNotifyRequired:0===c("inputStorageGroupUUIDs").length},messageBoxProps:c("inputStorageGroupUUIDMessages"),selectItems:o,selectProps:{onChange:function(e){var t=e.target.value;v(t)},onClearIndicatorClick:function(){return v("")},renderValue:function(e){var t,n=null!==(t=l[e])&&void 0!==t?t:{},r=n.anvilName,o=void 0===r?"?":r,i=n.storageGroupName,a=void 0===i?"Unknown (".concat(e,")"):i;return"".concat(a," (").concat(o,")")},value:c("inputStorageGroupUUIDs")}})})]},"ps-virtual-disk-".concat(c("stateIds")))}(Ye,t,Ke,Y,Zt,qt,z,$t)})),(0,r.jsx)(j.Z,{disableItem:function(e){return e===at},hideItem:function(e){return!Pt.includes(e)},id:"ps-install-image",inputLabelProps:{isNotifyRequired:0===et.length},label:"Install ISO",messageBoxProps:rt,selectItems:W,selectProps:{onChange:function(e){var t=e.target.value;Kt(t)},onClearIndicatorClick:function(){return Kt("")},value:et}}),(0,r.jsx)(j.Z,{disableItem:function(e){return e===et},hideItem:function(e){return!Pt.includes(e)},id:"ps-driver-image",label:"Driver ISO",messageBoxProps:lt,selectItems:W,selectProps:{onChange:function(e){var t=e.target.value;Xt(t)},onClearIndicatorClick:function(){return Xt("")},value:at}}),(0,r.jsx)(j.Z,{disableItem:function(e){return!St.includes(e)},id:"ps-anvil",inputLabelProps:{isNotifyRequired:0===ct.length},label:"Anvil node pair",messageBoxProps:ft,selectItems:F,selectProps:{onChange:function(e){var t=e.target.value;en(t)},onClearIndicatorClick:function(){return en("")},renderValue:function(e){var t,n=(null!==(t=I[e])&&void 0!==t?t:{}).anvilName;return void 0===n?"Unknown ".concat(e):n},value:ct}}),(0,r.jsx)(f.Z,{id:"ps-optimize-for-os",extendRenderInput:function(e){var t=e.inputLabelProps;(void 0===t?{}:t).isNotifyRequired=null===xt},isOptionEqualToValue:function(e,t){return e.key===t.key},label:"Optimize for OS",messageBoxProps:bt,noOptionsText:"No matching OS",onChange:function(e,t){gt(t)},openOnFocus:!0,options:_,renderOption:function(e,t){return(0,o.createElement)("li",ne({},e,{key:"ps-optimize-for-os-".concat(t.key),children:[t.label," (",t.key,")"]}))},value:xt})]}):(0,r.jsx)($.Z,{}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",marginTop:"1em","& > :not(:first-child)":{marginTop:"1em"}},children:[Lt>0&&(0,r.jsx)(h.Z,{isAllowClose:!0,text:"Provision server job registered. You can provision another server, or exit; it won't affect the registered job."}),Tt?(0,r.jsx)($.Z,{mt:0}):(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"100%"},children:(0,r.jsx)(m.Z,{disabled:!$t({isIgnoreOnCallbacks:!0}),onClick:function(){Bt(!0)},sx:me,children:"Provision"})})]})]}),Gt&&(0,r.jsx)(v.Z,{actionProceedText:"Provision",content:(0,r.jsxs)(s.ZP,{container:!0,columns:8,direction:"column",children:[(0,r.jsx)(s.ZP,{direction:"row",item:!0,xs:8,children:(0,r.jsxs)(B.Ac,{children:["Server ",(0,r.jsx)(B.Q0,{text:te})," will be created on anvil node pair"," ",(0,r.jsx)(B.Q0,{text:I[ct].anvilName})," ","with the following properties:"]})}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"CPU"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:Ie})," core(s)"]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:we})," core(s) available"]})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Memory"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsx)(B.Q0,{text:"".concat(_e," ").concat(He)})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(We," ").concat(He)})," ","available"]})})]}),Ye.stateIds.map((function(e,t){var n=Ye.inputMaxes[t],o=Ye.inputSizes[t],i=Ye.inputUnits[t],a=z[Ye.inputStorageGroupUUIDs[t]].storageGroupName;return(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(B.Ac,{children:["Virtual disk ",(0,r.jsx)(B.Q0,{text:t})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(o," ").concat(i)})," on"," ",a]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(n," ").concat(i)})," ","available"]})})]},"ps-virtual-disk-".concat(e,"-summary"))})),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Install ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Q0,{text:w[et].fileName})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Driver ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:w[at]?(0,r.jsx)(B.Q0,{text:w[at].fileName}):(0,r.jsx)(B.Ac,{text:"none"})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Optimize for OS"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{text:"".concat(null===xt||void 0===xt?void 0:xt.label)})})]})]}),dialogProps:{open:Gt},onCancelAppend:function(){Bt(!1)},onProceedAppend:function(){var e={serverName:te,cpuCores:Ie,memory:ke.toString(),virtualDisks:Ye.stateIds.map((function(e,t){return{storageSize:Ye.sizes[t].toString(),storageGroupUUID:Ye.inputStorageGroupUUIDs[t]}})),installISOFileUUID:et,driverISOFileUUID:at,anvilUUID:ct,optimizeForOS:null===xt||void 0===xt?void 0:xt.key};Nt(!0),d.Z.post("/server",e).then((function(){Nt(!1),Et(Lt+1)})),Bt(!1)},proceedButtonProps:{sx:me},titleText:"Provision ".concat(te,"?")})]})}},1081:function(e,t,n){var r=n(7294);t.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},5737:function(e,t,n){n.d(t,{Bh:function(){return o},KY:function(){return i},MU:function(){return a}});var r=n(4490),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fromUnit,o=t.onFailure,i=t.onSuccess,a=t.precision,s=t.toUnit,l=(0,r.gO)(e,{fromUnit:n,precision:a,toUnit:s});if(l){var u=l.value,c=l.unit;try{var p,d,f;null===i||void 0===i||null===(p=i.bigint)||void 0===p||p.call(null,BigInt(u),c),null===i||void 0===i||null===(d=i.number)||void 0===d||d.call(null,parseFloat(u),c),null===i||void 0===i||null===(f=i.string)||void 0===f||f.call(null,u,c)}catch(v){null===o||void 0===o||o.call(null,v,u,c)}}else null===o||void 0===o||o.call(null)},i=function(e,t,n,r){o(e,{fromUnit:t,onFailure:r,onSuccess:{bigint:n},precision:0,toUnit:"B"})},a=function(e){return(0,r._d)(e,{toUnit:"ibyte"})}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[825],{4594:function(e,t,n){var r=n(5893),o=n(6514),i=n(5113),a=n(4656),s=n(482),l=n(2994),u=n(7357),c=n(9890),p=n(7169),d=n(1363),f=n(6284);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,m({},e))})};t.Z=function(e){var t=e.componentsProps,n=e.extendRenderInput,o=e.label,i=e.messageBoxProps,h=e.renderInput,b=e.sx,y=x(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),U=m({paper:{sx:{backgroundColor:p.lD}}},t),S=null!==h&&void 0!==h?h:function(e){var t=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,s=e.inputProps,l={formControlProps:{fullWidth:t,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:s,startAdornment:i.startAdornment},label:o};return null===n||void 0===n||n.call(null,l,e),(0,r.jsx)(f.Z,m({},l))},j=m(v({},"& .".concat(a.Z.root," .").concat(s.Z.endAdornment),v({right:"7px"},"& .".concat(l.Z.root),{color:p.s7})),b);return(0,r.jsxs)(u.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(c.Z,m({PaperComponent:g},y,{componentsProps:U,renderInput:S,sx:j})),(0,r.jsx)(d.Z,m({},i))]})}},5521:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(5893),o=n(1113),i=n(1496),a=n(2293),s=n(7357),l=n(2992),u=n(4799),c=n(7294),p=n(7169),d=n(4433),f=n(9029),v=n(7533),m=n(8462),x=n(7212),g=n(8619),h=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],b={width:"40em",height:"40em"},y=n(4390),U=n(582),S=n(4690),j=n(1770),I=n(7750),P=n(1081);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return n["".concat(t).concat(e)]}),[n]),i=(0,c.useCallback)((function(){return o("user")}),[o]);return(0,c.useEffect)((function(){if(e){var t=document.cookie.split(/\s*;\s*/);r(t.reduce((function(e,t){var n,r=w(t.split("=",2),2),o=r[0],i=r[1],a=decodeURIComponent(i);if(a.startsWith("j:"))try{n=JSON.parse(a.substring(2))}catch(s){n=i}else n=i;return e[o]=n,e}),{}))}}),[e]),{cookieJar:n,getCookie:o,getSessionUser:i}};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){for(var t=1;t0)},ref:t})]})}},4968:function(e,t,n){n.d(t,{Z:function(){return Ue}});var r=n(5893),o=n(7294),a=n(7357),s=n(6886),l=n(8262),u=n(5537),c=n(5934),p=n(7169),d=n(4390),f=n(4594),v=n(157),m=n(4825),x=n(5737),g=n(1706),h=n(8187),b=n(6284),y=n(7120),U=n(4656),S=n(1363),j=n(7783);function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){for(var t=1;t :first-child":{flexGrow:1},"& > :not(:last-child)":{marginRight:".5em"}},"&:hover\n .".concat(y.Z.root,"\n .").concat(U.Z.root,"\n .").concat(U.Z.notchedOutline),{borderColor:p.s7}),children:[(0,r.jsx)(b.Z,P({id:t,label:n},i)),(0,r.jsx)(j.Z,P({formControlProps:{fullWidth:!1},id:"".concat(t,"-nested-select"),selectItems:u},d))]}),(0,r.jsx)(S.Z,P({},l))]})};w.defaultProps=D;var Z=w,O=n(3679),A=n(3640),M=n(6727),C=n(1184),k=n(9),G=n(192),B=n(7750);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function E(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);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 z(e,t)}(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 W={inputLabelProps:{},isAllowTextInput:!1,labelId:"",messageBoxProps:{},sliderProps:{}},V={root:"".concat("SliderInputLabelDecorator","-root")},R=function(e){var t=e.isFocused,n=e.label,o=p.s7,i="solid",s="0",l="0 .6em 0 .4em",u="1px 0 0 0",c="0.3";return t&&(s="-1px",l="0 1em 0 1em",u="2px 0 0 0",c="1"),(0,r.jsxs)(a.Z,{className:V.root,sx:{display:"flex",flexDirection:"row",position:"absolute",top:s,width:"calc(100% - 6px)","> :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c,width:".6em"}}),(0,r.jsx)(B.Ac,{sx:{fontSize:".75em",margin:l,visibility:"hidden"},text:n}),(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c}})]})},_=function(e,t){var n=Number.parseFloat(e);return Number.isNaN(n)?t:n},Q=function(e){return N(e,Array)?e.map((function(e){return String(e)})):[String(e)]},q=function(e){var t,n=e.messageBoxProps,i=void 0===n?W.messageBoxProps:n,s=e.isAllowTextInput,l=void 0===s?W.isAllowTextInput:s,u=e.label,c=e.labelId,d=void 0===c?W.labelId:c,f=e.inputLabelProps,v=void 0===f?W.inputLabelProps:f,m=e.sliderProps,x=void 0===m?W.sliderProps:m,g=e.value,h=x.max,b=x.min,y=x.onChange,j=x.sx,I=x.valueLabelDisplay,P=g,D=(0,o.useState)({range:Q(g)}),w=D[0],Z=D[1],O=(0,o.useState)(!1),B=O[0],z=O[1],q=function(){z(!1)},H=function(){z(!0)},$=function(){P=function(e,t){return N(t,Array)?e.map((function(e,n){return _(e,t[n])})):_(e[0],t)}(w.range,P),null===y||void 0===y||y.call(null,P)};return(0,r.jsxs)(A.Z,{sx:{display:"flex",flexDirection:"column","&:hover":(t={},T(t,"& .".concat(V.root," div"),{opacity:1}),T(t,"& .".concat(U.Z.notchedOutline),{borderColor:p.s7}),t)},children:[(0,r.jsx)(G.Z,F({className:B?M.Z.focused:"",id:d,shrink:!0},v,{children:u})),R({isFocused:B,label:u}),(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","> :first-child":{flexGrow:1}},children:[(0,r.jsx)(C.ZP,{"aria-labelledby":d,max:h,min:b,onBlur:q,onChange:function(e,t){Z({range:Q(t)}),null===y||void 0===y||y.call(null,t)},onFocus:H,sx:F(T({color:p.s7,marginLeft:"1em",marginRight:"1em"},"& .".concat(C.TW.thumb),{borderRadius:p.n_,transform:"translate(-50%, -50%) rotate(45deg)"}),j),value:P,valueLabelDisplay:I}),w.range.map((function(e,t){return function(e){var t=e.key,n=e.isFocused,o=L(e,["key","isFocused"]);return(0,r.jsx)(k.Z,F({key:t,className:n?U.Z.focused:"",type:"number"},o))}({key:"slider-nested-text-input-".concat(t),inputProps:{max:h,min:b},isFocused:B,onBlur:q,onChange:function(){for(var e=arguments.length,n=new Array(e),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oe(e,t){return K(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||se(e,t)||te()}function ie(e){return K(e)||ee(e)||se(e,i)||te()}function ae(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||ee(e)||se(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.")}()}function se(e,t){if(e){if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}var le,ue,ce=BigInt(0),pe=[{value:"B"},{value:"KiB"},{value:"MiB"},{value:"GiB"},{value:"TiB"}],de="GiB",fe=BigInt(65536),ve=BigInt(104857600),me={backgroundColor:p.Ej,color:p.lD,"&:hover":{backgroundColor:p.Ej}},xe=function(e,t){var n=t.onButtonClick;return(0,r.jsx)(m.Z,{disabled:void 0===n,onClick:n,sx:{minWidth:"unset",whiteSpace:"nowrap"},children:"Max: ".concat(e)})},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.endAdornment,n=e.mainLabel,o=e.subLabel;return(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row",width:"100%","& > :first-child":{flexGrow:1}},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[n&&(0,r.jsx)(B.Ac,{inverted:!0,text:n}),o&&(0,r.jsx)(B.Ac,{inverted:!0,text:o})]}),t]})},he=function(e,t,n,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=s.includeAnvilUUIDs,u=void 0===l?[]:l,c=s.includeFileUUIDs,p=void 0===c?[]:c,d=s.includeStorageGroupUUIDs,f=void 0===d?[]:d,v=function(){return!0},m=function(){return!0},x=function(){return!0};u.length>0&&(v=function(e){return u.includes(e)}),p.length>0&&(m=function(e){return p.includes(e)}),f.length>0&&(x=function(e){return f.includes(e)});var g={},h=i.reduce((function(e,t,n){var r,i=null!==(r=o[n])&&void 0!==r?r:ce;return e.all+=i,""===t||(void 0===e[t]&&(e[t]=ce),e[t]+=i),e}),{all:ce}),b=e.reduce((function(e,s){var l=s.anvilUUID;if(v(l)){var u,c=s.anvilTotalCPUCores,p=s.anvilTotalAvailableMemory,d=s.files,f=s.fileUUIDs,b=s.storageGroups,y=[],U=ce,S=ce;if(b.forEach((function(e){var t=e.storageGroupUUID,n=e.storageGroupFree;x(t)&&(y.push(t),S+=n,n>U&&(U=n))})),[function(){return b.length>0},function(){return n<=c},function(){return r<=p},function(){return i.every((function(e,n){var r,i=null!==(r=o[n])&&void 0!==r?r:ce,a=!0,s=i<=U;return""!==e&&(a=y.includes(e),s=i<=t[e].storageGroupFree),a&&s}))},function(){return Object.entries(h).every((function(e){var n=oe(e,2),r=n[0],o=n[1];return"all"===r?o<=S:o<=t[r].storageGroupFree}))},function(){return a.every((function(e){return""===e||f.includes(e)}))}].every((function(e){return e()})))e.anvils.push(s),e.anvilUUIDs.push(l),e.maxCPUCores=Math.max(c,e.maxCPUCores),p>e.maxMemory&&(e.maxMemory=p),d.forEach((function(e){var t=e.fileUUID;m(t)&&(g[t]=!0)})),(u=e.storageGroupUUIDs).push.apply(u,ae(y)),e.maxVirtualDiskSizes.fill(U)}return e}),{anvils:[],anvilUUIDs:[],fileUUIDs:[],maxCPUCores:0,maxMemory:ce,maxVirtualDiskSizes:i.map((function(){return ce})),storageGroupUUIDs:[]});return b.fileUUIDs=Object.keys(g),i.forEach((function(e,n){""!==e&&(b.maxVirtualDiskSizes[n]=t[e].storageGroupFree)})),b},be=function(e){return e.filter((function(e){return""!==e}))},ye=function(e){return{fromUnit:"B",onSuccess:{string:e},precision:0,toUnit:"ibyte"}};(0,x.Bh)(fe,ye((function(e,t){le="".concat(e," ").concat(t)}))),(0,x.Bh)(ve,ye((function(e,t){ue="".concat(e," ").concat(t)})));var Ue=function(e){var t=e.dialogProps.open,n=e.onClose,i=(0,o.useState)([]),y=i[0],U=i[1],S=(0,o.useState)({}),I=S[0],P=S[1],D=(0,o.useState)({}),w=D[0],A=D[1],M=(0,o.useState)({}),C=M[0],k=M[1],G=(0,o.useState)({}),z=G[0],T=G[1],N=(0,o.useState)([]),F=N[0],L=N[1],E=(0,o.useState)([]),W=E[0],V=E[1],R=(0,o.useState)([]),_=R[0],Q=R[1],q=(0,o.useState)([]),Y=q[0],K=q[1],ee=(0,o.useState)(""),te=ee[0],se=ee[1],ye=(0,o.useState)(),Ue=ye[0],Se=ye[1],je=(0,o.useState)(1),Ie=je[0],Pe=je[1],De=(0,o.useState)(0),we=De[0],Ze=De[1],Oe=(0,o.useState)(),Ae=Oe[0],Me=Oe[1],Ce=(0,o.useState)(ce),ke=Ce[0],Ge=Ce[1],Be=(0,o.useState)(ce),ze=Be[0],Te=Be[1],Ne=(0,o.useState)(),Fe=Ne[0],Le=Ne[1],Ee=(0,o.useState)("0"),We=Ee[0],Ve=Ee[1],Re=(0,o.useState)(""),_e=Re[0],Qe=Re[1],qe=(0,o.useState)(de),He=qe[0],$e=qe[1],Je=(0,o.useState)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.existingVirtualDisks,n=void 0===t?{stateIds:[],inputMaxes:[],inputSizeMessages:[],inputSizes:[],inputStorageGroupUUIDMessages:[],inputStorageGroupUUIDs:[],inputUnits:[],maxes:[],sizes:[]}:t,r=e.stateId,o=void 0===r?(0,c.Z)():r,i=e.inputMax,a=void 0===i?"0":i,s=e.inputSize,l=void 0===s?"":s,u=e.inputSizeMessage,p=void 0===u?void 0:u,d=e.inputStorageGroupUUID,f=void 0===d?"":d,v=e.inputStorageGroupUUIDMessage,m=void 0===v?void 0:v,x=e.inputUnit,g=void 0===x?de:x,h=e.max,b=void 0===h?ce:h,y=e.setVirtualDisks,U=e.size,S=void 0===U?ce:U,j=n.stateIds,I=n.inputMaxes,P=n.inputSizeMessages,D=n.inputSizes,w=n.inputStorageGroupUUIDMessages,Z=n.inputStorageGroupUUIDs,O=n.inputUnits,A=n.maxes,M=n.sizes;return j.push(o),I.push(a),P.push(p),D.push(l),w.push(m),Z.push(f),O.push(g),A.push(b),M.push(S),null===y||void 0===y||y.call(null,ne({},n)),n}()),Ye=Je[0],Ke=Je[1],Xe=(0,o.useState)(""),et=Xe[0],tt=Xe[1],nt=(0,o.useState)(),rt=nt[0],ot=nt[1],it=(0,o.useState)(""),at=it[0],st=it[1],lt=(0,o.useState)()[0],ut=(0,o.useState)(""),ct=ut[0],pt=ut[1],dt=(0,o.useState)(),ft=dt[0],vt=dt[1],mt=(0,o.useState)(null),xt=mt[0],gt=mt[1],ht=(0,o.useState)(),bt=ht[0],yt=ht[1],Ut=(0,o.useState)([]),St=Ut[0],jt=Ut[1],It=(0,o.useState)([]),Pt=It[0],Dt=It[1],wt=(0,o.useState)([]),Zt=wt[0],Ot=wt[1],At=(0,o.useState)(!1),Mt=At[0],Ct=At[1],kt=(0,o.useState)(!1),Gt=kt[0],Bt=kt[1],zt=(0,o.useState)(!1),Tt=zt[0],Nt=zt[1],Ft=(0,o.useState)(0),Lt=Ft[0],Et=Ft[1],Wt={serverName:{defaults:{onSuccess:function(){Se(void 0)},value:te},tests:[{onFailure:function(){Se({text:"The server name length must be 1 to 16 characters.",type:"warning"})},test:function(e){var t=e.value.length;return t>=1&&t<=16}},{onFailure:function(){Se({text:"The server name is expected to only contain alphanumeric, hyphen, or underscore characters.",type:"warning"})},test:function(e){var t=e.value;return/^[a-zA-Z0-9_-]+$/.test(t)}},{onFailure:function(){Se({text:"This server name already exists, please choose another name.",type:"warning"})},test:function(e){var t=e.value;return void 0===C[t]}}]},cpuCores:{defaults:{max:we,min:1,onSuccess:function(){Me(void 0)},value:Ie},tests:[{onFailure:function(){Me({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var t=e.displayMax,n=e.displayMin;Me({text:"The number of CPU cores is expected to be between ".concat(n," and ").concat(t,"."),type:"warning"})},test:J.SQ}]},memory:{defaults:{displayMax:"".concat(We," ").concat(He),displayMin:le,max:ze,min:fe,onSuccess:function(){Le(void 0)},value:ke},tests:[{onFailure:function(){Le({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var t=e.displayMax,n=e.displayMin;Le({text:"Memory is expected to be between ".concat(n," and ").concat(t,"."),type:"warning"})},test:J.SQ}]},installISO:{defaults:{onSuccess:function(){ot(void 0)},value:et},tests:[{test:J.HJ}]},anvil:{defaults:{onSuccess:function(){vt(void 0)},value:ct},tests:[{test:J.HJ}]},optimizeForOS:{defaults:{onSuccess:function(){yt(void 0)},value:null===xt||void 0===xt?void 0:xt.key},tests:[{test:J.HJ}]}};Ye.inputSizeMessages.forEach((function(e,t){Wt["vd".concat(t,"Size")]={defaults:{displayMax:"".concat(Ye.inputMaxes[t]," ").concat(Ye.inputUnits[t]),displayMin:ue,max:Ye.maxes[t],min:ve,onSuccess:function(){Ye.inputSizeMessages[t]=void 0},value:Ye.sizes[t]},onFinishBatch:function(){Ke(ne({},Ye))},tests:[{onFailure:function(){Ye.inputSizeMessages[t]={text:"Non available.",type:"warning"}},test:J.X7},{onFailure:function(e){var n=e.displayMax,r=e.displayMin;Ye.inputSizeMessages[t]={text:"Virtual disk ".concat(t," size is expected to be between ").concat(r," and ").concat(n,"."),type:"warning"}},test:J.SQ}]},Wt["vd".concat(t,"StorageGroup")]={defaults:{onSuccess:function(){Ye.inputStorageGroupUUIDMessages[t]=void 0},value:Ye.inputStorageGroupUUIDs[t]},onFinishBatch:function(){Ke(ne({},Ye))},tests:[{test:J.HJ}]}}));var Vt,Rt,_t,Qt,qt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allAnvils,n=void 0===t?y:t,r=e.cpuCores,o=void 0===r?Ie:r,i=e.fileUUIDs,a=void 0===i?[et,at]:i,s=e.includeAnvilUUIDs,l=void 0===s?be([ct]):s,u=e.includeFileUUIDs,c=e.includeStorageGroupUUIDs,p=e.inputMemoryUnit,d=void 0===p?He:p,f=e.memory,v=void 0===f?ke:f,m=e.storageGroupUUIDMapToData,g=void 0===m?z:m,h=e.virtualDisks,b=void 0===h?Ye:h,U=he(n,g,o,v,b.sizes,b.inputStorageGroupUUIDs,a,{includeAnvilUUIDs:l,includeFileUUIDs:u,includeStorageGroupUUIDs:c}),S=U.anvilUUIDs,j=U.fileUUIDs,I=U.maxCPUCores,P=U.maxMemory,D=U.maxVirtualDiskSizes,w=U.storageGroupUUIDs;Ze(I),Te(P);var Z=[];b.maxes=D,b.maxes.forEach((function(e,t){(0,x.Bh)(e,{fromUnit:"B",onSuccess:{string:function(e,n){b.inputMaxes[t]=e,Z[t]="".concat(e," ").concat(n)}},toUnit:b.inputUnits[t]})})),Ke(ne({},b)),jt(S),Dt(j),Ot(w);var O="";return(0,x.Bh)(P,{fromUnit:"B",onSuccess:{string:function(e,t){Ve(e),O="".concat(e," ").concat(t)}},toUnit:d}),{formattedMaxMemory:O,formattedMaxVDSizes:Z,maxCPUCores:I,maxMemory:P,maxVirtualDiskSizes:D}},Ht=(0,o.useCallback)(qt,[]),$t=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.cmValue,n=void 0===t?ce:t,r=e.cmUnit,o=void 0===r?He:r;Ge(n);var i=qt({inputMemoryUnit:o,memory:n}),a=i.formattedMaxMemory,s=i.maxMemory;$t({inputs:{memory:{displayMax:a,max:s,value:n}}})},Yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.value,n=void 0===t?_e:t,r=e.unit,o=void 0===r?He:r;n!==_e&&Qe(n),o!==He&&$e(o),(0,x.KY)(n,o,(function(e){return Jt({cmValue:e,cmUnit:o})}),(function(){return Jt({cmUnit:o})}))},Kt=function(e){tt(e),qt({fileUUIDs:[e,at]})},Xt=function(e){st(e),qt({fileUUIDs:[et,e]})},en=function(e){var t=be([e]);pt(e),qt({includeAnvilUUIDs:t})};return(0,o.useEffect)((function(){d.Z.get("/anvil",{params:{anvilUUIDs:"all",isForProvisionServer:!0}}).then((function(e){var t=e.data,n=function(e){var t={},n=e.reduce((function(e,n){var o=n.anvilUUID,i=n.anvilName,s=n.anvilTotalMemory,l=n.anvilTotalAllocatedMemory,u=n.anvilTotalAvailableMemory,c=n.hosts,p=n.servers,d=n.storageGroups,f=n.files,v=d.reduce((function(t,n){var a=ne({},n,{anvilUUID:o,anvilName:i,storageGroupSize:BigInt(n.storageGroupSize),storageGroupFree:BigInt(n.storageGroupFree),humanizedStorageGroupFree:""});return(0,x.Bh)(n.storageGroupFree,{fromUnit:"B",onSuccess:{string:function(e,t){a.humanizedStorageGroupFree="".concat(e," ").concat(t)}},precision:0,toUnit:"ibyte"}),t.anvilStorageGroupUUIDs.push(n.storageGroupUUID),t.anvilStorageGroups.push(a),e.storageGroups.push(a),e.storageGroupSelectItems.push({displayValue:ge({endAdornment:(0,r.jsx)(B.Ac,{inverted:!0,text:"~".concat(a.humanizedStorageGroupFree," free")}),mainLabel:n.storageGroupName,subLabel:i}),value:n.storageGroupUUID}),e.storageGroupUUIDMapToData[n.storageGroupUUID]=a,t}),{anvilStorageGroups:[],anvilStorageGroupUUIDs:[]}),m=v.anvilStorageGroups,g=v.anvilStorageGroupUUIDs,h=[];f.forEach((function(e){var n=e.fileUUID;h.push(n),t[n]=e}));var b=ne({},n,{anvilTotalMemory:BigInt(s),anvilTotalAllocatedMemory:BigInt(l),anvilTotalAvailableMemory:BigInt(u),humanizedAnvilTotalAvailableMemory:"",hosts:c.map((function(e){return ne({},e,{hostMemory:BigInt(e.hostMemory)})})),servers:p.map((function(t){var n=t.serverMemory,r=t.serverName,o=ne({},re(t,["serverMemory","serverName"]),{serverMemory:BigInt(n),serverName:r});return e.serverNameMapToData[r]=o,o})),storageGroupUUIDs:g,storageGroups:m,fileUUIDs:h});return(0,x.Bh)(u,{fromUnit:"B",onSuccess:{string:function(e,t){b.humanizedAnvilTotalAvailableMemory="".concat(e," ").concat(t)}},precision:0,toUnit:"ibyte"}),e.anvils.push(b),e.anvilSelectItems.push({displayValue:ge({endAdornment:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",width:"8rem"},children:[(0,r.jsx)(B.Ac,{inverted:!0,text:"CPU: ".concat(b.anvilTotalCPUCores," cores")}),(0,r.jsx)(B.Ac,{inverted:!0,text:"Memory: ~".concat(b.humanizedAnvilTotalAvailableMemory)})]}),mainLabel:b.anvilName,subLabel:b.anvilDescription}),value:o}),e.anvilUUIDMapToData[o]=b,e}),{anvils:[],anvilSelectItems:[],anvilUUIDMapToData:{},files:[],fileSelectItems:[],fileUUIDMapToData:{},serverNameMapToData:{},storageGroups:[],storageGroupSelectItems:[],storageGroupUUIDMapToData:{}});return Object.values(t).forEach((function(e){n.files.push(e),n.fileSelectItems.push({displayValue:e.fileName,value:e.fileUUID}),n.fileUUIDMapToData[e.fileUUID]=e})),n}(t.anvils),o=n.anvils,i=n.anvilSelectItems,s=n.anvilUUIDMapToData,l=n.fileSelectItems,u=n.fileUUIDMapToData,c=n.serverNameMapToData,p=n.storageGroupSelectItems,d=n.storageGroupUUIDMapToData;U(o),P(s),A(u),k(c),T(d),L(i),V(l),K(p),Ht({allAnvils:o,storageGroupUUIDMapToData:d}),Q(t.osList.map((function(e){var t=oe(e.replace(/^key=([^\s]+),name=['"](.*)['"]$/,"$1,$2").split(","),2),n=t[0];return{label:t[1],key:n}}))),Ct(!0)}))}),[Ht]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Z,{fullWidth:!0,maxWidth:"sm",open:t,PaperComponent:O.s_,PaperProps:{sx:{overflow:"visible"}},children:[(0,r.jsxs)(O.V9,{children:[(0,r.jsx)(B.z,{text:"Provision a Server"}),(0,r.jsx)(g.Z,{onClick:n,sx:{backgroundColor:p.hM,color:p.lD,"&:hover":{backgroundColor:p.hM}},children:(0,r.jsx)(u.Z,{})})]}),Mt?(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",maxHeight:"50vh",overflowY:"scroll",paddingTop:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(b.Z,{id:"ps-server-name",label:"Server name",inputProps:{onChange:function(e){var t=e.target.value;se(t),$t({inputs:{serverName:{value:t}}})},value:te},inputLabelProps:{isNotifyRequired:0===te.length},messageBoxProps:Ue})}),(Vt="ps-cpu-cores",Rt="CPU cores",_t=Ie,Qt={messageBoxProps:Ae,sliderProps:{onChange:function(e){var t=e;if(t!==Ie){Pe(t);var n=qt({cpuCores:t}).maxCPUCores;$t({inputs:{cpuCores:{max:n,value:t}}})}},max:we,min:1}},(0,r.jsx)(H,ne({isAllowTextInput:!0,label:Rt,labelId:"".concat(Vt,"-label"),value:_t},Qt))),(0,r.jsx)(Z,{id:"ps-memory",label:"Memory",messageBoxProps:Fe,inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(We," ").concat(He),{onButtonClick:function(){Qe(We),Jt({cmValue:ze})}}),onChange:function(e){var t=e.target.value;Yt({value:t})},type:"number",value:_e},inputLabelProps:{isNotifyRequired:ke===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var t=e.target.value;Yt({unit:t})},value:He}}}),Ye.stateIds.map((function(e,t){return function(e,t,n,o,i,s,l,u){var c=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return e[n][r]},p=function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;e[r][i]=o,n(ne({},e))},d=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce;p("sizes",n);var r=s({virtualDisks:e}),o=r.formattedMaxVDSizes,i=r.maxVirtualDiskSizes;u({inputs:X({},"vd".concat(t,"Size"),{displayMax:"".concat(o[t]),max:i[t],value:n})})},f=function(e){var t=e.value,n=void 0===t?c("inputSizes"):t,r=e.unit,o=void 0===r?c("inputUnits"):r;n!==c("inputSizes")&&p("inputSizes",n),o!==c("inputUnits")&&p("inputUnits",o),(0,x.KY)(n,o,(function(e){return d(e)}),(function(){return d()}))},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c("inputStorageGroupUUIDs");t!==c("inputStorageGroupUUIDs")&&p("inputStorageGroupUUIDs",t),s({virtualDisks:e})};return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(Z,{id:"ps-virtual-disk-size-".concat(t),label:"Virtual disk size",messageBoxProps:c("inputSizeMessages"),inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(c("inputMaxes")," ").concat(c("inputUnits")),{onButtonClick:function(){p("inputSizes",c("inputMaxes")),d(c("maxes"))}}),onChange:function(e){var t=e.target.value;f({value:t})},type:"number",value:c("inputSizes")},inputLabelProps:{isNotifyRequired:c("sizes")===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var t=e.target.value;f({unit:t})},value:c("inputUnits")}}})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(j.Z,{id:"ps-storage-group-".concat(t),label:"Storage group",disableItem:function(e){return!(i.includes(e)&&c("sizes")<=l[e].storageGroupFree)},inputLabelProps:{isNotifyRequired:0===c("inputStorageGroupUUIDs").length},messageBoxProps:c("inputStorageGroupUUIDMessages"),selectItems:o,selectProps:{onChange:function(e){var t=e.target.value;v(t)},onClearIndicatorClick:function(){return v("")},renderValue:function(e){var t,n=null!==(t=l[e])&&void 0!==t?t:{},r=n.anvilName,o=void 0===r?"?":r,i=n.storageGroupName,a=void 0===i?"Unknown (".concat(e,")"):i;return"".concat(a," (").concat(o,")")},value:c("inputStorageGroupUUIDs")}})})]},"ps-virtual-disk-".concat(c("stateIds")))}(Ye,t,Ke,Y,Zt,qt,z,$t)})),(0,r.jsx)(j.Z,{disableItem:function(e){return e===at},hideItem:function(e){return!Pt.includes(e)},id:"ps-install-image",inputLabelProps:{isNotifyRequired:0===et.length},label:"Install ISO",messageBoxProps:rt,selectItems:W,selectProps:{onChange:function(e){var t=e.target.value;Kt(t)},onClearIndicatorClick:function(){return Kt("")},value:et}}),(0,r.jsx)(j.Z,{disableItem:function(e){return e===et},hideItem:function(e){return!Pt.includes(e)},id:"ps-driver-image",label:"Driver ISO",messageBoxProps:lt,selectItems:W,selectProps:{onChange:function(e){var t=e.target.value;Xt(t)},onClearIndicatorClick:function(){return Xt("")},value:at}}),(0,r.jsx)(j.Z,{disableItem:function(e){return!St.includes(e)},id:"ps-anvil",inputLabelProps:{isNotifyRequired:0===ct.length},label:"Anvil node",messageBoxProps:ft,selectItems:F,selectProps:{onChange:function(e){var t=e.target.value;en(t)},onClearIndicatorClick:function(){return en("")},renderValue:function(e){var t,n=(null!==(t=I[e])&&void 0!==t?t:{}).anvilName;return void 0===n?"Unknown ".concat(e):n},value:ct}}),(0,r.jsx)(f.Z,{id:"ps-optimize-for-os",extendRenderInput:function(e){var t=e.inputLabelProps;(void 0===t?{}:t).isNotifyRequired=null===xt},isOptionEqualToValue:function(e,t){return e.key===t.key},label:"Optimize for OS",messageBoxProps:bt,noOptionsText:"No matching OS",onChange:function(e,t){gt(t)},openOnFocus:!0,options:_,renderOption:function(e,t){return(0,o.createElement)("li",ne({},e,{key:"ps-optimize-for-os-".concat(t.key),children:[t.label," (",t.key,")"]}))},value:xt})]}):(0,r.jsx)($.Z,{}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",marginTop:"1em","& > :not(:first-child)":{marginTop:"1em"}},children:[Lt>0&&(0,r.jsx)(h.Z,{isAllowClose:!0,text:"Provision server job registered. You can provision another server, or exit; it won't affect the registered job."}),Tt?(0,r.jsx)($.Z,{mt:0}):(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"100%"},children:(0,r.jsx)(m.Z,{disabled:!$t({isIgnoreOnCallbacks:!0}),onClick:function(){Bt(!0)},sx:me,children:"Provision"})})]})]}),Gt&&(0,r.jsx)(v.Z,{actionProceedText:"Provision",content:(0,r.jsxs)(s.ZP,{container:!0,columns:8,direction:"column",children:[(0,r.jsx)(s.ZP,{direction:"row",item:!0,xs:8,children:(0,r.jsxs)(B.Ac,{children:["Server ",(0,r.jsx)(B.Q0,{text:te})," will be created on anvil node"," ",(0,r.jsx)(B.Q0,{text:I[ct].anvilName})," ","with the following properties:"]})}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"CPU"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:Ie})," core(s)"]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:we})," core(s) available"]})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Memory"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsx)(B.Q0,{text:"".concat(_e," ").concat(He)})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(We," ").concat(He)})," ","available"]})})]}),Ye.stateIds.map((function(e,t){var n=Ye.inputMaxes[t],o=Ye.inputSizes[t],i=Ye.inputUnits[t],a=z[Ye.inputStorageGroupUUIDs[t]].storageGroupName;return(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(B.Ac,{children:["Virtual disk ",(0,r.jsx)(B.Q0,{text:t})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(o," ").concat(i)})," on"," ",a]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(n," ").concat(i)})," ","available"]})})]},"ps-virtual-disk-".concat(e,"-summary"))})),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Install ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Q0,{text:w[et].fileName})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Driver ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:w[at]?(0,r.jsx)(B.Q0,{text:w[at].fileName}):(0,r.jsx)(B.Ac,{text:"none"})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Optimize for OS"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{text:"".concat(null===xt||void 0===xt?void 0:xt.label)})})]})]}),dialogProps:{open:Gt},onCancelAppend:function(){Bt(!1)},onProceedAppend:function(){var e={serverName:te,cpuCores:Ie,memory:ke.toString(),virtualDisks:Ye.stateIds.map((function(e,t){return{storageSize:Ye.sizes[t].toString(),storageGroupUUID:Ye.inputStorageGroupUUIDs[t]}})),installISOFileUUID:et,driverISOFileUUID:at,anvilUUID:ct,optimizeForOS:null===xt||void 0===xt?void 0:xt.key};Nt(!0),d.Z.post("/server",e).then((function(){Nt(!1),Et(Lt+1)})),Bt(!1)},proceedButtonProps:{sx:me},titleText:"Provision ".concat(te,"?")})]})}},1081:function(e,t,n){var r=n(7294);t.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},5737:function(e,t,n){n.d(t,{Bh:function(){return o},KY:function(){return i},MU:function(){return a}});var r=n(4490),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fromUnit,o=t.onFailure,i=t.onSuccess,a=t.precision,s=t.toUnit,l=(0,r.gO)(e,{fromUnit:n,precision:a,toUnit:s});if(l){var u=l.value,c=l.unit;try{var p,d,f;null===i||void 0===i||null===(p=i.bigint)||void 0===p||p.call(null,BigInt(u),c),null===i||void 0===i||null===(d=i.number)||void 0===d||d.call(null,parseFloat(u),c),null===i||void 0===i||null===(f=i.string)||void 0===f||f.call(null,u,c)}catch(v){null===o||void 0===o||o.call(null,v,u,c)}}else null===o||void 0===o||o.call(null)},i=function(e,t,n,r){o(e,{fromUnit:t,onFailure:r,onSuccess:{bigint:n},precision:0,toUnit:"B"})},a=function(e){return(0,r._d)(e,{toUnit:"ibyte"})}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/899-83e9de2a35c6bcf0.js b/striker-ui/out/_next/static/chunks/899-83e9de2a35c6bcf0.js deleted file mode 100644 index a86711fe..00000000 --- a/striker-ui/out/_next/static/chunks/899-83e9de2a35c6bcf0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[899],{1363:function(e,t,r){var n=r(5893),o=r(8187);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.sx,r=e.text,i=a(e,["sx","text"]);return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsx)(o.Z,u({},i,{sx:u({marginTop:".4em"},t),text:r}))})}},6284:function(e,t,r){var n=r(5893),o=r(5685),i=r(3640),u=r(1057),a=r(6239),l=r(4799),c=r(7294),f=r(7169),s=r(1363),y=r(9),p=r(192);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function h(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(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 g={baseInputProps:void 0,fillRow:!1,formControlProps:{},helpMessageBoxProps:{},id:"",inputProps:{},inputLabelProps:{},messageBoxProps:{},onHelp:void 0,onHelpAppend:void 0,required:!1,type:void 0,value:""},O=function(e){var t,r=e.baseInputProps,b=e.fillRow,O=void 0===b?g.fillRow:b,j=e.formControlProps,w=void 0===j?g.formControlProps:j,S=e.helpMessageBoxProps,x=void 0===S?g.helpMessageBoxProps:S,P=e.id,A=void 0===P?g.id:P,I=e.inputProps,F=(void 0===I?g.inputProps:I).endAdornment,k=e.inputLabelProps,C=void 0===k?g.inputLabelProps:k,E=e.label,B=e.messageBoxProps,R=void 0===B?g.messageBoxProps:B,q=e.name,M=e.onBlur,T=e.onChange,Z=e.onFocus,$=e.onHelp,D=e.onHelpAppend,U=e.required,Q=void 0===U?g.required:U,N=e.type,H=e.value,L=void 0===H?g.value:H,_=m(e.inputProps,["endAdornment"]),W=w.sx,z=m(w,["sx"]),V=x.text,Y=void 0===V?"":V,G=(0,c.useState)(!1),J=G[0],X=G[1],K=(0,c.useMemo)((function(){return O?"100%":void 0}),[O]),ee=(0,c.useMemo)((function(){return J&&(0,n.jsx)(s.Z,v({onClose:function(){X(!1)}},x))}),[x,J]),te=(0,c.useMemo)((function(){return void 0!==$||Y.length>0}),[Y,$]),re=(0,c.useCallback)((function(){var e;return $?e=$:Y.length>0&&(e=function(){for(var e=arguments.length,t=new Array(e),r=0;r .".concat(a.Z.root),{color:f.s7,padding:".2em"}),d(t,"& > :not(:first-child, .".concat(a.Z.root,")"),{marginLeft:".3em"}),t),children:[F,te&&(0,n.jsx)(l.Z,{onClick:ne,tabIndex:-1,children:(0,n.jsx)(o.Z,{})})]}),fullWidth:w.fullWidth,id:A,inputProps:r,label:E,name:q,onBlur:M,onChange:T,onFocus:Z,type:N,value:L},_)),ee,(0,n.jsx)(s.Z,v({},R))]}))};O.defaultProps=g,t.Z=O},1250:function(e,t,r){r.d(t,{FZ:function(){return l},tf:function(){return c},ah:function(){return f},OU:function(){return s},Qt:function(){return y}});var n="[a-z0-9]",o="[a-z0-9-]",i="[0-9a-f]",u="(?:25[0-5]|(?:2[0-4]|1[0-9]|[1-9]|)[0-9])",a="(?:".concat(u,"[.]){3}").concat(u),l=new RegExp("^(?:".concat(n,"(?:").concat(o,"{0,61}").concat(n,")?[.])+").concat(n).concat(o,"{0,61}").concat(n,"$")),c=new RegExp("^".concat(a,"$")),f=new RegExp("^(?:".concat(a,"\\s*,\\s*)*").concat(a,"$")),s=/^[^'"/\\><}{]*$/,y=new RegExp("^".concat(i,"{8}-").concat(i,"{4}-[1-5]").concat(i,"{3}-[89ab]").concat(i,"{3}-").concat(i,"{12}$"),"i")},4894:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(5893),o=r(6777),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parseInt";return"number"===typeof e?e:Number[t](String(e))};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(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 s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,y=r.isRequired,p=r.onFinishBatch,b=c(r,["isRequired","onFinishBatch"]),d=[];return u?d.push({onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;o0},u=r(7750);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(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 y=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,l=r.isRequired,y=r.onFinishBatch,p=f(r,["isRequired","onFinishBatch"]);return{defaults:c({},p,{onSuccess:t}),isRequired:l,onFinishBatch:y,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function m(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(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 h=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=r.isRequired,l=r.onFinishBatch,c=v(r,["isRequired","onFinishBatch"]);return{defaults:d({},c,{onSuccess:t}),isRequired:a,onFinishBatch:l,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function S(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(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 x=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=r.isRequired,l=r.onFinishBatch,c=w(r,["isRequired","onFinishBatch"]);return{defaults:j({},c,{onSuccess:t}),isRequired:a,onFinishBatch:l,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function C(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(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 E=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,l=r.isRequired,c=r.onFinishBatch,f=k(r,["isRequired","onFinishBatch"]);return{defaults:F({},f,{onSuccess:t}),isRequired:l,onFinishBatch:c,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;o"}),"), curly brackets (",(0,n.jsx)(u.Q0,{inheritColour:!0,text:"{}"}),")."]})].concat(C(r)))},test:function(e){var t=e.value;return o.OU.test(t)}}]}};function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function T(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(e,t)}(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 Z=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=r.isRequired,l=r.onFinishBatch,c=M(r,["isRequired","onFinishBatch"]);return{defaults:q({},c,{onSuccess:t}),isRequired:a,onFinishBatch:l,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.excludeTestIds,r=void 0===t?[]:t,n=e.excludeTestIdsRe,o=e.inputs,i=void 0===o?{}:o,u=e.isContinueOnFailure,a=e.isIgnoreOnCallbacks,l=e.isTestAll,c=void 0===l?0===Object.keys(i).length:l,f=e.tests,s=void 0===f?{}:f,y=Q(r),p={},b=!0;return c&&Object.keys(s).forEach((function(e){p[e]={}})),p=U({},p,i),n&&Object.keys(p).forEach((function(e){n.test(e)&&y.push(e)})),y.forEach((function(e){delete p[e]})),Object.keys(p).every((function(e){var t=s[e],r=t.defaults,n=void 0===r?{}:r,o=n.compare,i=void 0===o?[]:o,l=n.displayMax,c=n.displayMin,f=n.getCompare,y=n.getValue,d=n.isIgnoreOnCallbacks,v=void 0===d?a:d,m=n.max,h=void 0===m?0:m,g=n.min,O=void 0===g?0:g,j=n.onSuccess,w=n.value,S=void 0===w?null:w,x=t.isRequired,P=void 0!==x&&x,A=t.onFinishBatch,I=t.optionalTests,F=t.tests,k=!P,C=p[e],E=C.getCompare,B=void 0===E?f:E,R=C.getValue,q=void 0===R?y:R,M=C.isIgnoreOnCallbacks,T=void 0===M?v:M,Z=C.max,$=void 0===Z?h:Z,D=C.min,U=void 0===D?O:D,Q=C.compare,N=void 0===Q?_(null===B||void 0===B?void 0:B.call(null),i):Q,H=C.value,z=void 0===H?_(null===q||void 0===q?void 0:q.call(null),S):H,V=C.displayMax,Y=void 0===V?W(l,String($)):V,G=C.displayMin,J=void 0===G?W(c,String(U)):G,X=L({isIgnoreOnCallbacks:T,onFinishBatch:A}),K=X.cbFinishBatch,ee=X.setTestCallbacks;if(!z&&k)return null===K||void 0===K||K.call(null,!0,e),!0;var te=function(e){var t=e.onFailure,r=e.onSuccess,n=void 0===r?j:r,o={},i=(0,e.test)({append:o,compare:N,max:$,min:U,value:z}),u=ee({onFailure:t,onSuccess:n}),a=u.cbFailure,l=u.cbSuccess;return i?null===l||void 0===l||l.call(null,{append:o}):(b=i,null===a||void 0===a||a.call(null,{append:o,compare:N,displayMax:Y,displayMin:J,max:$,min:U,value:z})),i};null===I||void 0===I||I.forEach(te);var re=F.every(te);return null===K||void 0===K||K.call(null,re,e),re||u})),b};function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function X(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(e,t)}(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 K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeTestIds,n=void 0===r?[]:r,o=J(t,["excludeTestIds"]);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.excludeTestIds,i=void 0===r?[]:r,u=J(t,["excludeTestIds"]);return z(G({tests:e,excludeTestIds:X(n).concat(X(i))},o,u))}},ee=function(e){return e.max>=e.min},te=r(6777)},6777:function(e,t){t.Z=function(e){var t=e.max,r=e.min,n=e.value;return!!n&&(n>=r&&n<=t)}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/899-ec535b0f0a173e21.js b/striker-ui/out/_next/static/chunks/899-ec535b0f0a173e21.js new file mode 100644 index 00000000..066ec6fb --- /dev/null +++ b/striker-ui/out/_next/static/chunks/899-ec535b0f0a173e21.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[899],{1363:function(e,t,r){var n=r(5893),o=r(8187);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.sx,r=e.text,i=a(e,["sx","text"]);return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsx)(o.Z,u({},i,{sx:u({marginTop:".4em"},t),text:r}))})}},6284:function(e,t,r){var n=r(5893),o=r(5685),i=r(3640),u=r(1057),a=r(6239),l=r(4799),c=r(7294),f=r(7169),s=r(1363),y=r(9),p=r(192);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function h(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(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 g={baseInputProps:void 0,fillRow:!1,formControlProps:{},helpMessageBoxProps:{},id:"",inputProps:{},inputLabelProps:{},messageBoxProps:{},onHelp:void 0,onHelpAppend:void 0,required:!1,type:void 0,value:""},O=function(e){var t,r=e.baseInputProps,b=e.fillRow,O=void 0===b?g.fillRow:b,j=e.formControlProps,w=void 0===j?g.formControlProps:j,S=e.helpMessageBoxProps,x=void 0===S?g.helpMessageBoxProps:S,P=e.id,A=void 0===P?g.id:P,I=e.inputProps,F=(void 0===I?g.inputProps:I).endAdornment,k=e.inputLabelProps,C=void 0===k?g.inputLabelProps:k,E=e.label,B=e.messageBoxProps,R=void 0===B?g.messageBoxProps:B,q=e.name,M=e.onBlur,T=e.onChange,Z=e.onFocus,$=e.onHelp,D=e.onHelpAppend,U=e.required,Q=void 0===U?g.required:U,N=e.type,H=e.value,L=void 0===H?g.value:H,_=m(e.inputProps,["endAdornment"]),W=w.sx,z=m(w,["sx"]),V=x.text,Y=void 0===V?"":V,G=(0,c.useState)(!1),J=G[0],X=G[1],K=(0,c.useMemo)((function(){return O?"100%":void 0}),[O]),ee=(0,c.useMemo)((function(){return J&&(0,n.jsx)(s.Z,v({onClose:function(){X(!1)}},x))}),[x,J]),te=(0,c.useMemo)((function(){return void 0!==$||Y.length>0}),[Y,$]),re=(0,c.useCallback)((function(){var e;return $?e=$:Y.length>0&&(e=function(){for(var e=arguments.length,t=new Array(e),r=0;r .".concat(a.Z.root),{color:f.s7,padding:".2em"}),d(t,"& > :not(:first-child, .".concat(a.Z.root,")"),{marginLeft:".3em"}),t),children:[F,te&&(0,n.jsx)(l.Z,{onClick:ne,tabIndex:-1,children:(0,n.jsx)(o.Z,{})})]}),fullWidth:w.fullWidth,id:A,inputProps:r,label:E,name:q,onBlur:M,onChange:T,onFocus:Z,type:N,value:L},_)),ee,(0,n.jsx)(s.Z,v({},R))]}))};O.defaultProps=g,t.Z=O},1250:function(e,t,r){r.d(t,{FZ:function(){return l},tf:function(){return c},ah:function(){return f},OU:function(){return s},Qt:function(){return y}});var n="[a-z0-9]",o="[a-z0-9-]",i="[0-9a-f]",u="(?:25[0-5]|(?:2[0-4]|1[0-9]|[1-9]|)[0-9])",a="(?:".concat(u,"[.]){3}").concat(u),l=new RegExp("^(?:".concat(n,"(?:").concat(o,"{0,61}").concat(n,")?[.])+").concat(n).concat(o,"{0,61}").concat(n,"$")),c=new RegExp("^".concat(a,"$")),f=new RegExp("^(?:".concat(a,"\\s*,\\s*)*").concat(a,"$")),s=/^[^'"/\\><}{]*$/,y=new RegExp("^".concat(i,"{8}-(?:").concat(i,"{4}-){3}").concat(i,"{12}$"),"i")},4894:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(5893),o=r(6777),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parseInt";return"number"===typeof e?e:Number[t](String(e))};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(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 s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,y=r.isRequired,p=r.onFinishBatch,b=c(r,["isRequired","onFinishBatch"]),d=[];return u?d.push({onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;o0},u=r(7750);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(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 y=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,l=r.isRequired,y=r.onFinishBatch,p=f(r,["isRequired","onFinishBatch"]);return{defaults:c({},p,{onSuccess:t}),isRequired:l,onFinishBatch:y,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function m(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(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 h=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=r.isRequired,l=r.onFinishBatch,c=v(r,["isRequired","onFinishBatch"]);return{defaults:d({},c,{onSuccess:t}),isRequired:a,onFinishBatch:l,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function S(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(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 x=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=r.isRequired,l=r.onFinishBatch,c=w(r,["isRequired","onFinishBatch"]);return{defaults:j({},c,{onSuccess:t}),isRequired:a,onFinishBatch:l,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function C(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(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 E=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,l=r.isRequired,c=r.onFinishBatch,f=k(r,["isRequired","onFinishBatch"]);return{defaults:F({},f,{onSuccess:t}),isRequired:l,onFinishBatch:c,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;o"}),"), curly brackets (",(0,n.jsx)(u.Q0,{inheritColour:!0,text:"{}"}),")."]})].concat(C(r)))},test:function(e){var t=e.value;return o.OU.test(t)}}]}};function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function T(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(e,t)}(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 Z=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,a=r.isRequired,l=r.onFinishBatch,c=M(r,["isRequired","onFinishBatch"]);return{defaults:q({},c,{onSuccess:t}),isRequired:a,onFinishBatch:l,tests:[{test:i},{onFailure:function(){for(var t=arguments.length,r=new Array(t),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.excludeTestIds,r=void 0===t?[]:t,n=e.excludeTestIdsRe,o=e.inputs,i=void 0===o?{}:o,u=e.isContinueOnFailure,a=e.isIgnoreOnCallbacks,l=e.isTestAll,c=void 0===l?0===Object.keys(i).length:l,f=e.tests,s=void 0===f?{}:f,y=Q(r),p={},b=!0;return c&&Object.keys(s).forEach((function(e){p[e]={}})),p=U({},p,i),n&&Object.keys(p).forEach((function(e){n.test(e)&&y.push(e)})),y.forEach((function(e){delete p[e]})),Object.keys(p).every((function(e){var t=s[e],r=t.defaults,n=void 0===r?{}:r,o=n.compare,i=void 0===o?[]:o,l=n.displayMax,c=n.displayMin,f=n.getCompare,y=n.getValue,d=n.isIgnoreOnCallbacks,v=void 0===d?a:d,m=n.max,h=void 0===m?0:m,g=n.min,O=void 0===g?0:g,j=n.onSuccess,w=n.value,S=void 0===w?null:w,x=t.isRequired,P=void 0!==x&&x,A=t.onFinishBatch,I=t.optionalTests,F=t.tests,k=!P,C=p[e],E=C.getCompare,B=void 0===E?f:E,R=C.getValue,q=void 0===R?y:R,M=C.isIgnoreOnCallbacks,T=void 0===M?v:M,Z=C.max,$=void 0===Z?h:Z,D=C.min,U=void 0===D?O:D,Q=C.compare,N=void 0===Q?_(null===B||void 0===B?void 0:B.call(null),i):Q,H=C.value,z=void 0===H?_(null===q||void 0===q?void 0:q.call(null),S):H,V=C.displayMax,Y=void 0===V?W(l,String($)):V,G=C.displayMin,J=void 0===G?W(c,String(U)):G,X=L({isIgnoreOnCallbacks:T,onFinishBatch:A}),K=X.cbFinishBatch,ee=X.setTestCallbacks;if(!z&&k)return null===K||void 0===K||K.call(null,!0,e),!0;var te=function(e){var t=e.onFailure,r=e.onSuccess,n=void 0===r?j:r,o={},i=(0,e.test)({append:o,compare:N,max:$,min:U,value:z}),u=ee({onFailure:t,onSuccess:n}),a=u.cbFailure,l=u.cbSuccess;return i?null===l||void 0===l||l.call(null,{append:o}):(b=i,null===a||void 0===a||a.call(null,{append:o,compare:N,displayMax:Y,displayMin:J,max:$,min:U,value:z})),i};null===I||void 0===I||I.forEach(te);var re=F.every(te);return null===K||void 0===K||K.call(null,re,e),re||u})),b};function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function X(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(e,t)}(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 K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeTestIds,n=void 0===r?[]:r,o=J(t,["excludeTestIds"]);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.excludeTestIds,i=void 0===r?[]:r,u=J(t,["excludeTestIds"]);return z(G({tests:e,excludeTestIds:X(n).concat(X(i))},o,u))}},ee=function(e){return e.max>=e.min},te=r(6777)},6777:function(e,t){t.Z=function(e){var t=e.max,r=e.min,n=e.value;return!!n&&(n>=r&&n<=t)}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/94-db0af749b6e45543.js b/striker-ui/out/_next/static/chunks/94-e103c3735f0e061b.js similarity index 86% rename from striker-ui/out/_next/static/chunks/94-db0af749b6e45543.js rename to striker-ui/out/_next/static/chunks/94-e103c3735f0e061b.js index 5b8bb7f5..f0ebe423 100644 --- a/striker-ui/out/_next/static/chunks/94-db0af749b6e45543.js +++ b/striker-ui/out/_next/static/chunks/94-e103c3735f0e061b.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[94],{5094:function(e,n,t){t.d(n,{S:function(){return Z},M:function(){return O}});var r=t(5893),s=t(791),c=t(5537),i=t(1496),o=t(7357),l=t(8333),a=t(5861),u=t(5152),f=t(7294),d=t(1706),x="0xffe3",h="0xffe9",v=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[x,h,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[x,h,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[x,h,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[x,h,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[x,h,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[x,h,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[x,h,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[x,h,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[x,h,"0xffc6"]}],m=t(4427),p=t(3679),j=t(2152),C=t(7750),y=t(1081);function w(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0;t-=1)R.current.sendKey(e[t],0)}else R.current.sendCtrlAltDel();g(null)}}(t)},children:(0,r.jsx)(a.Z,{variant:"subtitle1",children:n})},n)}))})]})}),[b]),W=(0,f.useMemo)((function(){return(0,r.jsx)(d.Z,{onClick:function(){for(var e=arguments.length,t=new Array(e),r=0;r :first-child":{flexGrow:1}},children:[(0,r.jsx)(o.Z,{children:k?(0,r.jsx)(j.Z,{mt:"1em",mb:"1em"}):(0,r.jsx)(U.Z,{component:"span",onClick:m,sx:{borderRadius:N.n_,color:N.s7,padding:0},children:O})}),x&&(0,r.jsx)(_.Z,{children:(0,r.jsx)(d.Z,{onClick:w,children:(0,r.jsx)(B.Z,{})})})]})]})};G.defaultProps=D;var O=G}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[94],{5094:function(e,n,t){t.d(n,{S:function(){return Z},M:function(){return O}});var r=t(5893),s=t(791),c=t(5537),i=t(1496),o=t(7357),l=t(8333),a=t(5861),u=t(5152),f=t(7294),d=t(1706),x="0xffe3",h="0xffe9",v=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[x,h,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[x,h,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[x,h,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[x,h,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[x,h,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[x,h,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[x,h,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[x,h,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[x,h,"0xffc6"]}],m=t(4427),p=t(3679),j=t(2152),C=t(7750),y=t(1081);function w(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0;t-=1)R.current.sendKey(e[t],0)}else R.current.sendCtrlAltDel();g(null)}}(t)},children:(0,r.jsx)(a.Z,{variant:"subtitle1",children:n})},n)}))})]})}),[b]),W=(0,f.useMemo)((function(){return(0,r.jsx)(d.Z,{onClick:function(){for(var e=arguments.length,t=new Array(e),r=0;r :first-child":{flexGrow:1}},children:[(0,r.jsx)(o.Z,{children:k?(0,r.jsx)(j.Z,{mt:"1em",mb:"1em"}):(0,r.jsx)(U.Z,{component:"span",onClick:m,sx:{borderRadius:N.n_,color:N.s7,padding:0},children:O})}),x&&(0,r.jsx)(_.Z,{children:(0,r.jsx)(d.Z,{onClick:w,children:(0,r.jsx)(B.Z,{})})})]})]})};G.defaultProps=D;var O=G}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/anvil-c0917177269e4c45.js b/striker-ui/out/_next/static/chunks/pages/anvil-c0917177269e4c45.js new file mode 100644 index 00000000..597fec7b --- /dev/null +++ b/striker-ui/out/_next/static/chunks/pages/anvil-c0917177269e4c45.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{2852:function(e,t,n){"use strict";var r=n(3366),o=n(7462),i=n(7294),a=n(6010),c=n(7192),s=n(1796),l=n(8216),d=n(1964),u=n(3616),h=n(1496),f=n(9632),x=n(5893);const m=["className","color","edge","size","sx"],v=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,l.Z)(n.edge)}`],t[`size${(0,l.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${f.Z.thumb}`]:{width:16,height:16},[`& .${f.Z.switchBase}`]:{padding:4,[`&.${f.Z.checked}`]:{transform:"translateX(16px)"}}}))),p=(0,h.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${f.Z.input}`]:t.input},"default"!==n.color&&t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${f.Z.checked}`]:{transform:"translateX(20px)"},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]},[`&.${f.Z.checked} + .${f.Z.track}`]:{opacity:.5},[`&.${f.Z.disabled} + .${f.Z.track}`]:{opacity:"light"===e.palette.mode?.12:.2},[`& .${f.Z.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${f.Z.checked}`]:{color:e.palette[t.color].main,"&:hover":{backgroundColor:(0,s.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?(0,s.$n)(e.palette[t.color].main,.62):(0,s._j)(e.palette[t.color].main,.55)}},[`&.${f.Z.checked} + .${f.Z.track}`]:{backgroundColor:e.palette[t.color].main}}))),g=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.mode?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.mode?.38:.3}))),j=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:d=!1,size:h="medium",sx:b}=n,Z=(0,r.Z)(n,m),w=(0,o.Z)({},n,{color:s,edge:d,size:h}),y=(e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:s}=e,d={root:["root",n&&`edge${(0,l.Z)(n)}`,`size${(0,l.Z)(r)}`],switchBase:["switchBase",`color${(0,l.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(d,f.H,t);return(0,o.Z)({},t,u)})(w),k=(0,x.jsx)(j,{className:y.thumb,ownerState:w});return(0,x.jsxs)(v,{className:(0,a.Z)(y.root,i),sx:b,ownerState:w,children:[(0,x.jsx)(p,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:w},Z,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,x.jsx)(g,{className:y.track,ownerState:w})]})}));t.Z=b},6069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(7733)}])},1939:function(e,t,n){"use strict";var r=n(5893),o=n(7357),i=n(7169);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l="Decorator",d={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};t.Z=function(e){var t,n=e.colour,l=e.sx,u=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},u,{className:d[n],sx:c((t={borderRadius:i.n_,height:"100%",width:"1.4em"},a(t,"&.".concat(d.ok),{backgroundColor:i.Ej}),a(t,"&.".concat(d.warning),{backgroundColor:i.Wd}),a(t,"&.".concat(d.error),{backgroundColor:i.hM}),a(t,"&.".concat(d.off),{backgroundColor:i.s7}),t),l)}))}},6632:function(e,t,n){"use strict";var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionProceedText,n=void 0===t?"":t,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,d=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:n,content:c,titleText:l},d))}},7733:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tt}});var r=n(5893),o=n(1496),i=n(7357),a=n(9008),c=n(1163),s=n(7294),l=n(2029),d=n(7169),u={uuid:"",setAnvilUuid:function(){return null}},h=(0,s.createContext)(u),f=function(e){var t=e.children,n=(0,s.useState)(""),o=n[0],i=n[1];return(0,r.jsx)(h.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:t})},x=n(3679),m=n(1905),v=n(2852),p=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),g=n(1939),j=function(e,t){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},b=n(7750);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},y=(0,o.ZP)(i.Z)((function(){return Z({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},_=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},S=function(e){var t=e.list,n=(0,s.useContext)(h).uuid,o=t.findIndex((function(e){return e.anvil_uuid===n}));return(0,r.jsx)(y,Z({},"children",""!==n&&(0,r.jsxs)(r.Fragment,Z({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.jsx)(g.Z,{colour:k(t[o].anvil_state)})}),(0,r.jsxs)(i.Z,{p:1,flexGrow:1,className:w.anvilName,children:[(0,r.jsx)(b.z,{text:t[o].anvil_name}),(0,r.jsx)(b.z,{text:p.get(t[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(i.Z,Z({p:1},"children",(0,r.jsx)(v.Z,Z({checked:_(t[o])},"onChange",(function(){var e=t[o],n=e.anvil_uuid;j("".concat(l.Z,"/command/").concat(_(e)?"stop-an":"start-an","/").concat(n),{})})))))]))))},O=n(8462),P=n(7720),A=n(7212),N=function(e){var t=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Ac,{text:t.anvil_name}),(0,r.jsx)(b.Ac,{text:p.get(t.anvil_state)||"State unavailable"})]})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[t].link.link_speed,e.bond_state=e.hosts[t].link.link_state})),n},ae=n(2749);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd.li?(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsx)(i.Z,{className:Ye.server,children:(0,r.jsx)(Re,{anvil:g.anvils})}),(0,r.jsx)(i.Z,{className:Ye.child,children:(0,r.jsx)(Xe,{})}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]}):(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(Re,{anvil:g.anvils}),(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(Xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]})),e}),[g,t]),Z=(0,s.useMemo)((function(){return j?(0,r.jsx)(x.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 10em)",maxWidth:{xs:void 0,sm:"60%",md:"50%",lg:"40%"},minWidth:"fit-content"},children:(0,r.jsx)(F.Z,{sx:{margin:"2em 2.4em"}})}):b}),[b,j]);return(0,s.useEffect)((function(){""===u&&v((null===n||void 0===n?void 0:n.toString())||"")}),[u,n,v]),(0,r.jsxs)(et,{children:[(0,r.jsx)(a.default,{children:(0,r.jsx)("title",{children:"Anvil"})}),(0,r.jsxs)(f,{children:[(0,r.jsx)(H.Z,{}),Z]})]})}}},function(e){e.O(0,[382,483,894,182,614,485,62,780,899,140,825,774,888,179],(function(){return t=6069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js b/striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js deleted file mode 100644 index d0fbcdeb..00000000 --- a/striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{2852:function(e,t,n){"use strict";var r=n(3366),o=n(7462),i=n(7294),a=n(6010),c=n(7192),s=n(1796),l=n(8216),d=n(1964),u=n(3616),h=n(1496),f=n(9632),x=n(5893);const m=["className","color","edge","size","sx"],v=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,l.Z)(n.edge)}`],t[`size${(0,l.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${f.Z.thumb}`]:{width:16,height:16},[`& .${f.Z.switchBase}`]:{padding:4,[`&.${f.Z.checked}`]:{transform:"translateX(16px)"}}}))),p=(0,h.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${f.Z.input}`]:t.input},"default"!==n.color&&t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${f.Z.checked}`]:{transform:"translateX(20px)"},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]},[`&.${f.Z.checked} + .${f.Z.track}`]:{opacity:.5},[`&.${f.Z.disabled} + .${f.Z.track}`]:{opacity:"light"===e.palette.mode?.12:.2},[`& .${f.Z.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${f.Z.checked}`]:{color:e.palette[t.color].main,"&:hover":{backgroundColor:(0,s.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?(0,s.$n)(e.palette[t.color].main,.62):(0,s._j)(e.palette[t.color].main,.55)}},[`&.${f.Z.checked} + .${f.Z.track}`]:{backgroundColor:e.palette[t.color].main}}))),g=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.mode?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.mode?.38:.3}))),j=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:d=!1,size:h="medium",sx:b}=n,Z=(0,r.Z)(n,m),w=(0,o.Z)({},n,{color:s,edge:d,size:h}),y=(e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:s}=e,d={root:["root",n&&`edge${(0,l.Z)(n)}`,`size${(0,l.Z)(r)}`],switchBase:["switchBase",`color${(0,l.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(d,f.H,t);return(0,o.Z)({},t,u)})(w),k=(0,x.jsx)(j,{className:y.thumb,ownerState:w});return(0,x.jsxs)(v,{className:(0,a.Z)(y.root,i),sx:b,ownerState:w,children:[(0,x.jsx)(p,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:w},Z,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,x.jsx)(g,{className:y.track,ownerState:w})]})}));t.Z=b},6069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(6478)}])},1939:function(e,t,n){"use strict";var r=n(5893),o=n(7357),i=n(7169);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l="Decorator",d={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};t.Z=function(e){var t,n=e.colour,l=e.sx,u=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},u,{className:d[n],sx:c((t={borderRadius:i.n_,height:"100%",width:"1.4em"},a(t,"&.".concat(d.ok),{backgroundColor:i.Ej}),a(t,"&.".concat(d.warning),{backgroundColor:i.Wd}),a(t,"&.".concat(d.error),{backgroundColor:i.hM}),a(t,"&.".concat(d.off),{backgroundColor:i.s7}),t),l)}))}},6632:function(e,t,n){"use strict";var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionProceedText,n=void 0===t?"":t,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,d=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:n,content:c,titleText:l},d))}},6478:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tt}});var r=n(5893),o=n(1496),i=n(7357),a=n(9008),c=n(1163),s=n(7294),l=n(2029),d=n(7169),u={uuid:"",setAnvilUuid:function(){return null}},h=(0,s.createContext)(u),f=function(e){var t=e.children,n=(0,s.useState)(""),o=n[0],i=n[1];return(0,r.jsx)(h.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:t})},x=n(3679),m=n(1905),v=n(2852),p=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),g=n(1939),j=function(e,t){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},b=n(7750);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},y=(0,o.ZP)(i.Z)((function(){return Z({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},_=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},S=function(e){var t=e.list,n=(0,s.useContext)(h).uuid,o=t.findIndex((function(e){return e.anvil_uuid===n}));return(0,r.jsx)(y,Z({},"children",""!==n&&(0,r.jsxs)(r.Fragment,Z({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.jsx)(g.Z,{colour:k(t[o].anvil_state)})}),(0,r.jsxs)(i.Z,{p:1,flexGrow:1,className:w.anvilName,children:[(0,r.jsx)(b.z,{text:t[o].anvil_name}),(0,r.jsx)(b.z,{text:p.get(t[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(i.Z,Z({p:1},"children",(0,r.jsx)(v.Z,Z({checked:_(t[o])},"onChange",(function(){var e=t[o],n=e.anvil_uuid;j("".concat(l.Z,"/command/").concat(_(e)?"stop-an":"start-an","/").concat(n),{})})))))]))))},O=n(8462),P=n(7720),A=n(7212),N=function(e){var t=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Ac,{text:t.anvil_name}),(0,r.jsx)(b.Ac,{text:p.get(t.anvil_state)||"State unavailable"})]})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[t].link.link_speed,e.bond_state=e.hosts[t].link.link_state})),n},ae=n(2749);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd.li?(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsx)(i.Z,{className:Ye.server,children:(0,r.jsx)(Re,{anvil:g.anvils})}),(0,r.jsx)(i.Z,{className:Ye.child,children:(0,r.jsx)(Xe,{})}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]}):(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(Re,{anvil:g.anvils}),(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(Xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]})),e}),[g,t]),Z=(0,s.useMemo)((function(){return j?(0,r.jsx)(x.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 10em)",maxWidth:{xs:void 0,sm:"60%",md:"50%",lg:"40%"},minWidth:"fit-content"},children:(0,r.jsx)(F.Z,{sx:{margin:"2em 2.4em"}})}):b}),[b,j]);return(0,s.useEffect)((function(){""===u&&v((null===n||void 0===n?void 0:n.toString())||"")}),[u,n,v]),(0,r.jsxs)(et,{children:[(0,r.jsx)(a.default,{children:(0,r.jsx)("title",{children:"Anvil"})}),(0,r.jsxs)(f,{children:[(0,r.jsx)(H.Z,{}),Z]})]})}}},function(e){e.O(0,[382,483,894,182,614,485,62,780,899,140,825,774,888,179],(function(){return t=6069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js b/striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js deleted file mode 100644 index f1f59323..00000000 --- a/striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{5685:function(e,n,t){"use strict";var r=t(7892),o=t(5893);n.Z=(0,r.Z)((0,o.jsx)("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"}),"QuestionMark")},8262:function(e,n,t){"use strict";t.d(n,{Z:function(){return A}});var r=t(3366),o=t(7462),i=t(7294),l=t(6010),c=t(7192),a=t(7579),s=t(8216),u=t(9964),d=t(6628),f=t(5113),p=t(3616),h=t(1496),m=t(8979);function y(e){return(0,m.Z)("MuiDialog",e)}var b=(0,t(6087).Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var v=(0,i.createContext)({}),g=t(7227),x=t(2734),j=t(5893);const w=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],P=(0,h.ZP)(g.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,n)=>n.backdrop})({zIndex:-1}),Z=(0,h.ZP)(u.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,n)=>n.root})({"@media print":{position:"absolute !important"}}),O=(0,h.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.container,n[`scroll${(0,s.Z)(t.scroll)}`]]}})((({ownerState:e})=>(0,o.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),S=(0,h.ZP)(f.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.paper,n[`scrollPaper${(0,s.Z)(t.scroll)}`],n[`paperWidth${(0,s.Z)(String(t.maxWidth))}`],t.fullWidth&&n.paperFullWidth,t.fullScreen&&n.paperFullScreen]}})((({theme:e,ownerState:n})=>(0,o.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},"xs"!==n.maxWidth&&{maxWidth:`${e.breakpoints.values[n.maxWidth]}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${b.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})));var A=i.forwardRef((function(e,n){const t=(0,p.Z)({props:e,name:"MuiDialog"}),u=(0,x.Z)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":m,"aria-labelledby":b,BackdropComponent:g,BackdropProps:A,children:k,className:C,disableEscapeKeyDown:I=!1,fullScreen:T=!1,fullWidth:E=!1,maxWidth:M="sm",onBackdropClick:D,onClose:F,open:B,PaperComponent:W=f.Z,PaperProps:R={},scroll:U="paper",TransitionComponent:N=d.Z,transitionDuration:L=h,TransitionProps:$}=t,_=(0,r.Z)(t,w),H=(0,o.Z)({},t,{disableEscapeKeyDown:I,fullScreen:T,fullWidth:E,maxWidth:M,scroll:U}),V=(e=>{const{classes:n,scroll:t,maxWidth:r,fullWidth:o,fullScreen:i}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(t)}`],paper:["paper",`paperScroll${(0,s.Z)(t)}`,`paperWidth${(0,s.Z)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,c.Z)(l,y,n)})(H),z=i.useRef(),G=(0,a.Z)(b),K=i.useMemo((()=>({titleId:G})),[G]);return(0,j.jsx)(Z,(0,o.Z)({className:(0,l.Z)(V.root,C),BackdropProps:(0,o.Z)({transitionDuration:L,as:g},A),closeAfterTransition:!0,BackdropComponent:P,disableEscapeKeyDown:I,onClose:F,open:B,ref:n,onClick:e=>{z.current&&(z.current=null,D&&D(e),F&&F(e,"backdropClick"))},ownerState:H},_,{children:(0,j.jsx)(N,(0,o.Z)({appear:!0,in:B,timeout:L,role:"presentation"},$,{children:(0,j.jsx)(O,{className:(0,l.Z)(V.container),onMouseDown:e=>{z.current=e.target===e.currentTarget},ownerState:H,children:(0,j.jsx)(S,(0,o.Z)({as:W,elevation:24,role:"dialog","aria-describedby":m,"aria-labelledby":G},R,{className:(0,l.Z)(V.paper,R.className),ownerState:H,children:(0,j.jsx)(v.Provider,{value:K,children:k})}))})}))}))}))},7579:function(e,n,t){"use strict";var r;t.d(n,{Z:function(){return c}});var o=t(7294);let i=0;const l=(r||(r=t.t(o,2))).useId;function c(e){if(void 0!==l){const n=l();return null!=e?e:n}return function(e){const[n,t]=o.useState(e),r=e||n;return o.useEffect((()=>{null==n&&(i+=1,t(`mui-${i}`))}),[n]),r}(e)}},329:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(6028)}])},157:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(8262),l=t(7294),c=t(7169),a=t(4825),s=t(4690),u=t(3679),d=t(2152),f=t(7750);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function b(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,n)}(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 v={blue:c.Ej,red:c.hM},g=(0,l.forwardRef)((function(e,n){var t=e.actionCancelText,p=void 0===t?"Cancel":t,h=e.actionProceedText,g=e.contentContainerProps,x=void 0===g?{}:g,j=e.closeOnProceed,w=void 0!==j&&j,P=e.content,Z=e.dialogProps,O=void 0===Z?{}:Z,S=O.open,A=void 0!==S&&S,k=O.PaperProps,C=void 0===k?{}:k,I=e.disableProceed,T=e.formContent,E=e.loading,M=void 0!==E&&E,D=e.loadingAction,F=void 0!==D&&D,B=e.onActionAppend,W=e.onCancelAppend,R=e.onProceedAppend,U=e.onSubmitAppend,N=e.openInitially,L=void 0!==N&&N,$=e.preActionArea,_=e.proceedButtonProps,H=void 0===_?{}:_,V=e.proceedColour,z=void 0===V?"blue":V,G=e.scrollContent,K=void 0!==G&&G,q=e.scrollBoxProps,X=(void 0===q?{}:q).sx,Y=e.titleText,J=y(e.dialogProps,["open","PaperProps"]),Q=y(e.scrollBoxProps,["sx"]),ee=C.sx,ne=y(C,["sx"]),te=H.disabled,re=void 0===te?I:te,oe=H.sx,ie=y(H,["disabled","sx"]),le=(0,l.useState)(L),ce=le[0],ae=le[1],se=(0,l.useMemo)((function(){return n?ce:A}),[A,ce,n]),ue=(0,l.useMemo)((function(){return v[z]}),[z]),de=(0,l.useMemo)((function(){var e,n,t,r=function(){for(var e=arguments.length,n=new Array(e),t=0;t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,a=u(e,["children","sx"]);return(0,r.jsx)(i.Z,s({underline:"hover",variant:"subtitle1"},a,{sx:s({color:l.lD,textDecorationColor:l.s7},t),children:(0,r.jsxs)(c.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},3906:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(6607),l=t(8610);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n0}),[f.length]),m=(0,o.useMemo)((function(){return d.length>1}),[d.length]),y=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,c=e.getConfirmDialogTitle,u=e.onProceedAppend,d=e.renderEntry;return a({actionProceedText:"Delete",content:(0,r.jsx)(l.Z,a({entries:s,maxDepth:0,renderEntry:d},i)),onProceedAppend:u,proceedColour:"red",titleText:c(f.length)},t)}),[s,f.length]),b=(0,o.useCallback)((function(e){return s[e]}),[s]),v=(0,o.useCallback)((function(e){return u(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return u((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:y,checklist:s,checks:f,getCheck:b,hasAllChecks:p,hasChecks:h,multipleItems:m,setAllChecks:v,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,c=void 0===o?"":o,a=e.titleText,s=void 0===a?"":a,u=l(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:c,titleText:s},u))}},3106:function(e,n){"use strict";n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},6028:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Je}});var r=t(5893),o=t(6886),i=t(9008),l=t(7294),c=t(2029),a=t(157),s=t(5521),u=t(1905),d=t(3106),f=t(4188),p=t(4390);function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:e,o=function(t){var r;null===(r=n.current.setMessage)||void 0===r||r.call(null,e,t)};return t&&(t[r]=o),o},b=function(e,n){var t,r,o={};return t=e,o=(null!=(r=Array)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e.reduce((function(e,t){return y(t,n,e),e}),o):Object.entries(e).reduce((function(e,t){var r=m(t,2),o=r[0],i=r[1];return y(i,n,e,o),e}),o)},v=t(4894),g=t(6607),x=t(480),j=t(2349),w=t(7750);function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(g({actionProceedText:"Delete",content:"The peer relationship between this striker and the selected ".concat(t," host(s) will terminate. The removed peer(s) can be re-added later."),onProceedAppend:function(){p.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete peer connection(s). ".concat(n.children),y(n)}))},proceedColour:"red",titleText:"Delete ".concat(t," peer(s) from this striker?")}),null===(e=f.current.setOpen)||void 0===e||e.call(null,!0))},onEdit:function(){A((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){I[e].isChecked=t,T((function(e){return oe({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(S.Z,{row:!0,spacing:0,children:(0,r.jsxs)(S.Z,{spacing:0,children:[(0,r.jsx)(w.$_,{children:e}),(0,r.jsx)(ne,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(V,{ref:s}),(0,r.jsx)(a.Z,oe({closeOnProceed:!0},v,{ref:f}))]})},ce=t(582),ae=t(5741),se=t(3906);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[y]),M=(0,u.Z)("".concat(c.Z,"/ssh-key/conflict"),{onError:function(e){h({children:"Failed to fetch SSH key conflicts. Error: ".concat(e),type:"error"})},onSuccess:function(e){b((function(n){return Object.values(e).reduce((function(e,t){return Object.values(t).forEach((function(t){var r=t.hostName,o=t.hostUUID,i=t.ipAddress,l=t.stateUUID;e[l]=fe({},n[l],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K.TZ,{header:"Manage changed SSH keys",loading:M,children:[(0,r.jsxs)(S.Z,{spacing:".2em",children:[(0,r.jsx)(w.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(G.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(ae.Z,{href:t,sx:{display:"inline-flex"},target:"_blank",children:'"Man In The Middle"'})," ","attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys."]}),(0,r.jsx)(z.Z,{header:(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{width:"100%","& > :not(:last-child)":{display:{xs:"none",sm:"flex"}},"& > :last-child":{display:{xs:"initial",sm:"none"},marginLeft:0}},children:[(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(w.Ac,{children:"Host name"}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(w.Ac,{children:"IP address"}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!A,edit:!0,getListCheckboxProps:function(){return{checked:O}},listEmpty:(0,r.jsx)(w.Ac,{align:"center",children:"No conflicting keys found."}),listItems:y,onAllCheckboxChange:function(e,n){C(n)},onDelete:function(){var e,n=P.reduce((function(e,n){if(!Z(n))return e;var t=y[n].hostUUID;return e[t]||(e[t]=[]),e[t].push(n),e}),{});x({actionProceedText:"Delete",content:"Resolve ".concat(P.length," SSH key conflicts. Please make sure the identity change(s) are expected to avoid MITM attacks."),onProceedAppend:function(){p.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),h(n)}))},proceedColour:"red",titleText:"Delete ".concat(P.length," conflicting SSH keys?")}),null===(e=s.current.setOpen)||void 0===e||e.call(null,!0)},onItemCheckboxChange:function(e,n,t){I(e,t)},renderListItem:function(e,n){var t=n.hostName,o=n.ipAddress;return(0,r.jsxs)(S.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(w.Ac,{children:t}),(0,r.jsx)(w.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return Z(e)}})]}),T]}),(0,r.jsx)(a.Z,fe({closeOnProceed:!0},g,{ref:s}))]})};function me(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ye(e){for(var n=1;n0),c(be,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(ge),ref:m,required:p})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(C.Z,{input:(0,r.jsx)(T.Z,{id:be,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(be)}},onFinishBatch:t(be),tests:[{test:E.HJ},{onFailure:function(){i(be,{children:"The passwords do not match."})},test:function(e){var n;return e.value===(null===(n=m.current.getValue)||void 0===n?void 0:n.call(null))}}]},onFirstRender:o(be),ref:y,required:v})}}:void 0}),[t,o,v,p,i,c,h]);return(0,r.jsx)(A.Z,{columns:{xs:1,sm:2,md:3},layout:ye({"common-user-input-cell-name":{children:(0,r.jsx)(C.Z,{input:(0,r.jsx)(T.Z,{id:ve,inputProps:{readOnly:u},label:xe,value:s}),inputTestBatch:(0,E.Gn)(xe,(function(){i(ve)}),{onFinishBatch:t(ve)},(function(e){i(ve,{children:e})})),onFirstRender:o(ve),required:!0}),md:1,sm:2}},x),spacing:"1em"})},Pe=t(2545),Ze=t(8610),Oe=t(6632),Se=t(8859);function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function qe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(a){c=!0,o=a}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||Ye(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(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.")}()}function Ye(e,n){if(e){if("string"===typeof e)return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ve(e,n):void 0}}var Je=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,M.Z)().protect,f=(0,l.useState)(!1),p=f[0],h=f[1],m=(0,l.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:p},onCancelAppend:function(){h(!1)},onProceedAppend:function(){h(!1)},titleText:""}),y=m[0],b=m[1],v=qe((0,D.Z)(void 0,d),2),g=v[0],x=v[1],j=qe((0,D.Z)("",d),2),w=j[0],P=j[1],Z=(0,u.Z)("".concat(c.Z,"/host/local"),{onError:function(){P("Unknown")},onSuccess:function(e){var n=e.installTarget,t=e.shortHostName;x(n),P(t)},refreshInterval:t}),O=Z.data,S=Z.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:S?"Loading...":"".concat(null===O||void 0===O?void 0:O.shortHostName," Config")})}),(0,r.jsx)(s.Z,{}),(0,r.jsxs)(o.ZP,{container:!0,columns:{xs:1,md:3,lg:4},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(He,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=Ke(e,["onProceedAppend"]);b((function(e){return Ge({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;rn.backdrop})({zIndex:-1}),Z=(0,h.ZP)(u.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,n)=>n.root})({"@media print":{position:"absolute !important"}}),O=(0,h.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.container,n[`scroll${(0,s.Z)(t.scroll)}`]]}})((({ownerState:e})=>(0,o.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),S=(0,h.ZP)(f.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.paper,n[`scrollPaper${(0,s.Z)(t.scroll)}`],n[`paperWidth${(0,s.Z)(String(t.maxWidth))}`],t.fullWidth&&n.paperFullWidth,t.fullScreen&&n.paperFullScreen]}})((({theme:e,ownerState:n})=>(0,o.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},"xs"!==n.maxWidth&&{maxWidth:`${e.breakpoints.values[n.maxWidth]}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${b.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})));var A=i.forwardRef((function(e,n){const t=(0,p.Z)({props:e,name:"MuiDialog"}),u=(0,x.Z)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":m,"aria-labelledby":b,BackdropComponent:g,BackdropProps:A,children:k,className:C,disableEscapeKeyDown:I=!1,fullScreen:T=!1,fullWidth:E=!1,maxWidth:M="sm",onBackdropClick:D,onClose:F,open:B,PaperComponent:W=f.Z,PaperProps:R={},scroll:U="paper",TransitionComponent:N=d.Z,transitionDuration:L=h,TransitionProps:$}=t,_=(0,r.Z)(t,w),H=(0,o.Z)({},t,{disableEscapeKeyDown:I,fullScreen:T,fullWidth:E,maxWidth:M,scroll:U}),V=(e=>{const{classes:n,scroll:t,maxWidth:r,fullWidth:o,fullScreen:i}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(t)}`],paper:["paper",`paperScroll${(0,s.Z)(t)}`,`paperWidth${(0,s.Z)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,c.Z)(l,y,n)})(H),z=i.useRef(),G=(0,a.Z)(b),K=i.useMemo((()=>({titleId:G})),[G]);return(0,j.jsx)(Z,(0,o.Z)({className:(0,l.Z)(V.root,C),BackdropProps:(0,o.Z)({transitionDuration:L,as:g},A),closeAfterTransition:!0,BackdropComponent:P,disableEscapeKeyDown:I,onClose:F,open:B,ref:n,onClick:e=>{z.current&&(z.current=null,D&&D(e),F&&F(e,"backdropClick"))},ownerState:H},_,{children:(0,j.jsx)(N,(0,o.Z)({appear:!0,in:B,timeout:L,role:"presentation"},$,{children:(0,j.jsx)(O,{className:(0,l.Z)(V.container),onMouseDown:e=>{z.current=e.target===e.currentTarget},ownerState:H,children:(0,j.jsx)(S,(0,o.Z)({as:W,elevation:24,role:"dialog","aria-describedby":m,"aria-labelledby":G},R,{className:(0,l.Z)(V.paper,R.className),ownerState:H,children:(0,j.jsx)(v.Provider,{value:K,children:k})}))})}))}))}))},7579:function(e,n,t){"use strict";var r;t.d(n,{Z:function(){return c}});var o=t(7294);let i=0;const l=(r||(r=t.t(o,2))).useId;function c(e){if(void 0!==l){const n=l();return null!=e?e:n}return function(e){const[n,t]=o.useState(e),r=e||n;return o.useEffect((()=>{null==n&&(i+=1,t(`mui-${i}`))}),[n]),r}(e)}},329:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(6028)}])},157:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(8262),l=t(7294),c=t(7169),a=t(4825),s=t(4690),u=t(3679),d=t(2152),f=t(7750);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function b(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,n)}(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 v={blue:c.Ej,red:c.hM},g=(0,l.forwardRef)((function(e,n){var t=e.actionCancelText,p=void 0===t?"Cancel":t,h=e.actionProceedText,g=e.contentContainerProps,x=void 0===g?{}:g,j=e.closeOnProceed,w=void 0!==j&&j,P=e.content,Z=e.dialogProps,O=void 0===Z?{}:Z,S=O.open,A=void 0!==S&&S,k=O.PaperProps,C=void 0===k?{}:k,I=e.disableProceed,T=e.formContent,E=e.loading,M=void 0!==E&&E,D=e.loadingAction,F=void 0!==D&&D,B=e.onActionAppend,W=e.onCancelAppend,R=e.onProceedAppend,U=e.onSubmitAppend,N=e.openInitially,L=void 0!==N&&N,$=e.preActionArea,_=e.proceedButtonProps,H=void 0===_?{}:_,V=e.proceedColour,z=void 0===V?"blue":V,G=e.scrollContent,K=void 0!==G&&G,q=e.scrollBoxProps,X=(void 0===q?{}:q).sx,Y=e.titleText,J=y(e.dialogProps,["open","PaperProps"]),Q=y(e.scrollBoxProps,["sx"]),ee=C.sx,ne=y(C,["sx"]),te=H.disabled,re=void 0===te?I:te,oe=H.sx,ie=y(H,["disabled","sx"]),le=(0,l.useState)(L),ce=le[0],ae=le[1],se=(0,l.useMemo)((function(){return n?ce:A}),[A,ce,n]),ue=(0,l.useMemo)((function(){return v[z]}),[z]),de=(0,l.useMemo)((function(){var e,n,t,r=function(){for(var e=arguments.length,n=new Array(e),t=0;t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,a=u(e,["children","sx"]);return(0,r.jsx)(i.Z,s({underline:"hover",variant:"subtitle1"},a,{sx:s({color:l.lD,textDecorationColor:l.s7},t),children:(0,r.jsxs)(c.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},3906:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(6607),l=t(8610);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n0}),[f.length]),m=(0,o.useMemo)((function(){return d.length>1}),[d.length]),y=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,c=e.getConfirmDialogTitle,u=e.onProceedAppend,d=e.renderEntry;return a({actionProceedText:"Delete",content:(0,r.jsx)(l.Z,a({entries:s,maxDepth:0,renderEntry:d},i)),onProceedAppend:u,proceedColour:"red",titleText:c(f.length)},t)}),[s,f.length]),b=(0,o.useCallback)((function(e){return s[e]}),[s]),v=(0,o.useCallback)((function(e){return u(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return u((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:y,checklist:s,checks:f,getCheck:b,hasAllChecks:p,hasChecks:h,multipleItems:m,setAllChecks:v,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,c=void 0===o?"":o,a=e.titleText,s=void 0===a?"":a,u=l(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:c,titleText:s},u))}},3106:function(e,n){"use strict";n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},6028:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Qe}});var r=t(5893),o=t(6886),i=t(9008),l=t(7294),c=t(2029),a=t(157),s=t(5521),u=t(1905),d=t(3106),f=t(4188),p=t(4390);function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:e,o=function(t){var r;null===(r=n.current.setMessage)||void 0===r||r.call(null,e,t)};return t&&(t[r]=o),o},b=function(e,n){var t,r,o={};return t=e,o=(null!=(r=Array)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e.reduce((function(e,t){return y(t,n,e),e}),o):Object.entries(e).reduce((function(e,t){var r=m(t,2),o=r[0],i=r[1];return y(i,n,e,o),e}),o)},v=t(4894),g=t(6607),x=t(480),j=t(2349),w=t(7750);function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(g({actionProceedText:"Delete",content:"The peer relationship between this striker and the selected ".concat(t," host(s) will terminate. The removed peer(s) can be re-added later."),onProceedAppend:function(){p.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete peer connection(s). ".concat(n.children),y(n)}))},proceedColour:"red",titleText:"Delete ".concat(t," peer(s) from this striker?")}),null===(e=f.current.setOpen)||void 0===e||e.call(null,!0))},onEdit:function(){A((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){I[e].isChecked=t,T((function(e){return ie({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(S.Z,{row:!0,spacing:0,children:(0,r.jsxs)(S.Z,{spacing:0,children:[(0,r.jsx)(w.$_,{children:e}),(0,r.jsx)(te,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(z,{ref:s}),(0,r.jsx)(a.Z,ie({closeOnProceed:!0},v,{ref:f}))]})},ae=t(582),se=t(5741),ue=t(3906);function de(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[y]),M=(0,u.Z)("".concat(c.Z,"/ssh-key/conflict"),{onError:function(e){h({children:"Failed to fetch SSH key conflicts. Error: ".concat(e),type:"error"})},onSuccess:function(e){b((function(n){return Object.values(e).reduce((function(e,t){return Object.values(t).forEach((function(t){var r=t.hostName,o=t.hostUUID,i=t.ipAddress,l=t.stateUUID;e[l]=pe({},n[l],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(q.TZ,{header:"Manage changed SSH keys",loading:M,children:[(0,r.jsxs)(S.Z,{spacing:".2em",children:[(0,r.jsx)(w.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(K.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(se.Z,{href:t,sx:{display:"inline-flex"},target:"_blank",children:'"Man In The Middle"'})," ","attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys."]}),(0,r.jsx)(G.Z,{header:(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{width:"100%","& > :not(:last-child)":{display:{xs:"none",sm:"flex"}},"& > :last-child":{display:{xs:"initial",sm:"none"},marginLeft:0}},children:[(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(w.Ac,{children:"Host name"}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(w.Ac,{children:"IP address"}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!A,edit:!0,getListCheckboxProps:function(){return{checked:O}},listEmpty:(0,r.jsx)(w.Ac,{align:"center",children:"No conflicting keys found."}),listItems:y,onAllCheckboxChange:function(e,n){C(n)},onDelete:function(){var e,n=P.reduce((function(e,n){if(!Z(n))return e;var t=y[n].hostUUID;return e[t]||(e[t]=[]),e[t].push(n),e}),{});x({actionProceedText:"Delete",content:"Resolve ".concat(P.length," SSH key conflicts. Please make sure the identity change(s) are expected to avoid MITM attacks."),onProceedAppend:function(){p.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),h(n)}))},proceedColour:"red",titleText:"Delete ".concat(P.length," conflicting SSH keys?")}),null===(e=s.current.setOpen)||void 0===e||e.call(null,!0)},onItemCheckboxChange:function(e,n,t){I(e,t)},renderListItem:function(e,n){var t=n.hostName,o=n.ipAddress;return(0,r.jsxs)(S.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(w.Ac,{children:t}),(0,r.jsx)(w.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return Z(e)}})]}),T]}),(0,r.jsx)(a.Z,pe({closeOnProceed:!0},g,{ref:s}))]})};function ye(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function be(e){for(var n=1;n0),c(ve,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(xe),ref:m,required:p})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(I.Z,{input:(0,r.jsx)(E.Z,{id:ve,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(ve)}},onFinishBatch:t(ve),tests:[{test:M.HJ},{onFailure:function(){i(ve,{children:"The passwords do not match."})},test:function(e){var n;return e.value===(null===(n=m.current.getValue)||void 0===n?void 0:n.call(null))}}]},onFirstRender:o(ve),ref:y,required:v})}}:void 0}),[t,o,v,p,i,c,h]);return(0,r.jsx)(A.Z,{columns:{xs:1,sm:2,md:3},layout:be({"common-user-input-cell-name":{children:(0,r.jsx)(I.Z,{input:(0,r.jsx)(E.Z,{id:ge,inputProps:{readOnly:u},label:je,value:s}),inputTestBatch:(0,M.Gn)(je,(function(){i(ge)}),{onFinishBatch:t(ge)},(function(e){i(ge,{children:e})})),onFirstRender:o(ge),required:!0}),md:1,sm:2}},x),spacing:"1em"})},Ze=t(2545),Oe=t(8610),Se=t(6632),Ae=t(8859);function ke(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Xe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(a){c=!0,o=a}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||Je(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e){return function(e){if(Array.isArray(e))return ze(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Je(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.")}()}function Je(e,n){if(e){if("string"===typeof e)return ze(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ze(e,n):void 0}}var Qe=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,D.Z)().protect,f=(0,l.useState)(!1),p=f[0],h=f[1],m=(0,l.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:p},onCancelAppend:function(){h(!1)},onProceedAppend:function(){h(!1)},titleText:""}),y=m[0],b=m[1],v=Xe((0,F.Z)(void 0,d),2),g=v[0],x=v[1],j=Xe((0,F.Z)("",d),2),w=j[0],P=j[1],Z=(0,u.Z)("".concat(c.Z,"/host/local"),{onError:function(){P("Unknown")},onSuccess:function(e){var n=e.installTarget,t=e.shortHostName;x(n),P(t)},refreshInterval:t}),O=Z.data,S=Z.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:S?"Loading...":"".concat(null===O||void 0===O?void 0:O.shortHostName," Config")})}),(0,r.jsx)(s.Z,{}),(0,r.jsxs)(o.ZP,{container:!0,columns:{xs:1,md:3,lg:4},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Ve,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=qe(e,["onProceedAppend"]);b((function(e){return Ke({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(t=0;t=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)(c.Z,a({underline:"hover",variant:"subtitle1"},s,{sx:a({color:i.lD,textDecorationColor:i.s7},n),children:(0,t.jsxs)(u.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),c=n(1163),i=n(7294),u=n(7357),s=n(7720),a=n(2428),l=n(2029),f=n(7169),v=n(5094),d=n(1200),h=n(5521),p=n(1706),b=n(5741),y=n(9),m=n(3679),x=n(1905),j=n(4968),g=n(2152);function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n *":{width:{xs:"20em",md:"24em"}},"& > :not(:last-child)":{marginRight:"2em"}},children:e.map((function(e){var n=e.anvilName,o=e.anvilUUID,c=e.isScreenshotStale,i=e.screenshot,u=e.serverName,s=e.serverUUID;return(0,t.jsx)(v.M,{externalPreview:i,headerEndAdornment:[(0,t.jsx)(b.Z,{href:"/server?uuid=".concat(s,"&server_name=").concat(u),children:u},"server_list_to_server_".concat(s)),(0,t.jsx)(b.Z,{href:"/anvil?anvil_uuid=".concat(o),sx:{opacity:.7},children:n},"server_list_server_".concat(s,"_to_anvil_").concat(o))],isExternalPreviewStale:c,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){r.push("/server?uuid=".concat(s,"&server_name=").concat(u,"&vnc=1"))},serverUUID:s},"server-preview-".concat(s))}))})},P=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,i.useRef)(!0),r=(0,c.useRouter)(),n=(0,i.useState)([]),v=n[0],b=n[1],w=(0,i.useState)([]),O=w[0],E=w[1],U=(0,i.useState)([]),D=U[0],I=U[1],k=(0,i.useState)(""),C=k[0],A=k[1],N=(0,i.useState)(!1),R=N[0],T=N[1],F=function(){for(var r=arguments.length,n=new Array(r),t=0;t0&&void 0!==arguments[0]?arguments[0]:[],n=r.map((function(r){var t,o=r.serverUUID,c=S({},r,{screenshot:(null===(t=v.find((function(e){return e.serverUUID===o})))||void 0===t?void 0:t.screenshot)||""});return(0,d.Z)("".concat(l.Z,"/server/").concat(o,"?ss")).then((function(r){var t=r.screenshot;c.screenshot=t,c.isScreenshotStale=!1;var o=_(n);e.current&&b(o)})).catch((function(){c.isScreenshotStale=!0})),c}));b(n),F(n,C)},refreshInterval:6e4}).isLoading;return(0,i.useEffect)((function(){return function(){e.current=!1}}),[]),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(o.default,{children:(0,t.jsx)("title",{children:"Dashboard"})}),(0,t.jsx)(h.Z,{}),(0,t.jsx)(m.s_,{children:L?(0,t.jsx)(g.Z,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(m.V9,{children:[(0,t.jsx)(y.Z,{placeholder:"Search by server name",onChange:function(e){var r=e.target.value;A(r),F(v,r)},sx:{marginRight:".6em"},value:C}),(0,t.jsx)(p.Z,{onClick:function(){return T(!0)},children:(0,t.jsx)(a.Z,{})})]}),Z(D,r),D.length>0&&(0,t.jsx)(s.Z,{sx:{backgroundColor:f.d}}),Z(O,r)]})}),(0,t.jsx)(j.Z,{dialogProps:{open:R},onClose:function(){T(!1)}})]})}}},function(e){e.O(0,[382,483,894,182,614,485,717,62,780,899,140,825,94,774,888,179],(function(){return r=5301,e(e.s=r);var r}));var r=e.O();_N_E=r}]); \ No newline at end of file +(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),c=n(122),i=n(7169),u=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 a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(t=0;t=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)(c.Z,a({underline:"hover",variant:"subtitle1"},s,{sx:a({color:i.lD,textDecorationColor:i.s7},n),children:(0,t.jsxs)(u.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),c=n(1163),i=n(7294),u=n(7357),s=n(7720),a=n(2428),l=n(2029),f=n(7169),v=n(5094),d=n(1200),h=n(5521),p=n(1706),b=n(5741),y=n(9),m=n(3679),x=n(1905),j=n(4968),g=n(2152);function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n *":{width:{xs:"20em",md:"24em"}},"& > :not(:last-child)":{marginRight:"2em"}},children:e.map((function(e){var n=e.anvilName,o=e.anvilUUID,c=e.isScreenshotStale,i=e.screenshot,u=e.serverName,s=e.serverUUID;return(0,t.jsx)(v.M,{externalPreview:i,headerEndAdornment:[(0,t.jsx)(b.Z,{href:"/server?uuid=".concat(s,"&server_name=").concat(u),children:u},"server_list_to_server_".concat(s)),(0,t.jsx)(b.Z,{href:"/anvil?anvil_uuid=".concat(o),sx:{opacity:.7},children:n},"server_list_server_".concat(s,"_to_anvil_").concat(o))],isExternalPreviewStale:c,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){r.push("/server?uuid=".concat(s,"&server_name=").concat(u,"&vnc=1"))},serverUUID:s},"server-preview-".concat(s))}))})},P=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,i.useRef)(!0),r=(0,c.useRouter)(),n=(0,i.useState)([]),v=n[0],b=n[1],w=(0,i.useState)([]),O=w[0],E=w[1],U=(0,i.useState)([]),D=U[0],I=U[1],k=(0,i.useState)(""),C=k[0],A=k[1],N=(0,i.useState)(!1),R=N[0],T=N[1],F=function(){for(var r=arguments.length,n=new Array(r),t=0;t0&&void 0!==arguments[0]?arguments[0]:[],n=r.map((function(r){var t,o=r.serverUUID,c=S({},r,{screenshot:(null===(t=v.find((function(e){return e.serverUUID===o})))||void 0===t?void 0:t.screenshot)||""});return(0,d.Z)("".concat(l.Z,"/server/").concat(o,"?ss=1")).then((function(r){var t=r.screenshot;c.screenshot=t,c.isScreenshotStale=!1;var o=_(n);e.current&&b(o)})).catch((function(){c.isScreenshotStale=!0})),c}));b(n),F(n,C)},refreshInterval:6e4}).isLoading;return(0,i.useEffect)((function(){return function(){e.current=!1}}),[]),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(o.default,{children:(0,t.jsx)("title",{children:"Dashboard"})}),(0,t.jsx)(h.Z,{}),(0,t.jsx)(m.s_,{children:L?(0,t.jsx)(g.Z,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(m.V9,{children:[(0,t.jsx)(y.Z,{placeholder:"Search by server name",onChange:function(e){var r=e.target.value;A(r),F(v,r)},sx:{marginRight:".6em"},value:C}),(0,t.jsx)(p.Z,{onClick:function(){return T(!0)},children:(0,t.jsx)(a.Z,{})})]}),Z(D,r),D.length>0&&(0,t.jsx)(s.Z,{sx:{backgroundColor:f.d}}),Z(O,r)]})}),(0,t.jsx)(j.Z,{dialogProps:{open:R},onClose:function(){T(!1)}})]})}}},function(e){e.O(0,[382,483,894,182,614,485,717,62,780,899,140,825,94,774,888,179],(function(){return r=5301,e(e.s=r);var r}));var r=e.O();_N_E=r}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/manage-element-2b1d8792c2a5bf47.js b/striker-ui/out/_next/static/chunks/pages/manage-element-3b79eff498885bcb.js similarity index 83% rename from striker-ui/out/_next/static/chunks/pages/manage-element-2b1d8792c2a5bf47.js rename to striker-ui/out/_next/static/chunks/pages/manage-element-3b79eff498885bcb.js index 078a0dc1..317e7af8 100644 --- a/striker-ui/out/_next/static/chunks/pages/manage-element-2b1d8792c2a5bf47.js +++ b/striker-ui/out/_next/static/chunks/pages/manage-element-3b79eff498885bcb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[808],{4173:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage-element",function(){return t(8938)}])},4594:function(e,n,t){"use strict";var r=t(5893),o=t(6514),i=t(5113),a=t(4656),u=t(482),c=t(2994),l=t(7357),s=t(9890),d=t(7169),f=t(1363),p=t(6284);function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function h(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var y=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,b=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==b&&void 0!==b?b:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},O=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(s.Z,h({PaperComponent:y},j,{componentsProps:x,renderInput:w,sx:O})),(0,r.jsx)(f.Z,h({},i))]})}},2545:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(157);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var u=(0,o.forwardRef)((function(e,n){var t=e.scrollContent,u=(0,o.useMemo)((function(){return t?".5em":void 0}),[t]);return(0,r.jsx)(i.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||O(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(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.")}()}function O(e,n){if(e){if("string"===typeof e)return y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,n):void 0}}var k={width:"100%"},P="gate-input",I="".concat(P,"-credential-id"),Z="".concat(P,"-credential-passphrase"),S="access",A=(0,i.forwardRef)((function(e,n){var t,y,b=e.formContainer,O=void 0===b||b,P=e.gridProps,A=void 0===P?{}:P,M=A.columns,T=void 0===M?{xs:1,sm:2}:M,F=(A.layout,A.spacing),C=void 0===F?"1em":F,U=e.identifierId,E=void 0===U?I:U,N=e.identifierInputTestBatchBuilder,R=void 0===N?m.Gn:N,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,L=void 0===D?{}:D,q=L.formControlProps,_=void 0===q?{}:q,H=L.inputProps,V=e.onIdentifierBlurAppend,$=e.onSubmit,G=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?Z:z,Q=e.passphraseLabel,K=e.passphraseOutlinedInputWithLabelProps,J=void 0===K?{}:K,X=J.formControlProps,Y=void 0===X?{}:X,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?O:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),le=Y.sx,se=j(Y,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=x((0,v.Z)(!1),2),he=me[0],ve=me[1],ye=(0,h.Z)([I,Z],pe),be=ye.buildFinishInputTestBatchFunction,ge=ye.buildInputFirstRenderFunction,je=ye.buildInputUnmountFunction,xe=ye.isFormInvalid,we=ye.setMessage,Oe=(0,i.useMemo)((function(){return null!==$&&void 0!==$?$:function(){for(var e=arguments.length,n=new Array(e),t=0;t0}),[f.length]),h=(0,o.useMemo)((function(){return d.length>1}),[d.length]),v=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,u=e.getConfirmDialogTitle,s=e.onProceedAppend,d=e.renderEntry;return c({actionProceedText:"Delete",content:(0,r.jsx)(a.Z,c({entries:l,maxDepth:0,renderEntry:d},i)),onProceedAppend:s,proceedColour:"red",titleText:u(f.length)},t)}),[l,f.length]),y=(0,o.useCallback)((function(e){return l[e]}),[l]),b=(0,o.useCallback)((function(e){return s(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return s((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:v,checklist:l,checks:f,getCheck:y,hasAllChecks:p,hasChecks:m,multipleItems:h,setAllChecks:b,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,u=void 0===o?"":o,c=e.titleText,l=void 0===c?"":c,s=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:u,titleText:l},s))}},8938:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Cr}});var r=t(5893),o=t(9008),i=t(1163),a=t(7294),u=t(4390);function c(e,n){return null!=n&&"undefined"!==typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n}var l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},s=t(7504),d=t(1770),f=t(5521),p=t(2029),m=t(7357),h=t(4594),v=t(1496),y=t(4386),b=t(4188),g=t(4690),j=t(9099),x=t(6284),w=t(3679),O=t(7783),k=t(480),P=t(2852),I=t(7169),Z=t(7750);function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tE(n,1)[0]?1:-1})).reduce((function(e,o){var a=E(o,2),u=a[0],c=a[1],l=c.content_type,s=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var b,g,j=e.optional,x=e.required,w=null!==(b=D[l])&&void 0!==b?b:D.string,O=L(n,u),k=null!==(g=f[O])&&void 0!==g?g:s,P="1"===String(v),I=/passw/i.test(u),S=w({formUtils:i,id:O,isChecked:N.includes(k),isRequired:P,isSensitive:I,label:u,selectOptions:h,value:k}),A=(0,r.jsx)(y.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(w.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(q,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:b,label:O,name:b,value:u}),inputTestBatch:(0,F.Gn)(O,(function(){d(b)}),{onFinishBatch:l(b)},(function(e){d(b,{children:e})})),onFirstRender:s(b),required:!0},"".concat(b,"-wrapper")),v]})}),(0,r.jsx)(w.TZ,{header:"Optional parameters",children:(0,r.jsx)(q,{children:h})})]})}return e}),[l,s,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),V=t(1081);function $(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),s(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(Z.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(Z.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:l})}),[d,l,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===l||void 0===l?void 0:l.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===l||void 0===l?void 0:l.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==l)}),[l,u,i]),(0,r.jsx)(r.Fragment,{children:v})},K=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,l=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:l})},X=t(2545),Y=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return tn(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,t=void 0===n?"":n,r=e.networkSubnetMask,o=void 0===r?"":r,i=e.networkType,a=void 0===i?"ifn":i,u=e.networkGateway,c=void 0===u?sn(a)?"":void 0:u,l=e.networkNumber,s=void 0===l?y(a)+1:l;return{network:{networkGateway:c,networkMinIp:t,networkNumber:s,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[y]),w=(0,a.useCallback)((function(e,n){return f((0,Xe.ZP)(e,n))}),[f]),O=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,l=t.reduce((function(e,n){var t=tn(n,2),i=t[0],l=t[1],s=l.networkNumber,d=l.networkType;i===r&&(u=!0,d=a,v(RegExp(i)));var f=d===a;return f&&(c+=1),u?(f?s=c:d===o&&(s-=1),e[i]=nn({},l,{networkNumber:s,networkType:d})):e[i]=l,e}),{});f(l)}),[t,v,f]),k=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=tn(t,2),u=a[0],c=a[1];u===n?o=!0:(c.networkType===r&&(i+=1),e[u]=o?nn({},c,{networkNumber:i}):c);return e}),{});f(a)}),[t,f]),P=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=tn(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,l=a.networkNumber,s=a.networkSubnetMask,d=a.networkType,f="".concat(on,"-").concat(i),p=1===l,m=sn(d),h="mn"===d||!p;return e[f]={children:(0,r.jsx)(Je,{formUtils:n,networkId:i,networkNumber:l,networkType:d,networkTypeOptions:b,onClose:k,onNetworkTypeChange:O,previous:{gateway:u,minIp:c,subnetMask:s},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[n,t,b,k,O]);return(0,r.jsx)(s.Z,{columns:{xs:1,sm:2,md:3},layout:nn({},P,{"an-network-config-cell-add-network":{children:(0,r.jsx)(Ve.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;w(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:an,label:"DNS",value:c}),inputTestBatch:(0,F.dg)("DNS",(function(){h(an)}),{onFinishBatch:p(an)},(function(e){h(an,{children:e})})),onFirstRender:m(an),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:cn,label:"NTP",value:d}),inputTestBatch:(0,F.dg)("NTP",(function(){h(cn)}),{onFinishBatch:p(cn)},(function(e){h(cn,{children:e})})),onFirstRender:m(cn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:un,inputProps:{placeholder:"1500"},label:"MTU",value:l}),inputTestBatch:(0,F.qY)("MTU",(function(){h(un)}),{onFinishBatch:p(un)},(function(e){h(un,{children:e})})),onFirstRender:m(un),valueType:"number"})}}),spacing:"1em"})};function fn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},mn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous,u=void 0===i?{}:i,c=u.hostConfig,l=u.networkConfig,s=void 0===l?{}:l,d=fn(e.previous,["hostConfig","networkConfig"]),f=s.networks,p=void 0===f?pn:f,m=(0,a.useState)(p),h=m[0],v=m[1],y=(0,a.useMemo)((function(){return Object.entries(h)}),[h]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(qe,{formUtils:n,previous:d}),(0,r.jsx)(dn,{formUtils:n,networkListEntries:y,previous:s,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:y,previous:c})]})},hn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(mn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return yt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wt=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,l=e.radioItems,s=e.radioProps,d=(void 0===s?{}:s).sx,f=e.radioGroupProps,p=jt(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(l).map((function(e){var n=xt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,l="string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u;return(0,r.jsx)(k.Z,gt({control:(0,r.jsx)(ft.Z,gt({},p,{sx:gt(bt({},"&.".concat(pt.Z.root),{color:I.s7}),d)})),value:c,label:l},t),"".concat(i,"-").concat(o))}))}),[t,i,l,d,p]);return(0,r.jsxs)(mt.Z,gt({},n,{children:[(0,r.jsx)(ht.Z,gt({},o,{children:m})),(0,r.jsx)(vt.Z,gt({onChange:c,row:!0},f,{children:h}))]}))},Ot=t(3144);function kt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ht(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||$t(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$t(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.")}()}function $t(e,n){if(e){if("string"===typeof e)return Dt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dt(e,n):void 0}}var Gt="prepare-network-host-name-input",zt="prepare-network-netconf-input-group",Wt="Host name",Qt=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var tr=function(e){var n=e.label,t=nr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(Z.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(Xt.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function dr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return cr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fr="1.8em",pr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=sr(e,["orientation","variant"]),l=(0,or.Z)(),s=(0,a.useCallback)((function(e){return l.breakpoints.up(e)}),[l]),d=(0,ir.Z)(s("xs")),f=(0,ir.Z)(s("sm")),p=(0,ir.Z)(s("md")),m=(0,ir.Z)(s("lg")),h=(0,ir.Z)(s("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),y=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=dr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(ar.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var y=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,b=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==b&&void 0!==b?b:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},O=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(s.Z,h({PaperComponent:y},j,{componentsProps:x,renderInput:w,sx:O})),(0,r.jsx)(f.Z,h({},i))]})}},2545:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(157);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var u=(0,o.forwardRef)((function(e,n){var t=e.scrollContent,u=(0,o.useMemo)((function(){return t?".5em":void 0}),[t]);return(0,r.jsx)(i.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||O(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(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.")}()}function O(e,n){if(e){if("string"===typeof e)return y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,n):void 0}}var k={width:"100%"},P="gate-input",I="".concat(P,"-credential-id"),Z="".concat(P,"-credential-passphrase"),S="access",A=(0,i.forwardRef)((function(e,n){var t,y,b=e.formContainer,O=void 0===b||b,P=e.gridProps,A=void 0===P?{}:P,M=A.columns,T=void 0===M?{xs:1,sm:2}:M,F=(A.layout,A.spacing),C=void 0===F?"1em":F,U=e.identifierId,E=void 0===U?I:U,N=e.identifierInputTestBatchBuilder,R=void 0===N?m.Gn:N,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,L=void 0===D?{}:D,q=L.formControlProps,_=void 0===q?{}:q,H=L.inputProps,V=e.onIdentifierBlurAppend,$=e.onSubmit,G=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?Z:z,Q=e.passphraseLabel,K=e.passphraseOutlinedInputWithLabelProps,J=void 0===K?{}:K,X=J.formControlProps,Y=void 0===X?{}:X,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?O:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),le=Y.sx,se=j(Y,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=x((0,v.Z)(!1),2),he=me[0],ve=me[1],ye=(0,h.Z)([I,Z],pe),be=ye.buildFinishInputTestBatchFunction,ge=ye.buildInputFirstRenderFunction,je=ye.buildInputUnmountFunction,xe=ye.isFormInvalid,we=ye.setMessage,Oe=(0,i.useMemo)((function(){return null!==$&&void 0!==$?$:function(){for(var e=arguments.length,n=new Array(e),t=0;t0}),[f.length]),h=(0,o.useMemo)((function(){return d.length>1}),[d.length]),v=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,u=e.getConfirmDialogTitle,s=e.onProceedAppend,d=e.renderEntry;return c({actionProceedText:"Delete",content:(0,r.jsx)(a.Z,c({entries:l,maxDepth:0,renderEntry:d},i)),onProceedAppend:s,proceedColour:"red",titleText:u(f.length)},t)}),[l,f.length]),y=(0,o.useCallback)((function(e){return l[e]}),[l]),b=(0,o.useCallback)((function(e){return s(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return s((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:v,checklist:l,checks:f,getCheck:y,hasAllChecks:p,hasChecks:m,multipleItems:h,setAllChecks:b,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,u=void 0===o?"":o,c=e.titleText,l=void 0===c?"":c,s=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:u,titleText:l},s))}},8938:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Cr}});var r=t(5893),o=t(9008),i=t(1163),a=t(7294),u=t(4390);function c(e,n){return null!=n&&"undefined"!==typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n}var l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},s=t(7504),d=t(1770),f=t(5521),p=t(2029),m=t(7357),h=t(4594),v=t(1496),y=t(4386),b=t(4188),g=t(4690),j=t(9099),x=t(6284),w=t(3679),O=t(7783),k=t(480),P=t(2852),I=t(7169),Z=t(7750);function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tE(n,1)[0]?1:-1})).reduce((function(e,o){var a=E(o,2),u=a[0],c=a[1],l=c.content_type,s=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var b,g,j=e.optional,x=e.required,w=null!==(b=D[l])&&void 0!==b?b:D.string,O=L(n,u),k=null!==(g=f[O])&&void 0!==g?g:s,P="1"===String(v),I=/passw/i.test(u),S=w({formUtils:i,id:O,isChecked:N.includes(k),isRequired:P,isSensitive:I,label:u,selectOptions:h,value:k}),A=(0,r.jsx)(y.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(w.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(q,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:b,label:O,name:b,value:u}),inputTestBatch:(0,F.Gn)(O,(function(){d(b)}),{onFinishBatch:l(b)},(function(e){d(b,{children:e})})),onFirstRender:s(b),required:!0},"".concat(b,"-wrapper")),v]})}),(0,r.jsx)(w.TZ,{header:"Optional parameters",children:(0,r.jsx)(q,{children:h})})]})}return e}),[l,s,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),V=t(1081);function $(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),s(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(Z.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(Z.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:l})}),[d,l,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===l||void 0===l?void 0:l.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===l||void 0===l?void 0:l.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==l)}),[l,u,i]),(0,r.jsx)(r.Fragment,{children:v})},K=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,l=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:l})},X=t(2545),Y=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return tn(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,t=void 0===n?"":n,r=e.networkSubnetMask,o=void 0===r?"":r,i=e.networkType,a=void 0===i?"ifn":i,u=e.networkGateway,c=void 0===u?sn(a)?"":void 0:u,l=e.networkNumber,s=void 0===l?y(a)+1:l;return{network:{networkGateway:c,networkMinIp:t,networkNumber:s,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[y]),w=(0,a.useCallback)((function(e,n){return f((0,Xe.ZP)(e,n))}),[f]),O=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,l=t.reduce((function(e,n){var t=tn(n,2),i=t[0],l=t[1],s=l.networkNumber,d=l.networkType;i===r&&(u=!0,d=a,v(RegExp(i)));var f=d===a;return f&&(c+=1),u?(f?s=c:d===o&&(s-=1),e[i]=nn({},l,{networkNumber:s,networkType:d})):e[i]=l,e}),{});f(l)}),[t,v,f]),k=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=tn(t,2),u=a[0],c=a[1];u===n?o=!0:(c.networkType===r&&(i+=1),e[u]=o?nn({},c,{networkNumber:i}):c);return e}),{});f(a)}),[t,f]),P=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=tn(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,l=a.networkNumber,s=a.networkSubnetMask,d=a.networkType,f="".concat(on,"-").concat(i),p=1===l,m=sn(d),h="mn"===d||!p;return e[f]={children:(0,r.jsx)(Je,{formUtils:n,networkId:i,networkNumber:l,networkType:d,networkTypeOptions:b,onClose:k,onNetworkTypeChange:O,previous:{gateway:u,minIp:c,subnetMask:s},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[n,t,b,k,O]);return(0,r.jsx)(s.Z,{columns:{xs:1,sm:2,md:3},layout:nn({},P,{"an-network-config-cell-add-network":{children:(0,r.jsx)(Ve.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;w(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:an,label:"DNS",value:c}),inputTestBatch:(0,F.dg)("DNS",(function(){h(an)}),{onFinishBatch:p(an)},(function(e){h(an,{children:e})})),onFirstRender:m(an),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:cn,label:"NTP",value:d}),inputTestBatch:(0,F.dg)("NTP",(function(){h(cn)}),{onFinishBatch:p(cn)},(function(e){h(cn,{children:e})})),onFirstRender:m(cn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:un,inputProps:{placeholder:"1500"},label:"MTU",value:l}),inputTestBatch:(0,F.qY)("MTU",(function(){h(un)}),{onFinishBatch:p(un)},(function(e){h(un,{children:e})})),onFirstRender:m(un),valueType:"number"})}}),spacing:"1em"})};function fn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},mn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous,u=void 0===i?{}:i,c=u.hostConfig,l=u.networkConfig,s=void 0===l?{}:l,d=fn(e.previous,["hostConfig","networkConfig"]),f=s.networks,p=void 0===f?pn:f,m=(0,a.useState)(p),h=m[0],v=m[1],y=(0,a.useMemo)((function(){return Object.entries(h)}),[h]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(qe,{formUtils:n,previous:d}),(0,r.jsx)(dn,{formUtils:n,networkListEntries:y,previous:s,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:y,previous:c})]})},hn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(mn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return yt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wt=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,l=e.radioItems,s=e.radioProps,d=(void 0===s?{}:s).sx,f=e.radioGroupProps,p=jt(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(l).map((function(e){var n=xt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,l="string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u;return(0,r.jsx)(k.Z,gt({control:(0,r.jsx)(ft.Z,gt({},p,{sx:gt(bt({},"&.".concat(pt.Z.root),{color:I.s7}),d)})),value:c,label:l},t),"".concat(i,"-").concat(o))}))}),[t,i,l,d,p]);return(0,r.jsxs)(mt.Z,gt({},n,{children:[(0,r.jsx)(ht.Z,gt({},o,{children:m})),(0,r.jsx)(vt.Z,gt({onChange:c,row:!0},f,{children:h}))]}))},Ot=t(3144);function kt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ht(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||$t(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$t(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.")}()}function $t(e,n){if(e){if("string"===typeof e)return Dt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dt(e,n):void 0}}var Gt="prepare-network-host-name-input",zt="prepare-network-netconf-input-group",Wt="Host name",Qt=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var tr=function(e){var n=e.label,t=nr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(Z.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(Xt.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function dr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return cr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fr="1.8em",pr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=sr(e,["orientation","variant"]),l=(0,or.Z)(),s=(0,a.useCallback)((function(e){return l.breakpoints.up(e)}),[l]),d=(0,ir.Z)(s("xs")),f=(0,ir.Z)(s("sm")),p=(0,ir.Z)(s("md")),m=(0,ir.Z)(s("lg")),h=(0,ir.Z)(s("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),y=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=dr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(ar.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tAnvil
\ No newline at end of file +Anvil
\ No newline at end of file diff --git a/striker-ui/out/config.html b/striker-ui/out/config.html index c61db3fd..d5e93600 100644 --- a/striker-ui/out/config.html +++ b/striker-ui/out/config.html @@ -1 +1 @@ -Loading...
Install target
Configure striker peers
Configure striker peers
Inbound connections

    No inbound connections found.
Peer connections

    No peer connections found.
Manage changed SSH keys
Manage changed SSH keys
The identity of the following targets have unexpectedly changed.
If you haven't rebuilt the listed targets, then you could be experiencing a
"Man In The Middle"
attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys.

Host name

IP address


    No conflicting keys found.
Manage users
Manage users

    No users found.
\ No newline at end of file +Loading...
Install target
Configure striker peers
Configure striker peers
Inbound connections

    No inbound connections found.
Peer connections

    No peer connections found.
Manage changed SSH keys
Manage changed SSH keys
The identity of the following targets have unexpectedly changed.
If you haven't rebuilt the listed targets, then you could be experiencing a
"Man In The Middle"
attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys.

Host name

IP address


    No conflicting keys found.
Manage users
Manage users

    No users found.
\ No newline at end of file diff --git a/striker-ui/out/file-manager.html b/striker-ui/out/file-manager.html index 199f2d73..6ca296ce 100644 --- a/striker-ui/out/file-manager.html +++ b/striker-ui/out/file-manager.html @@ -1 +1 @@ -File Manager

Files

    \ No newline at end of file +File Manager

    Files

      \ No newline at end of file diff --git a/striker-ui/out/index.html b/striker-ui/out/index.html index bfd47011..0397a7ce 100644 --- a/striker-ui/out/index.html +++ b/striker-ui/out/index.html @@ -1 +1 @@ -Dashboard
      \ No newline at end of file +Dashboard
      \ No newline at end of file diff --git a/striker-ui/out/init.html b/striker-ui/out/init.html index f8a440f5..415485fc 100644 --- a/striker-ui/out/init.html +++ b/striker-ui/out/init.html @@ -1 +1 @@ -

      Loading...

      Placeholder
      Uncheck to skip domain and host name pattern validation.
      \ No newline at end of file +

      Loading...

      Placeholder
      Uncheck to skip domain and host name pattern validation.
      \ No newline at end of file diff --git a/striker-ui/out/login.html b/striker-ui/out/login.html index fd16f9d5..06144749 100644 --- a/striker-ui/out/login.html +++ b/striker-ui/out/login.html @@ -1 +1 @@ -Login
      Placeholder
      \ No newline at end of file +Login
      Placeholder
      \ No newline at end of file diff --git a/striker-ui/out/manage-element.html b/striker-ui/out/manage-element.html index b9c3a079..9734f014 100644 --- a/striker-ui/out/manage-element.html +++ b/striker-ui/out/manage-element.html @@ -1 +1 @@ -Loading
      \ No newline at end of file +Loading
      \ No newline at end of file diff --git a/striker-ui/out/server.html b/striker-ui/out/server.html index 4436883d..dccfb732 100644 --- a/striker-ui/out/server.html +++ b/striker-ui/out/server.html @@ -1 +1 @@ -
      \ No newline at end of file +
      \ No newline at end of file