Skip to content

Commit

Permalink
testing with file changes
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <[email protected]>
  • Loading branch information
mengweieric committed Dec 20, 2023
1 parent 1f6b0ed commit a8258b5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ export function AppTable(props: AppTableProps) {
setIsModalVisible(true);
};

const showModalTesting = () => {

Check failure on line 101 in public/components/application_analytics/components/app_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

'showModalTesting' is assigned a value but never used
setIsModalVisible(true);
};

const onRename = async (newApplicationName: string) => {
renameApplication(newApplicationName, selectedApplications[0].id);
closeModal();
Expand Down
25 changes: 25 additions & 0 deletions public/components/common/query_utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a8258b5

Please sign in to comment.