From a8258b5d19e4763bfe2ab610b93f60d6539230b9 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 20 Dec 2023 22:18:55 +0000 Subject: [PATCH] testing with file changes Signed-off-by: Eric --- .github/workflows/lint.yml | 2 +- .../components/app_table.tsx | 4 +++ public/components/common/query_utils/index.ts | 25 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3b90b0bafa..a194e81b42 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -57,6 +57,6 @@ jobs: echo "Linting changed files..." yarn lint $CHANGED_FILES else - echo "No JavaScript/TypeScript files changed." + echo "No matching files changed." exit 0 fi \ No newline at end of file diff --git a/public/components/application_analytics/components/app_table.tsx b/public/components/application_analytics/components/app_table.tsx index 993cee0fef..e663763378 100644 --- a/public/components/application_analytics/components/app_table.tsx +++ b/public/components/application_analytics/components/app_table.tsx @@ -98,6 +98,10 @@ export function AppTable(props: AppTableProps) { setIsModalVisible(true); }; + const showModalTesting = () => { + setIsModalVisible(true); + }; + const onRename = async (newApplicationName: string) => { renameApplication(newApplicationName, selectedApplications[0].id); closeModal(); diff --git a/public/components/common/query_utils/index.ts b/public/components/common/query_utils/index.ts index 9f4024bb31..1c430161ad 100644 --- a/public/components/common/query_utils/index.ts +++ b/public/components/common/query_utils/index.ts @@ -145,6 +145,31 @@ export const updatePromQLQueryFilters = ( return `source = ${connection}.query_range('${promQLPart}', ${start}, ${end}, '1h')`; }; +export const updatePromQLQueryFiltersTestings = ( + promQLQuery: string, + startTime: string, + endTime: string +) => { + const { connection, metric, aggregation, attributesGroupBy } = parsePromQLIntoKeywords( + promQLQuery + ); + console.log('updatePromQLQueryFilters', { + connection, + metric, + aggregation, + attributesGroupBy, + promQLQuery, + }); + const promQLPart = buildPromQLFromMetricQuery({ + metric, + attributesGroupBy: attributesGroupBy.split(','), + aggregation, + }); + const start = convertDateTime(startTime, true, false, true); + const end = convertDateTime(endTime, false, false, true); + return `source = ${connection}.query_range('${promQLPart}', ${start}, ${end}, '1h')`; +}; + const getPPLIndex = (query: string): string => { const matches = query.match(PPL_INDEX_REGEX); if (matches) {