From 9a0e874e9baf3b58e6aaa4b6bab356873691d6a4 Mon Sep 17 00:00:00 2001 From: Scott Lepper Date: Tue, 18 Feb 2025 17:34:04 -0500 Subject: [PATCH] Unified Search: remove date sort fields (#100924) --- public/app/features/search/service/unified.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/public/app/features/search/service/unified.ts b/public/app/features/search/service/unified.ts index 8e270aba37b..c1755c10517 100644 --- a/public/app/features/search/service/unified.ts +++ b/public/app/features/search/service/unified.ts @@ -101,10 +101,6 @@ export class UnifiedSearcher implements GrafanaSearcher { opts.push({ value: `-${sf.name}`, label: `${sf.display} (most)` }); opts.push({ value: `${sf.name}`, label: `${sf.display} (least)` }); } - for (const sf of sortTimeFields) { - opts.push({ value: `-${sf.name}`, label: `${sf.display} (recent)` }); - opts.push({ value: `${sf.name}`, label: `${sf.display} (oldest)` }); - } } return Promise.resolve(opts); @@ -283,12 +279,6 @@ const sortFields = [ { name: 'errors_last_30_days', display: 'Errors 30 days' }, ]; -// Enterprise only time sort field values for dashboards -const sortTimeFields = [ - { name: 'created_at', display: 'Created time' }, - { name: 'updated_at', display: 'Updated time' }, -]; - function noDataResponse(): QueryResponse | PromiseLike { return { view: new DataFrameView({ length: 0, fields: [] }), @@ -309,11 +299,6 @@ function getSortFieldDisplayName(name: string) { return sf.display; } } - for (const sf of sortTimeFields) { - if (sf.name === name) { - return sf.display; - } - } return name; }