Browse Source

fix issue

tags/v1.22.11.3^2
zhoupzh 2 years ago
parent
commit
5dece178c1
3 changed files with 22 additions and 9 deletions
  1. +1
    -1
      templates/repo/home.tmpl
  2. +19
    -7
      web_src/vuepages/pages/notebook/debug/index.vue
  3. +2
    -1
      web_src/vuepages/pages/notebook/debug/vp-notebook-debug.js

+ 1
- 1
templates/repo/home.tmpl View File

@@ -394,7 +394,7 @@
</div>
{{if and (.IsViewFile) (IpynbBool .TreePath)}}
<div id="__vue-root"></div>
<div id="__vue-self-data" data-branch="{{.BranchName}}" data-owner="{{.Repository.OwnerName}}" data-project="{{.Repository.Name}}"
<div id="__vue-self-data" data-branch="{{.BranchName}}" data-owner="{{.SignedUser.Name}}" data-project="{{.Repository.Name}}"
data-file="{{.TreePath}}">
</div>
{{end}}


+ 19
- 7
web_src/vuepages/pages/notebook/debug/index.vue View File

@@ -7,7 +7,10 @@
:close-on-click-modal="false"
@closed="handleClose"
>
<div class="wrapper">
<div class="wrapper" v-loading="loading">
<div style="text-align: center;padding-bottom: 12px;">
<span class="text-tip">{{$t('notebook.tips')}}</span>
</div>
<div v-show="alertCb" class="ui message alert-info">
<div style="display: flex;align-items: center;">
<i class="ri-information-line" style="font-size: 35px;color: rgba(242, 113, 28, 1);;"></i>
@@ -168,9 +171,7 @@
</div>
</div>
<div style="text-align: right;padding-bottom: 12px;">
<span style="color: #f2711c;font-size: 12px;">{{$t('notebook.tips')}}</span>
</div>
</div>
</el-dialog>
</div>
@@ -221,6 +222,7 @@ export default {
deubgUrlGpu:'',
deubgUrlNpuStop:'',
deubgUrlGpuStop:'',
loading:false
};
},
methods: {
@@ -243,14 +245,18 @@ export default {
this.alertCb = false
},
getNotebookInfo(){
this.loading = true
getFileNotebook().then((res)=>{
if(res.data.code==0){
this.notebookInfo = res.data
}else{
Message.error(res.data.message)
}
this.loading = false
}).catch((err)=>{
Message.error(err)
this.loading = false
})
},
getCb1NotebookInfo(path,id,index){
@@ -326,7 +332,6 @@ export default {
Message.error(res.data.message)
}
}).catch((err)=>{
console.log("------",err,err.response)
if(err.response.status===403 && err.response.data.code===1 ){
location.href=`${AppSubUrl}/authentication/wechat/bind`
}
@@ -359,8 +364,6 @@ export default {
clearInterval(timerCb2)
},
mounted() {
console.log("'asdasd")
this.getNotebookInfo()
const selfData = document.querySelector('#__vue-self-data')
this.fileInfo.file = selfData.getAttribute('data-file')
this.fileInfo.branch_name = selfData.getAttribute('data-branch')
@@ -370,6 +373,7 @@ export default {
document
.querySelector("#notebook-debug")
.addEventListener("click", function () {
that.getNotebookInfo()
that.dialogVisible = true;
});
},
@@ -415,6 +419,14 @@ export default {
);
border-radius: 5px 5px 0px 0px;
}
.text-tip{
color: #888;
font-size: 12px;
}
.text-tip::before{
content: '*';
color: #f2711c;
}
.alert-info{
width: 70%;
background-color: rgba(242, 113, 28, 0.05);


+ 2
- 1
web_src/vuepages/pages/notebook/debug/vp-notebook-debug.js View File

@@ -1,10 +1,11 @@
import Vue from 'vue';
import {Dialog} from 'element-ui';
import {Dialog,Loading} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import { i18n, lang } from '~/langs';
import App from './index.vue';

Vue.use(Dialog)
Vue.use(Loading.directive)
new Vue({
i18n,
render: (h) => h(App),


Loading…
Cancel
Save