refactor: Rename id to metric_id as some client caches values by id again

This commit is contained in:
Inex Code 2024-07-30 06:56:46 +03:00
parent 315250bae3
commit 5755fbba48
2 changed files with 14 additions and 14 deletions

View file

@ -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(

View file

@ -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
@ -139,7 +139,7 @@ query Query($end: String!, $start: String!, $step: String!) {
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
@ -217,7 +217,7 @@ query Query($end: String!, $start: String!, $step: String!) {
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