Skip to content

Commit

Permalink
More bugfixes - full working now
Browse files Browse the repository at this point in the history
  • Loading branch information
jovanni-hernandez committed Feb 24, 2020
1 parent 4712c0f commit 71437ae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Binary file modified build/srirachaiq_jupyter-1.0.0.zip
Binary file not shown.
36 changes: 20 additions & 16 deletions public/components/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,36 @@
import React from 'react';
import Iframe from 'react-iframe';

import {
EuiPage,
EuiPageBody,
} from '@elastic/eui';

export class Main extends React.Component {
constructor(props) {
super(props);

this.state = {
iframeHeight : "200px"
}
}

componentDidMount(){
let height = "" + (document.getElementsByClassName("application")[0].offsetHeight - 32) + "px";

this.setState({
iframeHeight: height
})
}

render() {
let url = "http://" + window.location.hostname + ":8888";
let iframeHeight = "" + document.getElementsByClassName("euiPageBody")[0].offsetHeight + "px";


const { title } = this.props;
return (
<EuiPage>
<EuiPageBody>
<Iframe url={url}
width="100%"
height={iframeHeight}
id="jupyter-iframe"
display="initial"
<div style={{"padding" : "16px"}}>
<Iframe url={url}
width="100%"
height={this.state.iframeHeight}
id="jupyter-iframe"
display="initial"
position="relative"/>
</EuiPageBody>
</EuiPage>
</div>
);
}
}

0 comments on commit 71437ae

Please sign in to comment.