mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
Adding HTML reports to ghost reports generated by GhostRequest
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -137,6 +137,7 @@ class GhostRequest:
|
|||||||
self.ghost_json_login = self.ghost_json_url + '/admin/session/'
|
self.ghost_json_login = self.ghost_json_url + '/admin/session/'
|
||||||
self.api_token = _api_token
|
self.api_token = _api_token
|
||||||
self.images = list()
|
self.images = list()
|
||||||
|
self.webpages = list()
|
||||||
self.pdfs = list()
|
self.pdfs = list()
|
||||||
self.influx_host = influx_host
|
self.influx_host = influx_host
|
||||||
self.influx_port = influx_port
|
self.influx_port = influx_port
|
||||||
@@ -290,7 +291,8 @@ class GhostRequest:
|
|||||||
target_folders.append(folder)
|
target_folders.append(folder)
|
||||||
|
|
||||||
testbeds = list()
|
testbeds = list()
|
||||||
pdfs = list()
|
webpages = self.webpages
|
||||||
|
pdfs = self.pdfs
|
||||||
high_priority_list = list()
|
high_priority_list = list()
|
||||||
low_priority_list = list()
|
low_priority_list = list()
|
||||||
images = list()
|
images = list()
|
||||||
@@ -359,6 +361,10 @@ class GhostRequest:
|
|||||||
url = 'http://%s/%s/%s/%s/%s/%s' % (
|
url = 'http://%s/%s/%s/%s/%s/%s' % (
|
||||||
ghost_host, customer.strip('/'), testbed, test_run, target_folder, file)
|
ghost_host, customer.strip('/'), testbed, test_run, target_folder, file)
|
||||||
pdfs.append('PDF of results: <a href="%s">%s</a><br />' % (url, file))
|
pdfs.append('PDF of results: <a href="%s">%s</a><br />' % (url, file))
|
||||||
|
if 'index.html' in files:
|
||||||
|
url = 'http://%s/%s/%s/%s/%s' % (
|
||||||
|
ghost_host, customer.strip('/'), testbed, target_folder, 'index.html')
|
||||||
|
webpages.append('Results webpage: <a href="%s">Index of report</a><br />' % url)
|
||||||
scp_push.close()
|
scp_push.close()
|
||||||
self.upload_images(target_folder)
|
self.upload_images(target_folder)
|
||||||
for image in self.images:
|
for image in self.images:
|
||||||
@@ -469,6 +475,10 @@ class GhostRequest:
|
|||||||
print(pdf)
|
print(pdf)
|
||||||
text = text + pdf
|
text = text + pdf
|
||||||
|
|
||||||
|
for page in webpages:
|
||||||
|
print(page)
|
||||||
|
text = text + page
|
||||||
|
|
||||||
for image in images:
|
for image in images:
|
||||||
text = text + image
|
text = text + image
|
||||||
|
|
||||||
|
|||||||
0
py-scripts/influxgrafanaghost.sh
Normal file
0
py-scripts/influxgrafanaghost.sh
Normal file
Reference in New Issue
Block a user