import React, { Component, PropTypes } from 'react'; import classnames from 'classnames'; import AdminDetails from 'components/forms/RegistrationForm/AdminDetails'; import ConfirmationPage from 'components/forms/RegistrationForm/ConfirmationPage'; import KolideDetails from 'components/forms/RegistrationForm/KolideDetails'; import OrgDetails from 'components/forms/RegistrationForm/OrgDetails'; const PAGE_HEADER_TEXT = { 1: 'SET USERNAME & PASSWORD', 2: 'SET ORGANIZATION DETAILS', 3: 'SET KOLIDE WEB ADDRESS', 4: 'SUCCESS', }; const baseClass = 'user-registration'; class RegistrationForm extends Component { static propTypes = { onNextPage: PropTypes.func, onSubmit: PropTypes.func, page: PropTypes.number, }; constructor (props) { super(props); const { window } = global; this.state = { errors: {}, formData: { kolide_server_url: window.location.origin, }, }; } onPageFormSubmit = (pageFormData) => { const { formData } = this.state; const { onNextPage } = this.props; this.setState({ formData: { ...formData, ...pageFormData, }, }); return onNextPage(); } onSubmitConfirmation = (evt) => { evt.preventDefault(); const { formData } = this.state; const { onSubmit: handleSubmit } = this.props; return handleSubmit(formData); } isCurrentPage = (num) => { const { page } = this.props; if (num === page) { return true; } return false; } renderHeader = () => { const { page } = this.props; const headerText = PAGE_HEADER_TEXT[page]; if (headerText) { return
Additional admins can be designated within the Kolide App
Passwords must include 7 characters, at least 1 number (eg. 0-9) and at least 1 symbol (eg. ^&*#)
Set your organization's name (eg. Kolide, Inc)
(Optional) Set an organization logo to use in the Kolide application. Should be an https URL to an image file (eg. https://kolide.co/logo.png).
Define the base URL that clients will use to connect to Kolide.
Note: Please ensure the URL is accessible to all endpoints that will be managed by Kolide. The hostname must match the name on your TLS certificate.