Grafana and Ghost improvements, fixing table columns,fixing title of ghost articles, and pass/fail kpi

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-07-08 11:46:17 -07:00
parent 7e3575b481
commit 87d7e1a8eb
4 changed files with 109 additions and 24 deletions

View File

@@ -187,7 +187,8 @@ class GrafanaRequest:
from_date='now-1y',
to_date='now',
graph_height=8,
graph__width=12):
graph__width=12,
pass_fail=None):
options = string.ascii_lowercase + string.ascii_uppercase + string.digits
uid = ''.join(random.choice(options) for i in range(9))
input1 = dict()
@@ -221,6 +222,9 @@ class GrafanaRequest:
print('Target CSVs: %s' % target_csvs)
graph_groups = self.get_graph_groups(
target_csvs) # Get the list of graph groups which are in the tests we ran
if pass_fail is not None:
graph_groups[pass_fail] = ['PASS', 'FAIL']
for scriptname in graph_groups.keys():
for graph_group in graph_groups[scriptname]:
panel = dict()
@@ -358,7 +362,8 @@ class GrafanaRequest:
data['expires'] = 360000
data['external'] = False
data['timeout'] = 15
print(data)
if self.debug:
print(data)
return requests.post(grafanajson_url, headers=self.headers, json=data, verify=False).text
def list_snapshots(self):