|
|
|
@ -31,8 +31,22 @@ class MainContent extends Component {
|
|
|
|
|
onResizeButtonClick = () => {
|
|
|
|
|
// console.log('onResizeButtonClick')
|
|
|
|
|
}
|
|
|
|
|
onRunCodeTest = () => {
|
|
|
|
|
const vncContainer = this.refs['vncContainer']
|
|
|
|
|
if (vncContainer) {
|
|
|
|
|
vncContainer.showCodeEvaluate && vncContainer.showCodeEvaluate()
|
|
|
|
|
}
|
|
|
|
|
this.props.onRunCodeTest();
|
|
|
|
|
}
|
|
|
|
|
hideCodeEvaluate = () => {
|
|
|
|
|
const vncContainer = this.refs['vncContainer']
|
|
|
|
|
if (vncContainer) {
|
|
|
|
|
vncContainer.onBottomDrawerClose && vncContainer.onBottomDrawerClose()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout,
|
|
|
|
|
const onRunCodeTest = this.onRunCodeTest
|
|
|
|
|
const { challenge, output_sets, latest_output, record, st, readRepoTimeout,
|
|
|
|
|
onTestSetHeaderClick, loading, codeLoading, shixun, vnc_url} = this.props
|
|
|
|
|
|
|
|
|
|
// if (output_sets && output_sets.test_sets) {
|
|
|
|
@ -97,11 +111,23 @@ class MainContent extends Component {
|
|
|
|
|
{ showIframeContent && vnc_url ?
|
|
|
|
|
<CodeRepositoryViewContainer { ...this.props } isOnlyContainer={true}>
|
|
|
|
|
<VNCContainer
|
|
|
|
|
ref="vncContainer"
|
|
|
|
|
vnc_url={vnc_url}
|
|
|
|
|
{...this.props}
|
|
|
|
|
codeEvaluate={
|
|
|
|
|
<div id="games_valuation_contents">
|
|
|
|
|
<CodeEvaluateView output_sets={output_sets} latest_output={latest_output}
|
|
|
|
|
record={record} onTestSetHeaderClick={onTestSetHeaderClick}
|
|
|
|
|
{...this.props} inDrawer={true}
|
|
|
|
|
hideCodeEvaluate={this.hideCodeEvaluate}
|
|
|
|
|
></CodeEvaluateView>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
></VNCContainer>
|
|
|
|
|
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack" style={{height:'48px'}}>
|
|
|
|
|
<ActionView onRunCodeTest={onRunCodeTest} {...this.props}></ActionView>
|
|
|
|
|
<ActionView {...this.props}
|
|
|
|
|
onRunCodeTest={onRunCodeTest}
|
|
|
|
|
></ActionView>
|
|
|
|
|
</div>
|
|
|
|
|
</CodeRepositoryViewContainer>
|
|
|
|
|
:
|
|
|
|
@ -158,7 +184,7 @@ class MainContent extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack" style={{height:'48px'}}>
|
|
|
|
|
<ActionView onRunCodeTest={onRunCodeTest} {...this.props}></ActionView>
|
|
|
|
|
<ActionView {...this.props} onRunCodeTest={onRunCodeTest}></ActionView>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</React.Fragment>
|
|
|
|
|