graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

SOURCE_FIELD column fixed to 180px

Open shtrom opened this issue 3 years ago • 0 comments

When displaying more than one column, the source (SOURCE_FIELD) column is given a CSS style that includes width: 180px. This forces long hostnames to wrap, and in turns create a lot of wasted space. This is not the case for any other column.

Compare the density:

Screen Shot 2022-07-06 at 14 39 15

Screen Shot 2022-07-06 at 14 39 30

I think it comes from https://github.com/Graylog2/graylog2-server/blob/master/graylog2-web-interface/src/views/components/widgets/MessageTable.tsx#L107-L109. 4359b35b8ea3d73666476eb0536559878dd94b9b first introduced the behaviour, but it's not clear why it is limited to that column.

Expected Behavior

The source column should not be unecessarily limited in width to avoid word-wrapping of the contents of the column

Current Behavior

Even with a lot of screen space, displaying the timestamp and source columns sees the latter with a width: 180px, which leads to word-wrapping and wasted space when displaying messages.

Possible Solution

Remove https://github.com/Graylog2/graylog2-server/blob/master/graylog2-web-interface/src/views/components/widgets/MessageTable.tsx#L107-L109

Steps to Reproduce (for bugs)

  1. Load the Graylog (4.2.9) dashboard
  2. Edit the view
  3. Select only the source field -> the width: 180px CSS property is applied to the source field's <th>, but the column data is allowed to overflow

Screen Shot 2022-07-06 at 15 32 25

  1. Add one or more fields (before or after; e.g., timestamp, source, )-> only the source field has the width CSS property, and the column data is no longer allowed to overflow

Screen Shot 2022-07-06 at 14 40 02

Context

After upgrading to 4.2.9 (from 3.1), there is a lot of wasted screen space due to this issue, which makes it harder to get a bigger picture idea of what's currently happening via the logs.

Your Environment

  • Graylog Version: 4.2.9
  • Java Version: openjdk version "16.0.1" 2021-04-20
  • Elasticsearch Version: AWS OpenSearch 1.1
  • MongoDB Version: 4.0.28
  • Operating System: (Server) Ubuntu 20.4 (Client) MacOSX 12.4
  • Browser version: Firefox 101.0.1 (64-bit)

shtrom avatar Jul 06 '22 05:07 shtrom