diff --git a/bitmovin-analytics-datasource/src/components/GroupByInput.tsx b/bitmovin-analytics-datasource/src/components/GroupByInput.tsx index b0d3588..56de55d 100644 --- a/bitmovin-analytics-datasource/src/components/GroupByInput.tsx +++ b/bitmovin-analytics-datasource/src/components/GroupByInput.tsx @@ -1,22 +1,47 @@ import React from 'react'; +import { SelectableValue } from '@grafana/data'; import { HorizontalGroup, IconButton, Select } from '@grafana/ui'; + import { QueryAttribute } from '../types/queryAttributes'; import { QueryAdAttribute } from '../types/queryAdAttributes'; -import { SelectableValue } from '@grafana/data'; type Props = { groupBy: SelectableValue; selectableGroupBys: Array>; onDelete: () => void; onChange: (newValue: SelectableValue) => void; + isFirst: boolean; + isLast: boolean; + onReorderGroupBy: (direction: REORDER_DIRECTION) => void; }; + +export enum REORDER_DIRECTION { + UP, + DOWN, +} export function GroupByInput(props: Props) { - //TODOMY delete margin between select and icon - //TODOMY border around the icon return ( onIntervalChange(item)} - width={40} + width={30} options={SELECTABLE_QUERY_INTERVALS} /> @@ -109,7 +109,7 @@ export function QueryEditor({ query, onChange, onRunQuery, datasource }: Props) >