MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / Dashboard

Class Dashboard

xadmin-dashboard/src/components/Dashboard.js:7–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import Root from './Root'
6
7@DashboardWrap('dashboard.view')
8class 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

Callers

nothing calls this directly

Calls 1

componentDidCatchFunction · 0.85

Tested by

no test coverage detected