![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/vendor/swagger-api/swagger-ui/src/core/components/ |
import React from "react" import PropTypes from "prop-types" import ObjectInspector from "react-inspector" export default class Debug extends React.Component { constructor() { super() this.state = { jsonDumpOpen: false } this.toggleJsonDump = (e) => { e.preventDefault() this.setState({jsonDumpOpen: !this.state.jsonDumpOpen}) } } plusOrMinus(bool) { return bool ? "-" : "+" } render() { let { getState, getComponent } = this.props window.props = this.props const Collapse = getComponent("Collapse") return ( <div className="info"> <h3><a onClick={this.toggleJsonDump}> {this.plusOrMinus(this.state.jsonDumpOpen)} App </a></h3> <Collapse isOpened={this.state.jsonDumpOpen} springConfig={{ stiffness: 170, damping: 26 }}> <ObjectInspector data={getState().toJS() || {}} name="state" expandPaths={["state"]}/> </Collapse> </div> ) } } Debug.propTypes = { getState: PropTypes.func.isRequired, getComponent: PropTypes.func.isRequired, }