mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-26 12:02:19 +00:00
* fix: having value data type * feat: connect new builder to dashboard * Fix/query builder filters (#2623) * feat: rename query data type * fix: remove reset of groupBy * fix: filters search * fix: calls autocomplete times * fix: response mapper * fix: removee unnecessary field * fix: no check ts types for old query builder * fix: disable check utils old builder
29 lines
557 B
TypeScript
29 lines
557 B
TypeScript
import { PANEL_TYPES } from 'constants/queryBuilder';
|
|
import { GlobalTime } from 'types/actions/globalTime';
|
|
import { Widgets } from 'types/api/dashboard/getAll';
|
|
|
|
const GetMaxMinTime = ({
|
|
graphType,
|
|
minTime,
|
|
maxTime,
|
|
}: GetMaxMinProps): GlobalTime => {
|
|
if (graphType === PANEL_TYPES.VALUE) {
|
|
return {
|
|
maxTime,
|
|
minTime: maxTime,
|
|
};
|
|
}
|
|
return {
|
|
maxTime,
|
|
minTime,
|
|
};
|
|
};
|
|
|
|
interface GetMaxMinProps {
|
|
graphType: Widgets['panelTypes'] | null;
|
|
maxTime: GlobalTime['maxTime'];
|
|
minTime: GlobalTime['minTime'];
|
|
}
|
|
|
|
export default GetMaxMinTime;
|