perfact-api-pd-fastapi 1.14__tar.gz → 1.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/PKG-INFO +1 -1
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/grafana.py +6 -6
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/PKG-INFO +1 -1
- perfact_api_pd_fastapi-1.16/src/perfact_api_pd_fastapi.egg-info/scm_version.json +8 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/test_grafana.py +2 -0
- perfact_api_pd_fastapi-1.14/src/perfact_api_pd_fastapi.egg-info/scm_version.json +0 -8
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/README.md +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/pyproject.toml +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/setup.cfg +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/__init__.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/kpi.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/pdunit.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/pdunitlch.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/performancedata.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/py.typed +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/SOURCES.txt +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/dependency_links.txt +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/entry_points.txt +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/requires.txt +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/scm_file_list.json +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact_api_pd_fastapi.egg-info/top_level.txt +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/__init__.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/conftest.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/helpers.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/locustfile.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/test_init.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/test_kpi.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/test_pdunit.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/test_pdunitlch.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tests/test_performance.py +0 -0
- {perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/tox.ini +0 -0
{perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/grafana.py
RENAMED
|
@@ -99,13 +99,14 @@ _TOOL_DOWNTIME_MAX_TOP_N = 100
|
|
|
99
99
|
def _int_ids(values: Any) -> list[int]:
|
|
100
100
|
"""Parse a Grafana multi-value filter payload into a list of ints.
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
Accepts a list or a comma-separated string (Grafana's ``${var:csv}``
|
|
103
|
+
format). Non-numeric entries are dropped, so the values a template variable
|
|
104
|
+
emits when it is set to "All" or cleared - an empty string, an empty list,
|
|
105
|
+
or a custom all-value such as ``all`` - are treated as "no filter" instead
|
|
106
|
+
of raising and blanking the panel.
|
|
106
107
|
"""
|
|
107
108
|
if isinstance(values, str):
|
|
108
|
-
values =
|
|
109
|
+
values = values.split(",")
|
|
109
110
|
return [int(str(value)) for value in values if str(value).strip().isdigit()]
|
|
110
111
|
|
|
111
112
|
|
|
@@ -177,7 +178,6 @@ def _tool_downtime_handler(
|
|
|
177
178
|
status_code=status.HTTP_400_BAD_REQUEST,
|
|
178
179
|
detail=exc.errors(include_url=False),
|
|
179
180
|
) from exc
|
|
180
|
-
|
|
181
181
|
policy = visibility.get(PdTool)
|
|
182
182
|
pdtool_ids = _filter_visible_pdtool_ids(session, auth, policy, payload.pdtool_ids)
|
|
183
183
|
|
|
@@ -308,6 +308,8 @@ def test_int_ids_ignores_non_numeric_filter_values() -> None:
|
|
|
308
308
|
# those must parse to "no filter", not raise and blank the panel.
|
|
309
309
|
assert grafana._int_ids([1, "2", "", "$__all"]) == [1, 2]
|
|
310
310
|
assert grafana._int_ids("") == []
|
|
311
|
+
assert grafana._int_ids("all") == []
|
|
312
|
+
assert grafana._int_ids("3, 7,x") == [3, 7]
|
|
311
313
|
assert grafana._int_ids([]) == []
|
|
312
314
|
|
|
313
315
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/__init__.py
RENAMED
|
File without changes
|
{perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/kpi.py
RENAMED
|
File without changes
|
{perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/pdunit.py
RENAMED
|
File without changes
|
{perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/pdunitlch.py
RENAMED
|
File without changes
|
|
File without changes
|
{perfact_api_pd_fastapi-1.14 → perfact_api_pd_fastapi-1.16}/src/perfact/api/pd_fastapi/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|