@openshift-assisted/ui-lib 2.7.11-cim → 2.7.13-cim
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cim/index.js +8 -8
- package/dist/cim/index.js.map +2 -2
- package/dist/index.js +15 -15
- package/dist/index.js.map +2 -2
- package/dist/ocm/index.js +1 -1
- package/dist/src/cim/components/ClusterDeployment/constants.d.ts +1 -1
- package/dist/src/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.d.ts +0 -1
- package/dist/src/cim/components/helpers/clusterDeployment.d.ts +1 -1
- package/package.json +1 -1
package/dist/ocm/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var Pk=Object.create;var Pa=Object.defineProperty;var wk=Object.getOwnPropertyDe
|
|
|
4
4
|
`,o+=`Response: ${JSON.stringify(qk(e.response.data,["code","message","reason"]),null,1)}
|
|
5
5
|
`):e.request&&(o+=`Status Code: ${JSON.stringify(e.request.__sentry_xhr__.status_code,null,1)}`),Lo(e,o)}else Lo(e);if(t)return t(e)},D=e=>vs(e)?e.response?.data?.message||e.response?.data.reason||e.message:Ge(e),xu=e=>{if(!Va(e))return bu;let t=e.response?.status||0;return t>=400&&t<500?t:e.code===en?en:bu};var Ry={};lr(Ry,{store:()=>Sr,storeDay2:()=>EO});import{configureStore as jy}from"@reduxjs/toolkit";import{createSlice as sO,createAsyncThunk as iO}from"@reduxjs/toolkit";import Yk from"react";window.Fragment=Yk.Fragment;import{createElement as Or,forwardRef as dT}from"react";import{useField as nT}from"formik";import{FormGroup as aT,HelperTextItem as lT,Split as pT,SplitItem as Zf,TextInput as uT}from"@patternfly/react-core";import{Address4 as jk}from"ip-address";import Rk from"lodash/set";import Kk from"lodash/groupBy";import Xk from"lodash/pickBy";var T=(e,t,o)=>(o=o?`${o}-`:"",`form-${t}-${e.replace(/\./g,"-")}-${o}field`),Ss=e=>e.split(`
|
|
6
6
|
`).map(t=>t.trim()).filter(Boolean).join(`
|
|
7
|
-
`),Mo=e=>e.split(",").map(t=>t.trim()).filter(Boolean).join(","),ro=(e,t)=>Object.keys(e).filter(o=>t[o]),Xf=e=>e.find(t=>t.default)?.value||e[0]?.value||"",Ej=e=>e.reduce((o,r)=>{let s=r.split("=");return o[s[0]]=s[1],o},{}),Jk=e=>e.reduce((t,{path:o,message:r})=>({...t,[o]:(t[o]||[]).concat(r)}),{}),ku=e=>{let t=Xk(Kk(e),o=>o.length>1);return Object.keys(t)},ni=e=>async t=>{try{await e.validate(t,{abortEarly:!1})}catch(o){let{inner:r}=o;if(!r||r.length===0)return{};let s=[],i=[];r.forEach(l=>{/\.|\[/.test(l.path)?i.push(l):s.push(l)});let n=Jk(s);if(i.length===0)return n;let a={};return i.forEach(l=>{Rk(a,l.path,[l.message])}),{...n,...a}}},tn=(e,t)=>`${e}[${t}]`,Aj=(e,t)=>`${e}.${t}`,Jf=e=>!!e?.every(t=>t.cidr&&jk.isValid(t.cidr)),Fj=(e={})=>{let t=[];for(let o in e)t.push(`${o}=${e[o]}`);return t};import Zk from"react";import{css as Qk}from"@patternfly/react-styles";var eT=({fieldId:e,children:t,isError:o=!1})=>Zk.createElement("div",{className:Qk("pf-c-form__helper-text",{"pf-m-error":o}),id:`${e}-helper`,"aria-live":"polite"},t),j=eT;import{useEffect as iT,useState as sT}from"react";import{useField as tT}from"formik";var oT=e=>Array.isArray(e)?e.join(". "):e,rT=({name:e,inputError:t,validate:o})=>{let[r,{error:s}]=tT({name:e,validate:o}),[i,n]=sT(!1);iT(()=>{r.value&&n(r.value)},[r.value,n]);let a=r.value||!r.value&&i;return oT((a?s:"")||t)},pr=rT;var cT=dT(({label:e,labelIcon:t,helperText:o,isRequired:r,onChange:s,validate:i,idPostfix:n,children:a,noDefaultOnChange:l,inputError:p,description:u,labelInfo:c,showErrorMessage:d=!0,...m},g)=>{let[h]=nT({name:m.name,validate:i}),C=T(m.name,"input",n),I=pr({name:m.name,inputError:p,validate:i}),S=!I;return Or(aT,{fieldId:C,label:e,helperText:typeof o=="string"?o:Or(j,{fieldId:C},o),helperTextInvalid:d?I:void 0,validated:S?"default":"error",isRequired:r,labelIcon:t,labelInfo:c},u&&Or(j,{fieldId:C},Or(lT,{variant:"indeterminate"},u)),Or(pT,null,Or(Zf,{isFilled:!0},Or(uT,{...h,...m,ref:g,id:C,validated:S?"default":"error",isRequired:r,"aria-describedby":`${C}-helper`,onChange:(y,v)=>{m.isDisabled||(!l&&h.onChange(v),s&&s(v))}})),Or(Zf,null,a)))}),St=cT;import{createElement as Tu}from"react";import{useField as mT}from"formik";import{Checkbox as fT,FormGroup as gT}from"@patternfly/react-core";var hT=({label:e,helperText:t,onChange:o,validate:r,idPostfix:s,...i})=>{let[n,{touched:a,error:l}]=mT({name:i.name,validate:r}),p=T(i.name,"checkbox",s),u=!(a&&l);return Tu(gT,{fieldId:p,helperTextInvalid:u?"":l,validated:u?"default":"error"},Tu(fT,{...n,...i,id:p,label:e,"aria-describedby":`${p}-helper`,description:typeof t=="string"?t:Tu(j,{fieldId:p},t),isValid:u,isChecked:n.value,onChange:(d,m)=>{n.onChange(m),o&&o(d,m)}}))},Lr=hT;import{createElement as Na}from"react";import{useField as CT}from"formik";import{FormGroup as yT,TextArea as vT}from"@patternfly/react-core";var ST=({label:e,helperText:t,getErrorText:o,isRequired:r,children:s,idPostfix:i,labelIcon:n,groupClassName:a,...l})=>{let[p,{touched:u,error:c}]=CT(l.name),d=T(l.name,"input",i),m=!(u&&c),h=(()=>!m&&c?o?o(c):c:"")(),{isDisabled:C,...I}=l;return Na(yT,{fieldId:d,label:e,helperText:typeof t=="string"?t:Na(j,{fieldId:d},t),helperTextInvalid:typeof h=="string"?h:Na(j,{fieldId:d,isError:!0},h),validated:m?"default":"error",isRequired:r,labelIcon:n,className:a},s,Na(vT,{...p,...I,id:d,style:{resize:"vertical"},validated:m?"default":"error",isRequired:r,"aria-describedby":`${d}-helper`,onChange:(S,y)=>p.onChange(y),disabled:C}))},ur=ST;import{createElement as Ha}from"react";import{useField as IT}from"formik";import{FormGroup as bT,FormSelect as xT,FormSelectOption as kT}from"@patternfly/react-core";var TT=({label:e,options:t,helperText:o,isRequired:r,onChange:s,getHelperText:i,idPostfix:n,labelIcon:a,callFormikOnChange:l=!0,...p})=>{let[u,{touched:c,error:d}]=IT(p.name),m=T(p.name,"input",n),g=!(c&&d),h=g?"":d,C=i?i(u.value):o;return Ha(bT,{fieldId:m,label:e,helperText:typeof C=="string"?C:Ha(j,{fieldId:m},C),helperTextInvalid:h,validated:g?"default":"error",isRequired:r,labelIcon:a},Ha(xT,{...u,...p,id:m,validated:g?"default":"error",isRequired:r,"aria-describedby":`${m}-helper`,onChange:(I,S)=>{l&&u.onChange(S),s&&s(S)}},t.map((I,S)=>Ha(kT,{key:I.id||S,...I}))))},on=TT;import ai from"react";import{useField as wT}from"formik";import DT from"fuse.js";import{FormGroup as ET,Select as AT,SelectOption as FT,SelectVariant as VT}from"@patternfly/react-core";import{useTranslation as PT}from"react-i18next";function f(){return PT(process.env.TRANSLATION_NAMESPACE)}var NT=({label:e,options:t,helperText:o,placeholderText:r,isRequired:s,onChange:i,getHelperText:n,idPostfix:a,labelIcon:l,...p})=>{let[u,c]=ai.useState(!1),[d,{touched:m,error:g},{setValue:h}]=wT(p.name),C=T(p.name,"multiinput",a),I=!(m&&g),S=I?"":g,y=n?n(d.value):o,v=Y=>c(Y),w=()=>{h([]),i&&i([]),c(!1)},E=(Y,je)=>{let tt=d.value,vt=je.value||je,b;tt.includes(vt)?b=tt.filter(P=>P!==vt):b=[...d.value,vt],h(b),i&&i(b)},F=d.value.map(Y=>{let je=t.find(tt=>tt.value===Y);return je?{value:je.value,toString:()=>je.displayName,compareTo:tt=>tt.value===Y}:Y}),q=t.filter(Y=>!(d.value||[]).includes(Y.value)).map(Y=>ai.createElement(FT,{key:Y.id,id:Y.id,value:Y.value},Y.displayName)),Z=new DT(t,{ignoreLocation:!0,keys:["displayName"]}),{t:ae}=f();return ai.createElement(ET,{fieldId:C,label:e,helperText:typeof y=="string"?y:ai.createElement(j,{fieldId:C},y),helperTextInvalid:S,validated:I?"default":"error",isRequired:s,labelIcon:l},ai.createElement(AT,{...d,...p,id:C,variant:VT.typeaheadMulti,typeAheadAriaLabel:ae("ai:Select a state"),validated:I?"default":"error","aria-describedby":`${C}-helper`,isCreatable:!1,placeholderText:r,isOpen:u,onToggle:v,onSelect:E,onClear:w,selections:F,onFilter:(Y,je)=>{if(!je||je==="")return q;let tt=Z.search(je).map(vt=>vt.item.id);return ai.Children.toArray(q).filter(({props:vt})=>tt.includes(vt.id))}},q))},HT=NT;import{createElement as Oa}from"react";import{FormGroup as OT,Button as Qf}from"@patternfly/react-core";var LT=({isSet:e,isEdit:t,helperTextHidden:o,onToggle:r,idPostfix:s,...i})=>{let{label:n,name:a}=i,l=T(a,"input",s);return t?Oa(ur,{...i},e&&Oa(Qf,{onClick:()=>r(!0),variant:"link"},"Keep existing value")):Oa(OT,{fieldId:l,label:n,helperText:o,isRequired:i.isRequired},Oa(Qf,{onClick:()=>r(!1),variant:"link"},"Change"))},MT=LT;import{createElement as La,useState as eg}from"react";import{useField as _T}from"formik";import{FormGroup as WT,FileUpload as zT}from"@patternfly/react-core";var BT=({label:e,labelIcon:t,helperText:o,getErrorText:r,isRequired:s,children:i,idPostfix:n,isDisabled:a,name:l,onBlur:p,allowEdittingUploadedText:u=!0,dropzoneProps:c,transformValue:d})=>{let{t:m}=f(),[g,h]=eg(),[C,I]=eg(!1),[S,{touched:y,error:v},w]=_T(l),E=T(l,"input",n),F=!((y||g)&&v),Z=(()=>!F&&v?r?r(v):v:"")();return La(WT,{fieldId:E,label:e,helperText:typeof o=="string"?o:La(j,{fieldId:E},o),helperTextInvalid:typeof Z=="string"?Z:La(j,{fieldId:E,isError:!0},Z),validated:F?"default":"error",isRequired:s,labelIcon:t},i,La(zT,{filenamePlaceholder:m("ai:Drag a file here or browse to upload"),browseButtonText:m("ai:Browse..."),clearButtonText:m("ai:Clear"),id:S.name,style:{resize:"vertical"},validated:F?"default":"error",isRequired:s,"aria-describedby":`${E}-helper`,type:"text",value:S.value,filename:g,onChange:(ae,Y)=>{h(Y),w.setTouched(!0),d&&typeof ae=="string"?w.setValue(d(ae)):w.setValue(ae)},onBlur:ae=>{S.onBlur(ae),p&&p(ae)},onReadStarted:()=>I(!0),onReadFinished:()=>I(!1),isLoading:C,disabled:a,dropzoneProps:{...c,onDropRejected:c?.onDropRejected&&c?.onDropRejected(w)},allowEditingUploadedText:u}))},Pu=BT;import{createElement as rn}from"react";import{useField as UT}from"formik";import{FormGroup as GT,Switch as tg,Tooltip as $T}from"@patternfly/react-core";var qT=({label:e,helperText:t,isRequired:o,onChange:r,onChangeCustomOverride:s,getHelperText:i,idPostfix:n,labelIcon:a,tooltipProps:l,switchOuiaId:p,...u})=>{let[c,{touched:d,error:m}]=UT(u.name),g=T(u.name,"input",n),h=!(d&&m),C=h?"":m,I=i?i(c.value):t,S={...c,id:g,label:e,isDisabled:u.isDisabled,isChecked:Boolean(c.value),hasCheckIcon:Boolean(c.value),ouiaId:p,onChange:(y,v)=>{s?s(y,v):(c.onChange(v),r&&r(y,v))}};return rn(GT,{fieldId:g,helperText:typeof I=="string"?I:rn(j,{fieldId:g},I),helperTextInvalid:C,validated:h?"default":"error",isRequired:o,labelIcon:a},l?rn($T,{...l},rn(tg,{...S})):rn(tg,{...S}))},li=qT;import cr from"react";import{shallowEqual as og}from"react-redux";import rg from"lodash/debounce";import{useFormikContext as sg}from"formik";var ho=(e=1e3)=>{let[t,o]=cr.useState([]),{values:r,isSubmitting:s,submitForm:i}=sg(),n=cr.useRef(r),a=cr.useRef(rg(async l=>{await i(),o(p=>p.filter(u=>u>l))},e));return cr.useEffect(()=>{if(!og(n.current,r)&&!s){let l=Date.now();o(p=>(p.push(l),p)),a.current(l)}s||(n.current=r)},[r,s,o]),cr.useEffect(()=>{let l=a.current;return()=>l.cancel()},[]),!!t.length},YT=({debounce:e=1e3})=>{let{values:t,dirty:o,isSubmitting:r,submitForm:s}=sg(),i=cr.useRef(t),n=cr.useRef(rg(s,e));return cr.useEffect(()=>{!og(i.current,t)&&o&&!r&&n.current(),r||(i.current=t)},[t,o,r]),cr.useEffect(()=>{let a=n.current;return()=>a.cancel()},[]),null},wu=YT;import Ne from"react";import{ExternalLinkAltIcon as pg}from"@patternfly/react-icons";var lg={};lr(lg,{AI_UI_TAG:()=>ci,APPROVE_NODES_IN_CL_LINK:()=>_u,CLUSTER_DEFAULT_NETWORK_SETTINGS_IPV4:()=>JT,CLUSTER_DEFAULT_NETWORK_SETTINGS_IPV6:()=>ZT,CLUSTER_MANAGER_SITE_LINK:()=>_a,CNV_LINK:()=>Ou,DUAL_STACK:()=>wt,ENCRYPTING_DISK_DURING_INSTALLATION:()=>Wa,EVENTS_POLLING_INTERVAL:()=>Wu,EVENT_SEVERITIES:()=>$u,FEEDBACK_FORM_LINK:()=>RT,IPV4_STACK:()=>yo,MS_PER_DAY:()=>qu,NETWORK_TYPE_OVN:()=>Ts,NETWORK_TYPE_SDN:()=>Co,NMSTATE_EXAMPLES_LINK:()=>Mu,NO_SUBNET_SET:()=>qt,NUTANIX_CONFIG_LINK:()=>Ru,OCP_RELEASES_PAGE:()=>ju,OCP_STATIC_IP_DOC:()=>Yu,ODF_LINK:()=>Lu,ODF_REQUIREMENTS_LINK:()=>Au,OPENSHIFT_LIFE_CYCLE_DATES_LINK:()=>Ma,OPENSHIFT_NETWORKING_DOCS_LINK:()=>Du,OPERATOR_NAME_CNV:()=>Mr,OPERATOR_NAME_CONSOLE:()=>ag,OPERATOR_NAME_CVO:()=>ng,OPERATOR_NAME_LSO:()=>Ba,OPERATOR_NAME_LVM:()=>Wo,OPERATOR_NAME_ODF:()=>_o,POLLING_INTERVAL:()=>bs,PREFIX_MAX_RESTRICTION:()=>za,PULL_SECRET_INFO_LINK:()=>Eu,REDHAT_CONSOLE_OPENSHIFT:()=>Nu,SSH_GENERATION_DOC_LINK:()=>Hu,TECH_SUPPORT_LEVEL_LINK:()=>sn,TIME_ZERO:()=>ui,VSPHERE_CONFIG_LINK:()=>Is,clusterFieldLabels:()=>zu,clusterStatusLabels:()=>dr,clusterValidationGroupLabels:()=>XT,clusterValidationLabels:()=>Uu,diskRoleLabels:()=>nn,getAssistedUiLibVersion:()=>Gu,getOcpConsoleNodesPage:()=>Vu,getProductBrandingCode:()=>KT,getReportIssueLink:()=>Fu,hostRoles:()=>xs,hostValidationFailureHints:()=>pi,hostValidationGroupLabels:()=>Bu,hostValidationLabels:()=>ks,operatorLabels:()=>an});var ig="2.7.11-cim";var Ma="https://access.redhat.com/support/policy/updates/openshift#dates",Du="https://docs.openshift.com/container-platform/4.7/installing/installing_bare_metal/installing-bare-metal.html#installation-network-user-infra_installing-bare-metal",_a="https://console.redhat.com/openshift/install/pull-secret",Eu=_a,Au="https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.9/html/planning_your_deployment/infrastructure-requirements_rhodf#resource-requirements_rhodf",Is="https://access.redhat.com/solutions/6677901",Fu=()=>"https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332330&issuetype=1&components=12370775",RT="https://docs.google.com/forms/d/e/1FAIpQLSfg9M8wRW4m_HkWeAl6KpB5dTcMu8iI3iJ29GlLfZpF2hnjng/viewform",sn="https://access.redhat.com/support/offerings/techpreview",Wa="https://docs.openshift.com/container-platform/4.7/installing/install_config/installing-customizing.html#installation-special-config-encrypt-disk_installing-customizing",Vu=e=>`${e}/k8s/cluster/nodes`,Nu="https://console.redhat.com/openshift",Hu="https://www.redhat.com/sysadmin/configure-ssh-keygen",Ou="https://cloud.redhat.com/learn/topics/virtualization/",Lu="https://www.redhat.com/en/resources/openshift-data-foundation-datasheet",Mu="https://nmstate.io/examples.html",_u="https://docs.openshift.com/container-platform/4.11/installing/installing_platform_agnostic/installing-platform-agnostic.html#installation-approve-csrs_installing-platform-agnostic",KT=()=>"redhat",bs=10*1e3,Wu=10*1e3,xs=e=>[{value:"auto-assign",label:e("ai:Auto-assign"),description:e("ai:A role will be chosen automatically based on detected hardware and network latency.")},{value:"master",label:e("ai:Control plane node"),description:e("ai:Runs the control plane components of OpenShift, including the API server.")},{value:"worker",label:e("ai:Worker"),description:e("ai:Runs application workloads. Connect at least 5 hosts to enable dedicated workers.")}],dr=e=>({"pending-for-input":e("ai:Draft"),insufficient:e("ai:Draft"),ready:e("ai:Draft"),"preparing-for-installation":e("ai:Preparing for installation"),installing:e("ai:Installing"),"installing-pending-user-action":e("ai:Installing (pending action)"),finalizing:e("ai:Finalizing"),cancelled:e("ai:Installation cancelled"),error:e("ai:Error"),installed:e("ai:Installed"),"adding-hosts":e("ai:Adding hosts")}),zu=e=>({name:e("ai:Cluster name"),baseDnsDomain:e("ai:Base domain"),clusterNetworkCidr:e("ai:Cluster network CIDR"),clusterNetworkHostPrefix:e("ai:Cluster network host prefix"),serviceNetworkCidr:e("ai:Service network CIDR"),apiVip:e("ai:API IP"),ingressVip:e("ai:Ingress IP"),pullSecret:e("ai:Pull secret"),sshPublicKey:e("ai:SSH public key"),SNODisclaimer:e("ai:Single Node OpenShift disclaimer"),diskEncryptionTangServers:e("ai:Tang servers' URLs or thumbprints"),selectedHostIds:e("ai:Hosts selection"),httpProxy:e("ai:HTTP proxy"),httpsProxy:e("ai:HTTPS proxy"),noProxy:e("ai:No proxy"),machineNetworks:e("ai:Machine networks"),clusterNetworks:e("ai:Cluster networks"),serviceNetworks:e("ai:Service networks")}),Bu=e=>({hardware:e("ai:Hardware"),network:e("ai:Network"),operators:e("ai:Operators"),infrastructure:e("ai:Infrastructure")}),ks=e=>({"compatible-with-cluster-platform":e("ai:Compatible with cluster platform"),"has-default-route":e("ai:Default route to host"),"sufficient-network-latency-requirement-for-role":e("ai:Network latency"),"sufficient-packet-loss-requirement-for-role":e("ai:Packet loss"),"has-inventory":e("ai:Hardware information"),"has-min-cpu-cores":e("ai:Minimum CPU cores"),"has-min-memory":e("ai:Minimum Memory"),"has-min-valid-disks":e("ai:Minimum disks of required size"),"has-cpu-cores-for-role":e("ai:Minimum CPU cores for selected role"),"has-memory-for-role":e("ai:Minimum memory for selected role"),"hostname-unique":e("ai:Unique hostname"),"hostname-valid":e("ai:Valid hostname"),connected:e("ai:Connected"),"media-connected":e("ai:Media Connected"),"machine-cidr-defined":e("ai:Machine CIDR"),"belongs-to-machine-cidr":e("ai:Belongs to machine CIDR"),"ignition-downloadable":e("ai:Ignition file downloadable"),"belongs-to-majority-group":e("ai:Belongs to majority connected group"),"valid-platform-network-settings":e("ai:Platform network settings"),"ntp-synced":e("ai:NTP synchronization"),"container-images-available":e("ai:Container images availability"),"lso-requirements-satisfied":e("ai:LSO requirements"),"ocs-requirements-satisfied":e("ai:OCS requirements"),"odf-requirements-satisfied":e("ai:ODF requirements"),"lvm-requirements-satisfied":e("ai:LVM requirements"),"cnv-requirements-satisfied":e("ai:CNV requirements"),"disk-encryption-requirements-satisfied":e("ai:Disk encryption requirements"),"sufficient-installation-disk-speed":e("ai:Installation disk speed"),"api-domain-name-resolved-correctly":e("ai:API domain name resolution"),"api-int-domain-name-resolved-correctly":e("ai:API internal domain name resolution"),"apps-domain-name-resolved-correctly":e("ai:Application ingress domain name resolution"),"dns-wildcard-not-configured":e("ai:DNS wildcard not configured"),"non-overlapping-subnets":e("ai:Non overlapping subnets"),"vsphere-disk-uuid-enabled":e("ai:Vsphere disk uuid enabled"),"compatible-agent":e("ai:Agent compatibility"),"no-skip-installation-disk":e("ai:No skip installation disk"),"no-skip-missing-disk":e("ai:No skip missing disk"),"service-has-sufficient-spoke-kube-api-access":e("ai:Service has sufficient spoke kube api access")}),pi=e=>({"compatible-with-cluster-platform":"","has-default-route":"","sufficient-network-latency-requirement-for-role":"","sufficient-packet-loss-requirement-for-role":"","has-inventory":"","has-min-cpu-cores":"","has-min-memory":"","has-min-valid-disks":"","has-cpu-cores-for-role":"","has-memory-for-role":"","hostname-unique":"","hostname-valid":"",connected:"","media-connected":"","machine-cidr-defined":"","belongs-to-machine-cidr":"","ignition-downloadable":"","belongs-to-majority-group":"","valid-platform-network-settings":"","ntp-synced":e("ai:Please manually fix host's NTP configuration or provide additional NTP sources."),"container-images-available":"","lso-requirements-satisfied":"","ocs-requirements-satisfied":"","odf-requirements-satisfied":"","lvm-requirements-satisfied":"","cnv-requirements-satisfied":"","disk-encryption-requirements-satisfied":"","sufficient-installation-disk-speed":"","api-domain-name-resolved-correctly":"","api-int-domain-name-resolved-correctly":"","apps-domain-name-resolved-correctly":"","dns-wildcard-not-configured":"","non-overlapping-subnets":"","vsphere-disk-uuid-enabled":"","compatible-agent":"","no-skip-installation-disk":"","no-skip-missing-disk":"","service-has-sufficient-spoke-kube-api-access":""}),Uu=e=>({"network-type-valid":e("ai:Valid network type"),"machine-cidr-defined":e("ai:Machine CIDR"),"cluster-cidr-defined":e("ai:Cluster CIDR"),"service-cidr-defined":e("ai:Service CIDR"),"no-cidrs-overlapping":e("ai:No overlapping CIDR"),"networks-same-address-families":e("ai:Networks same address families"),"network-prefix-valid":e("ai:Valid network prefix"),"machine-cidr-equals-to-calculated-cidr":e("ai:Machine CIDR conforms expected"),"api-vip-defined":e("ai:API IP"),"api-vip-valid":e("ai:API IP validity"),"ingress-vip-defined":e("ai:Ingress IP"),"ingress-vip-valid":e("ai:Ingress IP validity"),"all-hosts-are-ready-to-install":e("ai:All hosts are ready to install"),"sufficient-masters-count":e("ai:Control plane nodes count"),"dns-domain-defined":e("ai:DNS domain"),"pull-secret-set":e("ai:Pull secret"),"ntp-server-configured":e("ai:NTP server"),"lso-requirements-satisfied":e("ai:LSO requirements"),"ocs-requirements-satisfied":e("ai:OCS requirements"),"odf-requirements-satisfied":e("ai:ODF requirements"),"lvm-requirements-satisfied":e("ai:LVM requirements"),"cnv-requirements-satisfied":e("ai:CNV requirements")}),XT=e=>({configuration:e("ai:General configuration"),hostsData:e("ai:Hosts"),"hosts-data":e("ai:Hosts"),network:e("ai:Networking"),operators:e("ai:Operators")}),JT={clusterNetworkCidr:"10.128.0.0/14",clusterNetworkHostPrefix:23,serviceNetworkCidr:"172.30.0.0/16"},ZT={clusterNetworkCidr:"2002:db8::/53",clusterNetworkHostPrefix:64,serviceNetworkCidr:"2003:db8::/112"},Gu=()=>ig,$u=["info","warning","error","critical"],ui="0001-01-01T00:00:00.000Z",qu=1e3*60*60*24,qt="NO_SUBNET_SET",Ts="OVNKubernetes",Co="OpenShiftSDN",yo="singleStack",wt="dualStack",za={IPv6:128,IPv4:25},nn=e=>({none:e("ai:None"),install:e("ai:Installation disk")}),Mr="cnv",Ba="lso",_o="odf",Wo="lvm",ng="cvo",ag="console",an=e=>({[ag]:e("ai:OpenShift Console"),[ng]:e("ai:OpenShift Cluster Version Operator"),[Ba]:e("ai:OpenShift Local Storage"),[_o]:e("ai:OpenShift Data Foundation"),[Wo]:e("ai:OpenShift Data Foundation Logical Volume Manager"),[Mr]:e("ai:OpenShift Virtualization")}),Yu="https://docs.openshift.com/container-platform/latest/scalability_and_performance/ztp-deploying-disconnected.html#ztp-configuring-a-static-ip_ztp-deploying-disconnected",ci="ui_ocm",ju="openshift/releases",Ru="https://access.redhat.com/solutions/6983944";import Ku from"react";import QT from"classnames";import{Button as eP,Popover as tP}from"@patternfly/react-core";import{OutlinedQuestionCircleIcon as oP}from"@patternfly/react-icons";var rP=({component:e,variant:t="plain",IconComponent:o=oP,noVerticalAlign:r=!1,buttonClassName:s,buttonOuiaId:i,...n})=>Ku.createElement(tP,{...n},Ku.createElement(eP,{component:e,variant:t,onClick:a=>a.preventDefault(),className:QT("pf-c-form__group-label-help","pf-u-p-0",s),ouiaId:i},Ku.createElement(o,{noVerticalAlign:r}))),W=rP;import{Trans as ug}from"react-i18next";var Xu=({isOcm:e})=>{let{t}=f();return Ne.createElement(W,{noVerticalAlign:!0,bodyContent:Ne.createElement(Ne.Fragment,null,Ne.createElement(ug,{t},"ai:Pull secrets are used to download OpenShift Container Platform components and connect clusters to a Red Hat account."," "),e?Ne.createElement(dg,null):Ne.createElement(Ne.Fragment,null,Ne.createElement(ug,{t},"ai:Pull secrets can be found in")," ",Ne.createElement(cg,null)))})},cg=()=>{let{t:e}=f();return Ne.createElement("a",{href:_a,target:"_blank",rel:"noopener noreferrer"},e("ai:OpenShift Cluster Manager")," ",Ne.createElement(pg,null))},dg=()=>{let{t:e}=f();return Ne.createElement("a",{href:Eu,target:"_blank",rel:"noopener noreferrer"},e("ai:Learn more about pull secrets and view examples")," ",Ne.createElement(pg,null),".")},mg=({isOcm:e})=>{let{t}=f();return e?Ne.createElement(dg,null):Ne.createElement(Ne.Fragment,null,t("ai:A Red Hat account's pull secret can be found in "),"\xA0",Ne.createElement(cg,null))},sP=({isOcm:e})=>{let{t}=f();return Ne.createElement(ur,{name:"pullSecret",label:t("ai:Pull secret"),labelIcon:e?void 0:Ne.createElement(Xu,{isOcm:e}),getErrorText:o=>Ne.createElement(Ne.Fragment,null,o," ",Ne.createElement(mg,{isOcm:e})),helperText:Ne.createElement(mg,{isOcm:e}),rows:10,isRequired:!0})},Ua=sP;import iP from"react";import{useField as nP}from"formik";import{Radio as aP}from"@patternfly/react-core";var lP=({callFormikOnChange:e=!0,name:t,value:o,onChange:r,...s})=>{let[i]=nP({name:t,value:o,type:"radio"}),n=T(t,"radio",i.value);return iP.createElement(aP,{...i,...s,id:n,isChecked:!!i.checked,onChange:(a,l)=>{r?.(a,l),e&&i.onChange(l)}})},Re=lP;import{Fragment as DP,createElement as di,useCallback as PP,useEffect as wP,useRef as TP}from"react";import{useField as vP,useFormikContext as SP}from"formik";import{Checkbox as IP,FormGroup as bP,Tooltip as xP}from"@patternfly/react-core";var fg={};lr(fg,{ACM_ENABLED_FEATURES:()=>pP,FeatureGateContext:()=>Zu,FeatureGateContextProvider:()=>Ps,SINGLE_CLUSTER_ENABLED_FEATURES:()=>uP,STANDALONE_DEPLOYMENT_ENABLED_FEATURES:()=>cP,useFeature:()=>_r});import Ju from"react";var pP={ASSISTED_INSTALLER_SNO_FEATURE:!0,ASSISTED_INSTALLER_OCS_FEATURE:!1,ASSISTED_INSTALLER_ODF_FEATURE:!1,ASSISTED_INSTALLER_CNV_FEATURE:!1,ASSISTED_INSTALLER_NETWORK_TYPE_SELECTION_FEATURE:!1,ASSISTED_INSTALLER_PLATFORM_INTEGRATION_FEATURE:!1},uP={ASSISTED_INSTALLER_SNO_FEATURE:!1,ASSISTED_INSTALLER_OCS_FEATURE:!1,ASSISTED_INSTALLER_ODF_FEATURE:!1,ASSISTED_INSTALLER_CNV_FEATURE:!1,ASSISTED_INSTALLER_NETWORK_TYPE_SELECTION_FEATURE:!1,ASSISTED_INSTALLER_PLATFORM_INTEGRATION_FEATURE:!1},cP={ASSISTED_INSTALLER_SNO_FEATURE:!0,ASSISTED_INSTALLER_OCS_FEATURE:!0,ASSISTED_INSTALLER_ODF_FEATURE:!0,ASSISTED_INSTALLER_CNV_FEATURE:!0,ASSISTED_INSTALLER_NETWORK_TYPE_SELECTION_FEATURE:!0,ASSISTED_INSTALLER_PLATFORM_INTEGRATION_FEATURE:!0},Zu=Ju.createContext({isFeatureEnabled:()=>!1}),Ps=({features:e,children:t})=>{let o={ASSISTED_INSTALLER_OCS_FEATURE:!1,ASSISTED_INSTALLER_ODF_FEATURE:!1,ASSISTED_INSTALLER_CNV_FEATURE:!1,...e},r=s=>!!o[s];return Ju.createElement(Zu.Provider,{value:{isFeatureEnabled:r}},t)},_r=e=>{let{isFeatureEnabled:t}=Ju.useContext(Zu);return t(e)};import oc from"react";import vo from"react";import{Label as gP,Popover as hP}from"@patternfly/react-core";import{InfoCircleIcon as CP}from"@patternfly/react-icons";import gg from"react";import{Text as dP}from"@patternfly/react-core";import{ExternalLinkAltIcon as mP}from"@patternfly/react-icons";var fP=({href:e,children:t,onClick:o})=>gg.createElement(dP,{component:"a",href:e,onClick:o,target:"_blank",rel:"noopener noreferrer"},t||e," ",gg.createElement(mP,{color:"rgb(0, 123, 186)"})),ot=fP;var ln;(function(r){r[r.default=0]="default",r[r.inline=1]="inline",r[r.inlineRight=2]="inlineRight"})(ln||(ln={}));var hg=({position:e=1,className:t="pf-u-ml-md",text:o,popoverText:r,externalLink:s,testId:i})=>{let n=t,{t:a}=f();switch(e){case 2:n+=" pf-u-float-right";break;case 1:n+=" pf-u-display-inline";break}let l=vo.createElement(vo.Fragment,null,vo.createElement("div",{style:{marginBottom:"var(--pf-global--spacer--sm)"}},r),s&&vo.createElement(vo.Fragment,null,vo.createElement(ot,{href:s},a("ai:Learn more"))));return vo.createElement(hP,{bodyContent:l,position:"top"},vo.createElement(gP,{style:{cursor:"pointer"},color:"orange",onClick:p=>p.preventDefault(),icon:vo.createElement(CP,{color:"var(--pf-c-label__content--Color)"}),className:n,"data-testid":`${i}`},o))},Qu=e=>{let{t}=f();return vo.createElement(hg,{text:t("ai:Developer Preview"),popoverText:t("ai:Developer preview features are not intended to be used in production environments. The clusters deployed with the developer preview features are considered to be development clusters and are not supported through the Red Hat Customer Portal case management system."),...e})};Qu.displayName="DeveloperPreview";var ec=e=>{let{t}=f();return vo.createElement(hg,{text:t("ai:Technology Preview"),popoverText:t("ai:Technology preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process."),externalLink:sn,...e})};ec.displayName="TechnologyPreview";import tc from"react";var Cg=tc.createContext(null),yg=({value:e,children:t})=>tc.createElement(Cg.Provider,{value:e},t),be=()=>{let e=tc.useContext(Cg),{t}=f();if(!e)throw new Error(t("ai:useFeatureSupportLevel must be used within FeatureSupportLevelContextProvider."));return e};var yP=({featureId:e,openshiftVersion:t})=>{let o=be(),r=oc.useMemo(()=>{if(!!t)return o.getFeatureSupportLevel(t,e)},[t,e,o]);if(!Fa(r))return null;let s=`${e}-support-level`;return r==="tech-preview"?oc.createElement(ec,{testId:s}):oc.createElement(Qu,{testId:s})},so=yP;var kP=({versions:e,validate:t,idPostfix:o,...r})=>{let{values:{openshiftVersion:s}}=SP(),i=_r("ASSISTED_INSTALLER_SNO_FEATURE"),[n,a,l]=vP({name:r.name,validate:t}),p=be(),u=TP(s),c=T(r.name,"input",o),{t:d}=f(),{value:m}=a,{setValue:g}=l,h=!!e.find(S=>p.isFeatureSupported(S.value,"SNO")),C=PP(S=>g(S?"None":"Full"),[g]),I=p.getFeatureDisabledReason(s,"SNO",d);return wP(()=>{u.current!==s&&!p.isFeatureSupported(s,"SNO")&&C(!1),u.current=s},[s,C,p]),i&&h?di(bP,{isInline:!0,fieldId:c},di(xP,{hidden:!I,content:I},di(IP,{...n,...r,id:c,label:di(DP,null,d("ai:Install single node OpenShift (SNO)"),"\xA0",di(so,{featureId:"SNO",openshiftVersion:s})),"aria-describedby":`${c}-helper`,description:di(j,{fieldId:c},d("ai:SNO enables you to install OpenShift using only one host.")),isChecked:m==="None",onChange:C,className:"with-tooltip"}))):null},rc=kP;import{createElement as mi,forwardRef as OP}from"react";import{useField as EP}from"formik";import{FormGroup as AP,NumberInput as FP,Split as VP,SplitItem as vg}from"@patternfly/react-core";var NP=OP(({label:e,labelIcon:t,helperText:o,isRequired:r,validate:s,idPostfix:i,minValue:n=0,maxValue:a,children:l,formatValue:p,onChange:u,...c},d)=>{let[m,{touched:g,error:h},{setValue:C}]=EP({name:c.name,validate:s}),I=T(c.name,"numberinput",i),S=!(g&&h),y=S?"":h,v=q=>{let Z=q<n?n:q;Z=a&&Z>a?a:Z,Z=p?p(Z):Z,C(Z),u?.(Z)},w=()=>{v(m.value+1)},E=()=>{v(m.value-1)},F=q=>{let Z=q.target.value;v(isNaN(Z)?0:Number(Z))};return mi(AP,{fieldId:I,label:e,helperText:typeof o=="string"?o:mi(j,{fieldId:I},o),helperTextInvalid:y,validated:S?"default":"error",isRequired:r,labelIcon:t},mi(VP,null,mi(vg,{isFilled:!0},mi(FP,{...c,value:m.value,onMinus:E,onChange:F,onPlus:w,min:n,max:a,ref:d,id:I,"aria-describedby":`${I}-helper`})),mi(vg,null,l)))}),HP=NP;import{Fragment as UP,createElement as fi,useEffect as BP,useState as Sg}from"react";import{useField as LP}from"formik";import{FormGroup as MP,HelperTextItem as _P}from"@patternfly/react-core";import{CodeEditor as WP}from"@patternfly/react-code-editor";var zP=({label:e,labelIcon:t,helperText:o,isRequired:r,validate:s,idPostfix:i,language:n,name:a,description:l,isDisabled:p})=>{let[u,,{setValue:c,setTouched:d}]=LP({name:a,validate:s}),m=T(a,"input",i),[g,h]=Sg(),[C,I]=Sg(),S=pr({name:a,validate:s});return BP(()=>{if(!!C)return g&&g.dispose(),h(C.onDidChangeModelContent(()=>{d(!0),c(C.getModel()?.getValue(),!0)})),()=>{g&&g.dispose()}},[C]),fi(UP,null,fi(MP,{fieldId:m,label:e,helperText:typeof o=="string"?o:fi(j,{fieldId:m},o),helperTextInvalid:S,validated:!S?"default":"error",isRequired:r,labelIcon:t},l&&fi(j,{fieldId:m},fi(_P,{variant:"indeterminate"},l)),fi(WP,{code:u.value,isUploadEnabled:!p,isDownloadEnabled:!0,isCopyEnabled:!0,isLanguageLabelVisible:!0,height:"400px",language:n,onEditorDidMount:v=>I(v)})))},sc=zP;import{createElement as Dt,forwardRef as uw,useState as cw}from"react";import{useField as GP}from"formik";import $P from"classnames";import{FormGroup as qP,HelperTextItem as YP,TextInput as jP,HelperText as RP,Popover as KP,PopoverPosition as XP,InputGroup as JP,Button as ZP}from"@patternfly/react-core";import{CheckCircleIcon as QP,CheckIcon as ew,ExclamationCircleIcon as tw,InfoCircleIcon as ow,TimesIcon as rw}from"@patternfly/react-icons";import{global_palette_green_500 as sw}from"@patternfly/react-tokens/dist/js/global_palette_green_500";import{global_danger_color_100 as iw}from"@patternfly/react-tokens/dist/js/global_danger_color_100";import{global_palette_blue_300 as nw}from"@patternfly/react-tokens/dist/js/global_palette_blue_300";var aw=(e,t,o)=>{if(t){if(o?.includes(e))return{variant:"error",icon:Dt(rw,null)}}else return{variant:"indeterminate"};return{variant:"success",icon:Dt(ew,null)}},lw=({value:e,error:t,richValidationMessages:o})=>Dt(RP,{component:"ul",className:"rich-input__rules"},Object.keys(o).map(r=>{let s=aw(o[r],e,t);return Dt(YP,{key:r,isDynamic:!0,component:"li",...s},o[r])})),pw=uw(({label:e,labelIcon:t,helperText:o,isRequired:r,onChange:s,validate:i,idPostfix:n,noDefaultOnChange:a,richValidationMessages:l,...p},u)=>{let[c,d]=cw(!1),[m,{error:g,value:h,touched:C},{setTouched:I}]=GP({name:p.name,validate:i}),S=T(p.name,"input",n),y=!C||!g?.length;return Dt(qP,{fieldId:S,label:e,helperText:typeof o=="string"?o:Dt(j,{fieldId:S},o),validated:y?"default":"error",isRequired:r,labelIcon:t},Dt(JP,{className:$P("rich-input__group",{"rich_input__group--invalid":!y})},Dt(jP,{...m,...p,ref:u,id:S,isRequired:r,"aria-describedby":`${S}-helper`,onChange:(v,w)=>{!c&&d(!0),!a&&m.onChange(w),I(!0,!1),s&&s(w)},className:"rich-input__text",onBlur:()=>d(!1)}),Dt(KP,{isVisible:c,shouldClose:()=>d(!1),shouldOpen:()=>d(!0),"aria-label":"validation popover",position:XP.top,bodyContent:Dt(lw,{value:h,error:g,richValidationMessages:l})},Dt(ZP,{variant:"plain","aria-label":"Validation"},y?h?Dt(QP,{color:sw.value}):Dt(ow,{color:nw.value}):Dt(tw,{color:iw.value})))))}),ws=pw;import{useField as dw}from"formik";import{createElement as fw}from"react";var mw=({name:e,label:t,isRequired:o,isDisabled:r,helperText:s})=>{let[i,,{setValue:n,setTouched:a}]=dw(e);return fw(ur,{name:e,label:t,helperText:s,onBlur:()=>{i.value&&(n(Mo(i.value)),a(!0))},spellCheck:!1,isRequired:o,isDisabled:r})},ic=mw;import nc from"react";import{Button as gw,ButtonVariant as hw,Tooltip as Cw}from"@patternfly/react-core";import{MinusCircleIcon as yw}from"@patternfly/react-icons";import vw from"classnames";var Sw=1500,Iw=({onRemove:e,hideRemoveButton:t=!0,children:o,className:r,removeButtonDataTestId:s,...i})=>nc.createElement(Cw,{hidden:t,exitDelay:Sw,flipBehavior:["right","bottom"],position:"right-start",distance:0,content:nc.createElement(gw,{variant:hw.plain,onClick:e,"data-testid":s},nc.createElement(yw,{size:"sm"})),className:vw("ai-remove-button__tooltip ",r),...i},o),pn=Iw;import{Button as bw,ButtonVariant as xw}from"@patternfly/react-core";import{PlusCircleIcon as kw}from"@patternfly/react-icons";import Ig from"react";var Tw=({onAdd:e,variant:t=xw.link,children:o,...r})=>Ig.createElement(bw,{icon:Ig.createElement(kw,null),onClick:e,variant:t,...r},o),ac=Tw;import{useField as Pw}from"formik";import{Fragment as xg,createElement as mr,useEffect as Nw,useRef as Vw,useState as Hw}from"react";import{PencilAltIcon as ww}from"@patternfly/react-icons";import{Split as Dw,SplitItem as bg}from"@patternfly/react-core";var Ew=({name:e,isRequired:t,onBlur:o,showErrorMessage:r})=>{let s=Vw();return Nw(()=>s?.current?.focus(),[]),mr(St,{name:e,isRequired:t,onBlur:o,ref:s,showErrorMessage:r})},Aw=({name:e,isRequired:t,showErrorMessage:o})=>{let[r,s]=Hw(!1),[i]=Pw({name:e}),n=pr({name:e});return mr(xg,null,r?mr(Ew,{name:e,isRequired:t,onBlur:()=>s(!1),showErrorMessage:o}):mr(xg,null,mr(Dw,null,mr(bg,{className:"ai-pencil-field__text"},i.value),mr(bg,null,mr(ww,{onClick:()=>s(!0)})))),mr("div",{className:"pf-c-form__helper-text pf-m-error"},n))},Fw=Aw;import{overlap as zw}from"cidr-tools";import{Address4 as gc,Address6 as hc}from"ip-address";import Qa from"is-cidr";import{isInSubnet as Bw}from"is-in-subnet";import{array as hn,lazy as lD,mixed as aD,number as il,object as Ic,string as Pe}from"yup";import{Address4 as Ka,Address6 as Xa}from"ip-address";import Ow from"lodash/camelCase";var O=e=>{let t;if(e)try{let o=e.replace(/"([\w-]+)":/g,(r,s)=>`"${Ow(s)}":`);t=JSON.parse(o)}catch(o){console.error("Failed to parse api string",o,e)}else console.info("Empty api string received.");return t},kg=(e="")=>e.replace(/^(http|https):\/\//,"");import un from"lodash/fp/head";var Ds=({machineNetworks:e,machineNetworkCidr:t})=>un(e)?.cidr??t;var gi=e=>e||[],Wr=e=>gi(e?.monitoredOperators).filter(t=>t.operatorType==="olm"),Ga=(e,t)=>gi(e).some(o=>o.name&&o.name===t),Tg=e=>!e.hosts||e.hosts.length<=3,le=({highAvailabilityMode:e})=>e==="None",Pg=({validationsInfo:e})=>O(e),lc=({machineNetworks:e,serviceNetworks:t,clusterNetworks:o},r)=>{switch(r){case"machineNetworks":return un(e)?.cidr;case"clusterNetworks":return un(o)?.cidr;case"serviceNetworks":return un(t)?.cidr}},pc=({machineNetworks:e,serviceNetworks:t,clusterNetworks:o},r)=>{switch(r){case"machineNetworks":return e&&e[1].cidr;case"clusterNetworks":return o&&o[1].cidr;case"serviceNetworks":return t&&t[1].cidr}},wg=({clusterNetworks:e})=>un(e)?.hostPrefix,Dg=({clusterNetworks:e})=>e&&e[1].hostPrefix,zo=({cpuArchitecture:e})=>e===L.ARM,Lw=e=>e.hosts?e.hosts.length<5:!0,cn=e=>e.schedulableMastersForcedTrue===void 0?Lw(e):e.schedulableMastersForcedTrue,io=e=>cn(e)?!0:e.schedulableMasters||!1,So=({platform:e})=>qf.includes(e?.type??"none"),$a=e=>e.canSelectCpuArch!==!1;import Mw from"filesize.js";import S8 from"fuse.js";var de="-",Eg="ODD";var Ag=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["disabled","disabled-unbound"].includes(t),Fg=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["discovering","discovering-unbound","disconnected","disconnected-unbound","known","known-unbound","insufficient","insufficient-unbound","pending-for-input"].includes(t),Vg=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["discovering","discovering-unbound","known","known-unbound","disconnected","disconnected-unbound","disabled","disabled-unbound","insufficient","insufficient-unbound","resetting","resetting-pending-user-input","resetting-pending-user-action","installing-pending-user-action","pending-for-input","added-to-existing-cluster","error"].includes(t),Ng=(e,t)=>["adding-hosts"].includes(e)&&["error","installing-pending-user-action"].includes(t),qa=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["discovering","discovering-unbound","known","known-unbound","disconnected","disconnected-unbound","disabled","disabled-unbound","insufficient","insufficient-unbound","pending-for-input"].includes(t),Hg=(e,t,o)=>qa(e,t)&&!o,Og=e=>["insufficient","adding-hosts","ready","pending-for-input"].includes(e),Lg=qa,dn=e=>["installing","finalizing","error","cancelled","installed","adding-hosts"].includes(e),Ya=(e,t)=>e.kind==="AddHostsCluster"&&e.status==="adding-hosts"&&t==="known",mn=e=>e.progressStages||[],uc=e=>e.progress?.currentStage?e.progress:{currentStage:"Starting installation",progressInfo:void 0,installationPercentage:void 0},ja=e=>{let t=mn(e),o=uc(e);return Math.round((o?.installationPercentage||0)/100*t.length)},Mg=e=>["discovering","discovering-unbound","known","known-unbound","disconnected","disconnected-unbound","insufficient","insufficient-unbound","pending-for-input"].includes(e),cc=(e,t,o)=>{let r=`${xs(t).find(s=>s.value===e.role)?.label||xs(t)[0].label}`;return o&&e.role==="master"&&(r=t("ai:Control plane node, Worker")),`${r}${e.bootstrap?" (bootstrap)":""}`},dc=e=>!!e.logsCollectedAt&&e.logsCollectedAt!==ui,Es=e=>e.controllerLogsCollectedAt!==ui||!!(e.hosts||[]).find(t=>dc(t)),Ra=e=>e.readyHostCount||0,fn=e=>e.enabledHostCount||0,gn=e=>e.totalHostCount||0,zr=(e=[])=>e.filter(t=>t.status!=="disabled"),Bo=(e,t)=>e.requestedHostname||t.hostname||"",_g=(e,t)=>{let o=de,{systemVendor:r}=e;return r!==void 0&&(r.virtual?o=t("ai:Virtual machine"):o=t("ai:Bare metal")),o},Io=(...e)=>Mw.call(null,...e).toUpperCase().replace(/I/,"i"),He=e=>{let{inventory:t=""}=e;return O(t)||{}};var _w=e=>Object.keys(e).reduce((t,o)=>{let r=e[o].filter(s=>s.status==="failure");return[...t,...r]},[]),Wg=e=>{let t=_w(e).map(o=>o.id);if(!t.length)return!1;for(let o of t)if(!["ntp-synced","container-images-available"].includes(o))return!1;return!0};var fr=e=>Ka.isValid(e)?new Ka(e):Xa.isValid(e)?new Xa(e):null,mc=e=>{if(e){let t=e.startAddress().correctForm(),o=e.endAddress().correctForm();return`(${t} - ${o})`}return""},Ww=e=>e?`${e.address} ${mc(e)}`:"",zg=e=>{let t=e.hosts?.reduce((o,r)=>{let s=O(r.inventory)||{};return o={...o,[r.id]:Bo(r,s)},o},{})||{};return e.hostNetworks?.map(o=>({subnet:o.cidr||"",hostIDs:o.hostIds?.map(r=>t[r]||r)||[],humanized:Ww(fr(o.cidr))}))||[]};var Bg=(e,t)=>{let o=t.map(r=>r.cidr);return e.length===t.length&&e.every(r=>o.includes(r.cidr))},Ug=(e,t)=>e.length===t.length&&e.every(o=>t.find(r=>r.cidr===o.cidr&&r.hostPrefix===o.hostPrefix));var Gg=(e,t=!1)=>!(e||t),$g=(e,t=!1)=>e||t?Ts:Co,qg=e=>e.some(t=>Ka.isValid(t.subnet))&&e.some(t=>Xa.isValid(t.subnet)),fc=e=>e&&e.length>1&&Ka.isValid(e[0].cidr||"")&&Xa.isValid(e[1].cidr||""),hi=({machineNetworks:e,clusterNetworks:t,serviceNetworks:o})=>fc(e)&&fc(t)&&fc(o);var Yg=e=>({usePlatformIntegration:So(e),schedulableMasters:io(e)}),jg=()=>({nodeLabeling:""});var Yt=e=>({INVALID_LENGTH_OCM:e("ai:1-54 characters"),INVALID_LENGTH_ACM:e("ai:2-54 characters"),INVALID_VALUE_OCM:Ja(e).INVALID_VALUE,INVALID_VALUE_ACM:e("ai:Use lowercase alphanumeric characters or hyphen (-)"),INVALID_START_END:e("ai:Start and end with a lowercase letter or a number."),NOT_UNIQUE:e("ai:Must be unique")}),Rg=e=>({INVALID_LENGTH:Yt(e).INVALID_LENGTH_OCM,INVALID_VALUE:Yt(e).INVALID_VALUE_OCM,INVALID_START_END:Yt(e).INVALID_START_END}),Kg=e=>({INVALID_LENGTH:Yt(e).INVALID_LENGTH_OCM,INVALID_VALUE:Yt(e).INVALID_VALUE_OCM,INVALID_START_END:Yt(e).INVALID_START_END,NOT_UNIQUE:Yt(e).NOT_UNIQUE}),z8=e=>({INVALID_LENGTH:Yt(e).INVALID_LENGTH_ACM,INVALID_VALUE:Yt(e).INVALID_VALUE_ACM,INVALID_START_END:Yt(e).INVALID_START_END,NOT_UNIQUE:Yt(e).NOT_UNIQUE}),Ja=e=>({INVALID_LENGTH:e("ai:1-253 characters"),NOT_UNIQUE:e("ai:Must be unique"),INVALID_VALUE:e("ai:Use lowercase alphanumeric characters, dot (.) or hyphen (-)"),INVALID_START_END:e("ai:Must start and end with an lowercase alphanumeric character"),INVALID_FORMAT:e("ai:Number of characters between dots (.) must be 1-63")}),Br=e=>({...Ja(e),LOCALHOST_ERR:e('ai:Do not use forbidden words, for example: "localhost".')}),Xg=e=>({INVALID_LENGTH:e("ai:1-63 characters"),INVALID_VALUE:e("ai:Use alphanumeric characters, dot (.), underscore (_) or hyphen (-)"),INVALID_START_END:e("ai:Must start and end with an alphanumeric character")}),Jg=e=>({INVALID_VALUE:e("ai:The Value is not valid BMC address, supported protocols are redfish-virtualmedia or idrac-virtualmedia.")}),Za=["localhost","localhost.localdomain","localhost4","localhost4.localdomain4","localhost6","localhost6.localdomain6"];var Zg=/^[a-zA-Z0-9]+$/,Qg=/^[a-z0-9](.*[a-z0-9])?$/,Uw=/^[a-z0-9-.]*$/,Gw=/^[a-z0-9](.*[a-z0-9])?$/,$w=/^[.-a-z0-9]?(([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)*)[.-a-z0-9]?$/,qw=/^[a-z0-9-]*$/,Yw=/^(ssh-rsa|ssh-ed25519|ecdsa-[-a-z0-9]*) AAAA[0-9A-Za-z+/]+[=]{0,3}( .+)?$/,eh=/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/,jw=/^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[._]?$/,Rw="0.0.0.0",Kw="0000:0000:0000:0000:0000:0000:0000:0000",Xw=/^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$/,Jw=/^[^.]{1,63}(?:[.][^.]{1,63})*$/,Zw=/^((redfish-virtualmedia|idrac-virtualmedia)(\+https?)?:(\/\/([a-z0-9\-._~%!$&'()*+,;=]+@)?([a-z0-9\-._~%]+|\[[a-f0-9:.]+\]|\[v[a-f0-9][a-z0-9\-._~%!$&'()*+,;=:]+\])(:[0-9]+)?(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)*\/?|(\/?[a-z0-9\-._~%!$&'()*+,;=:@]+(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)*\/?)?)|([a-z0-9\-._~%!$&'()*+,;=@]+(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)*\/?|(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)+\/?))(\?[a-z0-9\-._~%!$&'()*+,;=:@/?]*)?(#[a-z0-9\-._~%!$&'()*+,;=:@/?]*)?$/i,Qw=/^[a-zA-Z0-9-._]*$/,th=(e,t,o="",r,s=!1)=>{let i=Yt(e);return Pe().required("Required").matches(s?$w:qw,{message:s?i.INVALID_VALUE_OCM:i.INVALID_VALUE_ACM,excludeEmptyString:!0}).matches(Gw,{message:i.INVALID_START_END,excludeEmptyString:!0}).min(s?1:2,s?i.INVALID_LENGTH_OCM:i.INVALID_LENGTH_ACM).max(54,s?i.INVALID_LENGTH_OCM:i.INVALID_LENGTH_ACM).when("useRedHatDnsService",{is:!0,then:Pe().test("is-name-unique",i.NOT_UNIQUE,n=>{let a=`${n}.${o}`;return!n||!t.includes(a)}),otherwise:Pe().test("is-name-unique",i.NOT_UNIQUE,n=>r?!n||!t.includes(n):!0)})},el=Pe().test("ssh-public-key",'SSH public key must consist of "[TYPE] key [[EMAIL]]", supported types are: ssh-rsa, ssh-ed25519, ecdsa-[VARIANT]. A single key can be provided only.',e=>e?!!Ss(e).match(Yw):!0),oh=Pe().test("is-well-formed-json","Invalid pull secret format. You must use your Red Hat account's pull secret.",e=>{let t=!0;if(!e)return t;try{let o=JSON.parse(e);return o.constructor.name==="Object"&&!!o?.auths&&o.auths.constructor.name==="Object"}catch{return!t}}),rh=Pe().test("ip-validation","Not a valid IP address",e=>gc.isValid(e)||hc.isValid(e)),tl=Pe().matches(Xw,{message:'Value "${value}" is not valid MAC address.',excludeEmptyString:!0}),eD=(e,{machineNetworks:t,hostSubnet:o})=>Pe().test("vip-validation","IP Address is outside of selected subnet",function(r){if(!r)return!0;try{rh.validateSync(r)}catch(i){return this.createError({message:Ge(i)})}let s=[];if(t){let i=t?.map(n=>n.cidr);s.push(...e.filter(n=>i?.includes(n.subnet)))}else{let i=e.find(n=>n.subnet===o);i&&s.push(i)}for(let i of s)if(i?.subnet)if(i.hostIDs.length){if(Bw(r,i.subnet))return!0}else return!0;return!1}),tD=({ingressVip:e,apiVip:t})=>Pe().test("vip-uniqueness-validation","The Ingress and API IP addresses cannot be the same.",o=>o?e!==t:!0),oD=(e,t)=>Pe().test("required-once-set",t||"The value is required.",o=>o||!e),rD=Pe().when(["managedNetworkingType"],{is:"clusterManaged",then:Pe().notOneOf([qt],"Host subnet must be selected.")}),Cc=(e,t,o)=>aD().when(["vipDhcpAllocation","managedNetworkingType"],{is:(r,s)=>!r&&s!=="userManaged",then:oD(o,"Required. Please provide an IP address").concat(eD(e,t)).concat(tD(t)).when("hostSubnet",{is:r=>r!==qt,then:Pe().required("Required. Please provide an IP address")})}),sh=e=>Pe().required("A value is required.").test("valid-ip-address","Invalid IP address block. Expected value is a network expressed in CIDR notation (IP/netmask). For example: 123.123.123.0/24, 2055:d7a::/116",(t="")=>Qa.v4(t)||Qa.v6(t)).test("valid-netmask",`IPv4 netmask must be between 1-25 and include at least 128 addresses.
|
|
7
|
+
`),Mo=e=>e.split(",").map(t=>t.trim()).filter(Boolean).join(","),ro=(e,t)=>Object.keys(e).filter(o=>t[o]),Xf=e=>e.find(t=>t.default)?.value||e[0]?.value||"",Ej=e=>e.reduce((o,r)=>{let s=r.split("=");return o[s[0]]=s[1],o},{}),Jk=e=>e.reduce((t,{path:o,message:r})=>({...t,[o]:(t[o]||[]).concat(r)}),{}),ku=e=>{let t=Xk(Kk(e),o=>o.length>1);return Object.keys(t)},ni=e=>async t=>{try{await e.validate(t,{abortEarly:!1})}catch(o){let{inner:r}=o;if(!r||r.length===0)return{};let s=[],i=[];r.forEach(l=>{/\.|\[/.test(l.path)?i.push(l):s.push(l)});let n=Jk(s);if(i.length===0)return n;let a={};return i.forEach(l=>{Rk(a,l.path,[l.message])}),{...n,...a}}},tn=(e,t)=>`${e}[${t}]`,Aj=(e,t)=>`${e}.${t}`,Jf=e=>!!e?.every(t=>t.cidr&&jk.isValid(t.cidr)),Fj=(e={})=>{let t=[];for(let o in e)t.push(`${o}=${e[o]}`);return t};import Zk from"react";import{css as Qk}from"@patternfly/react-styles";var eT=({fieldId:e,children:t,isError:o=!1})=>Zk.createElement("div",{className:Qk("pf-c-form__helper-text",{"pf-m-error":o}),id:`${e}-helper`,"aria-live":"polite"},t),j=eT;import{useEffect as iT,useState as sT}from"react";import{useField as tT}from"formik";var oT=e=>Array.isArray(e)?e.join(". "):e,rT=({name:e,inputError:t,validate:o})=>{let[r,{error:s}]=tT({name:e,validate:o}),[i,n]=sT(!1);iT(()=>{r.value&&n(r.value)},[r.value,n]);let a=r.value||!r.value&&i;return oT((a?s:"")||t)},pr=rT;var cT=dT(({label:e,labelIcon:t,helperText:o,isRequired:r,onChange:s,validate:i,idPostfix:n,children:a,noDefaultOnChange:l,inputError:p,description:u,labelInfo:c,showErrorMessage:d=!0,...m},g)=>{let[h]=nT({name:m.name,validate:i}),C=T(m.name,"input",n),I=pr({name:m.name,inputError:p,validate:i}),S=!I;return Or(aT,{fieldId:C,label:e,helperText:typeof o=="string"?o:Or(j,{fieldId:C},o),helperTextInvalid:d?I:void 0,validated:S?"default":"error",isRequired:r,labelIcon:t,labelInfo:c},u&&Or(j,{fieldId:C},Or(lT,{variant:"indeterminate"},u)),Or(pT,null,Or(Zf,{isFilled:!0},Or(uT,{...h,...m,ref:g,id:C,validated:S?"default":"error",isRequired:r,"aria-describedby":`${C}-helper`,onChange:(y,v)=>{m.isDisabled||(!l&&h.onChange(v),s&&s(v))}})),Or(Zf,null,a)))}),St=cT;import{createElement as Tu}from"react";import{useField as mT}from"formik";import{Checkbox as fT,FormGroup as gT}from"@patternfly/react-core";var hT=({label:e,helperText:t,onChange:o,validate:r,idPostfix:s,...i})=>{let[n,{touched:a,error:l}]=mT({name:i.name,validate:r}),p=T(i.name,"checkbox",s),u=!(a&&l);return Tu(gT,{fieldId:p,helperTextInvalid:u?"":l,validated:u?"default":"error"},Tu(fT,{...n,...i,id:p,label:e,"aria-describedby":`${p}-helper`,description:typeof t=="string"?t:Tu(j,{fieldId:p},t),isValid:u,isChecked:n.value,onChange:(d,m)=>{n.onChange(m),o&&o(d,m)}}))},Lr=hT;import{createElement as Na}from"react";import{useField as CT}from"formik";import{FormGroup as yT,TextArea as vT}from"@patternfly/react-core";var ST=({label:e,helperText:t,getErrorText:o,isRequired:r,children:s,idPostfix:i,labelIcon:n,groupClassName:a,...l})=>{let[p,{touched:u,error:c}]=CT(l.name),d=T(l.name,"input",i),m=!(u&&c),h=(()=>!m&&c?o?o(c):c:"")(),{isDisabled:C,...I}=l;return Na(yT,{fieldId:d,label:e,helperText:typeof t=="string"?t:Na(j,{fieldId:d},t),helperTextInvalid:typeof h=="string"?h:Na(j,{fieldId:d,isError:!0},h),validated:m?"default":"error",isRequired:r,labelIcon:n,className:a},s,Na(vT,{...p,...I,id:d,style:{resize:"vertical"},validated:m?"default":"error",isRequired:r,"aria-describedby":`${d}-helper`,onChange:(S,y)=>p.onChange(y),disabled:C}))},ur=ST;import{createElement as Ha}from"react";import{useField as IT}from"formik";import{FormGroup as bT,FormSelect as xT,FormSelectOption as kT}from"@patternfly/react-core";var TT=({label:e,options:t,helperText:o,isRequired:r,onChange:s,getHelperText:i,idPostfix:n,labelIcon:a,callFormikOnChange:l=!0,...p})=>{let[u,{touched:c,error:d}]=IT(p.name),m=T(p.name,"input",n),g=!(c&&d),h=g?"":d,C=i?i(u.value):o;return Ha(bT,{fieldId:m,label:e,helperText:typeof C=="string"?C:Ha(j,{fieldId:m},C),helperTextInvalid:h,validated:g?"default":"error",isRequired:r,labelIcon:a},Ha(xT,{...u,...p,id:m,validated:g?"default":"error",isRequired:r,"aria-describedby":`${m}-helper`,onChange:(I,S)=>{l&&u.onChange(S),s&&s(S)}},t.map((I,S)=>Ha(kT,{key:I.id||S,...I}))))},on=TT;import ai from"react";import{useField as wT}from"formik";import DT from"fuse.js";import{FormGroup as ET,Select as AT,SelectOption as FT,SelectVariant as VT}from"@patternfly/react-core";import{useTranslation as PT}from"react-i18next";function f(){return PT(process.env.TRANSLATION_NAMESPACE)}var NT=({label:e,options:t,helperText:o,placeholderText:r,isRequired:s,onChange:i,getHelperText:n,idPostfix:a,labelIcon:l,...p})=>{let[u,c]=ai.useState(!1),[d,{touched:m,error:g},{setValue:h}]=wT(p.name),C=T(p.name,"multiinput",a),I=!(m&&g),S=I?"":g,y=n?n(d.value):o,v=Y=>c(Y),w=()=>{h([]),i&&i([]),c(!1)},E=(Y,je)=>{let tt=d.value,vt=je.value||je,b;tt.includes(vt)?b=tt.filter(P=>P!==vt):b=[...d.value,vt],h(b),i&&i(b)},F=d.value.map(Y=>{let je=t.find(tt=>tt.value===Y);return je?{value:je.value,toString:()=>je.displayName,compareTo:tt=>tt.value===Y}:Y}),q=t.filter(Y=>!(d.value||[]).includes(Y.value)).map(Y=>ai.createElement(FT,{key:Y.id,id:Y.id,value:Y.value},Y.displayName)),Z=new DT(t,{ignoreLocation:!0,keys:["displayName"]}),{t:ae}=f();return ai.createElement(ET,{fieldId:C,label:e,helperText:typeof y=="string"?y:ai.createElement(j,{fieldId:C},y),helperTextInvalid:S,validated:I?"default":"error",isRequired:s,labelIcon:l},ai.createElement(AT,{...d,...p,id:C,variant:VT.typeaheadMulti,typeAheadAriaLabel:ae("ai:Select a state"),validated:I?"default":"error","aria-describedby":`${C}-helper`,isCreatable:!1,placeholderText:r,isOpen:u,onToggle:v,onSelect:E,onClear:w,selections:F,onFilter:(Y,je)=>{if(!je||je==="")return q;let tt=Z.search(je).map(vt=>vt.item.id);return ai.Children.toArray(q).filter(({props:vt})=>tt.includes(vt.id))}},q))},HT=NT;import{createElement as Oa}from"react";import{FormGroup as OT,Button as Qf}from"@patternfly/react-core";var LT=({isSet:e,isEdit:t,helperTextHidden:o,onToggle:r,idPostfix:s,...i})=>{let{label:n,name:a}=i,l=T(a,"input",s);return t?Oa(ur,{...i},e&&Oa(Qf,{onClick:()=>r(!0),variant:"link"},"Keep existing value")):Oa(OT,{fieldId:l,label:n,helperText:o,isRequired:i.isRequired},Oa(Qf,{onClick:()=>r(!1),variant:"link"},"Change"))},MT=LT;import{createElement as La,useState as eg}from"react";import{useField as _T}from"formik";import{FormGroup as WT,FileUpload as zT}from"@patternfly/react-core";var BT=({label:e,labelIcon:t,helperText:o,getErrorText:r,isRequired:s,children:i,idPostfix:n,isDisabled:a,name:l,onBlur:p,allowEdittingUploadedText:u=!0,dropzoneProps:c,transformValue:d})=>{let{t:m}=f(),[g,h]=eg(),[C,I]=eg(!1),[S,{touched:y,error:v},w]=_T(l),E=T(l,"input",n),F=!((y||g)&&v),Z=(()=>!F&&v?r?r(v):v:"")();return La(WT,{fieldId:E,label:e,helperText:typeof o=="string"?o:La(j,{fieldId:E},o),helperTextInvalid:typeof Z=="string"?Z:La(j,{fieldId:E,isError:!0},Z),validated:F?"default":"error",isRequired:s,labelIcon:t},i,La(zT,{filenamePlaceholder:m("ai:Drag a file here or browse to upload"),browseButtonText:m("ai:Browse..."),clearButtonText:m("ai:Clear"),id:S.name,style:{resize:"vertical"},validated:F?"default":"error",isRequired:s,"aria-describedby":`${E}-helper`,type:"text",value:S.value,filename:g,onChange:(ae,Y)=>{h(Y),w.setTouched(!0),d&&typeof ae=="string"?w.setValue(d(ae)):w.setValue(ae)},onBlur:ae=>{S.onBlur(ae),p&&p(ae)},onReadStarted:()=>I(!0),onReadFinished:()=>I(!1),isLoading:C,disabled:a,dropzoneProps:{...c,onDropRejected:c?.onDropRejected&&c?.onDropRejected(w)},allowEditingUploadedText:u}))},Pu=BT;import{createElement as rn}from"react";import{useField as UT}from"formik";import{FormGroup as GT,Switch as tg,Tooltip as $T}from"@patternfly/react-core";var qT=({label:e,helperText:t,isRequired:o,onChange:r,onChangeCustomOverride:s,getHelperText:i,idPostfix:n,labelIcon:a,tooltipProps:l,switchOuiaId:p,...u})=>{let[c,{touched:d,error:m}]=UT(u.name),g=T(u.name,"input",n),h=!(d&&m),C=h?"":m,I=i?i(c.value):t,S={...c,id:g,label:e,isDisabled:u.isDisabled,isChecked:Boolean(c.value),hasCheckIcon:Boolean(c.value),ouiaId:p,onChange:(y,v)=>{s?s(y,v):(c.onChange(v),r&&r(y,v))}};return rn(GT,{fieldId:g,helperText:typeof I=="string"?I:rn(j,{fieldId:g},I),helperTextInvalid:C,validated:h?"default":"error",isRequired:o,labelIcon:a},l?rn($T,{...l},rn(tg,{...S})):rn(tg,{...S}))},li=qT;import cr from"react";import{shallowEqual as og}from"react-redux";import rg from"lodash/debounce";import{useFormikContext as sg}from"formik";var ho=(e=1e3)=>{let[t,o]=cr.useState([]),{values:r,isSubmitting:s,submitForm:i}=sg(),n=cr.useRef(r),a=cr.useRef(rg(async l=>{await i(),o(p=>p.filter(u=>u>l))},e));return cr.useEffect(()=>{if(!og(n.current,r)&&!s){let l=Date.now();o(p=>(p.push(l),p)),a.current(l)}s||(n.current=r)},[r,s,o]),cr.useEffect(()=>{let l=a.current;return()=>l.cancel()},[]),!!t.length},YT=({debounce:e=1e3})=>{let{values:t,dirty:o,isSubmitting:r,submitForm:s}=sg(),i=cr.useRef(t),n=cr.useRef(rg(s,e));return cr.useEffect(()=>{!og(i.current,t)&&o&&!r&&n.current(),r||(i.current=t)},[t,o,r]),cr.useEffect(()=>{let a=n.current;return()=>a.cancel()},[]),null},wu=YT;import Ne from"react";import{ExternalLinkAltIcon as pg}from"@patternfly/react-icons";var lg={};lr(lg,{AI_UI_TAG:()=>ci,APPROVE_NODES_IN_CL_LINK:()=>_u,CLUSTER_DEFAULT_NETWORK_SETTINGS_IPV4:()=>JT,CLUSTER_DEFAULT_NETWORK_SETTINGS_IPV6:()=>ZT,CLUSTER_MANAGER_SITE_LINK:()=>_a,CNV_LINK:()=>Ou,DUAL_STACK:()=>wt,ENCRYPTING_DISK_DURING_INSTALLATION:()=>Wa,EVENTS_POLLING_INTERVAL:()=>Wu,EVENT_SEVERITIES:()=>$u,FEEDBACK_FORM_LINK:()=>RT,IPV4_STACK:()=>yo,MS_PER_DAY:()=>qu,NETWORK_TYPE_OVN:()=>Ts,NETWORK_TYPE_SDN:()=>Co,NMSTATE_EXAMPLES_LINK:()=>Mu,NO_SUBNET_SET:()=>qt,NUTANIX_CONFIG_LINK:()=>Ru,OCP_RELEASES_PAGE:()=>ju,OCP_STATIC_IP_DOC:()=>Yu,ODF_LINK:()=>Lu,ODF_REQUIREMENTS_LINK:()=>Au,OPENSHIFT_LIFE_CYCLE_DATES_LINK:()=>Ma,OPENSHIFT_NETWORKING_DOCS_LINK:()=>Du,OPERATOR_NAME_CNV:()=>Mr,OPERATOR_NAME_CONSOLE:()=>ag,OPERATOR_NAME_CVO:()=>ng,OPERATOR_NAME_LSO:()=>Ba,OPERATOR_NAME_LVM:()=>Wo,OPERATOR_NAME_ODF:()=>_o,POLLING_INTERVAL:()=>bs,PREFIX_MAX_RESTRICTION:()=>za,PULL_SECRET_INFO_LINK:()=>Eu,REDHAT_CONSOLE_OPENSHIFT:()=>Nu,SSH_GENERATION_DOC_LINK:()=>Hu,TECH_SUPPORT_LEVEL_LINK:()=>sn,TIME_ZERO:()=>ui,VSPHERE_CONFIG_LINK:()=>Is,clusterFieldLabels:()=>zu,clusterStatusLabels:()=>dr,clusterValidationGroupLabels:()=>XT,clusterValidationLabels:()=>Uu,diskRoleLabels:()=>nn,getAssistedUiLibVersion:()=>Gu,getOcpConsoleNodesPage:()=>Vu,getProductBrandingCode:()=>KT,getReportIssueLink:()=>Fu,hostRoles:()=>xs,hostValidationFailureHints:()=>pi,hostValidationGroupLabels:()=>Bu,hostValidationLabels:()=>ks,operatorLabels:()=>an});var ig="2.7.13-cim";var Ma="https://access.redhat.com/support/policy/updates/openshift#dates",Du="https://docs.openshift.com/container-platform/4.7/installing/installing_bare_metal/installing-bare-metal.html#installation-network-user-infra_installing-bare-metal",_a="https://console.redhat.com/openshift/install/pull-secret",Eu=_a,Au="https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.9/html/planning_your_deployment/infrastructure-requirements_rhodf#resource-requirements_rhodf",Is="https://access.redhat.com/solutions/6677901",Fu=()=>"https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332330&issuetype=1&components=12370775",RT="https://docs.google.com/forms/d/e/1FAIpQLSfg9M8wRW4m_HkWeAl6KpB5dTcMu8iI3iJ29GlLfZpF2hnjng/viewform",sn="https://access.redhat.com/support/offerings/techpreview",Wa="https://docs.openshift.com/container-platform/4.7/installing/install_config/installing-customizing.html#installation-special-config-encrypt-disk_installing-customizing",Vu=e=>`${e}/k8s/cluster/nodes`,Nu="https://console.redhat.com/openshift",Hu="https://www.redhat.com/sysadmin/configure-ssh-keygen",Ou="https://cloud.redhat.com/learn/topics/virtualization/",Lu="https://www.redhat.com/en/resources/openshift-data-foundation-datasheet",Mu="https://nmstate.io/examples.html",_u="https://docs.openshift.com/container-platform/4.11/installing/installing_platform_agnostic/installing-platform-agnostic.html#installation-approve-csrs_installing-platform-agnostic",KT=()=>"redhat",bs=10*1e3,Wu=10*1e3,xs=e=>[{value:"auto-assign",label:e("ai:Auto-assign"),description:e("ai:A role will be chosen automatically based on detected hardware and network latency.")},{value:"master",label:e("ai:Control plane node"),description:e("ai:Runs the control plane components of OpenShift, including the API server.")},{value:"worker",label:e("ai:Worker"),description:e("ai:Runs application workloads. Connect at least 5 hosts to enable dedicated workers.")}],dr=e=>({"pending-for-input":e("ai:Draft"),insufficient:e("ai:Draft"),ready:e("ai:Draft"),"preparing-for-installation":e("ai:Preparing for installation"),installing:e("ai:Installing"),"installing-pending-user-action":e("ai:Installing (pending action)"),finalizing:e("ai:Finalizing"),cancelled:e("ai:Installation cancelled"),error:e("ai:Error"),installed:e("ai:Installed"),"adding-hosts":e("ai:Adding hosts")}),zu=e=>({name:e("ai:Cluster name"),baseDnsDomain:e("ai:Base domain"),clusterNetworkCidr:e("ai:Cluster network CIDR"),clusterNetworkHostPrefix:e("ai:Cluster network host prefix"),serviceNetworkCidr:e("ai:Service network CIDR"),apiVip:e("ai:API IP"),ingressVip:e("ai:Ingress IP"),pullSecret:e("ai:Pull secret"),sshPublicKey:e("ai:SSH public key"),SNODisclaimer:e("ai:Single Node OpenShift disclaimer"),diskEncryptionTangServers:e("ai:Tang servers' URLs or thumbprints"),selectedHostIds:e("ai:Hosts selection"),httpProxy:e("ai:HTTP proxy"),httpsProxy:e("ai:HTTPS proxy"),noProxy:e("ai:No proxy"),machineNetworks:e("ai:Machine networks"),clusterNetworks:e("ai:Cluster networks"),serviceNetworks:e("ai:Service networks")}),Bu=e=>({hardware:e("ai:Hardware"),network:e("ai:Network"),operators:e("ai:Operators"),infrastructure:e("ai:Infrastructure")}),ks=e=>({"compatible-with-cluster-platform":e("ai:Compatible with cluster platform"),"has-default-route":e("ai:Default route to host"),"sufficient-network-latency-requirement-for-role":e("ai:Network latency"),"sufficient-packet-loss-requirement-for-role":e("ai:Packet loss"),"has-inventory":e("ai:Hardware information"),"has-min-cpu-cores":e("ai:Minimum CPU cores"),"has-min-memory":e("ai:Minimum Memory"),"has-min-valid-disks":e("ai:Minimum disks of required size"),"has-cpu-cores-for-role":e("ai:Minimum CPU cores for selected role"),"has-memory-for-role":e("ai:Minimum memory for selected role"),"hostname-unique":e("ai:Unique hostname"),"hostname-valid":e("ai:Valid hostname"),connected:e("ai:Connected"),"media-connected":e("ai:Media Connected"),"machine-cidr-defined":e("ai:Machine CIDR"),"belongs-to-machine-cidr":e("ai:Belongs to machine CIDR"),"ignition-downloadable":e("ai:Ignition file downloadable"),"belongs-to-majority-group":e("ai:Belongs to majority connected group"),"valid-platform-network-settings":e("ai:Platform network settings"),"ntp-synced":e("ai:NTP synchronization"),"container-images-available":e("ai:Container images availability"),"lso-requirements-satisfied":e("ai:LSO requirements"),"ocs-requirements-satisfied":e("ai:OCS requirements"),"odf-requirements-satisfied":e("ai:ODF requirements"),"lvm-requirements-satisfied":e("ai:LVM requirements"),"cnv-requirements-satisfied":e("ai:CNV requirements"),"disk-encryption-requirements-satisfied":e("ai:Disk encryption requirements"),"sufficient-installation-disk-speed":e("ai:Installation disk speed"),"api-domain-name-resolved-correctly":e("ai:API domain name resolution"),"api-int-domain-name-resolved-correctly":e("ai:API internal domain name resolution"),"apps-domain-name-resolved-correctly":e("ai:Application ingress domain name resolution"),"dns-wildcard-not-configured":e("ai:DNS wildcard not configured"),"non-overlapping-subnets":e("ai:Non overlapping subnets"),"vsphere-disk-uuid-enabled":e("ai:Vsphere disk uuid enabled"),"compatible-agent":e("ai:Agent compatibility"),"no-skip-installation-disk":e("ai:No skip installation disk"),"no-skip-missing-disk":e("ai:No skip missing disk"),"service-has-sufficient-spoke-kube-api-access":e("ai:Service has sufficient spoke kube api access")}),pi=e=>({"compatible-with-cluster-platform":"","has-default-route":"","sufficient-network-latency-requirement-for-role":"","sufficient-packet-loss-requirement-for-role":"","has-inventory":"","has-min-cpu-cores":"","has-min-memory":"","has-min-valid-disks":"","has-cpu-cores-for-role":"","has-memory-for-role":"","hostname-unique":"","hostname-valid":"",connected:"","media-connected":"","machine-cidr-defined":"","belongs-to-machine-cidr":"","ignition-downloadable":"","belongs-to-majority-group":"","valid-platform-network-settings":"","ntp-synced":e("ai:Please manually fix host's NTP configuration or provide additional NTP sources."),"container-images-available":"","lso-requirements-satisfied":"","ocs-requirements-satisfied":"","odf-requirements-satisfied":"","lvm-requirements-satisfied":"","cnv-requirements-satisfied":"","disk-encryption-requirements-satisfied":"","sufficient-installation-disk-speed":"","api-domain-name-resolved-correctly":"","api-int-domain-name-resolved-correctly":"","apps-domain-name-resolved-correctly":"","dns-wildcard-not-configured":"","non-overlapping-subnets":"","vsphere-disk-uuid-enabled":"","compatible-agent":"","no-skip-installation-disk":"","no-skip-missing-disk":"","service-has-sufficient-spoke-kube-api-access":""}),Uu=e=>({"network-type-valid":e("ai:Valid network type"),"machine-cidr-defined":e("ai:Machine CIDR"),"cluster-cidr-defined":e("ai:Cluster CIDR"),"service-cidr-defined":e("ai:Service CIDR"),"no-cidrs-overlapping":e("ai:No overlapping CIDR"),"networks-same-address-families":e("ai:Networks same address families"),"network-prefix-valid":e("ai:Valid network prefix"),"machine-cidr-equals-to-calculated-cidr":e("ai:Machine CIDR conforms expected"),"api-vip-defined":e("ai:API IP"),"api-vip-valid":e("ai:API IP validity"),"ingress-vip-defined":e("ai:Ingress IP"),"ingress-vip-valid":e("ai:Ingress IP validity"),"all-hosts-are-ready-to-install":e("ai:All hosts are ready to install"),"sufficient-masters-count":e("ai:Control plane nodes count"),"dns-domain-defined":e("ai:DNS domain"),"pull-secret-set":e("ai:Pull secret"),"ntp-server-configured":e("ai:NTP server"),"lso-requirements-satisfied":e("ai:LSO requirements"),"ocs-requirements-satisfied":e("ai:OCS requirements"),"odf-requirements-satisfied":e("ai:ODF requirements"),"lvm-requirements-satisfied":e("ai:LVM requirements"),"cnv-requirements-satisfied":e("ai:CNV requirements")}),XT=e=>({configuration:e("ai:General configuration"),hostsData:e("ai:Hosts"),"hosts-data":e("ai:Hosts"),network:e("ai:Networking"),operators:e("ai:Operators")}),JT={clusterNetworkCidr:"10.128.0.0/14",clusterNetworkHostPrefix:23,serviceNetworkCidr:"172.30.0.0/16"},ZT={clusterNetworkCidr:"2002:db8::/53",clusterNetworkHostPrefix:64,serviceNetworkCidr:"2003:db8::/112"},Gu=()=>ig,$u=["info","warning","error","critical"],ui="0001-01-01T00:00:00.000Z",qu=1e3*60*60*24,qt="NO_SUBNET_SET",Ts="OVNKubernetes",Co="OpenShiftSDN",yo="singleStack",wt="dualStack",za={IPv6:128,IPv4:25},nn=e=>({none:e("ai:None"),install:e("ai:Installation disk")}),Mr="cnv",Ba="lso",_o="odf",Wo="lvm",ng="cvo",ag="console",an=e=>({[ag]:e("ai:OpenShift Console"),[ng]:e("ai:OpenShift Cluster Version Operator"),[Ba]:e("ai:OpenShift Local Storage"),[_o]:e("ai:OpenShift Data Foundation"),[Wo]:e("ai:OpenShift Data Foundation Logical Volume Manager"),[Mr]:e("ai:OpenShift Virtualization")}),Yu="https://docs.openshift.com/container-platform/latest/scalability_and_performance/ztp-deploying-disconnected.html#ztp-configuring-a-static-ip_ztp-deploying-disconnected",ci="ui_ocm",ju="openshift/releases",Ru="https://access.redhat.com/solutions/6983944";import Ku from"react";import QT from"classnames";import{Button as eP,Popover as tP}from"@patternfly/react-core";import{OutlinedQuestionCircleIcon as oP}from"@patternfly/react-icons";var rP=({component:e,variant:t="plain",IconComponent:o=oP,noVerticalAlign:r=!1,buttonClassName:s,buttonOuiaId:i,...n})=>Ku.createElement(tP,{...n},Ku.createElement(eP,{component:e,variant:t,onClick:a=>a.preventDefault(),className:QT("pf-c-form__group-label-help","pf-u-p-0",s),ouiaId:i},Ku.createElement(o,{noVerticalAlign:r}))),W=rP;import{Trans as ug}from"react-i18next";var Xu=({isOcm:e})=>{let{t}=f();return Ne.createElement(W,{noVerticalAlign:!0,bodyContent:Ne.createElement(Ne.Fragment,null,Ne.createElement(ug,{t},"ai:Pull secrets are used to download OpenShift Container Platform components and connect clusters to a Red Hat account."," "),e?Ne.createElement(dg,null):Ne.createElement(Ne.Fragment,null,Ne.createElement(ug,{t},"ai:Pull secrets can be found in")," ",Ne.createElement(cg,null)))})},cg=()=>{let{t:e}=f();return Ne.createElement("a",{href:_a,target:"_blank",rel:"noopener noreferrer"},e("ai:OpenShift Cluster Manager")," ",Ne.createElement(pg,null))},dg=()=>{let{t:e}=f();return Ne.createElement("a",{href:Eu,target:"_blank",rel:"noopener noreferrer"},e("ai:Learn more about pull secrets and view examples")," ",Ne.createElement(pg,null),".")},mg=({isOcm:e})=>{let{t}=f();return e?Ne.createElement(dg,null):Ne.createElement(Ne.Fragment,null,t("ai:A Red Hat account's pull secret can be found in "),"\xA0",Ne.createElement(cg,null))},sP=({isOcm:e})=>{let{t}=f();return Ne.createElement(ur,{name:"pullSecret",label:t("ai:Pull secret"),labelIcon:e?void 0:Ne.createElement(Xu,{isOcm:e}),getErrorText:o=>Ne.createElement(Ne.Fragment,null,o," ",Ne.createElement(mg,{isOcm:e})),helperText:Ne.createElement(mg,{isOcm:e}),rows:10,isRequired:!0})},Ua=sP;import iP from"react";import{useField as nP}from"formik";import{Radio as aP}from"@patternfly/react-core";var lP=({callFormikOnChange:e=!0,name:t,value:o,onChange:r,...s})=>{let[i]=nP({name:t,value:o,type:"radio"}),n=T(t,"radio",i.value);return iP.createElement(aP,{...i,...s,id:n,isChecked:!!i.checked,onChange:(a,l)=>{r?.(a,l),e&&i.onChange(l)}})},Re=lP;import{Fragment as DP,createElement as di,useCallback as PP,useEffect as wP,useRef as TP}from"react";import{useField as vP,useFormikContext as SP}from"formik";import{Checkbox as IP,FormGroup as bP,Tooltip as xP}from"@patternfly/react-core";var fg={};lr(fg,{ACM_ENABLED_FEATURES:()=>pP,FeatureGateContext:()=>Zu,FeatureGateContextProvider:()=>Ps,SINGLE_CLUSTER_ENABLED_FEATURES:()=>uP,STANDALONE_DEPLOYMENT_ENABLED_FEATURES:()=>cP,useFeature:()=>_r});import Ju from"react";var pP={ASSISTED_INSTALLER_SNO_FEATURE:!0,ASSISTED_INSTALLER_OCS_FEATURE:!1,ASSISTED_INSTALLER_ODF_FEATURE:!1,ASSISTED_INSTALLER_CNV_FEATURE:!1,ASSISTED_INSTALLER_NETWORK_TYPE_SELECTION_FEATURE:!1,ASSISTED_INSTALLER_PLATFORM_INTEGRATION_FEATURE:!1},uP={ASSISTED_INSTALLER_SNO_FEATURE:!1,ASSISTED_INSTALLER_OCS_FEATURE:!1,ASSISTED_INSTALLER_ODF_FEATURE:!1,ASSISTED_INSTALLER_CNV_FEATURE:!1,ASSISTED_INSTALLER_NETWORK_TYPE_SELECTION_FEATURE:!1,ASSISTED_INSTALLER_PLATFORM_INTEGRATION_FEATURE:!1},cP={ASSISTED_INSTALLER_SNO_FEATURE:!0,ASSISTED_INSTALLER_OCS_FEATURE:!0,ASSISTED_INSTALLER_ODF_FEATURE:!0,ASSISTED_INSTALLER_CNV_FEATURE:!0,ASSISTED_INSTALLER_NETWORK_TYPE_SELECTION_FEATURE:!0,ASSISTED_INSTALLER_PLATFORM_INTEGRATION_FEATURE:!0},Zu=Ju.createContext({isFeatureEnabled:()=>!1}),Ps=({features:e,children:t})=>{let o={ASSISTED_INSTALLER_OCS_FEATURE:!1,ASSISTED_INSTALLER_ODF_FEATURE:!1,ASSISTED_INSTALLER_CNV_FEATURE:!1,...e},r=s=>!!o[s];return Ju.createElement(Zu.Provider,{value:{isFeatureEnabled:r}},t)},_r=e=>{let{isFeatureEnabled:t}=Ju.useContext(Zu);return t(e)};import oc from"react";import vo from"react";import{Label as gP,Popover as hP}from"@patternfly/react-core";import{InfoCircleIcon as CP}from"@patternfly/react-icons";import gg from"react";import{Text as dP}from"@patternfly/react-core";import{ExternalLinkAltIcon as mP}from"@patternfly/react-icons";var fP=({href:e,children:t,onClick:o})=>gg.createElement(dP,{component:"a",href:e,onClick:o,target:"_blank",rel:"noopener noreferrer"},t||e," ",gg.createElement(mP,{color:"rgb(0, 123, 186)"})),ot=fP;var ln;(function(r){r[r.default=0]="default",r[r.inline=1]="inline",r[r.inlineRight=2]="inlineRight"})(ln||(ln={}));var hg=({position:e=1,className:t="pf-u-ml-md",text:o,popoverText:r,externalLink:s,testId:i})=>{let n=t,{t:a}=f();switch(e){case 2:n+=" pf-u-float-right";break;case 1:n+=" pf-u-display-inline";break}let l=vo.createElement(vo.Fragment,null,vo.createElement("div",{style:{marginBottom:"var(--pf-global--spacer--sm)"}},r),s&&vo.createElement(vo.Fragment,null,vo.createElement(ot,{href:s},a("ai:Learn more"))));return vo.createElement(hP,{bodyContent:l,position:"top"},vo.createElement(gP,{style:{cursor:"pointer"},color:"orange",onClick:p=>p.preventDefault(),icon:vo.createElement(CP,{color:"var(--pf-c-label__content--Color)"}),className:n,"data-testid":`${i}`},o))},Qu=e=>{let{t}=f();return vo.createElement(hg,{text:t("ai:Developer Preview"),popoverText:t("ai:Developer preview features are not intended to be used in production environments. The clusters deployed with the developer preview features are considered to be development clusters and are not supported through the Red Hat Customer Portal case management system."),...e})};Qu.displayName="DeveloperPreview";var ec=e=>{let{t}=f();return vo.createElement(hg,{text:t("ai:Technology Preview"),popoverText:t("ai:Technology preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process."),externalLink:sn,...e})};ec.displayName="TechnologyPreview";import tc from"react";var Cg=tc.createContext(null),yg=({value:e,children:t})=>tc.createElement(Cg.Provider,{value:e},t),be=()=>{let e=tc.useContext(Cg),{t}=f();if(!e)throw new Error(t("ai:useFeatureSupportLevel must be used within FeatureSupportLevelContextProvider."));return e};var yP=({featureId:e,openshiftVersion:t})=>{let o=be(),r=oc.useMemo(()=>{if(!!t)return o.getFeatureSupportLevel(t,e)},[t,e,o]);if(!Fa(r))return null;let s=`${e}-support-level`;return r==="tech-preview"?oc.createElement(ec,{testId:s}):oc.createElement(Qu,{testId:s})},so=yP;var kP=({versions:e,validate:t,idPostfix:o,...r})=>{let{values:{openshiftVersion:s}}=SP(),i=_r("ASSISTED_INSTALLER_SNO_FEATURE"),[n,a,l]=vP({name:r.name,validate:t}),p=be(),u=TP(s),c=T(r.name,"input",o),{t:d}=f(),{value:m}=a,{setValue:g}=l,h=!!e.find(S=>p.isFeatureSupported(S.value,"SNO")),C=PP(S=>g(S?"None":"Full"),[g]),I=p.getFeatureDisabledReason(s,"SNO",d);return wP(()=>{u.current!==s&&!p.isFeatureSupported(s,"SNO")&&C(!1),u.current=s},[s,C,p]),i&&h?di(bP,{isInline:!0,fieldId:c},di(xP,{hidden:!I,content:I},di(IP,{...n,...r,id:c,label:di(DP,null,d("ai:Install single node OpenShift (SNO)"),"\xA0",di(so,{featureId:"SNO",openshiftVersion:s})),"aria-describedby":`${c}-helper`,description:di(j,{fieldId:c},d("ai:SNO enables you to install OpenShift using only one host.")),isChecked:m==="None",onChange:C,className:"with-tooltip"}))):null},rc=kP;import{createElement as mi,forwardRef as OP}from"react";import{useField as EP}from"formik";import{FormGroup as AP,NumberInput as FP,Split as VP,SplitItem as vg}from"@patternfly/react-core";var NP=OP(({label:e,labelIcon:t,helperText:o,isRequired:r,validate:s,idPostfix:i,minValue:n=0,maxValue:a,children:l,formatValue:p,onChange:u,...c},d)=>{let[m,{touched:g,error:h},{setValue:C}]=EP({name:c.name,validate:s}),I=T(c.name,"numberinput",i),S=!(g&&h),y=S?"":h,v=q=>{let Z=q<n?n:q;Z=a&&Z>a?a:Z,Z=p?p(Z):Z,C(Z),u?.(Z)},w=()=>{v(m.value+1)},E=()=>{v(m.value-1)},F=q=>{let Z=q.target.value;v(isNaN(Z)?0:Number(Z))};return mi(AP,{fieldId:I,label:e,helperText:typeof o=="string"?o:mi(j,{fieldId:I},o),helperTextInvalid:y,validated:S?"default":"error",isRequired:r,labelIcon:t},mi(VP,null,mi(vg,{isFilled:!0},mi(FP,{...c,value:m.value,onMinus:E,onChange:F,onPlus:w,min:n,max:a,ref:d,id:I,"aria-describedby":`${I}-helper`})),mi(vg,null,l)))}),HP=NP;import{Fragment as UP,createElement as fi,useEffect as BP,useState as Sg}from"react";import{useField as LP}from"formik";import{FormGroup as MP,HelperTextItem as _P}from"@patternfly/react-core";import{CodeEditor as WP}from"@patternfly/react-code-editor";var zP=({label:e,labelIcon:t,helperText:o,isRequired:r,validate:s,idPostfix:i,language:n,name:a,description:l,isDisabled:p})=>{let[u,,{setValue:c,setTouched:d}]=LP({name:a,validate:s}),m=T(a,"input",i),[g,h]=Sg(),[C,I]=Sg(),S=pr({name:a,validate:s});return BP(()=>{if(!!C)return g&&g.dispose(),h(C.onDidChangeModelContent(()=>{d(!0),c(C.getModel()?.getValue(),!0)})),()=>{g&&g.dispose()}},[C]),fi(UP,null,fi(MP,{fieldId:m,label:e,helperText:typeof o=="string"?o:fi(j,{fieldId:m},o),helperTextInvalid:S,validated:!S?"default":"error",isRequired:r,labelIcon:t},l&&fi(j,{fieldId:m},fi(_P,{variant:"indeterminate"},l)),fi(WP,{code:u.value,isUploadEnabled:!p,isDownloadEnabled:!0,isCopyEnabled:!0,isLanguageLabelVisible:!0,height:"400px",language:n,onEditorDidMount:v=>I(v)})))},sc=zP;import{createElement as Dt,forwardRef as uw,useState as cw}from"react";import{useField as GP}from"formik";import $P from"classnames";import{FormGroup as qP,HelperTextItem as YP,TextInput as jP,HelperText as RP,Popover as KP,PopoverPosition as XP,InputGroup as JP,Button as ZP}from"@patternfly/react-core";import{CheckCircleIcon as QP,CheckIcon as ew,ExclamationCircleIcon as tw,InfoCircleIcon as ow,TimesIcon as rw}from"@patternfly/react-icons";import{global_palette_green_500 as sw}from"@patternfly/react-tokens/dist/js/global_palette_green_500";import{global_danger_color_100 as iw}from"@patternfly/react-tokens/dist/js/global_danger_color_100";import{global_palette_blue_300 as nw}from"@patternfly/react-tokens/dist/js/global_palette_blue_300";var aw=(e,t,o)=>{if(t){if(o?.includes(e))return{variant:"error",icon:Dt(rw,null)}}else return{variant:"indeterminate"};return{variant:"success",icon:Dt(ew,null)}},lw=({value:e,error:t,richValidationMessages:o})=>Dt(RP,{component:"ul",className:"rich-input__rules"},Object.keys(o).map(r=>{let s=aw(o[r],e,t);return Dt(YP,{key:r,isDynamic:!0,component:"li",...s},o[r])})),pw=uw(({label:e,labelIcon:t,helperText:o,isRequired:r,onChange:s,validate:i,idPostfix:n,noDefaultOnChange:a,richValidationMessages:l,...p},u)=>{let[c,d]=cw(!1),[m,{error:g,value:h,touched:C},{setTouched:I}]=GP({name:p.name,validate:i}),S=T(p.name,"input",n),y=!C||!g?.length;return Dt(qP,{fieldId:S,label:e,helperText:typeof o=="string"?o:Dt(j,{fieldId:S},o),validated:y?"default":"error",isRequired:r,labelIcon:t},Dt(JP,{className:$P("rich-input__group",{"rich_input__group--invalid":!y})},Dt(jP,{...m,...p,ref:u,id:S,isRequired:r,"aria-describedby":`${S}-helper`,onChange:(v,w)=>{!c&&d(!0),!a&&m.onChange(w),I(!0,!1),s&&s(w)},className:"rich-input__text",onBlur:()=>d(!1)}),Dt(KP,{isVisible:c,shouldClose:()=>d(!1),shouldOpen:()=>d(!0),"aria-label":"validation popover",position:XP.top,bodyContent:Dt(lw,{value:h,error:g,richValidationMessages:l})},Dt(ZP,{variant:"plain","aria-label":"Validation"},y?h?Dt(QP,{color:sw.value}):Dt(ow,{color:nw.value}):Dt(tw,{color:iw.value})))))}),ws=pw;import{useField as dw}from"formik";import{createElement as fw}from"react";var mw=({name:e,label:t,isRequired:o,isDisabled:r,helperText:s})=>{let[i,,{setValue:n,setTouched:a}]=dw(e);return fw(ur,{name:e,label:t,helperText:s,onBlur:()=>{i.value&&(n(Mo(i.value)),a(!0))},spellCheck:!1,isRequired:o,isDisabled:r})},ic=mw;import nc from"react";import{Button as gw,ButtonVariant as hw,Tooltip as Cw}from"@patternfly/react-core";import{MinusCircleIcon as yw}from"@patternfly/react-icons";import vw from"classnames";var Sw=1500,Iw=({onRemove:e,hideRemoveButton:t=!0,children:o,className:r,removeButtonDataTestId:s,...i})=>nc.createElement(Cw,{hidden:t,exitDelay:Sw,flipBehavior:["right","bottom"],position:"right-start",distance:0,content:nc.createElement(gw,{variant:hw.plain,onClick:e,"data-testid":s},nc.createElement(yw,{size:"sm"})),className:vw("ai-remove-button__tooltip ",r),...i},o),pn=Iw;import{Button as bw,ButtonVariant as xw}from"@patternfly/react-core";import{PlusCircleIcon as kw}from"@patternfly/react-icons";import Ig from"react";var Tw=({onAdd:e,variant:t=xw.link,children:o,...r})=>Ig.createElement(bw,{icon:Ig.createElement(kw,null),onClick:e,variant:t,...r},o),ac=Tw;import{useField as Pw}from"formik";import{Fragment as xg,createElement as mr,useEffect as Nw,useRef as Vw,useState as Hw}from"react";import{PencilAltIcon as ww}from"@patternfly/react-icons";import{Split as Dw,SplitItem as bg}from"@patternfly/react-core";var Ew=({name:e,isRequired:t,onBlur:o,showErrorMessage:r})=>{let s=Vw();return Nw(()=>s?.current?.focus(),[]),mr(St,{name:e,isRequired:t,onBlur:o,ref:s,showErrorMessage:r})},Aw=({name:e,isRequired:t,showErrorMessage:o})=>{let[r,s]=Hw(!1),[i]=Pw({name:e}),n=pr({name:e});return mr(xg,null,r?mr(Ew,{name:e,isRequired:t,onBlur:()=>s(!1),showErrorMessage:o}):mr(xg,null,mr(Dw,null,mr(bg,{className:"ai-pencil-field__text"},i.value),mr(bg,null,mr(ww,{onClick:()=>s(!0)})))),mr("div",{className:"pf-c-form__helper-text pf-m-error"},n))},Fw=Aw;import{overlap as zw}from"cidr-tools";import{Address4 as gc,Address6 as hc}from"ip-address";import Qa from"is-cidr";import{isInSubnet as Bw}from"is-in-subnet";import{array as hn,lazy as lD,mixed as aD,number as il,object as Ic,string as Pe}from"yup";import{Address4 as Ka,Address6 as Xa}from"ip-address";import Ow from"lodash/camelCase";var O=e=>{let t;if(e)try{let o=e.replace(/"([\w-]+)":/g,(r,s)=>`"${Ow(s)}":`);t=JSON.parse(o)}catch(o){console.error("Failed to parse api string",o,e)}else console.info("Empty api string received.");return t},kg=(e="")=>e.replace(/^(http|https):\/\//,"");import un from"lodash/fp/head";var Ds=({machineNetworks:e,machineNetworkCidr:t})=>un(e)?.cidr??t;var gi=e=>e||[],Wr=e=>gi(e?.monitoredOperators).filter(t=>t.operatorType==="olm"),Ga=(e,t)=>gi(e).some(o=>o.name&&o.name===t),Tg=e=>!e.hosts||e.hosts.length<=3,le=({highAvailabilityMode:e})=>e==="None",Pg=({validationsInfo:e})=>O(e),lc=({machineNetworks:e,serviceNetworks:t,clusterNetworks:o},r)=>{switch(r){case"machineNetworks":return un(e)?.cidr;case"clusterNetworks":return un(o)?.cidr;case"serviceNetworks":return un(t)?.cidr}},pc=({machineNetworks:e,serviceNetworks:t,clusterNetworks:o},r)=>{switch(r){case"machineNetworks":return e&&e[1].cidr;case"clusterNetworks":return o&&o[1].cidr;case"serviceNetworks":return t&&t[1].cidr}},wg=({clusterNetworks:e})=>un(e)?.hostPrefix,Dg=({clusterNetworks:e})=>e&&e[1].hostPrefix,zo=({cpuArchitecture:e})=>e===L.ARM,Lw=e=>e.hosts?e.hosts.length<5:!0,cn=e=>e.schedulableMastersForcedTrue===void 0?Lw(e):e.schedulableMastersForcedTrue,io=e=>cn(e)?!0:e.schedulableMasters||!1,So=({platform:e})=>qf.includes(e?.type??"none"),$a=e=>e.canSelectCpuArch!==!1;import Mw from"filesize.js";import S8 from"fuse.js";var de="-",Eg="ODD";var Ag=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["disabled","disabled-unbound"].includes(t),Fg=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["discovering","discovering-unbound","disconnected","disconnected-unbound","known","known-unbound","insufficient","insufficient-unbound","pending-for-input"].includes(t),Vg=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["discovering","discovering-unbound","known","known-unbound","disconnected","disconnected-unbound","disabled","disabled-unbound","insufficient","insufficient-unbound","resetting","resetting-pending-user-input","resetting-pending-user-action","installing-pending-user-action","pending-for-input","added-to-existing-cluster","error"].includes(t),Ng=(e,t)=>["adding-hosts"].includes(e)&&["error","installing-pending-user-action"].includes(t),qa=(e,t)=>["pending-for-input","insufficient","ready","adding-hosts"].includes(e)&&["discovering","discovering-unbound","known","known-unbound","disconnected","disconnected-unbound","disabled","disabled-unbound","insufficient","insufficient-unbound","pending-for-input"].includes(t),Hg=(e,t,o)=>qa(e,t)&&!o,Og=e=>["insufficient","adding-hosts","ready","pending-for-input"].includes(e),Lg=qa,dn=e=>["installing","finalizing","error","cancelled","installed","adding-hosts"].includes(e),Ya=(e,t)=>e.kind==="AddHostsCluster"&&e.status==="adding-hosts"&&t==="known",mn=e=>e.progressStages||[],uc=e=>e.progress?.currentStage?e.progress:{currentStage:"Starting installation",progressInfo:void 0,installationPercentage:void 0},ja=e=>{let t=mn(e),o=uc(e);return Math.round((o?.installationPercentage||0)/100*t.length)},Mg=e=>["discovering","discovering-unbound","known","known-unbound","disconnected","disconnected-unbound","insufficient","insufficient-unbound","pending-for-input"].includes(e),cc=(e,t,o)=>{let r=`${xs(t).find(s=>s.value===e.role)?.label||xs(t)[0].label}`;return o&&e.role==="master"&&(r=t("ai:Control plane node, Worker")),`${r}${e.bootstrap?" (bootstrap)":""}`},dc=e=>!!e.logsCollectedAt&&e.logsCollectedAt!==ui,Es=e=>e.controllerLogsCollectedAt!==ui||!!(e.hosts||[]).find(t=>dc(t)),Ra=e=>e.readyHostCount||0,fn=e=>e.enabledHostCount||0,gn=e=>e.totalHostCount||0,zr=(e=[])=>e.filter(t=>t.status!=="disabled"),Bo=(e,t)=>e.requestedHostname||t.hostname||"",_g=(e,t)=>{let o=de,{systemVendor:r}=e;return r!==void 0&&(r.virtual?o=t("ai:Virtual machine"):o=t("ai:Bare metal")),o},Io=(...e)=>Mw.call(null,...e).toUpperCase().replace(/I/,"i"),He=e=>{let{inventory:t=""}=e;return O(t)||{}};var _w=e=>Object.keys(e).reduce((t,o)=>{let r=e[o].filter(s=>s.status==="failure");return[...t,...r]},[]),Wg=e=>{let t=_w(e).map(o=>o.id);if(!t.length)return!1;for(let o of t)if(!["ntp-synced","container-images-available"].includes(o))return!1;return!0};var fr=e=>Ka.isValid(e)?new Ka(e):Xa.isValid(e)?new Xa(e):null,mc=e=>{if(e){let t=e.startAddress().correctForm(),o=e.endAddress().correctForm();return`(${t} - ${o})`}return""},Ww=e=>e?`${e.address} ${mc(e)}`:"",zg=e=>{let t=e.hosts?.reduce((o,r)=>{let s=O(r.inventory)||{};return o={...o,[r.id]:Bo(r,s)},o},{})||{};return e.hostNetworks?.map(o=>({subnet:o.cidr||"",hostIDs:o.hostIds?.map(r=>t[r]||r)||[],humanized:Ww(fr(o.cidr))}))||[]};var Bg=(e,t)=>{let o=t.map(r=>r.cidr);return e.length===t.length&&e.every(r=>o.includes(r.cidr))},Ug=(e,t)=>e.length===t.length&&e.every(o=>t.find(r=>r.cidr===o.cidr&&r.hostPrefix===o.hostPrefix));var Gg=(e,t=!1)=>!(e||t),$g=(e,t=!1)=>e||t?Ts:Co,qg=e=>e.some(t=>Ka.isValid(t.subnet))&&e.some(t=>Xa.isValid(t.subnet)),fc=e=>e&&e.length>1&&Ka.isValid(e[0].cidr||"")&&Xa.isValid(e[1].cidr||""),hi=({machineNetworks:e,clusterNetworks:t,serviceNetworks:o})=>fc(e)&&fc(t)&&fc(o);var Yg=e=>({usePlatformIntegration:So(e),schedulableMasters:io(e)}),jg=()=>({nodeLabeling:""});var Yt=e=>({INVALID_LENGTH_OCM:e("ai:1-54 characters"),INVALID_LENGTH_ACM:e("ai:2-54 characters"),INVALID_VALUE_OCM:Ja(e).INVALID_VALUE,INVALID_VALUE_ACM:e("ai:Use lowercase alphanumeric characters or hyphen (-)"),INVALID_START_END:e("ai:Start and end with a lowercase letter or a number."),NOT_UNIQUE:e("ai:Must be unique")}),Rg=e=>({INVALID_LENGTH:Yt(e).INVALID_LENGTH_OCM,INVALID_VALUE:Yt(e).INVALID_VALUE_OCM,INVALID_START_END:Yt(e).INVALID_START_END}),Kg=e=>({INVALID_LENGTH:Yt(e).INVALID_LENGTH_OCM,INVALID_VALUE:Yt(e).INVALID_VALUE_OCM,INVALID_START_END:Yt(e).INVALID_START_END,NOT_UNIQUE:Yt(e).NOT_UNIQUE}),z8=e=>({INVALID_LENGTH:Yt(e).INVALID_LENGTH_ACM,INVALID_VALUE:Yt(e).INVALID_VALUE_ACM,INVALID_START_END:Yt(e).INVALID_START_END,NOT_UNIQUE:Yt(e).NOT_UNIQUE}),Ja=e=>({INVALID_LENGTH:e("ai:1-253 characters"),NOT_UNIQUE:e("ai:Must be unique"),INVALID_VALUE:e("ai:Use lowercase alphanumeric characters, dot (.) or hyphen (-)"),INVALID_START_END:e("ai:Must start and end with an lowercase alphanumeric character"),INVALID_FORMAT:e("ai:Number of characters between dots (.) must be 1-63")}),Br=e=>({...Ja(e),LOCALHOST_ERR:e('ai:Do not use forbidden words, for example: "localhost".')}),Xg=e=>({INVALID_LENGTH:e("ai:1-63 characters"),INVALID_VALUE:e("ai:Use alphanumeric characters, dot (.), underscore (_) or hyphen (-)"),INVALID_START_END:e("ai:Must start and end with an alphanumeric character")}),Jg=e=>({INVALID_VALUE:e("ai:The Value is not valid BMC address, supported protocols are redfish-virtualmedia or idrac-virtualmedia.")}),Za=["localhost","localhost.localdomain","localhost4","localhost4.localdomain4","localhost6","localhost6.localdomain6"];var Zg=/^[a-zA-Z0-9]+$/,Qg=/^[a-z0-9](.*[a-z0-9])?$/,Uw=/^[a-z0-9-.]*$/,Gw=/^[a-z0-9](.*[a-z0-9])?$/,$w=/^[.-a-z0-9]?(([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)*)[.-a-z0-9]?$/,qw=/^[a-z0-9-]*$/,Yw=/^(ssh-rsa|ssh-ed25519|ecdsa-[-a-z0-9]*) AAAA[0-9A-Za-z+/]+[=]{0,3}( .+)?$/,eh=/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/,jw=/^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[._]?$/,Rw="0.0.0.0",Kw="0000:0000:0000:0000:0000:0000:0000:0000",Xw=/^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$/,Jw=/^[^.]{1,63}(?:[.][^.]{1,63})*$/,Zw=/^((redfish-virtualmedia|idrac-virtualmedia)(\+https?)?:(\/\/([a-z0-9\-._~%!$&'()*+,;=]+@)?([a-z0-9\-._~%]+|\[[a-f0-9:.]+\]|\[v[a-f0-9][a-z0-9\-._~%!$&'()*+,;=:]+\])(:[0-9]+)?(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)*\/?|(\/?[a-z0-9\-._~%!$&'()*+,;=:@]+(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)*\/?)?)|([a-z0-9\-._~%!$&'()*+,;=@]+(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)*\/?|(\/[a-z0-9\-._~%!$&'()*+,;=:@]+)+\/?))(\?[a-z0-9\-._~%!$&'()*+,;=:@/?]*)?(#[a-z0-9\-._~%!$&'()*+,;=:@/?]*)?$/i,Qw=/^[a-zA-Z0-9-._]*$/,th=(e,t,o="",r,s=!1)=>{let i=Yt(e);return Pe().required("Required").matches(s?$w:qw,{message:s?i.INVALID_VALUE_OCM:i.INVALID_VALUE_ACM,excludeEmptyString:!0}).matches(Gw,{message:i.INVALID_START_END,excludeEmptyString:!0}).min(s?1:2,s?i.INVALID_LENGTH_OCM:i.INVALID_LENGTH_ACM).max(54,s?i.INVALID_LENGTH_OCM:i.INVALID_LENGTH_ACM).when("useRedHatDnsService",{is:!0,then:Pe().test("is-name-unique",i.NOT_UNIQUE,n=>{let a=`${n}.${o}`;return!n||!t.includes(a)}),otherwise:Pe().test("is-name-unique",i.NOT_UNIQUE,n=>r?!n||!t.includes(n):!0)})},el=Pe().test("ssh-public-key",'SSH public key must consist of "[TYPE] key [[EMAIL]]", supported types are: ssh-rsa, ssh-ed25519, ecdsa-[VARIANT]. A single key can be provided only.',e=>e?!!Ss(e).match(Yw):!0),oh=Pe().test("is-well-formed-json","Invalid pull secret format. You must use your Red Hat account's pull secret.",e=>{let t=!0;if(!e)return t;try{let o=JSON.parse(e);return o.constructor.name==="Object"&&!!o?.auths&&o.auths.constructor.name==="Object"}catch{return!t}}),rh=Pe().test("ip-validation","Not a valid IP address",e=>gc.isValid(e)||hc.isValid(e)),tl=Pe().matches(Xw,{message:'Value "${value}" is not valid MAC address.',excludeEmptyString:!0}),eD=(e,{machineNetworks:t,hostSubnet:o})=>Pe().test("vip-validation","IP Address is outside of selected subnet",function(r){if(!r)return!0;try{rh.validateSync(r)}catch(i){return this.createError({message:Ge(i)})}let s=[];if(t){let i=t?.map(n=>n.cidr);s.push(...e.filter(n=>i?.includes(n.subnet)))}else{let i=e.find(n=>n.subnet===o);i&&s.push(i)}for(let i of s)if(i?.subnet)if(i.hostIDs.length){if(Bw(r,i.subnet))return!0}else return!0;return!1}),tD=({ingressVip:e,apiVip:t})=>Pe().test("vip-uniqueness-validation","The Ingress and API IP addresses cannot be the same.",o=>o?e!==t:!0),oD=(e,t)=>Pe().test("required-once-set",t||"The value is required.",o=>o||!e),rD=Pe().when(["managedNetworkingType"],{is:"clusterManaged",then:Pe().notOneOf([qt],"Host subnet must be selected.")}),Cc=(e,t,o)=>aD().when(["vipDhcpAllocation","managedNetworkingType"],{is:(r,s)=>!r&&s!=="userManaged",then:oD(o,"Required. Please provide an IP address").concat(eD(e,t)).concat(tD(t)).when("hostSubnet",{is:r=>r!==qt,then:Pe().required("Required. Please provide an IP address")})}),sh=e=>Pe().required("A value is required.").test("valid-ip-address","Invalid IP address block. Expected value is a network expressed in CIDR notation (IP/netmask). For example: 123.123.123.0/24, 2055:d7a::/116",(t="")=>Qa.v4(t)||Qa.v6(t)).test("valid-netmask",`IPv4 netmask must be between 1-25 and include at least 128 addresses.
|
|
8
8
|
IPv6 netmask must be between 8-128 and include at least 256 addresses.`,(t="")=>{let o=parseInt(t.split("/")[1]);return Qa.v4(t)&&0<o&&o<26||Qa.v6(t)&&7<o&&o<129}).test("cidr-is-not-unspecified","The specified CIDR is invalid because its resulting routing prefix matches the unspecified address.",(t="")=>{let o=fr(t);if(o===null)return!1;let r=o.startAddress().address;return r!==Rw&&r!==Kw}).test("valid-cidr-base-address",({value:t})=>`${t} is not a valid CIDR`,(t="")=>{let o=fr(t);if(o===null)return!1;let r=o.startAddress().parsedAddress;return o.parsedAddress.every((n,a)=>n===r[a])}).test("cidrs-can-not-overlap","Provided CIDRs can not overlap.",t=>{try{if(t&&e&&e.length>0)return!zw(t,e)}catch{return!1}return!0}),yc=Pe().test("dns-name-label-length","Single label of the DNS name can not be longer than 63 characters.",(e="")=>e.split(".").every(t=>t.length<=63)).matches(eh,{message:'Value "${value}" is not valid DNS name. Example: basedomain.example.com',excludeEmptyString:!0}),sD=e=>{let t="The host prefix is required.",o="The host prefix is a number between 1 and 32 for IPv4 and between 8 and 128 for IPv6.",r=(e||"").split("/")[1];if(!r)return il().required(t).min(1,o).max(32,o);let s=parseInt(r);isNaN(s)&&(s=1);let i="The host prefix is a number between size of the cluster network CIDR range",n=`${i} (${s}) and 25.`,a=`${i} (8) and 128.`;return hc.isValid(e||"")?il().required(t).min(8,a).max(128,a):gc.isValid(e||"")?il().required(t).min(s,n).max(25,n):il().required(t)},ol=(e,t,o)=>{let r=Ja(e);return Pe().min(1,r.INVALID_LENGTH).max(253,r.INVALID_LENGTH).test(r.INVALID_START_END,r.INVALID_START_END,s=>{let i=s?.trim();return i?!!i[0].match(Qg)&&(i[i.length-1]?!!i[i.length-1].match(Qg):!0):!0}).matches(Jw,r.INVALID_FORMAT).matches(Uw,{message:r.INVALID_VALUE,excludeEmptyString:!0}).test(r.NOT_UNIQUE,r.NOT_UNIQUE,s=>!s||s===o?!0:!t.find(i=>i===s)).notOneOf(Za,Br(e).LOCALHOST_ERR)},iD="Provide a valid HTTP URL.",vc=(e,t)=>Pe().test("http-proxy-no-empty-validation","At least one of the HTTP or HTTPS proxy URLs is required.",o=>!e.enableProxy||o||e[t]).test("http-proxy-validation",iD,o=>{if(!o)return!0;try{return new URL(o).protocol==="http:"}catch{return!1}}),nD=e=>!e||e!=="",Sc=(e,t=eh)=>{if(!e||e.match(t))return!0;try{rh.validateSync(e)}catch{return!1}return!0},ih=Pe().test("no-proxy-validation","Provide a comma separated list of valid DNS names or IP addresses.",e=>{if(!e||e==="*")return!0;let t=Mo(e).split(",").map(o=>o.charAt(0)==="."?o.substring(1):o);return t.every(nD)&&t.every(o=>Sc(o,jw))}),nh=Pe().test("ntp-source-validation","Provide a comma separated list of valid DNS names or IP addresses.",e=>e?Mo(e).split(",").every(t=>Sc(t)):!0),ah=Pe().test("day2-api-vip","Provide a valid DNS name or IP Address",e=>e?Sc(e):!0),Z8=e=>{let t=Jg(e);return Pe().matches(Zw,{message:t.INVALID_VALUE,excludeEmptyString:!0})},Q8=e=>{let t=Xg(e);return Pe().min(1,t.INVALID_LENGTH).max(63,t.INVALID_LENGTH).test(t.INVALID_START_END,t.INVALID_START_END,o=>{let r=o?.trim();return r?!!r[0].match(Zg)&&(r[r.length-1]?!!r[r.length-1].match(Zg):!0):!0}).matches(Qw,{message:t.INVALID_VALUE,excludeEmptyString:!0})},lh=hn().of(Ic({cidr:rD,clusterId:Pe()})),ph=hn().of(lD(e=>Ic({cidr:sh(void 0),hostPrefix:sD(e.cidr),clusterId:Pe()}))),uh=hn().of(Ic({cidr:sh(void 0),clusterId:Pe()})),rl=e=>hn().max(2,`Maximum number of ${e} subnets in dual stack is 2.`).test("dual-stack-ipv4","First network has to be IPv4 subnet.",t=>t[0].cidr&&gc.isValid(t[0].cidr)).test("dual-stack-ipv6","Second network has to be IPv6 subnet.",t=>t[1].cidr&&hc.isValid(t[1].cidr)),sl=hn().test("single-stack","All network subnets must be IPv4.",e=>Jf(e));import{createElement as Ci,useState as fD}from"react";import{useField as pD}from"formik";import{FormGroup as uD,Label as cD}from"@patternfly/react-core";import dD from"react-tagsinput";var mD=({value:e,onClose:t})=>Ci(cD,{className:"label-field__value",variant:"outline",onClose:t},e),c5=({label:e,labelIcon:t,helperText:o,isRequired:r,onChange:s,validate:i,idPostfix:n,...a})=>{let{t:l}=f(),[p,u]=fD(""),[c,{touched:d,error:m},{setValue:g,setTouched:h}]=pD({name:a.name,validate:i}),C=T(a.name,"input",n),I=!(d&&m);return Ci(uD,{fieldId:C,label:e,helperText:typeof o=="string"?o:Ci(j,{fieldId:C},o),helperTextInvalid:I?"":m,validated:I?"default":"error",isRequired:r,labelIcon:t},l("ai:Enter key=value and then press 'enter' or 'space' or use a ',' to input the label."),Ci("div",{className:"co-search-input pf-c-form-control"},Ci(dD,{...c,onChange:y=>{g(y),u(""),s&&s(y),!d&&h(!0)},addKeys:[13,32,188],renderTag:({tag:y,key:v,onRemove:w,getTagDisplayValue:E})=>Ci(mD,{key:v,onClose:()=>w(v),value:E(y)}),addOnBlur:!0,inputProps:{autoFocus:!1,className:"label-field__input",placeholder:c.value?.length?"":"app=frontend",spellCheck:"false",id:"tags-input",value:p,onChange:y=>u(y.target.value),["data-test"]:"tags-input"}})))};import yi from"react";import{Title as gD,EmptyState as hD,EmptyStateBody as CD,Bullseye as yD,EmptyStateIcon as vD,EmptyStateSecondaryActions as SD}from"@patternfly/react-core";import{SearchIcon as ID}from"@patternfly/react-icons";var bD=({title:e="No results found",content:t,icon:o=ID,primaryAction:r,secondaryActions:s})=>yi.createElement(yD,null,yi.createElement(hD,null,yi.createElement(vD,{icon:o}),yi.createElement(gD,{headingLevel:"h2"},e),t&&yi.createElement(CD,null,t),r,s&&yi.createElement(SD,null,s))),bo=bD;import Uo from"react";import{Title as xD,EmptyState as kD,EmptyStateBody as TD,Bullseye as PD,EmptyStateIcon as wD,EmptyStateVariant as DD,Button as ED,ButtonVariant as AD,EmptyStateSecondaryActions as FD}from"@patternfly/react-core";import{ExclamationCircleIcon as VD}from"@patternfly/react-icons";import{global_danger_color_200 as ND}from"@patternfly/react-tokens";var HD=({fetchData:e})=>{let{t}=f();return Uo.createElement(Uo.Fragment,null,t("ai:There was an error retrieving data. Check your connection and")," ",e?Uo.createElement(ED,{onClick:e,variant:AD.link,isInline:!0},t("ai:try again")):t("ai:try again"),".")},OD=({title:e="Error loading data",content:t,fetchData:o,icon:r=VD,iconColor:s=ND.value,variant:i=DD.small,primaryAction:n,actions:a})=>Uo.createElement(PD,null,Uo.createElement(kD,{variant:i},Uo.createElement(wD,{icon:r,color:s}),Uo.createElement(xD,{headingLevel:"h2"},e),Uo.createElement(TD,null,t||Uo.createElement(HD,{fetchData:o})),n,a&&Uo.createElement(FD,null,a))),_=OD;import Cn from"react";import{EmptyState as LD,EmptyStateBody as MD,Bullseye as _D,EmptyStateVariant as WD,Spinner as zD,EmptyStateSecondaryActions as BD}from"@patternfly/react-core";var UD=({content:e,primaryAction:t,secondaryActions:o})=>Cn.createElement(_D,null,Cn.createElement(LD,{variant:WD.small},Cn.createElement(zD,{size:"xl"}),e&&Cn.createElement(MD,null,e),t,o&&Cn.createElement(BD,null,o))),z=UD;import ch from"react";import{Button as GD,ToolbarItem as $D}from"@patternfly/react-core";var qD=({...e})=>ch.createElement($D,null,ch.createElement(GD,{...e})),ht=qD;import dh from"react";import{ToolbarItem as YD,Text as jD}from"@patternfly/react-core";var RD=e=>dh.createElement(YD,null,dh.createElement(jD,{...e})),KD=RD;import bc from"react";import{ToolbarGroup as XD,ToolbarItem as JD,Progress as ZD,ProgressSize as QD}from"@patternfly/react-core";var eE=({style:e,size:t=QD.sm})=>bc.createElement(XD,{style:{flexGrow:1}},bc.createElement(JD,{style:{flexGrow:1}},bc.createElement(ZD,{style:{...e,gridGap:0},size:t}))),tE=eE;import oE from"react";import{ToolbarGroup as rE}from"@patternfly/react-core";var sE=({children:e})=>oE.createElement(rE,{alignment:{md:"alignRight"}},e),xc=sE;import{createElement as vi,useEffect as pE}from"react";import{useField as iE}from"formik";import{FormGroup as nE,TextContent as aE,Text as lE}from"@patternfly/react-core";var mh=({label:e,name:t,children:o,helperText:r,helperTextInvalid:s,isRequired:i,isValid:n=!0})=>{let a=T(t,"static");return vi(nE,{fieldId:a,label:e,helperText:typeof r=="string"?r:vi(j,{fieldId:a},r),helperTextInvalid:s,validated:n?"default":"error",isRequired:i},o)},nl=({value:e,...t})=>{let[,,o]=iE({name:t.name});return pE(()=>{o.setValue(e)},[e]),vi(mh,{...t})},al=({children:e,...t})=>{let o=T(t.name,"static");return vi(mh,{...t},vi(aE,null,vi(lE,{component:"p",id:o,"aria-describedby":`${o}-helper`},e)))};import{createElement as ut}from"react";import{ActionList as tA,ActionListItem as Tn,Button as Dc,ButtonVariant as Ec,Spinner as oA,SplitItem as rA,Stack as sA,StackItem as Ac,Text as iA,TextVariants as nA}from"@patternfly/react-core";import xh from"react";import{ButtonVariant as ZE}from"@patternfly/react-core";import Et from"react";import{Button as $E,Modal as qE,ButtonVariant as YE,ModalVariant as jE,ModalBoxBody as RE}from"@patternfly/react-core";import{ExclamationTriangleIcon as KE}from"@patternfly/react-icons";import{global_warning_color_100 as XE}from"@patternfly/react-tokens";import xn,{useEffect as GE,useState as wc}from"react";import Rt from"react";import{Label as mE}from"@patternfly/react-core";import{TableVariant as fE,Table as gE,TableBody as hE,breakWord as CE}from"@patternfly/react-table";import{InfoCircleIcon as yE,ExclamationTriangleIcon as vE,ExclamationCircleIcon as SE,SearchIcon as IE}from"@patternfly/react-icons";var jt=e=>e?new Date(e).toLocaleString():de,w9=e=>e?new Date(e).toLocaleTimeString():de;import uE from"lodash/upperFirst";import cE from"lodash/endsWith";import{SortByDirection as dE}from"@patternfly/react-table";var fh=(e,t)=>[{heightAuto:!0,cells:[{props:{colSpan:t},title:e}]}],ll=(e,t)=>(o,r)=>{let s=e.direction===dE.asc?1:-1,i=t(o,e.index),n=t(r,e.index),a=typeof i=="string"?i:i?.sortableValue,l=typeof n=="string"?n:n?.sortableValue;return typeof a=="string"||typeof l=="string"?(a=a||"",a.localeCompare(l)*s):(a=a||0,l=l||0,(a-l)*s)},xo=e=>`${uE(e)}${cE(e,".")||e===""?"":"."}`,pl=e=>({title:jt(e),sortableValue:e?new Date(e).getTime():0});var W9=()=>({className:"pf-m-break-word"}),gh=()=>({className:"pf-m-fit-content"}),z9=()=>({className:"pf-m-nowrap"}),B9=()=>({className:"pf-m-truncate"}),U9=()=>({className:"pf-m-wrap"}),hh=()=>({className:"table-no-padding"});var bE=({rowData:e})=>e?.props?.event.sortableTime+e?.props?.event.message,xE=e=>{switch(e){case"info":return"blue";case"warning":return"orange";case"error":return"red";case"critical":return"purple"}},kE=e=>{switch(e){case"info":return Rt.createElement(yE,null);case"warning":return Rt.createElement(vE,null);case"error":case"critical":return Rt.createElement(SE,null)}},TE=({events:e,className:t})=>{let{t:o}=f();if(e.length===0)return Rt.createElement(bo,{icon:IE,title:o("ai:No events found"),content:o("ai:There are no events found.")});let s=e.map(i=>({...i,sortableTime:new Date(i.eventTime).getTime()})).sort((i,n)=>n.sortableTime-i.sortableTime).map(i=>({cells:[{title:Rt.createElement("strong",null,jt(i.eventTime))},{title:Rt.createElement(Rt.Fragment,null,i.severity!=="info"&&Rt.createElement(Rt.Fragment,null,Rt.createElement(mE,{color:xE(i.severity),icon:kE(i.severity)},i.severity)," "),i.message)}],props:{event:i}}));return Rt.createElement("div",{className:t},Rt.createElement(gE,{rows:s,cells:[{title:o("ai:Time"),cellTransforms:[gh,hh]},{title:o("ai:Message"),cellTransforms:[CE]}],variant:fE.compact,"aria-label":o("ai:Events table"),borders:!1},Rt.createElement(hE,{rowKey:bE})))},yn=TE;import Ur from"react";import{Button as _E,ButtonVariant as WE}from"@patternfly/react-core";import{SearchIcon as zE}from"@patternfly/react-icons";import we from"react";import Ch from"lodash/capitalize";import{Toolbar as PE,ToolbarItem as wE,ToolbarContent as DE,ToolbarFilter as yh,Button as EE,ButtonVariant as AE,InputGroup as FE,Select as vh,SelectOption as vn,TextInput as VE,Badge as NE}from"@patternfly/react-core";import{SearchIcon as HE,FilterIcon as OE}from"@patternfly/react-icons";var Sh=({text:e})=>we.createElement(we.Fragment,null,we.createElement(OE,null)," ",e),Sn="select-all-actions",In="cluster-level-action",bn="deleted-hosts-action",kc=e=>(e||[]).map(t=>{let o=O(t.inventory)||{},r=t.requestedHostname;return o.hostname!==t.requestedHostname&&(r+=` (${o.hostname})`),{hostname:r,id:t.id}}),ul=e=>({fulltext:"",hosts:kc(e.hosts).map(t=>t.id),severity:[],clusterLevel:!0,orphanedHosts:!0,selectAll:!0}),LE=(e,t)=>t.filter(o=>o.severity===e).length,ME=({filters:e,setFilters:t,cluster:o,events:r})=>{let[s,i]=we.useState(!1),[n,a]=we.useState(!1),l=we.useMemo(()=>kc(o.hosts),[o.hosts]),p=()=>{t(ul(o))},u=(v,w,E)=>{let F=(ae,Y,je,tt)=>({...tt,[ae]:Y?[...tt[ae],je]:tt[ae].filter(vt=>vt!==je)}),q=(ae,Y)=>({...Y,selectAll:v==="severity"?Y.selectAll:Y.hosts.length===ae&&Y.orphanedHosts&&Y.clusterLevel}),Z=F(v,w,E,e);Z=q(o.hosts?.length||0,Z),t(Z)},c=()=>i(!s),d=(v,w)=>{let E=v.target.checked;switch(w){case Sn:t(E?{...e,hosts:kc(o.hosts).map(F=>F.id),clusterLevel:!0,orphanedHosts:!0,selectAll:!0}:{...e,clusterLevel:!1,orphanedHosts:!1,selectAll:!1,hosts:[]});break;case bn:t({...e,orphanedHosts:E,selectAll:E&&e.clusterLevel&&e.hosts.length===o.hosts?.length});break;case In:t({...e,clusterLevel:E,selectAll:E&&e.orphanedHosts&&e.hosts.length===o.hosts?.length});break;default:u("hosts",E,w)}},m=()=>a(!n),g=(v,w)=>{u("severity",v.target.checked,w)},h=v=>{t({...e,fulltext:v})},C=(v,w)=>{if(v){let E=w.key||w;t({...e,[v]:e[v].filter(F=>F!==E)})}else p()},I=v=>{t({...e,[v]:[]})},S=()=>{let v=e.clusterLevel?[...e.hosts,In]:e.hosts;return v=e.orphanedHosts?[...v,bn]:v,v=e.selectAll?[...v,Sn]:v,v},{t:y}=f();return we.createElement(PE,{id:"clusters-events-toolbar",className:"pf-m-toggle-group-container",collapseListedFiltersBreakpoint:"xl",clearAllFilters:p},we.createElement(DE,null,we.createElement(yh,{categoryName:"hosts"},we.createElement(vh,{variant:"checkbox","aria-label":"hosts",onToggle:c,onSelect:d,selections:S(),customBadgeText:e.hosts?.length||0,isOpen:s,placeholderText:we.createElement(Sh,{text:"Hosts"}),isDisabled:l.length===0},[we.createElement(vn,{inputId:`checkbox-${Sn}`,key:Sn,value:Sn},y("ai:Select All")),we.createElement(vn,{inputId:`checkbox-${In}`,key:In,value:In},y("ai:Cluster-level events")),we.createElement(vn,{inputId:`checkbox-${bn}`,key:bn,value:bn},y("ai:Deleted hosts")),...l.map(v=>we.createElement(vn,{key:v.id,value:v.id},v.hostname))])),we.createElement(yh,{chips:e.severity.map(v=>({key:v,node:Ch(v)})),deleteChip:C,deleteChipGroup:I,categoryName:"severity"},we.createElement(vh,{variant:"checkbox","aria-label":"Severity",onToggle:m,onSelect:g,selections:e.severity,isOpen:n,placeholderText:we.createElement(Sh,{text:"Severity"})},$u.map(v=>we.createElement(vn,{"data-testid":`${v}-filter-option`,key:v,value:v},Ch(v)," ",we.createElement(NE,{isRead:!0},LE(v,r)))))),we.createElement(wE,null,we.createElement(FE,null,we.createElement(VE,{name:"search-text",id:"search-text",type:"search","aria-label":"text to be searched",onChange:h,value:e.fulltext,placeholder:y("ai:Filter by text")}),we.createElement(EE,{variant:AE.control,"aria-label":"search text button"},we.createElement(HE,null))))))},Tc=ME;var BE=(e,t=[],o)=>t.filter(r=>e.severity.length===0||e.severity.includes(r.severity)).filter(r=>!r.hostId||e.hosts.includes(r.hostId)||e.orphanedHosts&&!(o||[]).find(s=>s.id===r.hostId)).filter(r=>r.hostId||e.clusterLevel).filter(r=>!e.fulltext||(r.message||"").toLowerCase().includes(e.fulltext.toLowerCase())),UE=({events:e,cluster:t,className:o})=>{let[r,s]=Ur.useState(()=>ul(t)),i=Ur.useMemo(()=>BE(r,e,t.hosts),[r,e,t.hosts]),{t:n}=f();return Ur.createElement(Ur.Fragment,null,Ur.createElement(Tc,{filters:r,setFilters:s,cluster:t,events:e}),i.length===0&&e.length>0?Ur.createElement(bo,{icon:zE,title:n("ai:No matching events"),content:n("ai:There are no events that match the current filters. Adjust or clear the filters to view events."),primaryAction:Ur.createElement(_E,{variant:WE.primary,onClick:()=>s(ul(t)),id:"empty-state-cluster-events-clear-filters-button","data-ouia-id":"button-clear-events-filter"},n("ai:Clear filters"))}):Ur.createElement(yn,{events:i,className:o}))},Pc=UE;var Ih=({onFetchEvents:e,...t})=>{let[o,r]=wc(),[s,i]=wc(0),[n,a]=wc(""),{cluster:l,hostId:p,entityKind:u,className:c}=t;GE(()=>{let m;return e({clusterId:l.id,hostId:p},g=>{r(g),a(""),m=setTimeout(()=>i(Date.now()),Wu)},a),()=>clearTimeout(m)},[s,l.id,p,e]);let d=xn.useCallback(()=>{i(Date.now())},[i]);return n?xn.createElement(_,{title:n,fetchData:d}):o?u==="cluster"?xn.createElement(Pc,{events:o,cluster:l,className:c}):xn.createElement(yn,{events:o,className:c}):xn.createElement(z,null)};import{Trans as JE}from"react-i18next";var bh=({ButtonComponent:e=ht,onFetchEvents:t,onClick:o,hostId:r,cluster:s,entityKind:i,children:n,title:a,fallbackEventsURL:l,...p})=>{let[u,c]=Et.useState(!1),d=()=>c(!1);return Et.createElement(Et.Fragment,null,Et.createElement(e,{...p,onClick:o||(()=>c(!0))},n||a),Et.createElement(kn,{title:a,isOpen:u,onClose:d,hostId:r,cluster:s,entityKind:i,onFetchEvents:t,fallbackEventsURL:l}))},kn=({onFetchEvents:e,hostId:t,cluster:o,entityKind:r,onClose:s,isOpen:i,title:n,fallbackEventsURL:a})=>{let{t:l}=f();return Et.createElement(qE,{title:n,isOpen:i,"aria-label":l("ai:Displays events"),hasNoBodyWrapper:!0,actions:[Et.createElement($E,{key:"close",variant:YE.primary,onClick:s},l("ai:Close"))],onClose:s,variant:jE.large,className:"events-modal"},Et.createElement(RE,{className:"events-modal__body"},a?Et.createElement(_,{title:l("ai:Could not load events"),content:Et.createElement(Et.Fragment,null,Et.createElement(JE,{t:l},"ai:Could not load events from the standard location. You can check the events in the ",Et.createElement(ot,{href:a},"raw format"),".")),icon:KE,iconColor:XE.value}):Et.createElement(Ih,{hostId:t,cluster:o,entityKind:r,onFetchEvents:e,className:"events-modal__event-list"})))};import{MonitoringIcon as QE}from"@patternfly/react-icons";var eA=({cluster:e,onFetchEvents:t})=>xh.createElement(bh,{id:"cluster-events-button",entityKind:"cluster",icon:xh.createElement(QE,null),cluster:e,title:"Cluster Events",variant:ZE.secondary,onFetchEvents:t},"View Cluster Events"),Gr=eA;var $r=({alerts:e,errors:t,onNext:o,onBack:r,onCancel:s,isNextDisabled:i,isBackDisabled:n,leftExtraActions:a,isSubmitting:l,submittingText:p,nextButtonText:u,cluster:c,onFetchEvents:d})=>{let{t:m}=f();return p=p||m("ai:Saving changes..."),ut(sA,{hasGutter:!0},e&&ut(Ac,null,e),t&&ut(Ac,null,t),ut(Ac,null,ut(tA,{"data-testid":"wizard-step-actions"},a,o&&ut(Tn,null,ut(Dc,{variant:Ec.primary,name:"next",onClick:o,isDisabled:i},u||m("ai:Next"))),r&&ut(Tn,null,ut(Dc,{variant:Ec.secondary,name:"back",onClick:r,isDisabled:n},m("ai:Back"))),ut(Tn,null,ut(Dc,{variant:Ec.link,name:"cancel",onClick:s,isDisabled:!1},m("ai:Cancel"))),l&&ut(Tn,null,ut(iA,{component:nA.small},ut(oA,{size:"sm"})," ",p)),ut(rA,{isFilled:!0}),c&&d&&ut(Tn,null,ut(Gr,{cluster:c,onFetchEvents:d})))))};import kh from"react";var ee=({condition:e=!1,children:t})=>e?kh.createElement(kh.Fragment,null,t):null;import Si from"react";import{DropdownItem as aA,DropdownToggle as lA,Dropdown as pA}from"@patternfly/react-core";import{CaretDownIcon as uA}from"@patternfly/react-icons";var Th=({current:e,defaultValue:t,items:o,setValue:r,isDisabled:s,idPrefix:i,position:n,menuAppendTo:a})=>{let[l,p]=Si.useState(!1),u=o.map(({value:m,label:g,description:h})=>Si.createElement(aA,{key:m,id:m,description:h},g)),c=Si.useCallback(m=>{r(m?.currentTarget.id),p(!1)},[r,p]),d=Si.useMemo(()=>Si.createElement(lA,{onToggle:m=>p(!s&&m),toggleIndicator:uA,isDisabled:s,id:i?`${i}-dropdown-toggle-items`:void 0,className:"role-dropdown"},e||t),[p,e,s,t,i]);return Si.createElement(pA,{onSelect:c,dropdownItems:u,toggle:d,isOpen:l,isPlain:!0,id:i?`${i}-dropdown-toggle`:void 0,position:n,menuAppendTo:a})};import Go from"react";import{TextContent as cA,TextList as Ph,TextListVariants as wh,TextListItem as cl,TextListItemVariants as dl,Text as dA}from"@patternfly/react-core";var It=({children:e,title:t,titleComponent:o="h2"})=>Go.createElement(cA,null,t&&Go.createElement(dA,{component:o},t),Go.createElement(Ph,{component:wh.dl,className:"detail-list"},e)),A=({title:e,value:t="",idPrefix:o,testId:r,isHidden:s=!1,classNameValue:i})=>s?null:Go.createElement(Go.Fragment,null,Go.createElement(cl,{component:dl.dt,id:o?`${o}-title`:void 0,"data-testid":r?`${r}-title`:void 0},e),Go.createElement(cl,{component:dl.dd,id:o?`${o}-value`:void 0,"data-testid":r?`${r}-value`:void 0,className:i},Array.isArray(t)?Go.createElement(Ph,{component:wh.dl},t.map((n,a)=>[Go.createElement(cl,{"data-testid":r?`${r}-title-${a}`:void 0,key:n.title,component:dl.dt},n.title),Go.createElement(cl,{"data-testid":r?`${r}-value-${a}`:void 0,key:`dd-${n.title}`,component:dl.dd},n.value)])):t));import ml from"react";import{WizardNavItem as mA}from"@patternfly/react-core";import{ExclamationCircleIcon as fA}from"@patternfly/react-icons";import{global_danger_color_100 as gA}from"@patternfly/react-tokens";var hA=(e,t,o,r)=>!o&&!r&&!t()?ml.createElement(ml.Fragment,null,e,ml.createElement(fA,{className:"wizard-nav-item-warning-icon",color:gA.value,size:"sm"})):e,CA=({isValid:e=()=>!0,children:t,...o})=>{let{content:r,isDisabled:s,isCurrent:i}=o;return ml.createElement(mA,{...o,content:hA(r,e,s,i)},t)},fl=CA;import Fc from"react";import{AlertGroup as wA,AlertActionCloseButton as DA,Alert as EA}from"@patternfly/react-core";import As from"react";var Eh={};lr(Eh,{alertsSlice:()=>qr,dialogsSlice:()=>gl});import{v4 as yA}from"uuid";import{createSlice as vA}from"@reduxjs/toolkit";import{AlertVariant as SA}from"@patternfly/react-core";var Dh=[],qr=vA({initialState:Dh,name:"alerts",reducers:{addAlert:(e,t)=>[{key:yA(),variant:SA.danger,...t.payload},...e],removeAlert:(e,t)=>e.filter(o=>o.key!==t.payload),clearAlerts:()=>Dh}});import{createSlice as IA}from"@reduxjs/toolkit";var bA={},gl=IA({initialState:bA,name:"alerts",reducers:{openDialog:(e,t)=>(e[t.payload.dialogId]=t.payload.data||{},e),closeDialog:(e,t)=>(e[t.payload.dialogId]=void 0,e)}});var{addAlert:xA,removeAlert:kA,clearAlerts:TA}=qr.actions,PA=qr.reducer,Ah=As.createContext(null),$o=({children:e})=>{let[t,o]=As.useReducer(PA,[]),r={alerts:t,addAlert:As.useCallback(s=>o(xA(s)),[]),removeAlert:As.useCallback(s=>o(kA(s)),[]),clearAlerts:As.useCallback(()=>o(TA()),[])};return As.createElement(Ah.Provider,{value:r},e)},N=()=>{let e=As.useContext(Ah),{t}=f();if(!e)throw new Error(t("ai:useAlerts must be used within AlertsContextProvider"));return e};var AA=({className:e})=>{let{alerts:t,removeAlert:o}=N(),r=s=>o(s.key);return t.length?Fc.createElement(wA,{className:e},t.map(s=>Fc.createElement(EA,{actionClose:Fc.createElement(DA,{onClose:()=>r(s)}),isInline:!0,...s},s.message))):null},gr=AA;import Pn from"react";import FA,{defaultProps as VA}from"prism-react-renderer";import{Text as NA,TextVariants as HA,ClipboardCopy as OA,clipboardCopyFunc as LA}from"@patternfly/react-core";import MA from"prism-react-renderer/themes/github";var _A=({code:e,language:t="bash",theme:o=MA,copiable:r=!1})=>Pn.createElement(FA,{...VA,code:e,language:t,theme:o},({className:s,style:i,tokens:n,getLineProps:a,getTokenProps:l})=>Pn.createElement(NA,{component:HA.pre,className:s,style:i},r&&Pn.createElement(OA,{isReadOnly:!0,variant:"inline-compact",onCopy:p=>LA(p,e),style:{float:"right",background:"inherit"}}),n.map((p,u)=>Pn.createElement("div",{key:u,...a({line:p,key:u})},p.map((c,d)=>Pn.createElement("span",{key:d,...l({token:c,key:d})})))))),ct=_A;import WA from"react";var zA=e=>WA.createElement("div",{...e,className:"pf-c-form"}),wn=zA;import{createElement as En}from"react";import{Alert as BA,AlertVariant as UA,Progress as GA,ProgressMeasureLocation as $A,Stack as qA,StackItem as Fh}from"@patternfly/react-core";var YA=({error:e,progress:t})=>{let{t:o}=f();return En(qA,{hasGutter:!0},e&&En(Fh,null,En(BA,{variant:UA.danger,title:e.title,isInline:!0},e.message)),t!==null&&En(Fh,null,En(GA,{value:t,measureLocation:$A.outside,"aria-label":o("ai:Progress")})))},Dn=YA;import{createElement as Vc}from"react";import{Modal as jA,Button as Vh,ModalVariant as RA}from"@patternfly/react-core";var KA=({title:e,titleIconVariant:t,content:o,confirmationButtonText:r="Yes",confirmationButtonVariant:s="danger",onClose:i,onConfirm:n})=>{let{t:a}=f();return Vc(jA,{title:e,titleIconVariant:t,isOpen:!0,onClose:i,variant:RA.small,actions:[Vc(Vh,{"data-testid":"confirm-modal-submit",key:"confirm",variant:s,onClick:n},r),Vc(Vh,{key:"cancel",variant:"link",onClick:i},a("ai:Cancel"))]},o)},Fs=KA;import Nh from"react";import{Text as XA,TextContent as JA}from"@patternfly/react-core";var ZA=({children:e})=>Nh.createElement(JA,null,Nh.createElement(XA,{component:"h2"},e)),Ke=ZA;import hl from"react";import{WizardBody as QA}from"@patternfly/react-core";import{css as Hh}from"@patternfly/react-styles";import Oh from"@patternfly/react-styles/css/components/Wizard/wizard";var eF=({navigation:e,footer:t,children:o})=>hl.createElement("div",{className:Hh(Oh.wizardOuterWrap,"cluster-wizard-step")},hl.createElement("div",{className:Hh(Oh.wizardInnerWrap)},e,hl.createElement(QA,{"aria-labelledby":"step-id",hasNoBodyPadding:!1},o)),t&&hl.createElement("div",{className:"pf-c-wizard__footer cluster-wizard-step__footer"},t)),ye=eF;import iF from"lodash/values";import At from"react";import{Alert as Gh,AlertGroup as nF,AlertVariant as $h,Flex as aF,FlexItem as Hc,List as lF,ListItem as pF}from"@patternfly/react-core";import Lh from"lodash/values";import Mh from"lodash/keys";import _h from"lodash/reduce";var Wh=({validationId:e,hostGroup:t,clusterGroup:o},r)=>Mh(r).find(i=>{let{cluster:n,host:a}=r[i];return n.validationIds.includes(e)||a.validationIds.includes(e)||o&&n.groups.includes(o)||t&&a.groups.includes(t)}),tF=(e,t)=>{let o=Lh(e).flat().filter(r=>r&&t.includes(r.id));return o.length===t.length&&o.every(r=>r?.status==="disabled"||r?.status==="success")},oF=(e,t,o)=>t.every(r=>e[r]?.every(s=>s.status==="disabled"||s.status==="success"||o.includes(s.id))),Nc=(e,t)=>{let o=Lh(e).flat().filter(r=>r&&t.includes(r.id));return o.length===t.length&&o.every(r=>r?.status==="disabled"||r?.status==="success")},rF=(e,t,o)=>t.every(r=>e[r]?.every(s=>s.status==="disabled"||s.status==="success"||o.includes(s.id))),An=(e,t,o)=>{let{groups:r,validationIds:s}=o[t].host;return _h(e,(i,n,a)=>{if(r.includes(a))return i[a]=n,i;let l=(n||[]).filter(p=>s.includes(p.id));return l.length&&(i[a]=l),i},{})},Fn=(e,t,o)=>{let{status:r}=o;if(["insufficient","pending-for-input"].includes(r)){let{softValidationIds:s}=t[e],i=(typeof o.validationsInfo=="string"?O(o.validationsInfo):o.validationsInfo)||{},{groups:n,validationIds:a}=t[e].host;return rF(i,n,s)&&Nc(i,a)?"known":r}return r},zh=(e,t,o)=>{let{groups:r,validationIds:s}=o[t].cluster;return _h(e,(i,n,a)=>{if(r.includes(a))return i[a]=n,i;let l=(n||[]).filter(p=>s.includes(p.id));return l.length&&(i[a]=l),i},{})},Yr=(e,t,o,r=[])=>{let{status:s}=o;if(["insufficient","pending-for-input"].includes(s)){let i=(typeof o.validationsInfo=="string"?O(o.validationsInfo):o.validationsInfo)||{},{groups:n,validationIds:a}=t[e].cluster,{softValidationIds:l}=t[e],{allowedStatuses:p}=t[e].host;return r.every(c=>p.length===0||p.includes(Fn(e,t,c)))&&oF(i,n,l)&&tF(i,a)?"ready":s}return s},Bh=e=>Object.keys(e).reduce((t,o)=>[...t,...e[o].softValidationIds],[]),sF=e=>Object.keys(e).reduce((t,o)=>{let r=e[o].filter(s=>s.status==="failure");return[...t,...r]},[]),Cl=(e,t,o)=>{let r=An(e,t,o),s=sF(r).map(i=>i.id);if(!s.length)return!1;for(let i of s)if(!o[t].softValidationIds.includes(i))return!1;return!0},Uh=(e,t,o)=>{let r=Mh(t),s=!0;return r.find(i=>{if(i===o&&(s=!1),s)return!1;let{host:n}=t[i];return n.validationIds.includes(e)})};var uF=({currentStepId:e,clusterStatus:t,validationsInfo:o,hosts:r,wizardStepsValidationsMap:s,children:i})=>{let{failedClusterValidations:n,failedHostnameValidations:a}=At.useMemo(()=>{let u=zh(o||{},e,s),c=iF(u).flat(),d=r.some(m=>{let g=typeof m.validationsInfo=="string"?O(m.validationsInfo):m.validationsInfo;return!Nc(g||{},["hostname-valid","hostname-unique"])});return{failedClusterValidations:c.filter(m=>m?.status==="failure"),failedHostnameValidations:d}},[o,e,s,r]),l=Yr(e,s,{status:t,validationsInfo:o||{}},r)==="ready",{t:p}=f();return At.createElement(At.Fragment,null,!o&&At.createElement(Gh,{variant:$h.info,title:"Cluster validations are initializing.",isInline:!0},p("ai:Please hold on till background checks are started.")),!l&&At.createElement(nF,null,i,At.createElement(Gh,{variant:$h.warning,title:"Cluster is not ready yet.",isInline:!0},At.createElement(aF,{spaceItems:{default:"spaceItemsSm"},direction:{default:"column"}},!!n.length&&At.createElement(At.Fragment,null,At.createElement(Hc,null,p("ai:The following requirements must be met:")),At.createElement(Hc,null,At.createElement(lF,null,n.filter(Boolean).map(u=>At.createElement(pF,{key:u.id},u.message))))),a&&At.createElement(Hc,null,p("ai:The cluster is not ready yet. Some hosts have an ineligible name. To change the hostname, click on it."))))))},Oc=uF;import{Table as mN,TableBody as fN,TableVariant as gN}from"@patternfly/react-table";import{createElement as LC,useMemo as CN}from"react";import K,{Fragment as mF}from"react";import{Alert as vl,AlertGroup as fF,AlertVariant as Rh,Level as gF,LevelItem as Kh}from"@patternfly/react-core";import{global_warning_color_100 as hF,global_success_color_100 as CF}from"@patternfly/react-tokens";import{PendingIcon as yF,CheckCircleIcon as vF,ExclamationTriangleIcon as SF}from"@patternfly/react-icons";import no from"react";import{Button as Lc,ButtonVariant as Mc,Flex as qh,FlexItem as yl,Popover as cF}from"@patternfly/react-core";import{ExclamationTriangleIcon as Yh}from"@patternfly/react-icons";import{global_warning_color_100 as jh}from"@patternfly/react-tokens";var dF=({host:e,inventory:t={},onEditHostname:o,title:r,className:s,hosts:i,readonly:n=!1})=>{let a=r||Bo(e,t)||de,l=a!=="localhost",u=(i?!i.find(m=>{let g=O(m.inventory||"")||{};return m.id!==e.id&&Bo(m,g)===a}):!0)&&l,c=no.createElement(qh,{alignItems:{default:"alignItemsCenter"}},o&&!u&&no.createElement(yl,{className:"pf-u-mr-xs"},no.createElement(Yh,{color:jh.value})),no.createElement(yl,null,a)),{t:d}=f();return!n&&o?u?no.createElement(Lc,{variant:Mc.link,isInline:!0,onClick:o,className:s},c):no.createElement(cF,{headerContent:no.createElement(qh,{alignItems:{default:"alignItemsCenter"}},no.createElement(yl,{className:"pf-u-mr-xs"},no.createElement(Yh,{color:jh.value})),no.createElement(yl,null,d("ai:Hostname is not valid"))),bodyContent:d(l?"ai:Hostname is not unique":"ai:Hostname can not be localhost"),footerContent:no.createElement(Lc,{variant:Mc.link,isInline:!0,className:s,onClick:o},d("ai:Change hostname")),minWidth:"30rem",maxWidth:"50rem",hideOnOutsideClick:!0,zIndex:300},no.createElement(Lc,{variant:Mc.link,isInline:!0,className:s},c)):c},Vn=dF;var Xh=({validations:e,variant:t,title:o,actionLinks:r=[]})=>{let{t:s}=f();return K.createElement(vl,{title:o,variant:t,actionLinks:r,isInline:!0},K.createElement("ul",null,e.map(i=>K.createElement("li",{key:i.id},K.createElement("strong",null,ks(s)[i.id]||i.id,":"),"\xA0",xo(i.message)," ",i.status==="failure"&&pi(s)[i.id]))))},IF=({onEditHostname:e,host:t,hostnameValidations:o,variant:r})=>{let{t:s}=f(),i=[K.createElement(Vn,{key:"change-hostname",title:s("ai:Change hostname"),onEditHostname:e,host:t})],n=s("ai:Illegal hostname");return o.length===1?K.createElement(vl,{title:n,variant:r,actionLinks:i,isInline:!0},xo(o[0].message)):K.createElement(Xh,{title:n,validations:o,variant:r,actionLinks:i})},bF=({AdditionalNTPSourcesDialogToggleComponent:e,variant:t,validation:o})=>{let r=[K.createElement(e,{key:"add-ntp-sources"})],{t:s}=f();return K.createElement(vl,{title:s("ai:NTP synchronization failure"),variant:t,actionLinks:r,isInline:!0},xo(o.message)," ",pi(s)[o.id])},xF=({UpdateDay2ApiVipDialogToggleComponent:e,variant:t,validation:o})=>{let r=[K.createElement(e,{key:"update-api-vip"})],{t:s}=f();return K.createElement(vl,{title:s("ai:API connectivity failure"),variant:t,actionLinks:r,isInline:!0},xo(o.message))},Jh=({validations:e,title:t,variant:o,onEditHostname:r,AdditionalNTPSourcesDialogToggleComponent:s,UpdateDay2ApiVipDialogToggleComponent:i,host:n})=>{if(!e.length)return null;let a={["hostname-unique"]:void 0,["hostname-valid"]:void 0,["ntp-synced"]:void 0,["ignition-downloadable"]:void 0},l=[],p=[];for(let c of e)c.id in a&&c.status==="failure"?a[c.id]=c:p.push(c);let u=[];return a["hostname-unique"]&&u.push(a["hostname-unique"]),a["hostname-valid"]&&u.push(a["hostname-valid"]),u.length>0&&r&&l.push(K.createElement(IF,{hostnameValidations:u,variant:o,onEditHostname:r,host:n,key:"hostname-alert"})),a["ignition-downloadable"]&&i&&l.push(K.createElement(xF,{UpdateDay2ApiVipDialogToggleComponent:i,validation:a["ignition-downloadable"],variant:o,key:"ignition-downloadable-alert"})),a["ntp-synced"]&&s&&l.push(K.createElement(bF,{AdditionalNTPSourcesDialogToggleComponent:s,validation:a["ntp-synced"],variant:o,key:"ntp-sync-alert"})),p.length>0&&l.push(K.createElement(Xh,{validations:p,variant:o,title:t,key:"insufficient-alert"})),K.createElement(fF,null,l)},Zh=({validationsInfo:e,...t})=>{let{t:o}=f();return K.createElement(K.Fragment,null,Object.keys(e).map(r=>{let s=Bu(o)[r],i=e[r].filter(l=>l.status==="pending"),n=e[r].filter(l=>l.status==="failure"||l.status==="error");return K.createElement(mF,{key:r},K.createElement(gF,{className:"host-validation-groups__validation-group"},K.createElement(Kh,null,K.createElement("strong",null,s)),K.createElement(Kh,null,(()=>n.length?K.createElement(K.Fragment,null,o("ai:Failed")," ",K.createElement(SF,{color:hF.value})):i.length?K.createElement(K.Fragment,null,o("ai:Pending input")," ",K.createElement(yF,null)):K.createElement(K.Fragment,null,o("ai:Ready")," ",K.createElement(vF,{color:CF.value})))())),!n.length&&K.createElement(Jh,{variant:Rh.info,title:o("ai:Pending validations:"),validations:i,...t}),K.createElement(Jh,{variant:Rh.warning,title:o("ai:Failed validations:"),validations:n,...t}))}))};import Qh from"react";import EF from"react";import{useCallback as kF,useEffect as TF,useRef as PF,useState as wF}from"react";var DF=e=>{let t=PF(!1);TF(()=>(t.current=!0,()=>{t.current=!1}),[]);let[o,r]=wF(e),s=kF(i=>{t.current&&r(i)},[]);return[o,s]},qo=DF;import{useRef as YZ}from"react";import $Z from"lodash/isEqual";var AF=({host:e,onEditRole:t,current:o,position:r})=>{let[s,i]=qo(!1),n=async l=>{i(!0);try{await t(l)}finally{i(!1)}},{t:a}=f();return EF.createElement(Th,{defaultValue:xs(a)[0].value,current:o,items:xs(a),setValue:n,isDisabled:s,idPrefix:`role-${e.requestedHostname}`,position:r,menuAppendTo:()=>document.body})},_c=AF;var FF=({host:e,role:t,readonly:o=!1,onEditRole:r,position:s})=>!o&&r?Qh.createElement(_c,{host:e,onEditRole:r,current:t,position:s}):Qh.createElement("span",null,t),Sl=FF;import Kt from"react";import{Popover as VF,Level as Wc,LevelItem as Ii}from"@patternfly/react-core";var NF=({cluster:e,inParenthesis:t=!1,valueId:o="hosts-count"})=>{let{t:r}=f(),s=Kt.createElement(Kt.Fragment,null,"readyHostCount"in e&&Kt.createElement(Wc,null,Kt.createElement(Ii,null,r("ai:Ready for the installation")),Kt.createElement(Ii,null,Ra(e))),"enabledHostCount"in e&&Kt.createElement(Wc,null,Kt.createElement(Ii,null,r("ai:Enabled for the installation")),Kt.createElement(Ii,null,fn(e))),Kt.createElement(Wc,null,Kt.createElement(Ii,null,r("ai:All discovered")),Kt.createElement(Ii,null,gn(e)))),i="enabledHostCount"in e?fn(e):gn(e);return Kt.createElement(VF,{headerContent:r("ai:Hosts in the cluster"),bodyContent:s},Kt.createElement("a",{id:o},t&&"(",i,t&&")"))},Nn=NF;import H from"react";import{Popover as $F,Button as qF,Text as On,TextContent as bi,FlexItem as bl,Flex as sC,Stack as YF,StackItem as jF}from"@patternfly/react-core";import RF from"human-date";import HF from"react";import{Progress as OF,ProgressVariant as eC,ProgressMeasureLocation as tC,ProgressSize as LF}from"@patternfly/react-core";var MF=e=>{switch(e){case"cancelled":case"error":return eC.danger;case"installed":return eC.success;default:return}},_F=e=>e==="installed"?tC.none:tC.top,WF=({host:e})=>{let{status:t}=e,o=mn(e),{currentStage:r,progressInfo:s}=uc(e),i=ja(e),n=`${r}${s?`: ${s}`:" "}`;return HF.createElement(OF,{title:n,value:i,min:1,max:o.length,label:`Step ${i} of ${o.length}`,valueText:`Step ${i} of ${o.length}: ${n}`,variant:MF(t),measureLocation:_F(t),size:LF.sm})},Hn=WF;import zc from"react";import{ExternalLinkAltIcon as zF}from"@patternfly/react-icons";import{Button as BF,ButtonVariant as UF}from"@patternfly/react-core";import oC from"react";var jr=oC.createContext({}),Il=({cluster:e,resetCluster:t,ocpConsoleUrl:o,children:r})=>oC.createElement(jr.Provider,{value:{cluster:e,resetCluster:t,ocpConsoleUrl:o}},r);var GF=({id:e,title:t="OpenShift console"})=>{let{ocpConsoleUrl:o}=zc.useContext(jr)||{};return o?zc.createElement(BF,{variant:UF.link,onClick:()=>window.open(Vu(o),"_blank","noopener noreferrer"),id:e},t," ",zc.createElement(zF,null)):null},rC=GF;import{UnknownIcon as KF}from"@patternfly/react-icons";var XF=(e,t)=>{let o=mn(e),r=ja(e);return t.withProgress?`${t.title} ${r}/${o.length}`:t.title},JF=({details:e,autoCSR:t,additionalPopoverContent:o,...r})=>{let{host:s}=r,{status:i,statusInfo:n}=s,{t:a}=f();return["installing-in-progress"].includes(i)?H.createElement(bi,null,H.createElement(Hn,{host:s})):["error","cancelled","installing-pending-user-action"].includes(i)?H.createElement(bi,null,H.createElement(On,null,e,H.createElement("br",null),xo(n)),H.createElement(Hn,{host:s})):["installed"].includes(i)?H.createElement(bi,null,H.createElement(On,null,e),H.createElement(Hn,{host:s})):["added-to-existing-cluster"].includes(i)?H.createElement(bi,null,H.createElement(On,null,e),!t&&H.createElement(H.Fragment,null,H.createElement("br",null),a("ai:To finish adding nodes to the cluster, approve the join request inside OpenShift Console's Nodes section."),H.createElement("br",null),a("ai:It may take a few minutes for the join request to appear."),H.createElement("br",null),a("ai:If you prefer using the CLI, follow the instructions in"),"\xA0",H.createElement(ot,{href:_u},a("ai:How to approve nodes using the CLI"))),H.createElement(Hn,{host:s})):["preparing-for-installation","preparing-successful","installing","unbinding-pending-user-action","binding","unbinding","reclaiming","reclaiming-rebooting"].includes(i)?H.createElement(bi,null,H.createElement(On,null,e)):H.createElement(YF,{hasGutter:!0},o,H.createElement(jF,null,e&&H.createElement(bi,null,H.createElement(On,null,e)),H.createElement(Zh,{...r})))},ZF=({host:e})=>{let{progress:t,statusUpdatedAt:o}=e,{t:r}=f();if(e.status==="added-to-existing-cluster")return H.createElement(rC,{id:`host-status-detail-link-to-ocp-nodes-${e.requestedHostname||e.id}`});let s;return e.status==="installing-in-progress"?t?.stageUpdatedAt&&t.stageUpdatedAt!==t.stageStartedAt?s=r("ai:Step started at {{startedAt}}, updated {{updatedAt}}",{startedAt:jt(t.stageStartedAt),updatedAt:RF.relativeTime(t.stageUpdatedAt)}):s=r("ai:Step started at {{startedAt}}",{startedAt:jt(t?.stageStartedAt||o)}):o&&(s=r("ai:Status updated at {{humanizedDataTime}}",{humanizedDataTime:jt(o)})),H.createElement(H.Fragment,null,!!s&&H.createElement("small",null,s))},iC=e=>H.createElement($F,{headerContent:H.createElement("div",null,e.title),bodyContent:H.createElement(JF,{...e}),footerContent:H.createElement(ZF,{host:e.host}),minWidth:"30rem",maxWidth:"50rem",hideOnOutsideClick:e.hideOnOutsideClick,zIndex:e.zIndex||300},H.createElement(qF,{variant:"link",isInline:!0,isSmall:e.isSmall},e.children)),QF=({host:e,validationsInfo:t,status:o,onEditHostname:r,AdditionalNTPSourcesDialogToggleComponent:s,UpdateDay2ApiVipDialogToggleComponent:i,children:n,zIndex:a,autoCSR:l,additionalPopoverContent:p})=>{let[u,c]=H.useState(!1),d=H.useCallback(()=>{c(!u),r?.()},[u,r]),{title:m,icon:g,sublabel:h,details:C,noPopover:I}=o,S=XF(e,o),y={hideOnOutsideClick:!u,host:e,onEditHostname:d,AdditionalNTPSourcesDialogToggleComponent:s,title:m,validationsInfo:t,details:C,UpdateDay2ApiVipDialogToggleComponent:i,zIndex:a,autoCSR:l,additionalPopoverContent:p};return H.createElement(sC,{alignItems:{default:"alignItemsCenter"},spaceItems:{default:"spaceItemsXs"}},H.createElement(bl,null,g||H.createElement(KF,null)),H.createElement(sC,{direction:{default:"column"},spaceItems:{default:"spaceItemsXs"}},!n&&!h&&!I?H.createElement(iC,{...y},S):H.createElement(bl,null,S),n&&H.createElement(bl,null,n),h&&H.createElement(bl,{className:"pf-u-font-size-xs",style:{marginTop:"calc(-1 * var(--pf-l-flex--spacer--xs))"}},H.createElement(iC,{...y},h))))},Vs=QF;import uC from"react";import{Modal as uV,ModalVariant as cV}from"@patternfly/react-core";import Ft from"react";import{object as pV}from"yup";import{Button as nC,ButtonVariant as eV,ButtonType as tV,Form as oV,ModalBoxBody as rV,ModalBoxFooter as sV,AlertVariant as aC,Alert as lC,AlertActionCloseButton as iV}from"@patternfly/react-core";import{Formik as nV}from"formik";var aV=(e,t,o=[])=>pV().shape({hostname:ol(e,o,t.hostname)}),lV=({host:e,inventory:t,usedHostnames:o,onCancel:r,onSave:s,onFormSaveError:i})=>{let n=Ft.useRef();Ft.useEffect(()=>{n.current?.focus(),n.current?.select()},[]);let{requestedHostname:a}=e,{hostname:l}=t,p={hostId:e.id,hostname:a||""},{t:u}=f();return Ft.createElement(nV,{validateOnMount:!0,initialValues:p,initialStatus:{error:null},validate:ni(aV(u,p,o)),onSubmit:async(c,d)=>{if(c.hostname===p.hostname){r();return}try{await s(c),r()}catch(m){let g=i&&i(m)||u("ai:Host update failed.");d.setStatus({error:{title:u("ai:Failed to update host"),message:g}})}}},({handleSubmit:c,status:d,setStatus:m,isSubmitting:g,isValid:h,dirty:C})=>Ft.createElement(oV,{onSubmit:c},Ft.createElement(rV,null,Ft.createElement(wn,null,d.error&&Ft.createElement(lC,{variant:aC.danger,title:d.error.title,actionClose:Ft.createElement(iV,{onClose:()=>m({error:null})}),isInline:!0},d.error.message),Ft.createElement(lC,{variant:aC.info,title:u("ai:This name will replace the original discovered hostname."),isInline:!0}),Ft.createElement(al,{name:"discoveredHostname",label:"Discovered hostname"},l||""),Ft.createElement(ws,{label:u("ai:New hostname"),name:"hostname",ref:n,isRequired:!0,isDisabled:!Mg(e.status),richValidationMessages:Br(u)}))),Ft.createElement(sV,null,Ft.createElement(nC,{key:"submit",type:tV.submit,isDisabled:g||!h||!C},u("ai:Change")),Ft.createElement(nC,{key:"cancel",variant:eV.link,onClick:r},u("ai:Cancel")))))},pC=lV;var dV=({isOpen:e,host:t,inventory:o,usedHostnames:r,onClose:s,onSave:i,onFormSaveError:n})=>t&&o?uC.createElement(uV,{"aria-label":"Change hostname dialog",title:"Change hostname",isOpen:e,onClose:s,variant:cV.small,hasNoBodyWrapper:!0},uC.createElement(pC,{host:t,inventory:o,usedHostnames:r,onCancel:s,onSave:i,onFormSaveError:n})):null,Bc=dV;import{List as eee,ListItem as tee,TextContent as oee}from"@patternfly/react-core";import{Fragment as pee,createElement as lee}from"react";import dt from"react";import{Button as mV,ButtonVariant as fV,Popover as gV,Text as xi,TextContent as hV,TextVariants as Ln}from"@patternfly/react-core";import{InfoCircleIcon as CV}from"@patternfly/react-icons";import{Trans as yV}from"react-i18next";var vV=()=>{let{t:e}=f();return dt.createElement(hV,null,dt.createElement(xi,{component:Ln.p},e("ai:Your libvirt virtual machines should be configured to restart automatically after a reboot. You can check this by running:")),dt.createElement(ct,{code:"virsh dumpxml <name> | grep on_reboot"}),dt.createElement(xi,{component:Ln.p},e("ai:And verify that this is the output:")),dt.createElement(ct,{code:"<on_reboot>restart</on_reboot>"}),dt.createElement(xi,{component:Ln.p},e("ai:If not, please start your VMs with the following configuration:")),dt.createElement(ct,{code:"--events on_reboot=restart"}),dt.createElement(xi,{component:Ln.p},dt.createElement(yV,{t:e,components:{code:dt.createElement("code",null)},i18nKey:"ai:When using <code>{{executionCommand}}</code>, please run:",values:{executionCommand:"virt-install"}})),dt.createElement(ct,{code:"virt-install --wait -1 <rest of the command>"}),dt.createElement(xi,{component:Ln.p},e("ai:Otherwise, the VMs will not be able to reboot during the installation process.")))},SV=()=>{let{t:e}=f();return dt.createElement(xi,{component:"p"},dt.createElement(gV,{bodyContent:dt.createElement(vV,null),minWidth:"35rem"},dt.createElement(mV,{variant:fV.link,isInline:!0},dt.createElement(CV,{size:"sm"}),"\xA0",e("ai:Check your VM reboot configuration"))))},Uc=SV;import{createElement as Ct,useCallback as CC,useEffect as EV,useState as hC}from"react";import{Dropdown as cC,DropdownItem as dC,DropdownToggle as mC,DropdownToggleCheckbox as IV,Pagination as bV,Split as xV,SplitItem as fC,Toolbar as kV,ToolbarContent as TV,ToolbarItem as gC,Tooltip as PV}from"@patternfly/react-core";import{CaretDownIcon as wV}from"@patternfly/react-icons";var DV=({itemIDs:e,selectedIDs:t,setSelectedIDs:o,actions:r,showPagination:s,clearAllFilters:i,children:n,...a})=>{let[l,p]=hC(!1),[u,c]=hC(!1),d=CC(()=>c(!u),[u]),m=CC(()=>p(!l),[l]);EV(()=>{t.every(v=>e.includes(v))||o(t.filter(v=>e.includes(v)))},[t,e,o]);let g=!1;t.length&&(g=t.length===e.length&&e.every(v=>t.includes(v))?!0:null);let h=g===!1,C=Ct(cC,{onSelect:m,toggle:Ct(mC,{onToggle:m,toggleIndicator:wV,isDisabled:h},"Actions"),isOpen:l,dropdownItems:r}),I=()=>o(e),S=()=>o([]),{t:y}=f();return Ct(xV,{hasGutter:!0},Ct(fC,{isFilled:!0},Ct(kV,{className:"table-toolbar",clearAllFilters:i},Ct(TV,{className:"table-toolbar__content"},Ct(gC,null,Ct(cC,{onSelect:d,toggle:Ct(mC,{splitButtonItems:[Ct(IV,{id:"select-checkbox",key:"select-checkbox","aria-label":y("ai:Select all"),onChange:v=>v?I():S(),isChecked:g},t.length," ",y("ai:selected"))],onToggle:d}),isOpen:u,dropdownItems:[Ct(dC,{key:"select-all",onClick:I},y("ai:Select all")),Ct(dC,{key:"select-none",onClick:S},y("ai:Select none"))]})),n,Ct(gC,null,h?Ct(PV,{content:"Select one or more hosts"},C):C)))),s&&Ct(fC,null,Ct(bV,{itemCount:e.length,...a,isCompact:!0})))},Gc=DV;import{createElement as vC}from"react";import{DropdownItem as yC}from"@patternfly/react-core";var $c=({onChangeHostname:e})=>vC(yC,{onClick:e},"Change hostname"),qc=({onDeleteHost:e})=>vC(yC,{onClick:e},"Delete");import{createElement as X,useCallback as JV,useEffect as XV,useRef as TC,useState as ZV}from"react";import{Button as Yc,ButtonType as AV,ButtonVariant as FV,Form as VV,HelperText as NV,HelperTextItem as HV,Modal as OV,ModalBoxBody as LV,ModalBoxFooter as MV,Popover as _V,Split as WV,SplitItem as jc,Stack as zV,StackItem as xl}from"@patternfly/react-core";import{Formik as BV,useFormikContext as UV}from"formik";import{object as KV}from"yup";import{global_palette_blue_300 as GV}from"@patternfly/react-tokens/dist/js/global_palette_blue_300";import{InfoCircleIcon as $V}from"@patternfly/react-icons";var SC=e=>{let t=He(e);return Bo(e,t)||""},IC=(e,t)=>t.hostname.replace(/{{n+}}/g,`${e+1}`),bC=(e,t,o)=>{let r=0;return t.map(s=>{let[i,n]=o(s),a={newHostname:i?IC(r,e):void 0,reason:i?void 0:n};return i&&r++,a})},xC={hostname:""},qV=(e,t,o)=>KV().shape({hostname:ol(o,t,e.hostname).required(o("ai:Required field"))}),kC=(e,t)=>(e={...e||{},hostname:(e?.hostname||[]).concat(t)},e),YV=(e,t,o,r,s)=>async i=>{let n=bC(i,e,r).filter(p=>!p.reason).map(({newHostname:p})=>p),a=t.reduce((p,u)=>(e.find(c=>c.id===u.id)||p.push(SC(u)),p),[]),l=await ni(o)({...i,hostname:n[0]||""});return(n.some(p=>a.includes(p||""))||new Set(n).size!==n.length)&&(l=kC(l,Br(s).NOT_UNIQUE)),n.some(p=>Za.includes(p||""))&&(l=kC(l,Br(s).LOCALHOST_ERR)),l},jV=({selectedHosts:e,isOpen:t,patchingHost:o,onClose:r,canChangeHostname:s})=>{let{values:i,handleSubmit:n,isSubmitting:a,status:l,isValid:p}=UV(),u=TC(),c=TC(e);XV(()=>{t&&u.current?.focus()},[t]),JV(()=>{a||(c.current=e)},[e,a]);let d=c.current,m=bC(i,d,s),{t:g}=f();return X(VV,{onSubmit:n},X(LV,null,X(zV,{hasGutter:!0},X(xl,null,X("div",null,g("ai:Rename hostnames using the custom template:")),X("div",null,X("strong",null,"{{n}}")," ",g("ai:to add a number."))),X(xl,null,X(ws,{name:"hostname",ref:u,isRequired:!0,richValidationMessages:Br(g)}),X(NV,null,X(HV,{variant:"indeterminate"},g("ai:For example: host-{{n}}",{interpolation:{suffix:"###",prefix:"###"}})))),X(xl,null,g("ai:Preview"),X("div",{className:"hostname-preview"},d.map((h,C)=>{let{newHostname:I,reason:S}=m[C];return X(WV,{key:h.id||C,hasGutter:!0},X(jc,{className:"hostname-column"},X("div",{className:"hostname-column__text"},X("strong",null,SC(h)))),X(jc,null,X("div",null,X("strong",null,">"))),X(jc,{isFilled:!0},S?X(_V,{"aria-label":g("ai:Cannot change hostname popover"),headerContent:X("div",null,g("ai:Hostname cannot be changed")),bodyContent:X("div",null,S)},X(Yc,{variant:"link",icon:X($V,{color:GV.value}),isInline:!0},g("ai:Not changeable"))):I||g("ai:New hostname will appear here...")))}))),X(xl,null,X(Dn,{error:l?.error,progress:a?100*(o+1)/d.length:null})))),X(MV,null,X(Yc,{key:"submit",type:AV.submit,isDisabled:a||!p},g("ai:Change")),X(Yc,{onClick:r,variant:FV.secondary,isDisabled:a},g("ai:Cancel"))))},RV=({isOpen:e,onClose:t,selectedHostIDs:o,hosts:r,onChangeHostname:s,canChangeHostname:i})=>{let[n,a]=ZV(0),l=r.filter(u=>o.includes(u.id)),{t:p}=f();return X(OV,{"aria-label":p("ai:Change hostnames dialog"),title:p("ai:Change hostnames"),isOpen:e,onClose:t,hasNoBodyWrapper:!0,id:"mass-change-hostname-modal",variant:"small"},X(BV,{initialValues:xC,validate:YV(l,r,qV(xC,[],p),i,p),onSubmit:async(u,c)=>{let d=0;try{for(let m of l){a(d);let g=IC(d,u);await s(m,g),d++}t()}catch(m){c.setStatus({error:{title:p("ai:Failed to update host"),message:D(m)}})}}},X(jV,{isOpen:e,selectedHosts:l,patchingHost:n,onClose:t,canChangeHostname:i})))},Rc=RV;import{createElement as Yo,useState as DC}from"react";import{Button as PC,ButtonVariant as wC,Modal as QV,ModalBoxBody as eN,ModalBoxFooter as tN,Stack as oN,StackItem as Kc}from"@patternfly/react-core";var rN=({isOpen:e,onClose:t,onDelete:o,hosts:r,children:s})=>{let[i,n]=DC(null),[a,l]=DC(),{t:p}=f(),u=async()=>{l(void 0);let c=0;try{for(let d of r)n(100*(c+1)/r.length),await o(d);n(null),t()}catch(d){l({title:p("ai:Failed to delete host"),message:Ge(d)}),n(null)}};return Yo(QV,{"aria-label":p("ai:Delete hosts dialog"),title:p("ai:Delete hosts"),isOpen:e,onClose:t,hasNoBodyWrapper:!0,id:"mass-delete-modal",variant:"medium",titleIconVariant:"warning"},Yo(eN,null,Yo(oN,{hasGutter:!0},Yo(Kc,null,p("ai:You are deleting multiple resources. All resources listed below will be deleted if you continue. This action cannot be undone.")),Yo(Kc,null,s),Yo(Kc,null,Yo(Dn,{error:a,progress:i})))),Yo(tN,null,Yo(PC,{onClick:u,isDisabled:i!==null,variant:wC.danger},p("ai:Delete hosts")),Yo(PC,{onClick:t,variant:wC.secondary,isDisabled:i!==null},p("ai:Cancel"))))},Xc=rN;import{createElement as ve}from"react";import{AddCircleOIcon as sN,BanIcon as Jc,CheckCircleIcon as EC,ConnectedIcon as AC,DisconnectedIcon as FC,ExclamationCircleIcon as iN,ExclamationTriangleIcon as kl,InProgressIcon as hr,LinkIcon as nN,PendingIcon as aN,PlusIcon as lN}from"@patternfly/react-icons";import{global_danger_color_100 as pN,global_warning_color_100 as Tl,global_success_color_100 as VC,chart_color_blue_300 as uN}from"@patternfly/react-tokens";var ki=Object.freeze({"unbinding-pending-user-action":{key:"unbinding-pending-user-action",title:"Removing from cluster",category:"Discovery related",icon:ve(hr,null),details:"This host is being removed from the cluster. To finish, reboot the host with the infrastructure environment ISO."},reclaiming:{key:"reclaiming",title:"Returning to the infrastructure environment",category:"Discovery related",icon:ve(hr,null),details:"This host is being removed from the cluster."},"reclaiming-rebooting":{key:"reclaiming-rebooting",title:"Rebooting while returning to the infrastructure environment",category:"Discovery related",icon:ve(hr,null),details:"This host is being rebooted to be available for reuse in another cluster."},"preparing-failed":{key:"preparing-failed",title:"Preparing step failed",category:"Installation related",details:"Preparing step failed"},unbinding:{key:"unbinding",title:"Removing from cluster",category:"Discovery related",icon:ve(hr,null),details:"This host is being removed from the cluster."},"disabled-unbound":{key:"disabled-unbound",title:"Disabled",category:"Discovery related",icon:ve(Jc,null),details:"This host was manually removed from a cluster and can not be included in another one. Enable this host to make it available again."},"disconnected-unbound":{key:"disconnected-unbound",title:"Disconnected",category:"Discovery related",icon:ve(FC,null),details:"Ensure the host is running, responsive, and is able to contact the installer."},"discovering-unbound":{key:"discovering-unbound",title:"Discovering",category:"Discovery related",icon:ve(AC,null),details:"This host is transmitting its hardware and networking information to the installer. Please wait while this information is received."},"insufficient-unbound":{key:"insufficient-unbound",title:"Insufficient",category:"Discovery related",icon:ve(kl,{color:Tl.value}),details:"This host does not meet the minimum hardware or networking requirements and can not be included in the cluster."},"known-unbound":{key:"known-unbound",title:"Available",category:"Discovery related",icon:ve(lN,{color:uN.value}),details:"This host meets the minimum hardware and networking requirements and can be included in the cluster."},binding:{key:"binding",title:"Binding",category:"Discovery related",icon:ve(nN,null),details:"This host is being added to the cluster."},discovering:{key:"discovering",title:"Discovering",category:"Discovery related",icon:ve(AC,null),details:"This host is transmitting its hardware and networking information to the installer. Please wait while this information is received."},"pending-for-input":{key:"pending-for-input",title:"Pending input",category:"Discovery related",icon:ve(aN,null)},known:{key:"known",title:"Ready",category:"Discovery related",icon:ve(EC,{color:VC.value}),details:"This host meets the minimum hardware and networking requirements and will be included in the cluster."},disconnected:{key:"disconnected",title:"Disconnected",category:"Discovery related",icon:ve(FC,null),details:"This host has lost its connection to the installer and will not be included in the cluster unless connectivity is restored."},insufficient:{key:"insufficient",title:"Insufficient",category:"Discovery related",icon:ve(kl,{color:Tl.value}),details:"This host does not meet the minimum hardware or networking requirements and will not be included in the cluster."},disabled:{key:"disabled",title:"Disabled",category:"Discovery related",icon:ve(Jc,null),details:"This host was manually disabled and will not be included in the cluster. Enable this host to include it again."},"preparing-for-installation":{key:"preparing-for-installation",title:"Preparing for installation",category:"Installation related",icon:ve(hr,null)},"preparing-successful":{key:"preparing-successful",title:"Preparing step successful",category:"Installation related",icon:ve(hr,null)},installing:{key:"installing",title:"Starting installation",category:"Installation related",icon:ve(hr,null)},"installing-in-progress":{key:"installing-in-progress",title:"Installing",category:"Installation related",icon:ve(hr,null),withProgress:!0},"installing-pending-user-action":{key:"installing-pending-user-action",title:"Pending user action",category:"Installation related",icon:ve(kl,{color:Tl.value}),details:"This host is pending user action"},installed:{key:"installed",title:"Installed",category:"Installation related",icon:ve(EC,{color:VC.value}),details:"This host completed its installation successfully."},cancelled:{key:"cancelled",title:"Installation cancelled",category:"Installation related",icon:ve(Jc,null),details:"This host installation has been cancelled.",withProgress:!0},error:{key:"error",title:"Error",category:"Installation related",icon:ve(iN,{color:pN.value}),details:"This host failed its installation.",withProgress:!0},resetting:{key:"resetting",title:"Resetting",category:"Installation related",icon:ve(hr,null),details:"This host is resetting the installation."},"resetting-pending-user-action":{key:"resetting-pending-user-action",title:"Reboot required",category:"Installation related",icon:ve(kl,{color:Tl.value}),details:"Host already booted from disk during previous installation. To finish resetting the installation please boot the host into Discovery ISO."},"added-to-existing-cluster":{key:"added-to-existing-cluster",title:"Installed",category:"Installation related",icon:ve(sN,null),details:"This host completed its installation successfully."}});import cN from"humanize-plus";var NC=e=>e.memory?.physicalBytes||0,HC=e=>e.disks?.filter(t=>t.driveType!==Eg).reduce((t,o)=>t+(o.sizeBytes||0),0)||0,dN=e=>cN.formatNumber(e.cpu?.frequency||0),OC=e=>({cores:e.cpu?.count||0,memory:NC(e),disks:HC(e)}),Zc={title:de,sortableValue:0},Ti=e=>{let t=Zc,o=Zc,r=Zc,s=de;if(e.cpu?.count){let a=e.cpu?.flags?.includes("ht")?" (hyper-threaded)":"";s=`${e.cpu?.count} cores${a} at ${dN(e)} MHz`,t={title:e.cpu?.count.toString(),sortableValue:e.cpu?.count}}let i=NC(e);i&&(o={title:Io(i,2,"iec"),sortableValue:i});let n=HC(e);return n&&(r={title:Io(n,2,"si"),sortableValue:n}),{serialNumber:e.systemVendor?.serialNumber||de,cores:t,cpuSpeed:s,memory:o,disk:r}};var hN=({hosts:e=[]})=>{let t=CN(()=>{let o=zr(e).reduce((r,s)=>{r.count++;let i=O(s.inventory);if(i){let n=OC(i);r.cores+=n.cores,r.memory+=n.memory,r.fs+=n.disks}return r},{count:0,cores:0,memory:0,fs:0});return[{cells:["Hosts",o.count]},{cells:["Cores",o.cores]},{cells:["Memory",Io(o.memory,2,"iec")]},{cells:["Storage",Io(o.fs,2,"si")]}]},[e]);return LC(mN,{rows:t,cells:["",""],variant:gN.compact,borders:!1,"aria-label":"Cluster summary table",className:"review-hosts-table"},LC(fN,null))},Qc=hN;import We from"react";import yN from"lodash/values";import{Button as vN,ButtonVariant as SN}from"@patternfly/react-core";import{CheckCircleIcon as IN,ExclamationCircleIcon as bN,ExclamationTriangleIcon as xN}from"@patternfly/react-icons";import{global_success_color_100 as kN,global_danger_color_100 as TN,global_warning_color_100 as PN}from"@patternfly/react-tokens";import{Trans as wN}from"react-i18next";var MC=()=>{let{t:e}=f();return We.createElement(We.Fragment,null,We.createElement(IN,{color:kN.value})," ",e("ai:All validations passed"))},DN=({id:e,count:t})=>{let{t:o}=f();return We.createElement("div",{id:e},o("ai:There is still {{count}} pending validation",{count:t}))},EN=({step:e,setCurrentStepId:t,wizardStepNames:o})=>We.createElement(vN,{variant:SN.link,onClick:()=>t(e),isInline:!0},o[e]),_C=({validation:e,clusterGroup:t,hostGroup:o,severity:r="danger",setCurrentStepId:s,wizardStepNames:i,wizardStepsValidationsMap:n})=>{let{t:a}=f(),l=a("ai:{{check_failed}} check failed",{check_failed:ks(a)[e.id]||Uu(a)[e.id]||e.id}),p,u=Wh({validationId:e.id,clusterGroup:t,hostGroup:o},n);u==="review"?p=a("ai:Please wait till all validations are finished."):u?p=We.createElement(We.Fragment,null,We.createElement(wN,{t:a},"ai:It can be fixed in the"," ",We.createElement(EN,{step:u,setCurrentStepId:s,wizardStepNames:i})," ","step.")):console.error("Unknown validation ID detected in the ",t||o," group:",JSON.stringify(e));let c;return r==="warning"?c=We.createElement(xN,{color:PN.value}):c=We.createElement(bN,{color:TN.value,size:"sm"}),We.createElement("div",{id:`failing-validation-${e.id}`},c," ",l,p?".":""," ",p)},ed=({validationsInfo:e="",setCurrentStepId:t,wizardStepNames:o,wizardStepsValidationsMap:r})=>{let s=O(e)||{},i=[],n=0;return Object.keys(s).forEach(a=>{let l=p=>{p.status==="pending"&&n++,p.status==="failure"&&i.push(We.createElement(_C,{key:p.id,validation:p,clusterGroup:a,setCurrentStepId:t,wizardStepNames:o,wizardStepsValidationsMap:r}))};s[a].forEach(l)}),n&&i.unshift(We.createElement(DN,{key:"pending-validations",id:"cluster-pending-validations",count:n})),i.length===0?We.createElement(MC,null):We.createElement(We.Fragment,null,i)},td=({hosts:e=[],setCurrentStepId:t,wizardStepNames:o,allClusterWizardSoftValidationIds:r,wizardStepsValidationsMap:s})=>{let i={};zr(e).forEach(a=>{let l=O(a.validationsInfo)||{};Object.keys(l).forEach(p=>{let u=c=>{if(c.status==="failure"){let d=r.includes(c.id)?"warning":"danger";i[c.id]=i[c.id]||We.createElement(_C,{key:c.id,validation:c,hostGroup:p,severity:d,setCurrentStepId:t,wizardStepNames:o,wizardStepsValidationsMap:s})}};l[p].forEach(u)})});let n=yN(i);return n.length===0?We.createElement(MC,null):We.createElement(We.Fragment,null,n)};import{array as UC,bool as NN,boolean as VN,lazy as FN,object as od,string as GC}from"yup";var WC=()=>[{url:"",thumbprint:""}],AN=e=>{if(!e)return WC();let t=WC();try{t=JSON.parse(e)}catch{console.warn("Tang Servers can not be parsed")}return t},zC=({cluster:e,pullSecret:t,managedDomains:o,ocpVersions:r,baseDomain:s})=>{let{name:i="",highAvailabilityMode:n="Full",baseDnsDomain:a=s||"",openshiftVersion:l=Xf(r)}=e||{};return{name:i,highAvailabilityMode:n,openshiftVersion:l,pullSecret:t||"",baseDnsDomain:a,SNODisclaimer:n==="None",useRedHatDnsService:!!a&&o.map(p=>p.domain).includes(a),enableDiskEncryptionOnMasters:["all","masters"].includes(e?.diskEncryption?.enableOn??"none"),enableDiskEncryptionOnWorkers:["all","workers"].includes(e?.diskEncryption?.enableOn??"none"),diskEncryptionMode:e?.diskEncryption?.mode??"tpmv2",diskEncryptionTangServers:AN(e?.diskEncryption?.tangServers),diskEncryption:e?.diskEncryption??{},cpuArchitecture:e?.cpuArchitecture||L.x86}},BC=({usedClusterNames:e,featureSupportLevels:t,pullSecretSet:o,ocpVersions:r,validateUniqueName:s,isOcm:i,t:n})=>FN(a=>{let l=()=>th(n,e,a.baseDnsDomain,s,i);return o?od({name:l(),baseDnsDomain:yc.required("Required")}):od({name:l(),baseDnsDomain:yc.required("Required"),pullSecret:oh.required("Required."),SNODisclaimer:VN().when(["highAvailabilityMode","openshiftVersion"],{is:(p,u)=>{let c=(r||[]).find(d=>d.value===u);return p==="None"&&c&&t.getFeatureSupportLevel(c.value,"SNO")==="dev-preview"},then:NN().oneOf([!0],n("ai:Confirm the Single Node OpenShift disclaimer to continue."))}),diskEncryptionTangServers:UC().when("diskEncryptionMode",{is:p=>p==="tang",then:UC().of(od().shape({url:GC().url(n('ai:Tang Server URL must be a valid URL starting with "http://" or "https://"')).required(n("ai:Required.")),thumbprint:GC().required(n("ai:Required."))}))})})});import noe from"react";import{DescriptionList as loe,DescriptionListDescription as poe,DescriptionListGroup as uoe,DescriptionListTerm as coe,Grid as doe,GridItem as moe}from"@patternfly/react-core";import jo from"react";import{Flex as HN,FlexItem as $C,Progress as ON,ProgressMeasureLocation as qC,ProgressVariant as YC}from"@patternfly/react-core";var LN=e=>{switch(e){case"cancelled":case"error":return YC.danger;case"installed":case"adding-hosts":return YC.success;default:return}},MN=e=>["installed","adding-hosts"].includes(e)?qC.none:qC.top,_N=(e,t,o)=>e==="installed"||e==="adding-hosts"?o("ai:Installed on {{humanizedDataTime}}",{humanizedDataTime:jt(t)}):e==="error"?o("ai:Failed on {{humanizedDataTime}}",{humanizedDataTime:jt(t)}):e==="cancelled"?o("ai:Cancelled on {{humanizedDataTime}}",{humanizedDataTime:jt(t)}):dr(o)[e]||e,WN=({cluster:e,minimizedView:t=!1,totalPercentage:o})=>{let{status:r}=e,{t:s}=f();return jo.createElement(jo.Fragment,null,jo.createElement(It,null,jo.createElement(HN,{direction:{default:t?"row":"column"}},jo.createElement($C,null,jo.createElement(A,{title:s("ai:Started on"),value:jt(e.installStartedAt),idPrefix:"cluster-progress-started-on"})),jo.createElement($C,null,jo.createElement(A,{title:s("ai:Status"),value:_N(e.status,e.installCompletedAt,s),idPrefix:"cluster-progress-status"})))),jo.createElement(ee,{condition:!t},jo.createElement(ON,{value:o||0,label:`${o||0}%`,title:" ",measureLocation:MN(r),variant:LN(r),className:"cluster-progress-bar"})))},Mn=WN;import Xe from"react";import{GridItem as jN,ClipboardCopy as RN,clipboardCopyFunc as KN,Button as XN,Alert as JN}from"@patternfly/react-core";import Oe from"react";import{Modal as zN,Button as rd,ButtonVariant as sd,Text as BN,ModalVariant as UN,ExpandableSection as GN}from"@patternfly/react-core";import{InfoCircleIcon as $N}from"@patternfly/react-icons";var qN=e=>e&&e.length>0?[...e.slice(1)].reduce((t,o)=>`${t}
|
|
9
9
|
${o}`,e[0]):"",jC=e=>{let{requiredList:t,...o}=e;return Oe.createElement(GN,{...o},Oe.createElement(ct,{code:qN(t),language:"markup",copiable:!0}))},YN=({cluster:e,consoleUrl:t})=>{let[o,r]=Oe.useState(!0),s=()=>r(!o),[i="",n=""]=[e.apiVip,e.ingressVip],a=`${e.name}.${e.baseDnsDomain}`,l=`apps.${a}`,p=[`${i} api.${a}`,`${n} oauth-openshift.${l}`,`${n} ${kg(t)}`,`${n} grafana-openshift-monitoring.${l}`,`${n} thanos-querier-openshift-monitoring.${l}`,`${n} prometheus-k8s-openshift-monitoring.${l}`,`${n} alertmanager-main-openshift-monitoring.${l}`],u=`*.${l}.`.length+2,c=[`api.${a}`.padEnd(u)+`A ${i}`,`*.${l}`.padEnd(u)+`A ${n}`],{t:d}=f();return Oe.createElement(Oe.Fragment,null,Oe.createElement(BN,{component:"p"},d("ai:In order to access the OpenShift Web Console, use external DNS server or local configuration to resolve its hostname. To do so, either:")),Oe.createElement(jC,{toggleText:d("ai:Option 1: Add the following records to your DNS server (recommended)"),className:"pf-u-pb-md",isExpanded:o,onToggle:s,requiredList:c}),Oe.createElement(jC,{toggleText:d("ai:Option 2: Update your local /etc/hosts or /etc/resolv.conf files"),className:"pf-u-pb-md",isExpanded:!o,onToggle:s,requiredList:p}))},RC=({cluster:e,consoleUrl:t,isDisabled:o,id:r})=>{let[s,i]=Oe.useState(!1),{t:n}=f();return Oe.createElement(Oe.Fragment,null,Oe.createElement(ht,{type:"button",variant:sd.primary,isDisabled:o,onClick:()=>i(!0),"data-testid":r},n("ai:Launch OpenShift Console")),Oe.createElement(XC,{closeModal:()=>i(!1),consoleUrl:t,cluster:e,isOpen:s}))},KC=({cluster:e,consoleUrl:t,idPrefix:o})=>{let[r,s]=Oe.useState(!1),{t:i}=f();return Oe.createElement(Oe.Fragment,null,Oe.createElement(rd,{variant:"link",icon:Oe.createElement($N,null),iconPosition:"left",isInline:!0,onClick:()=>s(!0),"data-testid":`${o}-troubleshooting-hint-open`},i("ai:Not able to access the Web Console?")),Oe.createElement(XC,{closeModal:()=>s(!1),consoleUrl:t,cluster:e,isOpen:r}))},XC=({closeModal:e,cluster:t,consoleUrl:o,isOpen:r})=>{let{t:s}=f(),i=[Oe.createElement(rd,{type:"submit",key:"launch",variant:sd.primary,onClick:()=>window.open(o,"_blank","noopener"),isDisabled:!o},s("ai:Launch OpenShift Console")),Oe.createElement(rd,{variant:sd.secondary,onClick:()=>e(),key:"close"},s("ai:Close"))];return Oe.createElement(zN,{title:s("ai:OpenShift Web Console troubleshooting"),isOpen:r,onClose:e,actions:i,variant:UN.large},Oe.createElement(YN,{cluster:t,consoleUrl:o}))};import{ExternalLinkAltIcon as ZN}from"@patternfly/react-icons";var QN=({cluster:e,credentials:t,error:o=!1,retry:r,idPrefix:s="cluster-creds",credentialsError:i=""})=>{let n,{t:a}=f();if(o)i.includes("403")?n=Xe.createElement(JN,{variant:"info",isInline:!0,title:"You do not have permission to view the cluster credentials"},"For more information, contact your organization administrator"):n=Xe.createElement(_,{title:a("ai:Failed to fetch cluster credentials."),fetchData:r});else if(!t)n=Xe.createElement(z,null);else{if(!t.username&&!t.consoleUrl)return Xe.createElement(Xe.Fragment,null,"N/A");n=Xe.createElement(It,null,t.consoleUrl&&Xe.createElement(A,{title:a("ai:Web Console URL"),value:Xe.createElement(Xe.Fragment,null,Xe.createElement(XN,{variant:"link",icon:Xe.createElement(ZN,null),iconPosition:"right",isInline:!0,onClick:()=>window.open(t.consoleUrl,"_blank","noopener"),"data-testid":`${s}-link-console-url`},t.consoleUrl),Xe.createElement("br",null),e.apiVip&&e.ingressVip&&Xe.createElement(KC,{consoleUrl:t.consoleUrl,cluster:e,idPrefix:s}))}),t.username&&Xe.createElement(Xe.Fragment,null,Xe.createElement(A,{title:"Username",value:t.username}),Xe.createElement(A,{title:a("ai:Password"),value:Xe.createElement(RN,{isReadOnly:!0,onCopy:l=>KN(l,t.password)},"\u2022\u2022\u2022\u2022\u2022")})))}return Xe.createElement(jN,{span:12},n)},id=QN;import JC from"react";import{saveAs as ZC}from"file-saver";import{Button as eH,ButtonVariant as tH}from"@patternfly/react-core";var Pl=new AbortController,ge={abortLastGetRequest(){Pl.abort(),Pl=new AbortController},makeBaseURI(e){return`/v2/clusters/${e||""}`},makeDownloadsBaseURI(e){return`${ge.makeBaseURI(e)}/downloads`},makeLogsBaseURI(e){return`${ge.makeBaseURI(e)}/logs`},makeDownloadsCredentialsBaseURI(e){return`${ge.makeDownloadsBaseURI(e)}/credentials`},makeDownloadsCredentialsPresignedBaseURI(e){return`${ge.makeDownloadsBaseURI(e)}/credentials-presigned`},makeDownloadsFilesPresignedBaseURI(e){return`${ge.makeDownloadsBaseURI(e)}/files-presigned`},makeSupportedPlatformsBaseURI(e){return`${ge.makeBaseURI(e)}/supported-platforms`},makeActionsBaseURI(e){return`${ge.makeBaseURI(e)}/actions`},downloadClusterCredentials(e,t){return V.get(`${ge.makeDownloadsCredentialsBaseURI(e)}?file_name=${t}`,{responseType:"blob",headers:{Accept:"application/octet-stream"}})},getPresignedForClusterCredentials({clusterId:e,fileName:t,hostId:o,logsType:r}){let s=`${r?`&logs_type=${r}`:""}${o?`&host_id=${o}`:""}`;return V.get(`${ge.makeDownloadsCredentialsPresignedBaseURI(e)}?file_name=${t}${s}`)},getPresignedForClusterFiles({clusterId:e,fileName:t,hostId:o,logsType:r}){let s=`${r?`&logs_type=${r}`:""}${o?`&host_id=${o}`:""}`;return V.get(`${ge.makeDownloadsFilesPresignedBaseURI(e)}?file_name=${t}${s}`)},list(){return V.get(`${ge.makeBaseURI()}`,{signal:Pl.signal})},get(e){return V.get(`${ge.makeBaseURI(e)}`,{signal:Pl.signal})},getSupportedPlatforms(e){return V.get(`${ge.makeSupportedPlatformsBaseURI(e)}`)},getPreflightRequirements(e){return V.get(`${ge.makeBaseURI(e)}/preflight-requirements`)},getDefaultConfig(){return V.get(`${ge.makeBaseURI()}/default-config`)},deregister(e){return V.delete(`${ge.makeBaseURI(e)}`)},register(e){return V.post(`${ge.makeBaseURI()}`,e)},update(e,t){return V.patch(`${ge.makeBaseURI(e)}`,t)},install(e){return V.post(`${ge.makeActionsBaseURI(e)}/install`)},cancel(e){return V.post(`${ge.makeActionsBaseURI(e)}/cancel`)},reset(e){return V.post(`${ge.makeActionsBaseURI(e)}/reset`)},registerAddHosts(e){return V.post(`${ge.makeBaseURI()}import`,e)},allowAddHosts(e){return V.post(`${ge.makeActionsBaseURI(e)}/allow-add-workers`)},downloadLogs(e,t){let o=`logs_type=${t?`host&host_id=${t}`:"all"}`;return V.get(`${ge.makeLogsBaseURI(e)}?${o}`,{responseType:"blob",headers:{Accept:"application/octet-stream"}})},getCredentials(e){return V.get(`${ge.makeBaseURI(e)}/credentials`)},listByOpenshiftId(e){return V.get(`${ge.makeBaseURI()}?openshift_cluster_id=${e||""}`)},listBySubscriptionIds(e){return V.get(`${ge.makeBaseURI()}?ams_subscription_ids=${e.toString()}`)}},M=ge;var oH=e=>{let t=e["content-disposition"]&&e["content-disposition"].match(/filename=".*"/);return t?t[0].slice(10,-1):"kubeconfig"},rH=({clusterId:e,status:t,id:o,handleDownload:r})=>{let{addAlert:s}=N(),i=JC.useCallback(async(a,l)=>{try{if(oe){let{data:p}=await M.getPresignedForClusterCredentials({clusterId:a,fileName:"kubeconfig"});ZC(p.url)}else{let p=await M.downloadClusterCredentials(a,"kubeconfig"),u=oH(p.headers);ZC(p.data,u)}}catch(p){x(p,u=>{s({title:l("ai:Could not download kubeconfig"),message:D(u)})})}},[s]),{t:n}=f();return JC.createElement(eH,{variant:tH.secondary,onClick:r||(()=>i(e,n)),isDisabled:!dn(t),id:o,"data-testid":o},"Download kubeconfig")},_n=rH;import Dl from"react";import{useFormikContext as lH}from"formik";import Vt from"react";import{Alert as sH,AlertVariant as QC,List as iH,ListItem as wl,Stack as nH,StackItem as ey}from"@patternfly/react-core";var aH=({snoSupportLevel:e,isDisabled:t=!1,snoExpansionSupported:o=!1})=>{let{t:r}=f();if(!["dev-preview","supported"].includes(e))return null;let s=e==="dev-preview",i=Vt.createElement(Vt.Fragment,null,Vt.createElement(wl,null,r("ai:Installing SNO will result in a non-highly available OpenShift deployment.")),!o&&Vt.createElement(wl,null,r("ai:Currently, adding additional machines to your cluster is not supported."))),n=Vt.createElement(Vt.Fragment,null,Vt.createElement(wl,null,r("ai:SNO is in a proof-of-concept stage and is not supported in any way.")),Vt.createElement(wl,null,r("ai:OpenShift in-place upgrades aren't expected to work with SNO. If an upgrade is needed, your system will need a redeployment.")));return Vt.createElement(sH,{variant:s?QC.warning:QC.info,title:r("ai:Limitations for using Single Node OpenShift"),isInline:!0},Vt.createElement(nH,{hasGutter:!0},Vt.createElement(ey,null,Vt.createElement(iH,null,i,s&&n)),s&&Vt.createElement(ey,null,Vt.createElement(Lr,{name:"SNODisclaimer",label:r("ai:I understand, accept, and agree to the limitations associated with using Single Node OpenShift."),isDisabled:t}))))},nd=aH;var pH=({versions:e,highAvailabilityMode:t})=>{let{values:o}=lH(),r=be(),s=r.getFeatureSupportLevel(o.openshiftVersion,"SNO"),i=r.isFeatureSupported(o.openshiftVersion,"SINGLE_NODE_EXPANSION"),n=r.isFeatureDisabled(o.openshiftVersion,"SNO");return Dl.createElement(Dl.Fragment,null,Dl.createElement(rc,{name:"highAvailabilityMode",versions:e,isDisabled:n}),t==="None"&&s&&Dl.createElement(nd,{isDisabled:n,snoSupportLevel:s,snoExpansionSupported:i}))},ad=pH;import Ire from"react";import{ExclamationCircleIcon as xre,ExclamationTriangleIcon as kre,ExternalLinkAltIcon as Tre}from"@patternfly/react-icons";import{global_warning_color_100 as wre,global_danger_color_100 as Dre}from"@patternfly/react-tokens";var uH="name-of-month DD, YYYY",cH={"4.8":"January 27, 2023","4.7":"August 24, 2022","4.6":"October 27, 2022"},El={"dates format":uH,versions:cH};function Al(e){let t=new Date(e),o=new Date;return Math.floor(Math.abs(o.valueOf()-t.valueOf())/qu)}function ty(e,t){return t&&t!==ui?e-Al(t):e}import{Fragment as IH,createElement as Fl}from"react";import{useField as vH}from"formik";import{Fragment as yH,createElement as Cr,useEffect as CH,useState as hH}from"react";import{useFormikContext as dH}from"formik";import{Checkbox as mH,FormGroup as fH}from"@patternfly/react-core";var pd=({fieldId:e="sshPublicKey"})=>{let{t}=f();return Cr(j,{fieldId:e},t("ai:Paste the content of a public ssh key you want to use to connect to the hosts into this field.")," ",Cr(ot,{href:Hu},t("ai:Learn more")))},gH=({clusterSshKey:e,imageSshKey:t,isDisabled:o=!1})=>{let r=!!t&&(e===t||!e),[s,i]=hH(r),{values:n,setFieldValue:a,errors:l,touched:p}=dH(),u=l.sshPublicKey,c=()=>{n.sshPublicKey&&a("sshPublicKey",Ss(n.sshPublicKey))};CH(()=>{!o&&s&&a("sshPublicKey",t)},[s,t,a,o]);let d=T("shareDiscoverySshKey","checkbox"),{t:m}=f();return Cr(yH,null,Cr(fH,{fieldId:d,label:m("ai:Host SSH Public Key for troubleshooting after installation"),helperTextInvalid:u,validated:p&&u?"error":"default"},Cr(ee,{condition:Boolean(t)},Cr(mH,{name:"shareDiscoverySshKey",id:d,label:m("ai:Use the same host discovery SSH key"),"aria-describedby":`${d}-helper`,isChecked:s,isDisabled:o,onChange:i})),Cr(ee,{condition:!s},Cr(ur,{name:"sshPublicKey",helperText:Cr(pd,null),onBlur:c,isDisabled:o}))))},ud=gH;var SH=({isRequired:e})=>{let[{name:t,value:o},,{setValue:r}]=vH("sshPublicKey"),{t:s}=f();return Fl(Pu,{label:Fl(IH,null,s("ai:SSH public key")," ",Fl(W,{bodyContent:s("ai:Provide an SSH key to be able to connect to the hosts for debugging purposes during the discovery process")})),name:t,helperText:Fl(pd,null),idPostfix:"discovery",onBlur:()=>o&&r(Ss(o)),dropzoneProps:{accept:".pub",maxSize:2048,onDropRejected:({setError:i})=>()=>i(s("ai:File not supported."))},transformValue:Ss,isRequired:e})},cd=SH;import Se from"react";import{useFormikContext as oy}from"formik";import{Grid as bH}from"@patternfly/react-core";import{Trans as dd}from"react-i18next";var ry=()=>{let{setFieldValue:e,values:t}=oy(),o=()=>{t.noProxy&&e("noProxy",Mo(t.noProxy))},{t:r}=f();return Se.createElement(bH,{hasGutter:!0},Se.createElement(St,{label:Se.createElement(Se.Fragment,null,r("ai:HTTP proxy URL")," ",Se.createElement(W,{bodyContent:r("ai:The HTTP proxy URL that agents should use to access the discovery service.")})),name:"httpProxy",placeholder:"http://<user>:<password>@<ipaddr>:<port>",helperText:Se.createElement("div",null,Se.createElement(dd,{t:r,components:{bold:Se.createElement("strong",null)},i18nKey:"ai:URL must start with <bold>http</bold>."}))}),Se.createElement(St,{label:Se.createElement(Se.Fragment,null,r("ai:HTTPS proxy URL")," ",Se.createElement(W,{bodyContent:r("ai:Specify the HTTPS proxy that agents should use to access the discovery service. If you don't provide a value, your HTTP proxy URL will be used by default for both HTTP and HTTPS connections.")})),name:"httpsProxy",placeholder:"http://<user>:<password>@<ipaddr>:<port>",helperText:Se.createElement("div",null,Se.createElement(dd,{t:r,components:{bold:Se.createElement("strong",null)},i18nKey:"ai:URL must start with <bold>http</bold> (https schemes are not currently supported)."}))}),Se.createElement(St,{label:Se.createElement(Se.Fragment,null,r("ai:No proxy domains")," ",Se.createElement(W,{bodyContent:r("ai:Exclude destination domain names, IP addresses, or other network CIDRs from proxying by adding them to this comma-separated list.")})),name:"noProxy",placeholder:"one.domain.com,second.domain.com",helperText:Se.createElement("div",null,Se.createElement(dd,{t:r,components:{bold:Se.createElement("strong",null)},i18nKey:"ai:Use a comma to separate each listed domain. Preface a domain with <bold>.</bold> to include its subdomains. Use <bold>*</bold> to bypass the proxy for all destinations."})),onBlur:o}))},xH=()=>{let{setFieldValue:e,values:t,initialValues:o}=oy(),r=i=>{i?(e("httpProxy",o.httpProxy),e("httpsProxy",o.httpsProxy),e("noProxy",o.noProxy)):(e("httpProxy",""),e("httpsProxy",""),e("noProxy",""))},{t:s}=f();return Se.createElement(Se.Fragment,null,Se.createElement(Lr,{label:s("ai:Configure cluster-wide proxy settings"),name:"enableProxy",className:"ai-proxy-fields",helperText:Se.createElement("p",null,s("ai:If hosts are behind a firewall that requires the use of a proxy, provide additional information about the proxy.")),onChange:i=>r(i),body:t.enableProxy&&Se.createElement(ry,null)}))},md=xH;import Lse from"react";import{Modal as _se,ModalVariant as Wse}from"@patternfly/react-core";import Me from"react";import{saveAs as BH}from"file-saver";import{Alert as uy,Button as vd,ButtonVariant as Sd,ClipboardCopy as cy,clipboardCopyFunc as dy,ModalBoxBody as UH,ModalBoxFooter as GH,Stack as $H,StackItem as Id}from"@patternfly/react-core";import Ro from"react";import{TextListItem as Wn,OrderType as kH,Text as TH,TextContent as PH,TextList as wH}from"@patternfly/react-core";import{Trans as DH}from"react-i18next";var EH=({showAllInstructions:e=!1,isSNO:t=!1})=>{let{t:o}=f();return Ro.createElement(PH,null,Ro.createElement(TH,{component:"h3"},o("ai:Adding hosts instructions")),Ro.createElement(wH,{component:"ol",type:kH.number,style:{marginLeft:0}},Ro.createElement(Wn,{hidden:!e},o("ai:Click the Add host button.",{count:+t})),Ro.createElement(Wn,{hidden:!e},o("ai:Configure the SSH key and proxy settings after the modal appears (optional).")),Ro.createElement(Wn,null,o("ai:Download the Discovery ISO (onto a USB drive, attach it to a virtual media, etc.) and use it to boot your hosts.")),Ro.createElement(Wn,null,Ro.createElement(DH,{t:o,count:+t,components:{bold:Ro.createElement("strong",null)},i18nKey:"ai:Keep the Discovery ISO media connected to the device throughout the installation process and set each host to boot <bold>only one time</bold> from this device. "})),Ro.createElement(Wn,null,o("ai:Booted hosts should appear in the host inventory table. This may take a few minutes."))))},fd=EH;import ze from"react";import{lazy as WH,object as zH}from"yup";import{Button as gd,Form as VH,ModalBoxBody as NH,ModalBoxFooter as HH,AlertVariant as ly,Alert as hd,Stack as OH,StackItem as Cd}from"@patternfly/react-core";import{ExternalLinkAltIcon as LH}from"@patternfly/react-icons";import{Formik as MH}from"formik";import Ko from"react";import{Stack as AH,StackItem as sy}from"@patternfly/react-core";var iy="imageType",ny=({text:e,popoverContent:t})=>Ko.createElement(Ko.Fragment,null,e," ",Ko.createElement(W,{component:"a",bodyContent:t,noVerticalAlign:!0})),FH=()=>{let{t:e}=f();return Ko.createElement(AH,{hasGutter:!0},Ko.createElement(sy,null,Ko.createElement(Re,{name:iy,id:"minimal-iso",value:"minimal-iso",label:Ko.createElement(ny,{text:e("ai:Minimal image file: Provision with virtual media"),popoverContent:e("ai:Recommended option. The generated discovery ISO will be smaller, but will need to download additional data during boot. This option is useful if ISO storage capacity is limited or if it's being served over a constrained network.")})})),Ko.createElement(sy,null,Ko.createElement(Re,{name:iy,id:"full-iso",value:"full-iso",label:Ko.createElement(ny,{text:e("ai:Full image file: Provision with physical media"),popoverContent:e("ai:The generated discovery ISO will contain everything needed to boot.")})})))},ay=FH;var yd=()=>{let{t:e}=f();return ze.createElement(hd,{title:e("ai:To use static network configuration, follow the steps listed in the documentation."),isInline:!0,variant:"info"},ze.createElement(gd,{variant:"link",icon:ze.createElement(LH,null),iconPosition:"right",isInline:!0,onClick:()=>window.open(Yu,"_blank","noopener")},e("ai:View documentation")))},_H=WH(e=>zH().shape({sshPublicKey:el,httpProxy:vc(e,"httpsProxy"),httpsProxy:vc(e,"httpProxy"),noProxy:ih})),py=({handleSubmit:e,onCancel:t,sshPublicKey:o,httpProxy:r,httpsProxy:s,noProxy:i,imageType:n,hideDiscoveryImageType:a,hasDHCP:l})=>{let p={sshPublicKey:o||"",httpProxy:r||"",httpsProxy:s||"",noProxy:i||"",enableProxy:!!(r||s||i),imageType:n||"minimal-iso"},{t:u}=f();return ze.createElement(MH,{initialValues:p,initialStatus:{error:null},validationSchema:_H,onSubmit:e},({submitForm:c,isSubmitting:d,status:m})=>ze.createElement(ze.Fragment,null,ze.createElement(NH,null,ze.createElement(OH,{hasGutter:!0},ze.createElement(Cd,null,ze.createElement(hd,{variant:ly.info,isInline:!0,title:u("ai:Generate a Discovery ISO in order to add hosts to the cluster.")})),l===!1&&ze.createElement(Cd,null,ze.createElement(yd,null)),ze.createElement(Cd,null,ze.createElement(VH,null,m?.error&&ze.createElement(hd,{variant:ly.danger,title:m.error.title,isInline:!0},m.error.message),!a&&ze.createElement(ay,null),ze.createElement(cd,null),ze.createElement(md,null))))),ze.createElement(HH,null,ze.createElement(gd,{onClick:c,isDisabled:d,isLoading:d},u(d?"ai:Generating":"ai:Generate Discovery ISO")),ze.createElement(gd,{key:"cancel",variant:"link",onClick:t},u("ai:Cancel")))))};var qH=({fileName:e="discovery.iso",downloadUrl:t,onClose:o,onReset:r,hasDHCP:s,isSNO:i=!1})=>{let n=`wget -O ${e} '${t||""}'`,{t:a}=f();return Me.createElement(Me.Fragment,null,Me.createElement(UH,null,Me.createElement($H,{hasGutter:!0},Me.createElement(Id,null,Me.createElement(uy,{isInline:!0,variant:"success",title:a("ai:Discovery ISO is ready to be downloaded")},Me.createElement(Me.Fragment,null,"\xA0",Me.createElement(fd,{isSNO:i})))),s===!1&&Me.createElement(Id,null,Me.createElement(yd,null)),Me.createElement(Id,null,Me.createElement(It,null,Me.createElement(A,{title:a("ai:Discovery ISO URL"),value:Me.createElement(cy,{isReadOnly:!0,onCopy:l=>dy(l,t)},t)}),Me.createElement(A,{title:a("ai:Command to download the ISO:"),value:Me.createElement(cy,{isReadOnly:!0,onCopy:l=>dy(l,n)},n)})),Me.createElement(uy,{variant:"info",isInline:!0,title:`${a("ai:Never share your downloaded ISO with anyone else.")} ${a("ai:Forwarding it could put your credentials and personal data at risk.")}`})))),Me.createElement(GH,null,Me.createElement(vd,{variant:Sd.primary,onClick:()=>t&&BH(t),"data-testid":"download-iso-btn",isDisabled:!t},a("ai:Download Discovery ISO")),Me.createElement(vd,{variant:Sd.secondary,onClick:o,"data-testid":"close-iso-btn"},a("ai:Close")),r&&Me.createElement(vd,{variant:Sd.link,onClick:r,"data-testid":"edit-iso-btn"},a("ai:Edit ISO configuration"))))},Vl=qH;import YH from"react";import{Alert as jH,AlertVariant as RH}from"@patternfly/react-core";var KH=({someDisksAreSkipFormatting:e})=>{let{t}=f();return YH.createElement(jH,{variant:RH.warning,isInline:!0,title:t(e?"ai:There may be issues with the boot order":"ai:All bootable disks will be formatted during installation. Make sure to backup any sensitive data.")},e?t("ai:You have opted out of formatting bootable disks on some hosts. To ensure the hosts reboot into the expected installation disk, manual user intervention may be required during OpenShift installation."):"")},bd=KH;import pe from"react";import{Button as XH,Modal as Xse,ButtonVariant as JH,ModalVariant as Jse,TextContent as ZH,Text as rt,TextVariants as st}from"@patternfly/react-core";import{InfoCircleIcon as QH}from"@patternfly/react-icons";import{Trans as eO}from"react-i18next";var my=()=>{let{t:e}=f();return pe.createElement(ZH,null,pe.createElement(rt,{component:st.p},e("ai:To troubleshoot host discovery issues, complete the following steps:")),pe.createElement(rt,{component:st.h2},e("ai:Verify that your host machine is powered on")),pe.createElement(rt,{component:st.p},e("ai:Note: Boot time depends on several factors such as your hardware and network configuration, and if you are booting from an ISO.")),pe.createElement(rt,{component:st.h2},e("ai:If you used DHCP networking, verify that your DHCP server is enabled")),pe.createElement(rt,{component:st.h2},e("ai:If you used static IP, bridges, and bonds networking, verify that your configurations are correct")),pe.createElement(rt,{component:st.h2},e("ai:SSH into your machine")),pe.createElement(rt,{component:st.p},e("ai:Verify that you can access your host machine using SSH, or a console such as BMC or virtual machine console. In the CLI, enter the following command:")),pe.createElement(ct,{code:"ssh -i <identity_file> core@<machine-ip>"}),pe.createElement(rt,{component:st.p},e("ai:NOTE: Authentication is provided by the discovery ISO, therefore when you access your host using SSH, a password is not required. Optional -i parameter can be used to specify the private key that matches the public key provided when generating Discovery ISO.")),pe.createElement(rt,{component:st.h2},e("ai:Verify that the discovery agent is running with the correct parameters")),pe.createElement(ct,{code:"ps -ef | grep agent"}),pe.createElement(rt,{component:st.p},e("ai:The output displays the following:")),pe.createElement(ct,{code:`root 1786 1 0 08:03 ? 00:00:00 /usr/local/bin/agent --url https://api.openshift.com --cluster-id e4c85fbe-77c7-411e-b107-5120f615c4fb --agent-version registry.redhat.io/openshift4/assisted-installer-agent-rhel8:v4.6.0-17 --insecure=false
|
|
10
10
|
core 2362 2311 0 08:04 pts/0 00:00:00 grep --color=auto agent`}),pe.createElement(rt,{component:st.h2},e("ai:Verify that the agent ran successfully")),pe.createElement(rt,{component:st.p},e("ai:To verify that the agent ran successfully, check the logs:")),pe.createElement(ct,{code:"sudo journalctl -u agent.service"}),pe.createElement(rt,{component:st.p},e("ai:In the following example, the errors indicate there is a network issue:")),pe.createElement(ct,{code:`Oct 15 11:26:35 localhost systemd[1]: agent.service: Service RestartSec=3s expired, scheduling restart.
|
|
@@ -6,9 +6,9 @@ export declare const clusterHostsSelectionLabel: (t: TFunction) => {
|
|
|
6
6
|
export declare const wizardStepNames: (t: TFunction) => {
|
|
7
7
|
review: string;
|
|
8
8
|
"cluster-details": string;
|
|
9
|
+
networking: string;
|
|
9
10
|
"hosts-selection": string;
|
|
10
11
|
"hosts-discovery": string;
|
|
11
|
-
networking: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const HOSTS_MAX_COUNT = 1024;
|
|
14
14
|
export declare const HOSTS_MIN_COUNT = 3;
|
|
@@ -23,12 +23,12 @@ declare type ClusterPropertyItem = {
|
|
|
23
23
|
value?: React.ReactNode;
|
|
24
24
|
};
|
|
25
25
|
export declare const getClusterProperties: (clusterDeployment: ClusterDeploymentK8sResource, agentClusterInstall: AgentClusterInstallK8sResource) => {
|
|
26
|
-
name: ClusterPropertyItem;
|
|
27
26
|
clusterNetworkCidr: ClusterPropertyItem;
|
|
28
27
|
clusterNetworkHostPrefix: ClusterPropertyItem;
|
|
29
28
|
serviceNetworkCidr: ClusterPropertyItem;
|
|
30
29
|
apiVip: ClusterPropertyItem;
|
|
31
30
|
ingressVip: ClusterPropertyItem;
|
|
31
|
+
name: ClusterPropertyItem;
|
|
32
32
|
baseDnsDomain: ClusterPropertyItem;
|
|
33
33
|
openshiftVersion: ClusterPropertyItem;
|
|
34
34
|
clusterId: ClusterPropertyItem;
|
package/package.json
CHANGED