Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {
nodeExecutionStartTimeFilters,
workflowExecutionStartTimeFilters,
} from './startTimeFilters';

describe('startTimeFilters', () => {
it('uses execution timestamps for workflow execution start-time filters', () => {
expect(workflowExecutionStartTimeFilters.lastHour.data).toEqual([
expect.objectContaining({
key: 'execution_created_at',
}),
]);
});

it('uses execution timestamps for node execution start-time filters', () => {
expect(nodeExecutionStartTimeFilters.lastHour.data).toEqual([
expect.objectContaining({
key: 'node_execution_created_at',
}),
]);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import moment from 'moment';
import { FilterOperationName } from '@clients/common/types/adminEntityTypes';
import { FilterMap } from './types';

const workflowExecutionStartTimeKey = 'created_at';
const nodeExecutionStartTimeKey = 'created_at';
const workflowExecutionStartTimeKey = 'execution_created_at';
const nodeExecutionStartTimeKey = 'node_execution_created_at';

export type StartTimeFilterKey =
| 'all'
Expand Down
7 changes: 7 additions & 0 deletions packages/oss-console/src/models/Execution/constants.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { executionSortFields } from './constants';

describe('executionSortFields', () => {
it('sorts workflow execution lists by execution start time', () => {
expect(executionSortFields.createdAt).toBe('execution_created_at');
});
});
2 changes: 1 addition & 1 deletion packages/oss-console/src/models/Execution/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const terminalExecutionStates: WorkflowExecutionPhase[] = [
];

export const executionSortFields = {
createdAt: 'created_at',
createdAt: 'execution_created_at',
startedAt: 'started_at',
};

Expand Down
Loading