| 5 | import Root from './Root' |
| 6 | |
| 7 | @DashboardWrap('dashboard.view') |
| 8 | class Dashboard extends React.Component { |
| 9 | |
| 10 | renderContent() { |
| 11 | const { params, scale, cells, editMode=true } = this.props |
| 12 | const { background='transparent', height=1080, width='auto' } = params |
| 13 | const childrenCells = Object.keys(cells).filter(key => cells[key].parent == Root.key) |
| 14 | |
| 15 | const style = { position: 'relative', height, width, background } |
| 16 | if(!editMode) { |
| 17 | style['overflow'] = 'hidden' |
| 18 | } |
| 19 | if(scale) { |
| 20 | style['transform'] = 'scale('+ scale +')' |
| 21 | } |
| 22 | const Main = Root.getWidget() |
| 23 | |
| 24 | return <Main className="dashboard" editMode={editMode} style={style} cellKey={Root.key} childrenCells={childrenCells} /> |
| 25 | } |
| 26 | |
| 27 | componentDidCatch(error, info) { |
| 28 | this.props.showError({ error, info }) |
| 29 | } |
| 30 | |
| 31 | render() { |
| 32 | const { height=1080, width='auto' } = this.props.params |
nothing calls this directly
no test coverage detected