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

1 lines
22 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[464],{62705:function(e,n,t){var r=t(55639).Symbol;e.exports=r},44239:function(e,n,t){var r=t(62705),i=t(89607),l=t(2333),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):l(e)}},27561:function(e,n,t){var r=t(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},31957:function(e,n,t){var r="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;e.exports=r},89607:function(e,n,t){var r=t(62705),i=Object.prototype,l=i.hasOwnProperty,s=i.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var n=l.call(e,o),t=e[o];try{e[o]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(n?e[o]=t:delete e[o]),i}},2333:function(e){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},55639:function(e,n,t){var r=t(31957),i="object"==typeof self&&self&&self.Object===Object&&self,l=r||i||Function("return this")();e.exports=l},67990:function(e){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},23279:function(e,n,t){var r=t(13218),i=t(7771),l=t(14841),s=Math.max,o=Math.min;e.exports=function(e,n,t){var a,u,c,d,m,x,h=0,v=!1,f=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function invokeFunc(n){var t=a,r=u;return a=u=void 0,h=n,d=e.apply(r,t)}function shouldInvoke(e){var t=e-x,r=e-h;return void 0===x||t>=n||t<0||f&&r>=c}function timerExpired(){var e,t,r,l=i();if(shouldInvoke(l))return trailingEdge(l);m=setTimeout(timerExpired,(e=l-x,t=l-h,r=n-e,f?o(r,c-t):r))}function trailingEdge(e){return(m=void 0,g&&a)?invokeFunc(e):(a=u=void 0,d)}function debounced(){var e,t=i(),r=shouldInvoke(t);if(a=arguments,u=this,x=t,r){if(void 0===m)return h=e=x,m=setTimeout(timerExpired,n),v?invokeFunc(e):d;if(f)return clearTimeout(m),m=setTimeout(timerExpired,n),invokeFunc(x)}return void 0===m&&(m=setTimeout(timerExpired,n)),d}return n=l(n)||0,r(t)&&(v=!!t.leading,c=(f="maxWait"in t)?s(l(t.maxWait)||0,n):c,g="trailing"in t?!!t.trailing:g),debounced.cancel=function(){void 0!==m&&clearTimeout(m),h=0,a=x=u=m=void 0},debounced.flush=function(){return void 0===m?d:trailingEdge(i())},debounced}},13218:function(e){e.exports=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,n,t){var r=t(44239),i=t(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},7771:function(e,n,t){var r=t(55639);e.exports=function(){return r.Date.now()}},14841:function(e,n,t){var r=t(27561),i=t(13218),l=t(33448),s=0/0,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(l(e))return s;if(i(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=i(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var t=a.test(e);return t||u.test(e)?c(e.slice(2),t?2:8):o.test(e)?s:+e}},45844:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/init",function(){return t(35426)}])},35426:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return init}});var r=t(85893),i=t(5616),l=t(41098),s=t(48263),o=t(11163),a=t(67294),u=t(98436),c=t(6010),d=t(67645),m=t(56597),x=t(19467),h=t(55238),v=t(58128),f=t(94121),g=t(65939),p=t(92917),j=t(68917),b=t(21642),P=t(55675),lib_pad=function(e){let{fillString:n="0",maxLength:t=2,which:r="Start"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return String(e)["pad".concat(r)](t,n)};let Z={show:!0},SuggestButton=e=>{let{onClick:n,show:t=Z.show,...i}=e;return t?(0,r.jsx)(x.Z,{onClick:n,tabIndex:-1,...i,children:"Suggest"}):(0,r.jsx)(r.Fragment,{})};SuggestButton.defaultProps=Z;var k=t(50233),w=t(84154);let y={adminPassword:"adminPassword",confirmAdminPassword:"confirmAdminPassword",domainName:"domainName",hostName:"hostName",hostNumber:"hostNumber",organizationName:"organizationName",organizationPrefix:"organizationPrefix"},N={0:()=>"",1:e=>{let[n]=e;return n.substring(0,1).toLocaleLowerCase()},2:e=>e.map(e=>e.substring(0,1).toLocaleLowerCase()).join("")},buildOrganizationPrefix=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.split(/\s/).filter(e=>!/and|of/.test(e)).slice(0,5),t=n.length>1?2:n.length;return N[t](n)},buildHostName=e=>{let{organizationPrefix:n,hostNumber:t,domainName:r}=e;return[n,t,r].every(e=>!!e)?"".concat(n,"-striker").concat(lib_pad(t),".").concat(r):""},C=(0,a.forwardRef)((e,n)=>{var t,i,l,o;let{expectHostDetail:u=!1,hostDetail:c,onHostNumberBlurAppend:d,toggleSubmitDisabled:m}=e,[x,Z]=(0,a.useState)(),[N,C]=(0,a.useState)(!1),[S,A]=(0,a.useState)(!1),[V,z]=(0,a.useState)(!0),[F,O]=(0,a.useState)(!0),_=(0,a.useRef)(!0),H=(0,a.useRef)({}),R=(0,a.useRef)({}),I=(0,a.useRef)({}),E=(0,a.useRef)({}),D=(0,a.useRef)({}),T=(0,a.useRef)({}),B=(0,a.useRef)({}),L=(0,a.useRef)({}),M=(0,a.useCallback)(e=>{var n;return null===(n=L.current.setMessage)||void 0===n?void 0:n.call(null,y.organizationPrefix,e)},[]),$=(0,a.useCallback)(e=>{var n;return null===(n=L.current.setMessage)||void 0===n?void 0:n.call(null,y.hostNumber,e)},[]),q=(0,a.useCallback)(e=>{var n;return null===(n=L.current.setMessage)||void 0===n?void 0:n.call(null,y.domainName,e)},[]),Q=(0,a.useCallback)(e=>{var n;return null===(n=L.current.setMessage)||void 0===n?void 0:n.call(null,y.hostName,e)},[]),U=(0,a.useCallback)(e=>{var n;return null===(n=L.current.setMessage)||void 0===n?void 0:n.call(null,y.adminPassword,e)},[]),J=(0,a.useCallback)(e=>{var n;return null===(n=L.current.setMessage)||void 0===n?void 0:n.call(null,y.confirmAdminPassword,e)},[]),G=(0,a.useMemo)(()=>({[y.adminPassword]:{defaults:{getValue:()=>{var e;return null===(e=H.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{U(void 0)}},tests:[{onFailure:()=>{U({children:(0,r.jsxs)(r.Fragment,{children:["Admin password cannot contain single-quote (",(0,r.jsx)(w.Q0,{text:"'"}),"), double-quote (",(0,r.jsx)(w.Q0,{text:'"'}),"), slash (",(0,r.jsx)(w.Q0,{text:"/"}),"), backslash (",(0,r.jsx)(w.Q0,{text:"\\"}),"), angle brackets (",(0,r.jsx)(w.Q0,{text:"<>"}),"), curly brackets (",(0,r.jsx)(w.Q0,{text:"{}"}),")."]})})},test:e=>{let{value:n}=e;return!/['"/\\><}{]/g.test(n)}},{test:k.HJ}]},[y.confirmAdminPassword]:{defaults:{getValue:()=>{var e,n;return null===(n=R.current)||void 0===n?void 0:null===(e=n.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{J(void 0)}},tests:[{onFailure:()=>{J({children:"Confirmation doesn't match admin password."})},test:e=>{var n;let{value:t}=e;return t===(null===(n=H.current.getValue)||void 0===n?void 0:n.call(null))}},{test:k.HJ}]},[y.domainName]:{defaults:{compare:[!F],getValue:()=>{var e;return null===(e=D.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{q(void 0)}},tests:[{onFailure:()=>{q({children:(0,r.jsxs)(r.Fragment,{children:["Domain name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(w.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(w.Q0,{text:"."}),") characters."]})})},test:e=>{let{compare:n,value:t}=e;return n[0]||g.FZ.test(t)}},{test:k.HJ}]},[y.hostName]:{defaults:{compare:[!F],getValue:()=>{var e;return null===(e=B.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{Q(void 0)}},tests:[{onFailure:()=>{Q({children:(0,r.jsxs)(r.Fragment,{children:["Host name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(w.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(w.Q0,{text:"."}),") characters."]})})},test:e=>{let{compare:n,value:t}=e;return n[0]||g.FZ.test(t)}},{test:k.HJ}]},[y.hostNumber]:{defaults:{getValue:()=>{var e;return null===(e=T.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{$(void 0)}},tests:[{onFailure:()=>{$({children:"Striker number can only contain digits."})},test:e=>{let{value:n}=e;return/^\d+$/.test(n)}},{test:k.HJ}]},[y.organizationName]:{defaults:{getValue:()=>{var e;return null===(e=I.current.getValue)||void 0===e?void 0:e.call(null)}},tests:[{test:k.HJ}]},[y.organizationPrefix]:{defaults:{getValue:()=>{var e;return null===(e=E.current.getValue)||void 0===e?void 0:e.call(null)},max:5,min:1,onSuccess:()=>{M(void 0)}},tests:[{onFailure:e=>{let{max:n,min:t}=e;M({children:"Organization prefix must be ".concat(t," to ").concat(n," lowercase alphanumeric characters.")})},test:e=>{let{max:n,min:t,value:r}=e;return RegExp("^[a-z0-9]{".concat(t,",").concat(n,"}$")).test(r)}}]}}),[F,U,J,q,Q,$,M]),W=(0,a.useMemo)(()=>(0,k.LT)(G),[G]),X=(0,a.useCallback)(function(){let{excludeTestIds:e=[],inputs:n,isContinueOnFailure:t,isExcludeConfirmAdminPassword:r=!V}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r&&e.push(y.confirmAdminPassword),null==m||m.call(null,W({excludeTestIds:e,inputs:n,isContinueOnFailure:t,isIgnoreOnCallbacks:!0,isTestAll:!0}))},[V,W,m]),Y=(0,a.useCallback)(function(){var e;let{organizationName:n=null===(t=I.current.getValue)||void 0===t?void 0:t.call(null)}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=buildOrganizationPrefix(n);return null===(e=E.current.setValue)||void 0===e||e.call(null,r),X({inputs:{[y.organizationPrefix]:{isIgnoreOnCallbacks:!1,value:r}},isContinueOnFailure:!0}),r},[X]),K=(0,a.useCallback)(function(){var e;let{organizationPrefix:n=null===(i=E.current.getValue)||void 0===i?void 0:i.call(null),hostNumber:t=null===(l=T.current.getValue)||void 0===l?void 0:l.call(null),domainName:r=null===(o=D.current.getValue)||void 0===o?void 0:o.call(null)}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=buildHostName({organizationPrefix:n,hostNumber:t,domainName:r});return null===(e=B.current.setValue)||void 0===e||e.call(null,s),X({inputs:{[y.hostName]:{isIgnoreOnCallbacks:!1,value:s}},isContinueOnFailure:!0}),s},[X]),ee=(0,a.useCallback)(()=>{var e;return!!(null===(e=I.current.getValue)||void 0===e?void 0:e.call(null))},[]),en=(0,a.useCallback)(()=>{var e,n,t;return[null===(e=E.current.getValue)||void 0===e?void 0:e.call(null),null===(n=T.current.getValue)||void 0===n?void 0:n.call(null),null===(t=D.current.getValue)||void 0===t?void 0:t.call(null)].every(e=>!!e)},[]),et=(0,a.useCallback)(()=>{var e;(null===(e=E.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?C(ee()):Y()},[ee,Y]),er=(0,a.useCallback)(()=>{var e;(null===(e=B.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?A(en()):K()},[en,K]),ei=(0,a.useCallback)(()=>{var e;let n=Y();(null===(e=B.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))||K({organizationPrefix:n})},[K,Y]),el=(0,a.useCallback)(()=>{K()},[K]),es=(0,a.useCallback)(e=>n=>n===e?void 0:e,[]),eo=(0,a.useMemo)(()=>(0,r.jsx)(v.Z,{checked:F,onChange:(e,n)=>{O(n),X({inputs:{[y.domainName]:{compare:[!n],isIgnoreOnCallbacks:!1},[y.hostName]:{compare:[!n],isIgnoreOnCallbacks:!1}},isContinueOnFailure:!0})},sx:{padding:".2em"}}),[F,X]);return(0,a.useEffect)(()=>{if([u,c,_.current,D.current,B.current,T.current,I.current,E.current].every(e=>!!e)){var e,n,t,r,i;_.current=!1;let{domain:l,hostName:s,organization:o,prefix:a,sequence:u}=c;null===(e=D.current.setValue)||void 0===e||e.call(null,l),null===(n=B.current.setValue)||void 0===n||n.call(null,s),null===(t=T.current.setValue)||void 0===t||t.call(null,u),null===(r=I.current.setValue)||void 0===r||r.call(null,o),null===(i=E.current.setValue)||void 0===i||i.call(null,a),X()}},[u,c,X]),(0,a.useImperativeHandle)(n,()=>({get:()=>{var e,n,t,r,i,l;return{adminPassword:null===(e=H.current.getValue)||void 0===e?void 0:e.call(null),organizationName:null===(n=I.current.getValue)||void 0===n?void 0:n.call(null),organizationPrefix:null===(t=E.current.getValue)||void 0===t?void 0:t.call(null),domainName:null===(r=D.current.getValue)||void 0===r?void 0:r.call(null),hostNumber:null===(i=T.current.getValue)||void 0===i?void 0:i.call(null),hostName:null===(l=B.current.getValue)||void 0===l?void 0:l.call(null)}}})),(0,r.jsxs)(h.Z,{children:[(0,r.jsxs)(s.ZP,{columns:{xs:1,sm:2,md:3},container:!0,spacing:"1em",children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-organization-name",inputProps:{onBlur:et},inputLabelProps:{isNotifyRequired:!0},label:"Organization name",onChange:()=>{X()},onHelp:()=>{Z(es("Name of the organization that maintains this Anvil! system. You can enter anything that makes sense to you."))}}),ref:I}),(0,r.jsxs)(h.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-organization-prefix",inputProps:{endAdornment:(0,r.jsx)(SuggestButton,{show:N,onClick:ei}),inputProps:{maxLength:5,sx:{minWidth:"2.5em"}},onBlur:function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];let{target:{value:i}}=e;W({inputs:{[y.organizationPrefix]:{value:i}}}),er(e,...t)}},inputLabelProps:{isNotifyRequired:!0},label:"Prefix",onChange:e=>{let{target:{value:n}}=e;X({inputs:{[y.organizationPrefix]:{value:n}}}),M(),C(ee())},onHelp:()=>{Z(es("Alphanumberic short-form of the organization name. It's used as the prefix for host names."))}}),ref:E}),(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-host-number",inputProps:{inputProps:{maxLength:2,sx:{minWidth:"2em"}},onBlur:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];let[r]=n,{target:{value:i}}=r;W({inputs:{[y.hostNumber]:{value:i}}}),er(...n),null==d||d.call(null,...n)}},inputLabelProps:{isNotifyRequired:!0},label:"Striker #",onChange:e=>{let{target:{value:n}}=e;X({inputs:{[y.hostNumber]:{value:n}}}),$()},onHelp:()=>{Z(es("Number or count of this striker; this should be '1' for the first striker, '2' for the second striker, and such."))}}),ref:T,valueType:"number"})]})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-domain-name",inputProps:{onBlur:function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];let{target:{value:i}}=e;W({inputs:{[y.domainName]:{value:i}}}),er(e,...t)}},inputLabelProps:{isNotifyRequired:!0},label:"Domain name",onChange:e=>{let{target:{value:n}}=e;X({inputs:{[y.domainName]:{value:n}}}),q()},onHelp:()=>{Z(es("Domain name for this striker. It's also the default domain used when creating new install manifests."))}}),ref:D}),(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-host-name",inputProps:{endAdornment:(0,r.jsx)(SuggestButton,{show:S,onClick:el}),onBlur:e=>{let{target:{value:n}}=e;W({inputs:{[y.hostName]:{value:n}}})}},inputLabelProps:{isNotifyRequired:!0},label:"Host name",onChange:e=>{let{target:{value:n}}=e;X({inputs:{[y.hostName]:{value:n}}}),Q(),A(en())},onHelp:()=>{Z(es("Host name for this striker. It's usually a good idea to use the auto-generated value."))}}),ref:B})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,sm:2,md:1,children:(0,r.jsxs)(s.ZP,{columns:{xs:1,sm:2,md:1},container:!0,spacing:"1em",sx:{"& > * > *":{width:"100%"}},children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-admin-password",inputProps:{inputProps:{type:f.Z.password},onBlur:e=>{let{target:{value:n}}=e;W({inputs:{[y.adminPassword]:{value:n}}})},onPasswordVisibilityAppend:e=>{let n=e===f.Z.password;X({isExcludeConfirmAdminPassword:!n}),z(n),J()}},inputLabelProps:{isNotifyRequired:!0},label:"Admin password",onChange:e=>{let{target:{value:n}}=e;X({inputs:{[y.adminPassword]:{value:n}}}),U()},onHelp:()=>{Z(es("Password use to login to this Striker and connect to its database. Don't provide an used password here because it'll be stored as plaintext."))}}),ref:H})}),V&&(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-confirm-admin-password",inputProps:{inputProps:{type:f.Z.password},onBlur:e=>{let{target:{value:n}}=e;W({inputs:{[y.confirmAdminPassword]:{value:n}}})}},inputLabelProps:{isNotifyRequired:V},label:"Confirm password",onChange:e=>{let{target:{value:n}}=e;X({inputs:{[y.confirmAdminPassword]:{value:n}}}),J()}}),ref:R})})]})})]}),(0,r.jsx)(b.Z,{count:1,defaultMessageType:"warning",ref:L}),(0,r.jsx)(j.Z,{children:(0,r.jsxs)(h.Z,{row:!0,sx:{"& > :last-child":{flexGrow:1}},children:[eo,(0,r.jsx)(w.Ac,{inverted:!0,children:F?"Uncheck to skip domain and host name pattern validation.":"Check to re-enable domain and host name pattern validation."})]})}),x&&(0,r.jsx)(j.Z,{onClose:()=>{Z(void 0)},children:x})]})});C.defaultProps={expectHostDetail:!1,hostDetail:void 0,onHostNumberBlurAppend:void 0,toggleSubmitDisabled:void 0},C.displayName="GeneralInitForm";var S=t(41247),A=t(83221),V=t(83909),z=t(66354),F=t(69836),O=t(7932),_=t(37260),H=t(10406),R=t(81796),components_StrikerInitForm=()=>{var e;let{isReady:n,query:{re:t}}=(0,o.useRouter)(),[i,v]=(0,a.useState)(),[f,g]=(0,a.useState)(),[p,b]=(0,a.useState)(!1),[P,Z]=(0,a.useState)(!0),[k,y]=(0,a.useState)(!1),[N,I]=(0,a.useState)(!1),[E,D]=(0,a.useState)(!1),[T,B]=(0,a.useState)(),[L,M]=(0,a.useState)(),$=(0,a.useRef)(!0),q=(0,a.useRef)({}),Q=(0,a.useRef)({}),U=(0,a.useRef)({}),J=(0,a.useRef)({}),G=(0,a.useMemo)(()=>!!t,[t]),W=(0,a.useMemo)(()=>E?(0,r.jsx)(R.Z,{}):(0,r.jsx)(h.Z,{row:!0,sx:{flexDirection:"row-reverse"},children:(0,r.jsx)(x.Z,{disabled:P,onClick:()=>{var e,n,t,r;g({...null!==(t=null===(e=q.current.get)||void 0===e?void 0:e.call(null))&&void 0!==t?t:{},...null!==(r=null===(n=Q.current.get)||void 0===n?void 0:n.call(null))&&void 0!==r?r:{networks:[]}}),b(!0)},children:"Initialize"})}),[P,E]),X=(0,a.useMemo)(()=>{let e="Loading...";if(n){var t;e=G?"Reconfigure ".concat(null!==(t=null==L?void 0:L.shortHostName)&&void 0!==t?t:"striker"):"Initialize striker"}return e},[null==L?void 0:L.shortHostName,n,G]),Y=(0,a.useCallback)(function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];Z(!n.every(e=>e))},[]);return(0,a.useEffect)(()=>{n&&G&&$.current&&($.current=!1,d.Z.get("/host/local").then(e=>{let{data:n}=e;M(n)}).catch(e=>{let n=(0,S.Z)(e);n.children=(0,r.jsxs)(r.Fragment,{children:["Failed to get host detail data. ",n.children]}),v(n)}))},[n,G,M]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(_.s_,{children:[(0,r.jsxs)(_.V9,{children:[(0,r.jsx)(w.z,{children:X}),(0,r.jsx)(A.Z,{onClick:e=>{var n,t;let{currentTarget:r}=e;null===(n=J.current.setAnchor)||void 0===n||n.call(null,r),null===(t=J.current.setOpen)||void 0===t||t.call(null,!0)},variant:"normal",children:(0,r.jsx)(V.Z,{icon:l.Z,ref:U})})]}),(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(C,{expectHostDetail:G,hostDetail:L,onHostNumberBlurAppend:e=>{let{target:{value:n}}=e;B(n)},ref:q,toggleSubmitDisabled:e=>{e!==k&&(y(e),Y(e,N))}}),(0,r.jsx)(O.Z,{expectHostDetail:G,hostDetail:L,hostSequence:T,ref:Q,toggleSubmitDisabled:e=>{e!==N&&(I(e),Y(k,e))}}),i&&(0,r.jsx)(j.Z,{...i,onClose:()=>v(void 0)}),W]})]}),(0,r.jsx)(m.Z,{actionProceedText:"Initialize",content:(0,r.jsxs)(s.ZP,{container:!0,spacing:".6em",columns:{xs:2},children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Organization name"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.organizationName})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Organization prefix"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.organizationPrefix})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Striker number"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.hostNumber})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Domain name"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.domainName})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Host name"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.hostName})}),(0,r.jsx)(s.ZP,{item:!0,sx:{marginTop:"1.4em"},xs:2,children:(0,r.jsx)(w.Ac,{children:"Networks"})}),null==f?void 0:f.networks.map(e=>{let{inputUUID:n,interfaces:t,ipAddress:i,name:l,subnetMask:o,type:a,typeCount:u}=e;return(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsxs)(s.ZP,{container:!0,spacing:".6em",columns:{xs:2},children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(w.Ac,{children:[l," (",(0,r.jsx)(w.Q0,{children:"".concat(a.toUpperCase()).concat(u)}),")"]})}),t.map((e,t)=>{let i="network-confirm-".concat(n,"-interface").concat(t),l="none";if(e){let{networkInterfaceName:n,networkInterfaceUUID:t}=e;i="".concat(i,"-").concat(t),l=n}return(0,r.jsxs)(s.ZP,{container:!0,item:!0,children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Link ".concat(t+1)})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:l})})]},i)}),(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(w.$_,{children:"".concat(i,"/").concat(o)})})]})},"network-confirm-".concat(n))}),(0,r.jsx)(s.ZP,{item:!0,sx:{marginBottom:"1.4em"},xs:2}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Gateway"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.gateway})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Gateway network"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:null===(e=f.gatewayInterface)||void 0===e?void 0:e.toUpperCase()})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Domain name server(s)"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.dns})})]}),dialogProps:{open:p},onCancelAppend:()=>{b(!1)},onProceedAppend:()=>{v(void 0),D(!0),b(!1),d.Z.put("/init",f).then(()=>{(0,H.Z)(0),D(!1),v({children:G?(0,r.jsx)(r.Fragment,{children:"Successfully initiated reconfiguration."}):(0,r.jsxs)(r.Fragment,{children:["Successfully registered the configuration job! You can check the progress at the top right icon. Once the job completes, you can access the"," ",(0,r.jsx)(F.Z,{href:"/login",sx:{color:c.E5,display:"inline-flex"},children:"login page"}),"."]}),type:"info"})}).catch(e=>{let n=(0,S.Z)(e);v(n),D(!1)})},titleText:"Confirm striker initialization"}),(0,r.jsx)(z.Z,{getJobUrl:e=>"".concat(u.Z,"/init/job?start=").concat(e),onFetchSuccessAppend:e=>{var n;null===(n=U.current.indicate)||void 0===n||n.call(null,Object.keys(e).length>0)},ref:J})]})},init=()=>(0,r.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(components_StrikerInitForm,{})})}},function(e){e.O(0,[494,804,50,263,213,310,203,197,775,675,633,556,270,774,888,179],function(){return e(e.s=45844)}),_N_E=e.O()}]);