airbus-cyber / graylog-plugin-alert-wizard

Alert Wizard plugin for Graylog to manage the alert rules
Other
45 stars 7 forks source link

Not fully compatible with the dark mode #59

Open frantz45 opened 2 years ago

frantz45 commented 2 years ago

Some areas are not compatible with the dark theme:

Wizard Alert Rules main page: rule

Wizard Lists main page: list

Text box when creating/editing a rule: value

Background of rule conditions when creating/editing a THEN/OR/AND rule: then

c8y3 commented 1 year ago

For the rule list, it seems to be because we hardcoded the text color to be 000 when the rule is valid (see AlertRuleList.jsx, colorValid variable). Instead, we should probably be changing the className to text-success/text-danger or use bsStyle. See https://getbootstrap.com/docs/3.4/css/#helper-classes-colors and https://getbootstrap.com/docs/3.4/css/#helper-classes-backgrounds

c8y3 commented 1 year ago

There also seems to be the possibility to style components (with styled-components) using the them colors as illustrated in graylog code: views/components/widgets/MessageTable.tsx.

frantz45 commented 12 months ago

I've tested with Wizard v5.1.0 but there are still some issues:

For AND and THEN rules:

image

It's even visible in light mode:

image

It's also the case with an OR rule but with a different color:

image

image

c8y3 commented 11 months ago

In the case of the THEN and AND, it's because component <HighlightedDiv> is explicitly written in the code. For the OR, it is a bit more complex, the color is hardcoded: <div style={{ backgroundColor: '#f6f6f6', padding: '10px' }}>. So, I believe the code was written this way on purpose in order to differentiate the conditions that are linked by the connector AND, THEN, OR from the rest of the configuration. What would be best to do:

frantz45 commented 11 months ago

Fixed in the latest master build (5.1.1). Issue can be closed after the version is officially released