Browse Source

Project BaseDir:

master
zeus 2 years ago
parent
commit
63dad0f1e0
  1. 4
      src-local/llo/new.js
  2. 16
      src/components/mynetwork/mytable.vue

4
src-local/llo/new.js

@ -794,10 +794,12 @@ app.get('/getjupyterinfo', (req, res, next) => {
app.get('/getmountinfo', (req, res, next) => {
var mypath1 = process.cwd()
var RES = new Object();
RES.instance = req.query["instance"]
var showexec = `docker inspect --format='{{json .Mounts}}' ${RES.instance} | jq . -s`
//console.log(JSON.stringify(showexec))
var nypathroot = mypath1+'/instance/'
exec(showexec, (err, stdout, stderr) => {
if (err) {
console.error(`exec error: ${err}`);
@ -822,6 +824,7 @@ app.get('/getmountinfo', (req, res, next) => {
RES.error = false
RES.error_msg = "ok"
RES.test = datajson;
RES.mypath = nypathroot;
//RES.data = found;
res.json(RES)
@ -829,6 +832,7 @@ app.get('/getmountinfo', (req, res, next) => {
var found = 'no'
RES.error = false
RES.error_msg = "ok"
RES.mypath = nypathroot;
//RES.data = found;
res.json(RES)
}

16
src/components/mynetwork/mytable.vue

@ -634,6 +634,9 @@ export default {
var log = await store.dispatch("pipelineLLO/getmountinfo",{
instance:this.hybridshowdata.Names
})
var pocmypathtmp = log.data.mypath
//console.log('log--poc--- ' + pocmypath)
//console.log('log111111111111111---------- ' + JSON.stringify(log))
var container_bash = '/bin/sh'
var container_user = false
@ -646,7 +649,11 @@ export default {
// -----
var swarmlabinstance1c = new RegExp("(/poc-|/POC-)");
var pocurl = 'no'
console.log('log---------- ' + JSON.stringify(this.hybridshowdata))
//console.log('log---------- ' + JSON.stringify(this.hybridshowdata))
var myNetwork = this.hybridshowdata.Networks.split('_')
var pocmypath = pocmypathtmp + myNetwork[0]
//console.log('log---imypath ok------- ' + JSON.stringify(pocmypath))
if(swarmlabinstance1c.test(this.hybridshowdata.Image)){
var swarmlabinstance1cd = new RegExp("(->)");
if(swarmlabinstance1cd.test(this.hybridshowdata.Ports)){
@ -692,6 +699,12 @@ if(pocurl != 'no'){
info +='</p>'
}
var pocmypathinfo = ''
if(pocmypath != ''){
pocmypathinfo += '<b>Project BaseDir:</b> '+pocmypath
}
info +='<p class="text-secondary">'
info +=' <b>Directory Maps</b>'
info +='<br>'
@ -707,6 +720,7 @@ info +='<tr><td><b>Local</b></td><td><i>Container</i></td></tr>'
}
info +=' </table>'
info +='</p>'
info += pocmypathinfo
info +='</h5><br>'
info +='<br>'
info +='<b>*</b> App with GUI: xhost +local:docker <br>'

Loading…
Cancel
Save