From 63dad0f1e0a91704752aa97e13300fdd5825fd59 Mon Sep 17 00:00:00 2001 From: zeus Date: Sun, 28 Nov 2021 17:44:46 +0200 Subject: [PATCH] Project BaseDir: --- src-local/llo/new.js | 4 ++++ src/components/mynetwork/mytable.vue | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src-local/llo/new.js b/src-local/llo/new.js index 2030e64..813787c 100644 --- a/src-local/llo/new.js +++ b/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) } diff --git a/src/components/mynetwork/mytable.vue b/src/components/mynetwork/mytable.vue index d879c98..d19c935 100755 --- a/src/components/mynetwork/mytable.vue +++ b/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 +='

' } +var pocmypathinfo = '' +if(pocmypath != ''){ + + pocmypathinfo += 'Project BaseDir: '+pocmypath +} + info +='

' info +=' Directory Maps' info +='
' @@ -707,6 +720,7 @@ info +='LocalContainer' } info +=' ' info +='

' +info += pocmypathinfo info +='
' info +='
' info +='* App with GUI: xhost +local:docker
'