From b6c1a6327d59792f35cd18f9b46222abbbb203b4 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Mon, 26 Feb 2024 14:43:25 +0100 Subject: [PATCH] fix: style and ordering for schema change clients (#4088) --- .../api/src/modules/operations/providers/operations-reader.ts | 4 +++- .../app/src/components/target/history/errors-and-changes.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/services/api/src/modules/operations/providers/operations-reader.ts b/packages/services/api/src/modules/operations/providers/operations-reader.ts index a54cd19b9..66facd880 100644 --- a/packages/services/api/src/modules/operations/providers/operations-reader.ts +++ b/packages/services/api/src/modules/operations/providers/operations-reader.ts @@ -1316,6 +1316,8 @@ export class OperationsReader { GROUP BY "coordinates_to_client_name_mapping"."coordinate", "clients_daily"."client_name" + ORDER BY + SUM("clients_daily"."total") DESC LIMIT 10 BY "coordinates_to_client_name_mapping"."coordinate", @@ -1340,7 +1342,7 @@ export class OperationsReader { operationsBySchemaCoordinate.set(result.coordinate, records); } records.push({ - name: result.name, + name: result.name === '' ? 'unknown' : result.name, count: result.count, }); } diff --git a/packages/web/app/src/components/target/history/errors-and-changes.tsx b/packages/web/app/src/components/target/history/errors-and-changes.tsx index 46ffdbefa..f30193ea3 100644 --- a/packages/web/app/src/components/target/history/errors-and-changes.tsx +++ b/packages/web/app/src/components/target/history/errors-and-changes.tsx @@ -147,7 +147,7 @@ function ChangeItem(props: { Operation Name - Total Requests + Total Requests % of traffic @@ -204,7 +204,7 @@ function ChangeItem(props: { Client Name - Total Requests + Total Requests % of traffic