diff options
author | Tibor Frank <tifrank@cisco.com> | 2023-06-23 07:58:36 +0000 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2023-06-23 08:02:36 +0000 |
commit | c17ad9031ead7a9d658f9e83e78a494dfa0ed040 (patch) | |
tree | ec8d7681f4d932b54255a05f8838b728d6ddbd87 /csit.infra.dash/app/cdash/trending/layout.py | |
parent | 575941328d025997c20ee30e7f85835a9510415e (diff) |
C-Dash: Add hyperlinks to job/builds
- performance trending
- test job statistics
- per release performance
Change-Id: I2b0479120906b79d45b1887be1e8bb72d9845585
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'csit.infra.dash/app/cdash/trending/layout.py')
-rw-r--r-- | csit.infra.dash/app/cdash/trending/layout.py | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/csit.infra.dash/app/cdash/trending/layout.py b/csit.infra.dash/app/cdash/trending/layout.py index f84f8b1cd9..84a68f5050 100644 --- a/csit.infra.dash/app/cdash/trending/layout.py +++ b/csit.infra.dash/app/cdash/trending/layout.py @@ -1698,11 +1698,27 @@ class Layout: metadata = no_update graph = list() - children = [ - dbc.ListGroupItem( - [dbc.Badge(x.split(":")[0]), x.split(": ")[1]] - ) for x in graph_data.get("text", "").split("<br>") - ] + list_group_items = list() + for itm in graph_data.get("text", None).split("<br>"): + if not itm: + continue + lst_itm = itm.split(": ") + if lst_itm[0] == "csit-ref": + list_group_item = dbc.ListGroupItem([ + dbc.Badge(lst_itm[0]), + html.A( + lst_itm[1], + href=f"{C.URL_JENKINS}{lst_itm[1]}", + target="_blank" + ) + ]) + else: + list_group_item = dbc.ListGroupItem([ + dbc.Badge(lst_itm[0]), + lst_itm[1] + ]) + list_group_items.append(list_group_item) + if trigger.idx == "tput": title = "Throughput" elif trigger.idx == "lat": @@ -1713,14 +1729,14 @@ class Layout: class_name="gy-2 p-0", children=[ dbc.CardHeader(hdrh_data.pop("name")), - dbc.CardBody(children=[ + dbc.CardBody( dcc.Graph( id="hdrh-latency-graph", figure=graph_hdrh_latency( hdrh_data, self._graph_layout ) ) - ]) + ) ]) ] else: @@ -1739,9 +1755,9 @@ class Layout: title ]), dbc.CardBody( + dbc.ListGroup(list_group_items, flush=True), id="tput-lat-metadata", class_name="p-0", - children=[dbc.ListGroup(children, flush=True), ] ) ] ) |