Skip to content

Commit 6e795f5

Browse files
committed
igloo: add average scatterplot graph discovery endpoint
Change-Id: I4617ef372a7c76f118f60149e41db9ab955ab438
1 parent b543411 commit 6e795f5

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

cmk/gui/openapi/restful_objects/type_defs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
"cmk/create_dashboard_relative_grid",
148148
"cmk/create_dashboard_responsive_grid",
149149
"cmk/create_dashboard_token",
150+
"cmk/discover_average_scatterplot_graphs",
150151
"cmk/discover_combined_graphs",
151152
"cmk/discover_single_timeseries_graphs",
152153
"cmk/discover_template_graphs",

packages/cmk-graphing-engine/cmk/graphing_engine/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
44
# conditions defined in the file COPYING, which is part of this source code package.
55

6+
from ._display import metric_display_attributes
67
from ._evaluate import (
78
evaluate_graphs,
89
EvaluatedCurve,
@@ -132,5 +133,6 @@
132133
"build_matched_graphs",
133134
"build_curve",
134135
"evaluate_graphs",
136+
"metric_display_attributes",
135137
"parse_graph_from_api",
136138
]

tests/testlib/rest_api_client.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,28 @@ def discover_combined_graphs(
13461346
expect_ok=expect_ok,
13471347
)
13481348

1349+
def discover_average_scatterplot_graphs(
1350+
self,
1351+
context: Mapping[str, Mapping[str, str]],
1352+
metric: str,
1353+
metric_color: str | None = None,
1354+
average_color: str | None = None,
1355+
median_color: str | None = None,
1356+
expect_ok: bool = True,
1357+
) -> Response:
1358+
return self.request(
1359+
"post",
1360+
url=f"/domain-types/{self.domain}/actions/discover_average_scatterplot_graphs/invoke",
1361+
body={
1362+
"context": context,
1363+
"metric": metric,
1364+
"metric_color": metric_color,
1365+
"average_color": average_color,
1366+
"median_color": median_color,
1367+
},
1368+
expect_ok=expect_ok,
1369+
)
1370+
13491371
def get_pin(self, expect_ok: bool = True) -> Response:
13501372
return self.request(
13511373
"get",

0 commit comments

Comments
 (0)