Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
feat: add orderby shared control (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored May 19, 2021
1 parent 4114094 commit 07256ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const dnd_adhoc_metric: SharedControlConfig<'DndMetricSelect'> = {
default: (c: Control) => mainMetric(c.savedMetrics),
};

export const dnd_timeseries_limit_metric: SharedControlConfig<'DndMetricSelect'> = {
export const dnd_sort_by: SharedControlConfig<'DndMetricSelect'> = {
type: 'DndMetricSelect',
label: t('Sort by'),
default: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import {
dnd_adhoc_filters,
dnd_adhoc_metric,
dnd_adhoc_metrics,
dnd_timeseries_limit_metric,
dnd_sort_by,
dndColumnsControl,
dndEntity,
dndGroupByControl,
Expand Down Expand Up @@ -339,7 +339,7 @@ const limit: SharedControlConfig<'SelectControl'> = {
),
};

const timeseries_limit_metric: SharedControlConfig<'MetricsControl'> = {
const sort_by: SharedControlConfig<'MetricsControl'> = {
type: 'MetricsControl',
label: t('Sort By'),
default: null,
Expand Down Expand Up @@ -481,7 +481,8 @@ const sharedControls = {
time_range,
row_limit,
limit,
timeseries_limit_metric: enableExploreDnd ? dnd_timeseries_limit_metric : timeseries_limit_metric,
timeseries_limit_metric: enableExploreDnd ? dnd_sort_by : sort_by,
orderby: enableExploreDnd ? dnd_sort_by : sort_by,
series: enableExploreDnd ? dndSeries : series,
entity: enableExploreDnd ? dndEntity : entity,
x,
Expand Down

1 comment on commit 07256ed

@vercel
Copy link

@vercel vercel bot commented on 07256ed May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.