diff --git a/selfprivacy_api/utils/monitoring.py b/selfprivacy_api/utils/monitoring.py index 95712eb..036339f 100644 --- a/selfprivacy_api/utils/monitoring.py +++ b/selfprivacy_api/utils/monitoring.py @@ -22,7 +22,7 @@ class MonitoringValue: @strawberry.type @dataclass class MonitoringMetric: - id: str + metric_id: str values: List[MonitoringValue] @@ -128,7 +128,7 @@ class MonitoringQueries: return list( map( lambda x: MonitoringMetric( - id=MonitoringQueries._clean_slice_id( + metric_id=MonitoringQueries._clean_slice_id( x["metric"][id_key], clean_id=clean_id ), values=[ @@ -144,7 +144,7 @@ class MonitoringQueries: return list( map( lambda x: MonitoringMetric( - id=MonitoringQueries._clean_slice_id( + metric_id=MonitoringQueries._clean_slice_id( x["metric"][id_key], clean_id=clean_id ), values=list( diff --git a/tests/test_graphql/test_api_monitoring_copy.py b/tests/test_graphql/test_api_monitoring_copy.py index 6403b08..9304de6 100644 --- a/tests/test_graphql/test_api_monitoring_copy.py +++ b/tests/test_graphql/test_api_monitoring_copy.py @@ -60,7 +60,7 @@ query { CPU_USAGE_QUERY_WITH_OPTIONS = """ query Query($end: String!, $start: String!, $step: String!) { - monitoring { + monitoring { cpuUsage(end: $end, start: $start, step: $step) { end overallUsage { @@ -88,7 +88,7 @@ query Query { averageUsageByService { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -103,7 +103,7 @@ query Query { maxUsageByService { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -134,12 +134,12 @@ query Query { MEMORY_USAGE_QUERY_WITH_OPTIONS = """ query Query($end: String!, $start: String!, $step: String!) { - monitoring { + monitoring { memoryUsage(end: $end, start: $start, step: $step) { averageUsageByService { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -154,7 +154,7 @@ query Query($end: String!, $start: String!, $step: String!) { maxUsageByService { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -193,7 +193,7 @@ query Query { overallUsage { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -211,13 +211,13 @@ query Query { NETWORK_USAGE_QUERY_WITH_OPTIONS = """ query Query($end: String!, $start: String!, $step: String!) { - monitoring { + monitoring { networkUsage(end: $end, start: $start, step: $step) { end overallUsage { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -246,7 +246,7 @@ query Query { overallUsage { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value @@ -270,7 +270,7 @@ query Query($end: String!, $start: String!, $step: String!) { overallUsage { ... on MonitoringMetrics { metrics { - id + metricId values { timestamp value