2016-11-16 16:58:25 +00:00
|
|
|
import React, { Component, PropTypes } from 'react';
|
2016-12-01 18:57:19 +00:00
|
|
|
import classnames from 'classnames';
|
2016-11-16 16:58:25 +00:00
|
|
|
|
|
|
|
|
import Button from 'components/buttons/Button';
|
|
|
|
|
import formDataInterface from 'interfaces/registration_form_data';
|
2016-12-22 19:26:18 +00:00
|
|
|
import Icon from 'components/icons/Icon';
|
2016-12-01 18:57:19 +00:00
|
|
|
import Checkbox from 'components/forms/fields/Checkbox';
|
|
|
|
|
|
|
|
|
|
const baseClass = 'confirm-user-reg';
|
2016-11-16 16:58:25 +00:00
|
|
|
|
|
|
|
|
class ConfirmationPage extends Component {
|
|
|
|
|
static propTypes = {
|
2016-12-01 18:57:19 +00:00
|
|
|
className: PropTypes.string,
|
2016-11-16 16:58:25 +00:00
|
|
|
formData: formDataInterface,
|
|
|
|
|
handleSubmit: PropTypes.func,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
|
const {
|
2016-12-01 18:57:19 +00:00
|
|
|
className,
|
2017-01-11 19:27:33 +00:00
|
|
|
handleSubmit,
|
2016-11-16 16:58:25 +00:00
|
|
|
formData: {
|
|
|
|
|
email,
|
2016-11-21 20:22:14 +00:00
|
|
|
kolide_server_url: kolideWebAddress,
|
2016-11-16 16:58:25 +00:00
|
|
|
org_name: orgName,
|
|
|
|
|
username,
|
|
|
|
|
},
|
|
|
|
|
} = this.props;
|
|
|
|
|
|
2016-12-01 18:57:19 +00:00
|
|
|
const confirmRegClasses = classnames(className, baseClass);
|
|
|
|
|
|
2016-11-16 16:58:25 +00:00
|
|
|
return (
|
2017-01-11 19:27:33 +00:00
|
|
|
<form onSubmit={handleSubmit} className={confirmRegClasses}>
|
2016-12-01 18:57:19 +00:00
|
|
|
<div className={`${baseClass}__wrapper`}>
|
|
|
|
|
<Icon name="success-check" className={`${baseClass}__icon`} />
|
|
|
|
|
<table className={`${baseClass}__table`}>
|
|
|
|
|
<caption>Administrator Configuration</caption>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Username:</th>
|
|
|
|
|
<td>{username}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Email:</th>
|
|
|
|
|
<td>{email}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Organization:</th>
|
|
|
|
|
<td>{orgName}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Kolide URL:</th>
|
|
|
|
|
<td><span className={`${baseClass}__table-url`} title={kolideWebAddress}>{kolideWebAddress}</span></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<div className={`${baseClass}__import`}>
|
|
|
|
|
<Checkbox name="import-install">
|
|
|
|
|
<p>I am migrating an existing <strong>osquery</strong> installation.</p>
|
|
|
|
|
<p>Take me to the <strong>Import Configuration</strong> page.</p>
|
|
|
|
|
</Checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-01-11 19:27:33 +00:00
|
|
|
<Button type="submit" variant="gradient" className={`${baseClass}__submit`} autofocus>
|
2016-12-28 15:24:52 +00:00
|
|
|
Finish
|
|
|
|
|
</Button>
|
2017-01-11 19:27:33 +00:00
|
|
|
</form>
|
2016-11-16 16:58:25 +00:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default ConfirmationPage;
|
|
|
|
|
|