Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_tpm_ui
daiao 5 years ago
commit 2e1eb3a133

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-12-16 15:50:45 * @Date: 2019-12-16 15:50:45
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 11:04:43 * @LastEditTime : 2019-12-27 15:07:11
*/ */
import Quill from "quill"; import Quill from "quill";
@ -37,7 +37,7 @@ export default class ImageBlot extends BlockEmbed {
node.setAttribute('width', '100%'); node.setAttribute('width', '100%');
} }
node.setAttribute('style', { cursor: 'pointer' }); // node.setAttribute('style', { cursor: 'pointer' });
// if (node.onclick) { // if (node.onclick) {
// console.log('image 有图片点击事件======》》》》》》'); // console.log('image 有图片点击事件======》》》》》》');
@ -60,7 +60,7 @@ export default class ImageBlot extends BlockEmbed {
height: node.height, height: node.height,
display: node.getAttribute('display'), display: node.getAttribute('display'),
id: node.id, id: node.id,
style: node.style // style: node.style
}; };
} }
} }

@ -2,4 +2,9 @@
.ql-editing{ .ql-editing{
left: 0 !important; left: 0 !important;
} }
.ql-editor{
img{
cursor: pointer;
}
}
} }

@ -491,7 +491,7 @@ class DeveloperHome extends React.PureComponent {
</div> </div>
</div> </div>
<div className={'card-table'}> <div className={'card-table'}>
<div bordered={false} className={'filter_ctx_area'}> <div className={'filter_ctx_area'}>
<div> <div>
<Dropdown className={'dropdonw-style'} placement="bottomLeft" overlay={this.getMenuItems('categoryMenu', this.handleCategoryMenuClick)}> <Dropdown className={'dropdonw-style'} placement="bottomLeft" overlay={this.getMenuItems('categoryMenu', this.handleCategoryMenuClick)}>
<span className={'dropdown-span'}>分类 <Icon type="down"/></span> <span className={'dropdown-span'}>分类 <Icon type="down"/></span>

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-12-04 08:36:21 * @Date: 2019-12-04 08:36:21
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 10:38:42 * @LastEditTime : 2019-12-27 14:51:42
*/ */
import './index.scss'; import './index.scss';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
@ -99,6 +99,11 @@ function RecordDetail (props) {
<span className="status_label" style={{ visibility: detail.status === 0 ? 'visible' : 'hidden'}}> <span className="status_label" style={{ visibility: detail.status === 0 ? 'visible' : 'hidden'}}>
执行用时: <span className="status_label_sub">{`${detail.execute_time && Number(detail.execute_time * 1000).toFixed(2)}ms`}</span> 执行用时: <span className="status_label_sub">{`${detail.execute_time && Number(detail.execute_time * 1000).toFixed(2)}ms`}</span>
</span> </span>
<span className="status_label pass_case" style={{ display: [-1, 0, 2, 5].includes(detail.status) ? 'inline-block' : 'none'}}>
<span className="status_label_sub">{detail.pass_sets_count}</span>
<span className="pass_case_span"> / {detail.set_count}</span>
个通过测试用例
</span>
</div> </div>
<div className="result_error_area"> <div className="result_error_area">
<ErrorResult detail={detail}/> <ErrorResult detail={detail}/>

@ -32,6 +32,13 @@
.status_label_sub{ .status_label_sub{
color: #333333; color: #333333;
} }
.pass_case{
float: right;
margin-right: 0;
}
.pass_case_span{
margin-right: 10px;
}
} }
.result_code_area{ .result_code_area{

@ -310,7 +310,7 @@ function JupyterTPI (props) {
}); });
const oUl = ( const oUl = (
<ul className="jupyter_data_list"> <ul className="jupyter_data_list" >
{ oList } { oList }
</ul> </ul>
); );
@ -412,7 +412,7 @@ function JupyterTPI (props) {
<h2 className="borbottom17212F jupyterfilepaths"> <h2 className="borbottom17212F jupyterfilepaths">
<span className={"ml50"}>文件路径</span> <span className={"ml50"}>文件路径</span>
<div className="sortinxdirection"> <div className="sortinxdirection">
<a className="jupyter_name ml50 maxnamewidth200 lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a> <a className="jupyter_name ml50 maxnamewidth186JUPYTER lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a>
<a className={"fr color-blue lineheighttaj font-14"} <a className={"fr color-blue lineheighttaj font-14"}
onClick={() => { onClick={() => {
jsCopy("jupyter_folder_name") jsCopy("jupyter_folder_name")

@ -215,13 +215,13 @@ line-height: 50px !important;
background: #070F1A !important; background: #070F1A !important;
} }
.maxnamewidth200{ .maxnamewidth186JUPYTER{
max-width: 200px; max-width: 186px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
cursor: default; cursor: default;
width: 200px; width: 186px;
} }
.maxnamewidth181{ .maxnamewidth181{

@ -7,7 +7,7 @@
* @LastEditTime: 2019-12-13 23:03:27 * @LastEditTime: 2019-12-13 23:03:27
*/ */
import types from "./actionTypes"; import types from "./actionTypes";
import { message } from 'antd'; import { message ,Modal} from 'antd';
import { import {
fetchJupyterTpiDataSet, fetchJupyterTpiDataSet,
fetchJupyterTpiUrl, fetchJupyterTpiUrl,
@ -78,8 +78,8 @@ export const getJupyterTpiUrl = (obj) => {
if (res.status === 200) { if (res.status === 200) {
const { status, url = '', port } = res.data; const { status, url = '', port } = res.data;
dispatch(updataspinning(false)) dispatch(updataspinning(false))
setTimeout(()=>{ dispatch(addjypertime(Date.now() +3600 * 1000))},500) //setTimeout(()=>{ dispatch(addjypertime(Date.now() +3600 * 1000))},500)
// timeinfo_with_tpi(id,dispatch) timeinfo_with_tpi(id,dispatch)
dispatch({ dispatch({
type: types.GET_JUPYTER_TPI_URL, type: types.GET_JUPYTER_TPI_URL,
payload: { payload: {
@ -240,27 +240,26 @@ export const updataspinning=(type)=>{
// 获取重置实训后的时间 // 获取重置实训后的时间
export const timeinfo_with_tpi = (identifier, dispatch) => { export const timeinfo_with_tpi = (identifier, dispatch) => {
debugger
const params = { const params = {
identifier: identifier identifier: identifier
}; };
debugger
timeinfo_with_tpis(params).then(res => { timeinfo_with_tpis(params).then(res => {
debugger
console.log('同步时间成功: ', res);
if (res.data.status === 401) return; if (res.data.status === 401) return;
if (res.status === 200) { if (res.status === 200) {
const {status} = res.data if(res.data.status===0){
console.log(status) if(res.data.useSeconds===null){
// dispatch(addjypertime(Date.now() +3600 * 1000)) Modal.warning({
// setTimeout(()=>{ dispatch(addjypertime(Date.now() +3600 * 1000))},500) title: '提示',
// if (status === 0) { content: '因为这个实训pod不在了无法获取倒计时请联系系统管理人员',
// message.success(msg); });
// dispatch(updataspinning(false)) }else{
// setTimeout(() => { let useSeconds=res.data.useSeconds;
// window.location.reload(); let summain=3600 * 1000;
// }, 300); let sums= useSeconds * 1000;
// } let sum=summain-sums;
setTimeout(()=>{ dispatch(addjypertime(Date.now() +sum))},500);
}
}
} }
}) })
} }
Loading…
Cancel
Save