1var K=Object.defineProperty;var z=(x,d,l)=>d in x?K(x,d,{enumerable:!0,configurable:!0,writable:!0,value:l}):x[d]=l;var p=(x,d,l)=>z(x,typeof d!="symbol"?d+"":d,l);import{r as q,j as e}from"./vendor-react-q_qiyTTa.js";import{c as B}from"./vendor-redux-Bq68MXSv.js";import{az as Z,aA as H,aB as U}from"./main-CEjC89ce.js";import{I as m}from"./ImportResource-BQEOozgH.js";import{j as t,H as F,h as i,c as h,f as u,M as f,B as M,S as O}from"./vendor-semantic-DUt9fbZG.js";import{W as b}from"./vendor-utils-Cep4RFcs.js";import"./vendor-q0W-3L2j.js";import"./vendor-react-dom-CQNok9NA.js";import"./vendor-syntax-BW49hFqs.js";import"./vendor-router-BfyMGTt_.js";import"./vendor-yaml-D_yuxGry.js";import"./vendor-toast-BkbVYhAd.js";import"./PremiumRequired-Co5ZUVzv.js";const J=["OpenSearch_1.2","OpenSearch_1.1","OpenSearch_1.0","Elasticsearch_7.10","Elasticsearch_7.9","Elasticsearch_7.8","Elasticsearch_7.7","Elasticsearch_7.4","Elasticsearch_7.1","Elasticsearch_6.8","Elasticsearch_6.7","Elasticsearch_6.5","Elasticsearch_6.4","Elasticsearch_6.3","Elasticsearch_6.2","
1Elasticsearch_6.0","Elasticsearch_5.6","Elasticsearch_5.5","Elasticsearch_5.3","Elasticsearch_5.1","Elasticsearch_2.3","Elasticsearch_1.5"],Q=["t3.small.search","t3.medium.search","c5.large.search","c5.xlarge.search","c5.2xlarge.search","c5.4xlarge.search","c5.9xlarge.search","c5.18xlarge.search","i3.large.search","i3.xlarge.search","i3.2xlarge.search","i3.4xlarge.search","i3.8xlarge.search","i3.16xlarge.search","m5.large.search","m5.xlarge.search","m5.2xlarge.search","m5.4xlarge.search","m5.12xlarge.search","r5.large.search","r5.xlarge.search","r5.2xlarge.search","r5.4xlarge.search","r5.12xlarge.search","t2.small.search","t2.medium.search","c4.large.search","c4.xlarge.search","c4.2xlarge.search","c4.4xlarge.search","c4.8xlarge.search","i2.xlarge.search","i2.2xlarge.search","m4.large.search","m4.xlarge.search","m4.2xlarge.search","m4.4xlarge.search","m4.10xlarge.search","r4.large.search","r4.xlarge.search","r4.2xlarge.search","r4.4xlarge.search","r4.8xlarge.search","r4.16xlarge.search","m3.medium.search","m3.large.search","m3.xlarge.search","m3.2xlarge.search","r3.large.search","r3.xlarge.search","r3.2xlarge.search","r3.4xlarge.search","r3.8xlarge.search","m6g.large.search","m6g.xlarge.search","m6g.2xlarge.search","m6g.4xlarge.search","m6g.8xlarge.search","m6g.12xlarge.search","c6g.large.search","c6g.xlarge.search","c6g.2xlarge.search","c6g.4xlarge.search","c6g.8xlarge.search","c6g.12xlarge.search","r6g.large.search","r6g.xlarge.search","r6g.2xlarge.search","r6g.4xlarge.search","r6g.8xlarge.search","r6g.12xlarge.search","r6gd.large.search","r6gd.xlarge.search","r6gd.2xlarge.search","r6gd.4xlarge.search","r6gd.8xlarge.search","r6gd.12xlarge.search","r6gd.16xlarge.search","ultrawarm1.medium.search","ultrawarm1.large.search","r3.8xlarge.search","t2.micro.search"],y={"OpenSearch_1.2":"r6g.large.search","OpenSearch_1.1":"r6g.large.search","OpenSearch_1.0":"r6g.large.search","Elasticsearch_7.10":"r6g.large.search","Elasticsearch_7.9":"r6g.large.search","Elasticsearch_7.8":"r5.large.search","Elasticsearch_7.7":"r5.large.search","Elasticsearch_7.4":"r5.large.search","Elasticsearch_7.1":"r5.large.search","Elasticsearch_6.8":"r5.large.search","Elasticsearch_6.7":"r5.large.search","Elasticsearch_6.5":"r5.large.search","Elasticsearch_6.4":"r5.large.search","Elasticsearch_6.3":"r5.large.search","Elasticsearch_6.2":"r5.large.search","Elasticsearch_6.0":"r5.large.search","Elasticsearch_5.6":"r5.large.search","Elasticsearch_5.5":"r5.large.search","Elasticsearch_5.3":"r5.large.search","Elasticsearch_5.1":"r5.large.search","Elasticsearch_2.3":"m4.large.search","Elasticsearch_1.5":"m4.large.search"};class X extends q.Component{constructor(){super(...arguments);p(this,"state",{isLoggingModalOpen:!1});p(this,"onLoad",()=>{this.setState({...this.props.configurationVariables})});p(this,"handleInputChange",(l,{value:s,name:r})=>{if(r.includes(".")){const n=r.split(".")[0],g=r.split(".")[1],c={...this.state[n],[g]:s};this.setState({[n]:c},function(){this.updateArtifactTemplate({...this.state,[n]:c})})}else this.setState({[r]:s},function(){this.updateArtifactTemplate({...this.state,[r]:s})})});p(this,"handleSelectChange",(l,{name:s,value:r})=>{if(s==="engineVersion")this.setState({[s]:r,clusterConfig:{...this.state.clusterConfig,instanceType:b(y,r,""),dedicatedMasterType:b(y,r,"")}},function(){this.updateArtifactTemplate({...this.state,[s]:r,clusterConfig:{...this.state.clusterConfig,instanceType:b(y,r,""),dedicatedMasterType:b(y,r,"")}})});else if(s==="clusterConfig.instanceType"){const n=!(r.startsWith("i2.")===!0||r.startsWith("m3.")===!0||r.startsWith("r3.")===!0||r.startsWith("r6gd.")===!0||r.startsWith("i3.")),g=s.split(".")[0],c=s.split(".")[1],o={...this.state[g],[c]:r};this.setState({[g]:o,ebsOptions:{...this.state.ebsOptions,enabled:n}},function(){this.updateArtifactTemplate({...this.state,[g]:o,ebsOptions:{...this.state.ebsOptions,enabled:n}})})}else if(s.includes(".")){const n=s.split(".")[0],g=s.split(".")[1],c={...this.state[n],[g]:r};this.setState({[n]:c},function(){this.updateArtifactTemplate({...this.state,[n]:c})})}else this.setState({[s]:r},function(){this.updateArtifactTemplate({...this.state,[s]:r})})});p(this,"handleCheckboxChange",(l,{checked:s,name:r})=>{if(r.includes(".")){const n=r.split(".")[0],g=r.split(".")[1],c={...this.state[n],[g]:s};this.setState({[n]:c},function(){this.updateArtifactTemplate({...this.state,[n]:c})})}else this.setState({[r]:s},function(){this.updateArtifactTemplate({...this.state,[r]:s})})});p(this,"openModal",()=>this.setState({isLoggingModalOpen:!0}));p(this,"closeModal",()=>this.setState({isLoggingModalOpen:!1}))}componentWillMount(){this.onLoad()}updateArtifactTemplate(l){this.props.currentParentPage==="configurationPackage"?this.props.dispatch(Z(this.props.artifactId,l)):this.props.inDeploymentStack?this.props.dispatch(H(this.props.stackId,this.props.stackItemId,l)):this.props.dispatch(U(l))}render(){const{selectedDeploymentView:l,inDeploymentStack:s,currentParentPage:r}=this.props,{isLoggingModalOpen:n}=this.state,{domainName:g,engineVersion:c,clusterConfig:o,encryptionAtRestEnabled:I,encryptionAtRestKmsKeyId:L,logPublishingSearchSlowLogsEnabled:A,logPublishingSearchSlowLogsCloudWatchLogsLogGroupArn:S,logPublishingEsApplicationLogsEnabled:j,logPublishingEsApplicationLogsCloudWatchLogsLogGroupArn:w,logPublishingIndexSlowLogsEnabled:k,logPublishingIndexSlowLogsCloudWatchLogsLogGroupArn:_,logPublishingAuditLogsEnabled:v,logPublishingAuditLogsCloudWatchLogsLogGroupArn:W,nodeToNodeEncryptionEnabled:V,ebsOptions:E,vpcAccess:G,vpcOptionsSecurityGroupIds:P,vpcOptionsSubnetIds:T}=this.state,D=r==="configurationPackage";let N=J.map(a=>({key:a,value:a,text:a})),R=Q.map(a=>({key:a,value:a,text:a}));return e.jsx("div",{children:l==="cli"||l==="cloudformation"||l==="terraform"||s||D?e.jsx("div",{children:e.jsxs(t,{children:[e.jsx(F,{as:"h4",children:"Cluster Settings"}),e.jsx(t.Field,{required:!0,name:"domainName",control:i,onChange:this.handleInputChange,label:"Domain Name",placeholder:"Enter Domain Name",value:g}),e.jsxs(t.Group,{children:[e.jsx(t.Field,{name:"engineVersion",control:i,required:!0,label:"Engine Version",value:c,onChange:this.handleInputChange,children:e.jsx("input",{style:{minWidth:"170px",width:"170px"}})}),e.jsx(h,{style:{marginTop:"24px",height:"29px"},icon:"chevron down",floating:!0,button:!0,basic:!0,className:"icon",children:e.jsx(h.Menu,{children:e.jsx(h.Menu,{scrolling:!0,children:N.map((a,C)=>e.jsx(h.Item,{name:"engineVersion",text:a.text,value:a.value,onClick:this.handleInputChange},C))})})})]}
1),e.jsx(t.Field,{name:"vpcAccess",control:u,onChange:this.handleCheckboxChange,label:"VPC Access",checked:G}),G===!0?e.jsxs(e.Fragment,{children:[e.jsxs(t.Field,{required:!0,name:"vpcOptionsSubnetIds",control:i,onChange:this.handleInputChange,label:"Subnet Ids",placeholder:"Enter Subnet Ids (Seperated by comma)",value:typeof T=="string"?T:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{inDeploymentStack:s,newResources:[{location:"vpc-complete",title:"VPC",category:"s_vpc"}],multiple:!0,matchResourceTypes:["vpc-subnet.id"],importFromAwsRuleIds:[{ruleDomain:"vpc",ruleId:"vpc_02",property:"resourceId"}],updateValue:a=>this.handleInputChange(null,{name:"vpcOptionsSubnetIds",value:a}),resetValue:a=>this.handleInputChange(null,{name:"vpcOptionsSubnetIds",value:""})}),e.jsx("input",{})]}),e.jsxs(t.Field,{required:!0,name:"vpcOptionsSecurityGroupIds",control:i,onChange:this.handleInputChange,label:"Security Group Ids",placeholder:"Enter Security Group Ids (Seperated by comma)",value:typeof P=="string"?P:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{inDeploymentStack:s,newResources:[{location:"sg_es",title:"OpenSearch Security Group (443 and 80)",category:"sg_nacl"}],importFromAwsRuleIds:[],multiple:!0,matchResourceTypes:["security-group.id"],updateValue:a=>this.handleInputChange(null,{name:"vpcOptionsSecurityGroupIds",value:a}),resetValue:a=>this.handleInputChange(null,{name:"vpcOptionsSecurityGroupIds",value:""})}),e.jsx("input",{})]})]}):null,e.jsx(t.Field,{name:"encryptionAtRestEnabled",control:u,onChange:this.handleCheckboxChange,label:"Encryption At Rest",checked:I}),I===!0?e.jsxs(t.Field,{name:"encryptionAtRestKmsKeyId",control:i,onChange:this.handleInputChange,label:"KMS Key Id",placeholder:"Enter KMS Key Id",value:typeof L=="string"?L:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{inDeploymentStack:s,matchResourceTypes:["kms.keyArn"],newResources:[{location:"KMS",title:"KMS Key",category:"s_kms"}],importFromAwsRuleIds:[{ruleDomain:"kms",ruleId:"kms_rotation",property:"resourceArn"}],updateValue:a=>this.handleInputChange(null,{name:"encryptionAtRestKmsKeyId",value:a}),resetValue:a=>this.handleInputChange(null,{name:"encryptionAtRestKmsKeyId",value:""})}),e.jsx("input",{})]}):null,e.jsx(t.Field,{name:"nodeToNodeEncryptionEnabled",control:u,onChange:this.handleCheckboxChange,label:"Node To Node Encryption",checked:V}),e.jsxs(f,{open:n,size:"mini",trigger:e.jsx(M,{style:{marginTop:"10px",backgroundColor:"#63a9de",color:"white"},primary:!0,fluid:!0,onClick:this.openModal,children:"Log Publishing Options"}),children:[e.jsx(f.Content,{children:e.jsxs(t,{children:[e.jsx(t.Field,{name:"logPublishingSearchSlowLogsEnabled",control:u,onChange:this.handleCheckboxChange,label:"Search Slow Logs",checked:A}),A===!0?e.jsxs(t.Field,{required:!0,name:"logPublishingSearchSlowLogsCloudWatchLogsLogGroupArn",control:i,onChange:this.handleInputChange,label:"CloudWatch Log Group Arn",placeholder:"Enter CloudWatch Log Group Arn",value:typeof S=="string"?S:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{newResources:[{location:"CWLogGroup",title:"CloudWatch Log Group",category:"logging"}],importFromAwsRuleIds:[{ruleDomain:"cloudwatch",ruleId:"cloudwatchlogs_retention",property:"resourceArn"}],matchResourceTypes:["cwloggroup.arn"],inDeploymentStack:s,updateValue:a=>this.handleInputChange(null,{name:"logPublishingSearchSlowLogsCloudWatchLogsLogGroupArn",value:a}),resetValue:a=>this.handleInputChange(null,{name:"logPublishingSearchSlowLogsCloudWatchLogsLogGroupArn",value:""})}),e.jsx("input",{})]}):null,e.jsx(t.Field,{name:"logPublishingEsApplicationLogsEnabled",control:u,onChange:this.handleCheckboxChange,label:"Es Application Logs",checked:j}),j===!0?e.jsxs(t.Field,{required:!0,name:"logPublishingEsApplicationLogsCloudWatchLogsLogGroupArn",control:i,onChange:this.handleInputChange,label:"CloudWatch Log Group Arn",placeholder:"Enter CloudWatch Log Group Arn",value:typeof w=="string"?w:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{newResources:[{location:"CWLogGroup",title:"CloudWatch Log Group",category:"logging"}],importFromAwsRuleIds:[{ruleDomain:"cloudwatch",ruleId:"cloudwatchlogs_retention",property:"resourceArn"}],matchResourceTypes:["cwloggroup.arn"],inDeploymentStack:s,updateV
1alue:a=>this.handleInputChange(null,{name:"logPublishingEsApplicationLogsCloudWatchLogsLogGroupArn",value:a}),resetValue:a=>this.handleInputChange(null,{name:"logPublishingEsApplicationLogsCloudWatchLogsLogGroupArn",value:""})}),e.jsx("input",{})]}):null,e.jsx(t.Field,{name:"logPublishingIndexSlowLogsEnabled",control:u,onChange:this.handleCheckboxChange,label:"Index Slow Logs",checked:k}),k===!0?e.jsxs(t.Field,{required:!0,name:"logPublishingIndexSlowLogsCloudWatchLogsLogGroupArn",control:i,onChange:this.handleInputChange,label:"CloudWatch Log Group Arn",placeholder:"Enter CloudWatch Log Group Arn",value:typeof _=="string"?_:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{newResources:[{location:"CWLogGroup",title:"CloudWatch Log Group",category:"logging"}],importFromAwsRuleIds:[{ruleDomain:"cloudwatch",ruleId:"cloudwatchlogs_retention",property:"resourceArn"}],matchResourceTypes:["cwloggroup.arn"],inDeploymentStack:s,updateValue:a=>this.handleInputChange(null,{name:"logPublishingIndexSlowLogsCloudWatchLogsLogGroupArn",value:a}),resetValue:a=>this.handleInputChange(null,{name:"logPublishingIndexSlowLogsCloudWatchLogsLogGroupArn",value:""})}),e.jsx("input",{})]}):null,e.jsx(t.Field,{name:"logPublishingAuditLogsEnabled",control:u,onChange:this.handleCheckboxChange,label:"Audit Logs",checked:v}),v===!0?e.jsxs(t.Field,{required:!0,name:"logPublishingAuditLogsCloudWatchLogsLogGroupArn",control:i,onChange:this.handleInputChange,label:"CloudWatch Log Group Arn",placeholder:"Enter CloudWatch Log Group Arn",value:typeof W=="string"?W:"Stack Reference",iconPosition:"right",children:[e.jsx(m,{newResources:[{location:"CWLogGroup",title:"CloudWatch Log Group",category:"logging"}],importFromAwsRuleIds:[{ruleDomain:"cloudwatch",ruleId:"cloudwatchlogs_retention",property:"resourceArn"}],matchResourceTypes:["cwloggroup.arn"],inDeploymentStack:s,updateValue:a=>this.handleInputChange(null,{name:"logPublishingAuditLogsCloudWatchLogsLogGroupArn",value:a}),resetValue:a=>this.handleInputChange(null,{name:"logPublishingAuditLogsCloudWatchLogsLogGroupArn",value:""})}),e.jsx("input",{})]}):null]})}),e.jsx(f.Actions,{children:e.jsx(M,{floated:"right",onClick:this.closeModal,children:"Close"})})]}),e.jsx(F,{as:"h4",style:{marginTop:"15px"},children:"Node Settings"}),e.jsx(t.Field,{name:"clusterConfig.zoneAwarenessEnabled",control:u,onChange:this.handleCheckboxChange,label:"Zone Awareness Enabled",checked:o.zoneAwarenessEnabled}),o.zoneAwarenessEnabled===!0?e.jsx(t.Field,{name:"clusterConfig.zoneAwarenessAvailabilityZoneCount",control:O,onChange:this.handleSelectChange,label:"Availability Zone Count",value:o.zoneAwarenessAvailabilityZoneCount,options:[{key:2,text:2,value:2},{key:3,text:3,value:3}]}):null,e.jsx(t.Field,{name:"clusterConfig.dedicatedMasterEnabled",control:u,onChange:this.handleCheckboxChange,label:"Dedicated Master Enabled",checked:o.dedicatedMasterEnabled}),o.dedicatedMasterEnabled===!0?e.jsxs(e.Fragment,{children:[e.jsx(t.Field,{name:"clusterConfig.dedicatedMasterCount",control:i,onChange:this.handleInputChange,label:"Master Node Count",placeholder:"Enter Master Node Count",value:o.dedicatedMasterCount,type:"number"}),e.jsxs(t.Group,{children:[e.jsx(t.Field,{name:"clusterConfig.dedicatedMasterType",control:i,required:!0,label:"Master Node Type",value:o.dedicatedMasterType,onChange:this.handleInputChange,children:e.jsx("input",{style:{minWidth:"170px",width:"170px"}})}),e.jsx(h,{style:{marginTop:"24px",height:"29px"},icon:"chevron down",floating:!0,button:!0,basic:!0,className:"icon",children:e.jsx(h.Menu,{children:e.jsx(h.Menu,{scrolling:!0,children:R.map((a,C)=>e.jsx(h.Item,{name:"clusterConfig.dedicatedMasterType",text:a.text,value:a.value,onClick:this.handleInputChange},C))})})})]})]}):null,e.jsx(t.Field,{name:"clusterConfig.instanceCount",control:i,onChange:this.handleInputChange,label:"Data Node Count",type:"number",placeholder:"Enter Node Count",value:o.instanceCount}),e.jsxs(t.Group,{children:[e.jsx(t.Field,{name:"clusterConfig.instanceType",control:i,required:!0,label:"Data Node Instance Type",value:o.instanceType,onCh
1ange:this.handleInputChange,children:e.jsx("input",{style:{minWidth:"170px",width:"170px"}})}),e.jsx(h,{style:{marginTop:"24px",height:"29px"},icon:"chevron down",floating:!0,button:!0,basic:!0,className:"icon",children:e.jsx(h.Menu,{children:e.jsx(h.Menu,{scrolling:!0,children:R.map((a,C)=>e.jsx(h.Item,{name:"clusterConfig.instanceType",text:a.text,value:a.value,onClick:this.handleInputChange},C))})})})]}),e.jsx(t.Field,{name:"ebsOptions.enabled",control:O,onChange:this.handleInputChange,label:"Data Storage Type",value:E.enabled,options:o.instanceType.startsWith("r6gd.")===!0||o.instanceType.startsWith("i3.")===!0?[{key:"instance",value:!1,text:"Instance"}]:[{key:"ebs",value:!0,text:"EBS"},{key:"instance",value:!1,text:"Instance"}]}),E.enabled===!0?e.jsx(t.Field,{required:!0,name:"ebsOptions.volumeSize",control:i,onChange:this.handleInputChange,label:"EBS Volume Size (GB)",type:"number",placeholder:"Enter EBS Volume Size",value:E.volumeSize}):null]})}):null})}}const ue=B()(X);export{ue as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.