Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
slapos.toolbox
Commits
190ec815
Commit
190ec815
authored
Nov 26, 2013
by
Alain Takoudjou
Committed by
Nicolas Wavrant
Feb 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix path not found issue
parent
c7b58897
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
22 deletions
+37
-22
slapos/runner/static/js/scripts/viewlog.js
slapos/runner/static/js/scripts/viewlog.js
+33
-21
slapos/runner/templates/viewLog.html
slapos/runner/templates/viewLog.html
+3
-0
slapos/runner/views.py
slapos/runner/views.py
+1
-1
No files found.
slapos/runner/static/js/scripts/viewlog.js
View file @
190ec815
...
@@ -168,27 +168,39 @@ $(document).ready(function () {
...
@@ -168,27 +168,39 @@ $(document).ready(function () {
if
(
!
key
){
if
(
!
key
){
key
=
'
0
'
;
key
=
'
0
'
;
}
}
$
(
tree
).
fancytree
({
$
.
ajax
({
activate
:
function
(
event
,
data
)
{
type
:
"
POST
"
,
var
node
=
data
.
node
;
url
:
$SCRIPT_ROOT
+
'
/getPath
'
,
},
data
:
{
file
:
"
instance_root
"
}
click
:
function
(
event
,
data
)
{
})
if
(
!
data
.
node
.
isFolder
()){
.
done
(
function
(
data
)
{
selectedFile
=
data
.
node
.
data
.
path
;
if
(
data
.
code
===
1
)
{
}
$
(
tree
).
fancytree
({
},
activate
:
function
(
event
,
data
)
{
source
:
{
var
node
=
data
.
node
;
url
:
$SCRIPT_ROOT
+
"
/fileBrowser
"
,
},
data
:{
opt
:
20
,
dir
:
path
,
key
:
key
,
listfiles
:
'
yes
'
},
click
:
function
(
event
,
data
)
{
cache
:
false
if
(
!
data
.
node
.
isFolder
()){
},
selectedFile
=
data
.
node
.
data
.
path
;
lazyload
:
function
(
event
,
data
)
{
}
var
node
=
data
.
node
;
},
data
.
result
=
{
source
:
{
url
:
$SCRIPT_ROOT
+
"
/fileBrowser
"
,
url
:
$SCRIPT_ROOT
+
"
/fileBrowser
"
,
data
:
{
opt
:
20
,
dir
:
node
.
data
.
path
,
key
:
node
.
key
,
listfiles
:
'
yes
'
}
data
:{
opt
:
20
,
dir
:
path
,
key
:
key
,
listfiles
:
'
yes
'
},
}
cache
:
false
},
},
lazyload
:
function
(
event
,
data
)
{
var
node
=
data
.
node
;
data
.
result
=
{
url
:
$SCRIPT_ROOT
+
"
/fileBrowser
"
,
data
:
{
opt
:
20
,
dir
:
node
.
data
.
path
,
key
:
node
.
key
,
listfiles
:
'
yes
'
}
}
},
});
}
else
{
$
(
"
#noServices
"
).
show
();
}
});
});
}
}
...
...
slapos/runner/templates/viewLog.html
View file @
190ec815
...
@@ -84,6 +84,9 @@
...
@@ -84,6 +84,9 @@
<div
id=
'inline_content'
style=
'padding:10px; background:#fff;'
>
<div
id=
'inline_content'
style=
'padding:10px; background:#fff;'
>
<div
style=
'border: solid 1px #678dad; height: 300px; overflow: auto;'
>
<div
style=
'border: solid 1px #678dad; height: 300px; overflow: auto;'
>
<div
id=
"fileTree"
></div>
<div
id=
"fileTree"
></div>
<div
id=
"noServices"
style=
'display:none'
>
<h2>
You don't have any services yet! Please run your services to choose custom log files
</h2>
</div>
</div>
</div>
<input
type=
submit
value=
"Add file"
id=
"addfile"
class=
"button"
>
<input
type=
submit
value=
"Add file"
id=
"addfile"
class=
"button"
>
</div>
</div>
...
...
slapos/runner/views.py
View file @
190ec815
...
@@ -467,7 +467,7 @@ def getPath():
...
@@ -467,7 +467,7 @@ def getPath():
list
=
[]
list
=
[]
for
p
in
files
:
for
p
in
files
:
path
=
realpath
(
app
.
config
,
p
)
path
=
realpath
(
app
.
config
,
p
)
if
not
p
:
if
not
p
ath
:
list
=
[]
list
=
[]
break
break
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment