mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Fleet] fix for inactive color (#113736)
* fix for inactive color * fix for inactive color * using theme colors Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
12dcc9e7b3
commit
32f4a6c950
2 changed files with 7 additions and 4 deletions
|
@ -9,6 +9,8 @@ import React from 'react';
|
||||||
import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react';
|
import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react';
|
||||||
import { EuiBadge, EuiToolTip } from '@elastic/eui';
|
import { EuiBadge, EuiToolTip } from '@elastic/eui';
|
||||||
|
|
||||||
|
import * as euiVars from '@elastic/eui/dist/eui_theme_light.json';
|
||||||
|
|
||||||
import type { Agent } from '../../../types';
|
import type { Agent } from '../../../types';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -27,7 +29,7 @@ const Status = {
|
||||||
</EuiBadge>
|
</EuiBadge>
|
||||||
),
|
),
|
||||||
Inactive: (
|
Inactive: (
|
||||||
<EuiBadge color="default">
|
<EuiBadge color={euiVars.default.euiColorDarkShade}>
|
||||||
<FormattedMessage id="xpack.fleet.agentHealth.inactiveStatusText" defaultMessage="Inactive" />
|
<FormattedMessage id="xpack.fleet.agentHealth.inactiveStatusText" defaultMessage="Inactive" />
|
||||||
</EuiBadge>
|
</EuiBadge>
|
||||||
),
|
),
|
||||||
|
|
|
@ -7,19 +7,20 @@
|
||||||
|
|
||||||
import { euiPaletteColorBlindBehindText } from '@elastic/eui';
|
import { euiPaletteColorBlindBehindText } from '@elastic/eui';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
|
import * as euiVars from '@elastic/eui/dist/eui_theme_light.json';
|
||||||
|
|
||||||
import type { SimplifiedAgentStatus } from '../../../types';
|
import type { SimplifiedAgentStatus } from '../../../types';
|
||||||
|
|
||||||
const visColors = euiPaletteColorBlindBehindText();
|
const visColors = euiPaletteColorBlindBehindText();
|
||||||
const colorToHexMap = {
|
const colorToHexMap = {
|
||||||
// TODO - replace with variable once https://github.com/elastic/eui/issues/2731 is closed
|
// using variables as mentioned here https://elastic.github.io/eui/#/guidelines/getting-started
|
||||||
default: '#d3dae6',
|
default: euiVars.default.euiColorLightShade,
|
||||||
primary: visColors[1],
|
primary: visColors[1],
|
||||||
secondary: visColors[0],
|
secondary: visColors[0],
|
||||||
accent: visColors[2],
|
accent: visColors[2],
|
||||||
warning: visColors[5],
|
warning: visColors[5],
|
||||||
danger: visColors[9],
|
danger: visColors[9],
|
||||||
inactive: '#98A2B3',
|
inactive: euiVars.default.euiColorDarkShade,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const AGENT_STATUSES: SimplifiedAgentStatus[] = [
|
export const AGENT_STATUSES: SimplifiedAgentStatus[] = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue