Graylog2 / Graylog2/graylog2-server

Cannot sort data table widget with more than 1 field

Open
#15,391 1 comment 2 reactions 1 assignee Claimed by @maxiadlovskii View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

It appears that it is only possible to sort a data table widget using a single field, even though the UX suggests that it can and will sort by more than 1 field.

![image](https://user-images.githubusercontent.com/107503402/235486732-4690be3b-59fe-4f27-93fe-8dab8ce7c9b3.png)

## Expected Behavior

If data table shows the ability to sort multiple fields, sorting is applied as expected. For example, if i sort by timestamp, and then sum(network_bytes), this sorting should be applied.

![image](https://user-images.githubusercontent.com/107503402/235486957-350fae1f-1de4-481d-a614-dc476420c157.png)

## Current Behavior

Data table widget only allow sorting by 1 single field.

## Possible Solution

## Steps to Reproduce (for bugs)

1. Create a data table widget
2. Attempt to sort by more than 1 field

Alternatively:

1. edit data table widget
2. add more than 1 sort field
3. observe that field select/dropdown does not allow you to select a field for second sort field input

## Context

Via https://community.graylog.org/t/sort-additional-metrics-when-sort-timestamp-is-enabled-not-working/28627

## Your Environment

* Graylog Version: Graylog 5.0.6+51f2df8
* Java Version: Bundled JDK
* ~~Elasticsearch~~OpenSearch Version: 2.6.0
* MongoDB Version: 6.0.5
* Operating System: Ubuntu Server 22.04 LTS
* Browser version: Google Chrome Version 112.0.5615.137 (Official Build) (arm64)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.