render()

in karavan-designer/src/designer/route/property/InfrastructureSelector.tsx [209:241]


    render() {
        const tabIndex = this.state.tabIndex;
        const tabs = InfrastructureAPI.infrastructure === 'kubernetes' ? ['configMap', 'secret', 'services'] : ['services'];
        return (
            <Modal
                aria-label="Select from Infrastructure"
                width={'50%'}
                className='dsl-modal'
                isOpen={this.props.isOpen}
                onClose={this.props.onClose}
                header={
                    <Flex direction={{default: "column"}}>
                        <FlexItem>
                            <h3>{"Select from " + capitalize(InfrastructureAPI.infrastructure)}</h3>
                            {this.searchInput()}
                        </FlexItem>
                        <FlexItem>
                            <Tabs style={{overflow: 'hidden'}} activeKey={this.state.tabIndex} onSelect={this.selectTab}>
                                {tabs.map(tab => <Tab eventKey={tab} key={tab} title={<TabTitleText>{capitalize(tab)}</TabTitleText>} />)}
                            </Tabs>
                        </FlexItem>
                    </Flex>
                }
                actions={{}}>
                <PageSection variant={this.props.dark ? "darker" : "light"}>
                    {this.searchInput()}
                    {tabIndex === 'configMap' && this.getConfigMapTable()}
                    {tabIndex === 'secret' && this.getSecretsTable()}
                    {tabIndex === 'services' && this.getServicesTable()}
                </PageSection>
            </Modal>
        )
    }