mirror of https://github.com/nicolargo/glances
Correct PATH in the Web export module
parent
99f1377a42
commit
8ba41b7b8a
|
@ -1938,9 +1938,12 @@ class glancesHtml:
|
||||||
# Init refresh time
|
# Init refresh time
|
||||||
self.__refresh_time = refresh_time
|
self.__refresh_time = refresh_time
|
||||||
|
|
||||||
|
# Set the root path
|
||||||
|
self.root_path = htmlfolder + '/'
|
||||||
|
|
||||||
# Set the templates path
|
# Set the templates path
|
||||||
environment = jinja2.Environment(
|
environment = jinja2.Environment(
|
||||||
loader=jinja2.FileSystemLoader(htmlfolder + '/html'),
|
loader=jinja2.FileSystemLoader(self.root_path + 'html'),
|
||||||
extensions=['jinja2.ext.loopcontrols'])
|
extensions=['jinja2.ext.loopcontrols'])
|
||||||
|
|
||||||
# Open the template
|
# Open the template
|
||||||
|
@ -2032,7 +2035,7 @@ class glancesHtml:
|
||||||
def update(self, stats):
|
def update(self, stats):
|
||||||
if stats.getCpu():
|
if stats.getCpu():
|
||||||
# Open the output file
|
# Open the output file
|
||||||
f = open('glances.html', 'w')
|
f = open(self.root_path + 'glances.html', 'w')
|
||||||
|
|
||||||
# Process color
|
# Process color
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue