Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Jan 3, 2025
1 parent 955ef20 commit acf2576
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
import { v4 as uuidv4 } from 'uuid';
import type { GetLensAttributes } from '../../types';
import { COUNT } from '../../translations';

const layerId = uuidv4();
// Exported for testing purposes
Expand Down Expand Up @@ -80,7 +81,7 @@ export const getEventsHistogramLensAttributes: GetLensAttributes = ({
},
},
[columnCountOfRecordsId]: {
label: 'Count of records',
label: COUNT,
dataType: 'number',
operationType: 'count',
isBucketed: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/
import { v4 as uuidv4 } from 'uuid';

import { COUNT, TOP_VALUE } from '../../translations';
import type { GetLensAttributes, LensAttributes } from '../../types';

Expand Down Expand Up @@ -109,11 +110,11 @@ export const getExternalAlertLensAttributes: GetLensAttributes = ({
params: { emptyAsNull: true },
},
[columnTopValue]: {
label: TOP_VALUE(`${stackByField}`), // could be event.category
label: TOP_VALUE(`${stackByField}`),
dataType: 'string',
operationType: 'terms',
scale: 'ordinal',
sourceField: `${stackByField}`, // could be event.category
sourceField: `${stackByField}`,
isBucketed: true,
params: {
size: 10,
Expand Down Expand Up @@ -159,5 +160,5 @@ export const getExternalAlertLensAttributes: GetLensAttributes = ({
id: '{dataViewId}',
},
],
} as LensAttributes;
} as unknown as LensAttributes;
};

0 comments on commit acf2576

Please sign in to comment.