test
bosn 6 years ago
parent 924c000bcd
commit 19ed4040ff

@ -5,8 +5,8 @@
"main": "app.js", "main": "app.js",
"scripts": { "scripts": {
"dev": "npm run start", "dev": "npm run start",
"build-css": "node-sass src/ -o build/", "build-css": "node-sass src/ -o src/",
"watch-css": "npm run build-css && node-sass src/ -o build/ --watch --recursive", "watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive",
"start-js": "react-scripts start", "start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js --max-old-space-size=4096", "start": "npm-run-all -p watch-css start-js --max-old-space-size=4096",
"build": "npm run lint && npm run build-css && react-scripts build", "build": "npm run lint && npm run build-css && react-scripts build",

@ -128,6 +128,7 @@ class InterfaceEditor extends Component<
bodyOption={this.state.summaryState.bodyOption} bodyOption={this.state.summaryState.bodyOption}
requestParamsType={this.state.summaryState.requestParamsType} requestParamsType={this.state.summaryState.requestParamsType}
handleChangeProperty={this.handleChangeProperty} handleChangeProperty={this.handleChangeProperty}
handleDeleteMemoryProperty={this.handleDeleteMemoryProperty}
/> />
<ResponsePropertyList <ResponsePropertyList
properties={this.state.properties} properties={this.state.properties}
@ -136,6 +137,7 @@ class InterfaceEditor extends Component<
mod={mod} mod={mod}
itf={this.state.itf} itf={this.state.itf}
handleChangeProperty={this.handleChangeProperty} handleChangeProperty={this.handleChangeProperty}
handleDeleteMemoryProperty={this.handleDeleteMemoryProperty}
/> />
<RModal <RModal
when={this.state.moveInterfaceDialogOpen} when={this.state.moveInterfaceDialogOpen}

@ -43,7 +43,6 @@ type InterfaceSummaryState = {
} }
class InterfaceSummary extends Component<InterfaceSummaryProps, InterfaceSummaryState> { class InterfaceSummary extends Component<InterfaceSummaryProps, InterfaceSummaryState> {
static contextTypes = { static contextTypes = {
onAddForeignRoomCase: PropTypes.func.isRequired,
onDeleteInterface: PropTypes.func.isRequired, onDeleteInterface: PropTypes.func.isRequired,
} }
constructor(props: any) { constructor(props: any) {
@ -264,17 +263,6 @@ class InterfaceSummary extends Component<InterfaceSummaryProps, InterfaceSummary
} }
} }
handleUpdate = () => { /** empty */ } handleUpdate = () => { /** empty */ }
createCase = (e: any, repositoryId: any, interfaceId: any, name: any) => {
e.preventDefault()
this.setState({ name })
const { onAddForeignRoomCase } = this.context
onAddForeignRoomCase({
id: repositoryId,
itf: interfaceId,
name,
})
// itf.repositoryId
}
} }
const mapStateToProps = (state: RootState) => ({ const mapStateToProps = (state: RootState) => ({
room: state.foreign, room: state.foreign,

@ -295,7 +295,7 @@ class PropertyList extends Component<any, any> {
} }
handleDeleteMemoryProperty = (e: any, property: any) => { handleDeleteMemoryProperty = (e: any, property: any) => {
e.preventDefault() e.preventDefault()
const { handleDeleteMemoryProperty } = this.context const { handleDeleteMemoryProperty } = this.props
handleDeleteMemoryProperty(property) handleDeleteMemoryProperty(property)
} }
handleSortProperties = (_: any, sortable: any) => { handleSortProperties = (_: any, sortable: any) => {

Loading…
Cancel
Save