\n );\n }\n}\n\nexport default withStyles(styles)(DeviceProfileForm);\n","import React, { Component } from \"react\";\nimport { withRouter, Link } from 'react-router-dom';\n\nimport { withStyles } from \"@material-ui/core/styles\";\nimport Grid from '@material-ui/core/Grid';\nimport Card from '@material-ui/core/Card';\nimport CardContent from \"@material-ui/core/CardContent\";\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from \"@material-ui/core/Button\";\n\nimport TitleBar from \"../../components/TitleBar\";\nimport TitleBarTitle from \"../../components/TitleBarTitle\";\n\nimport DeviceProfileForm from \"./DeviceProfileForm\";\nimport DeviceProfileStore from \"../../stores/DeviceProfileStore\";\nimport ServiceProfileStore from \"../../stores/ServiceProfileStore\";\n\n\nconst styles = {\n card: {\n overflow: \"visible\",\n },\n};\n\n\nclass CreateDeviceProfile extends Component {\n constructor() {\n super();\n this.state = {\n spDialog: false,\n };\n this.onSubmit = this.onSubmit.bind(this);\n this.closeDialog = this.closeDialog.bind(this);\n }\n\n componentDidMount() {\n ServiceProfileStore.list(this.props.match.params.organizationID, 0, 0, resp => {\n if (resp.totalCount === \"0\") {\n this.setState({\n spDialog: true,\n });\n }\n });\n }\n\n closeDialog() {\n this.setState({\n spDialog: false,\n });\n }\n\n onSubmit(deviceProfile) {\n let sp = deviceProfile;\n sp.organizationID = this.props.match.params.organizationID;\n\n DeviceProfileStore.create(sp, resp => {\n this.props.history.push(`/organizations/${this.props.match.params.organizationID}/device-profiles`);\n });\n }\n\n render() {\n return(\n