Commit 190ec815 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Nicolas Wavrant

Fix path not found issue

parent c7b58897
......@@ -168,6 +168,13 @@ $(document).ready(function () {
if (!key){
key = '0';
}
$.ajax({
type: "POST",
url: $SCRIPT_ROOT + '/getPath',
data: {file: "instance_root"}
})
.done(function(data) {
if (data.code === 1) {
$(tree).fancytree({
activate: function(event, data) {
var node = data.node;
......@@ -191,6 +198,11 @@ $(document).ready(function () {
},
});
}
else {
$("#noServices").show();
}
});
}
init();
updatelogBox();
......
......@@ -84,6 +84,9 @@
<div id='inline_content' style='padding:10px; background:#fff;'>
<div style='border: solid 1px #678dad; height: 300px; overflow: auto;'>
<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>
<input type=submit value="Add file" id="addfile" class="button">
</div>
......
......@@ -467,7 +467,7 @@ def getPath():
list = []
for p in files:
path = realpath(app.config, p)
if not p:
if not path:
list = []
break
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment