|
|
@ -1,7 +1,7 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* @Description: jupyter tpi
|
|
|
|
* @Description: jupyter tpi
|
|
|
|
* @Author: tangjiang
|
|
|
|
* @Author: tangjiang
|
|
|
|
* @Github:
|
|
|
|
* @Github:
|
|
|
|
* @Date: 2019-12-11 08:35:23
|
|
|
|
* @Date: 2019-12-11 08:35:23
|
|
|
|
* @LastEditors: tangjiang
|
|
|
|
* @LastEditors: tangjiang
|
|
|
|
* @LastEditTime: 2019-12-13 15:25:50
|
|
|
|
* @LastEditTime: 2019-12-13 15:25:50
|
|
|
@ -69,7 +69,7 @@ function JupyterTPI (props) {
|
|
|
|
<Empty />
|
|
|
|
<Empty />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
const {identifier} = params;
|
|
|
|
const {identifier} = params;
|
|
|
|
const [userInfo, setUserInfo] = useState({});
|
|
|
|
const [userInfo, setUserInfo] = useState({});
|
|
|
|
const [jupyterInfo, setJupyterInfo] = useState({});
|
|
|
|
const [jupyterInfo, setJupyterInfo] = useState({});
|
|
|
|
const [updateTip, setUpdateTip] = useState(true);
|
|
|
|
const [updateTip, setUpdateTip] = useState(true);
|
|
|
@ -94,8 +94,8 @@ function JupyterTPI (props) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
/* 先调用 jupyter的 TPI 接口,
|
|
|
|
/* 先调用 jupyter的 TPI 接口,
|
|
|
|
* 获取 用户信息,
|
|
|
|
* 获取 用户信息,
|
|
|
|
* 实训的 identifier, 状态, 名称, 是否被修改等信息
|
|
|
|
* 实训的 identifier, 状态, 名称, 是否被修改等信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
addEventListeners()
|
|
|
|
addEventListeners()
|
|
|
@ -109,7 +109,7 @@ function JupyterTPI (props) {
|
|
|
|
if (user) {
|
|
|
|
if (user) {
|
|
|
|
setUserInfo(user);
|
|
|
|
setUserInfo(user);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (myshixun_identifier) {
|
|
|
|
if (myshixun_identifier) {
|
|
|
|
setMyIdentifier(myshixun_identifier);
|
|
|
|
setMyIdentifier(myshixun_identifier);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -210,7 +210,7 @@ function JupyterTPI (props) {
|
|
|
|
saveJupyterTpi();
|
|
|
|
saveJupyterTpi();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 分页信息改变时
|
|
|
|
// 分页信息改变时
|
|
|
|
const handlePageChange = (current) => {
|
|
|
|
const handlePageChange = (current) => {
|
|
|
|
// 改变当前页
|
|
|
|
// 改变当前页
|
|
|
|
changeCurrentPage(current);
|
|
|
|
changeCurrentPage(current);
|
|
|
@ -243,13 +243,15 @@ function JupyterTPI (props) {
|
|
|
|
// title={item.file_path}
|
|
|
|
// title={item.file_path}
|
|
|
|
mouseLeaveDelay={0.3}
|
|
|
|
mouseLeaveDelay={0.3}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Icon type="file-text" className="jupyter_icon"/>
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
<span className="jupyter_name ml10">{item.title}</span>
|
|
|
|
<Icon type="file-text" className="jupyter_icon fl lineheighttaj" />
|
|
|
|
<a className={"fr color-blue"}
|
|
|
|
<a className="jupyter_name ml10 maxnamewidth150 lineheighttaj colorlineheighttaj" title={item.title}>{item.title}</a>
|
|
|
|
onClick={() => {
|
|
|
|
<a className={"fr color-blue lineheighttaj"}
|
|
|
|
jsCopy("file_path"+i)
|
|
|
|
onClick={() => {
|
|
|
|
}}>复制地址</a>
|
|
|
|
jsCopy("file_path"+i)
|
|
|
|
<input id={"file_path"+i} className={"file_path_input"} value={item.file_path}/>
|
|
|
|
}}>复制地址</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input id={"file_path"+i} className={"file_path_input"} value={item.file_path}/>
|
|
|
|
</Tooltip>
|
|
|
|
</Tooltip>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -276,9 +278,9 @@ function JupyterTPI (props) {
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p className="jupyter_btn">
|
|
|
|
<p className="jupyter_btn">
|
|
|
|
{/* sync | poweroff */}
|
|
|
|
{/* sync | poweroff */}
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
className="btn_common"
|
|
|
|
className="btn_common"
|
|
|
|
type="link"
|
|
|
|
type="link"
|
|
|
|
icon="history"
|
|
|
|
icon="history"
|
|
|
|
onClick={handleClickResetTpi}
|
|
|
|
onClick={handleClickResetTpi}
|
|
|
|
>重置实训</Button>
|
|
|
|
>重置实训</Button>
|
|
|
@ -290,12 +292,12 @@ function JupyterTPI (props) {
|
|
|
|
onClick={handleEnvironmentTpi}
|
|
|
|
onClick={handleEnvironmentTpi}
|
|
|
|
>重置环境</Button>
|
|
|
|
>重置环境</Button>
|
|
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
className="btn_common"
|
|
|
|
className="btn_common"
|
|
|
|
type="link"
|
|
|
|
type="link"
|
|
|
|
icon="poweroff"
|
|
|
|
icon="poweroff"
|
|
|
|
onClick={handleClickQuitTpi}
|
|
|
|
onClick={handleClickQuitTpi}
|
|
|
|
>退出实训</Button>
|
|
|
|
>退出实训</Button>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -358,7 +360,7 @@ function JupyterTPI (props) {
|
|
|
|
const mapStateToProps = (state) => {
|
|
|
|
const mapStateToProps = (state) => {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
jupyter_info,
|
|
|
|
jupyter_info,
|
|
|
|
jupyter_tpi_url,
|
|
|
|
jupyter_tpi_url,
|
|
|
|
jupyter_data_set,
|
|
|
|
jupyter_data_set,
|
|
|
|
jupyter_tpi_url_state,
|
|
|
|
jupyter_tpi_url_state,
|
|
|
|
jupyter_data_set_count,
|
|
|
|
jupyter_data_set_count,
|
|
|
|