mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Upgrade EUI to v41.0.0 (#117242)
* eui to v41.0.0
* update eui i18n tokens
* sass tokens
* EuiLoadingKibana
* EuiCodeEditor
* subdued
* betaBadgeProps
* EuiCodeEditor null-loader
* src secondary -> success
* [enterprise_search] Deprecate 'secondary' color prop
* [apm] Deprecate 'secondary' color prop
* [canvas] Deprecate 'secondary' color prop
* [cases] Deprecate 'secondary' color prop
* [cross_cluster_replication] Deprecate 'secondary' color prop
* [data_enhanced] Deprecate 'secondary' color prop
* [data_visualizer] Deprecate 'secondary' color prop
* [fleet] Deprecate 'secondary' color prop
* [index_management] Deprecate 'secondary' color prop
* [infra] Deprecate 'secondary' color prop
* [ingest_pipelines] Deprecate 'secondary' color prop
* [maps] Deprecate 'secondary' color prop
* [ml] Deprecate 'secondary' color prop
* [monitoring] Deprecate 'secondary' color prop
* [observability] Deprecate 'secondary' color prop
NB: conditional became `type === 'success' ? 'success' : type` after find&replace, which felt fairly redundant, so I simplified it
* [osquery] Deprecate 'secondary' color prop
* [painless_lab] Deprecate 'secondary' color prop
* [remote_clusters] Deprecate 'secondary' color prop
* [rollup] Deprecate 'secondary' color prop
* [security] Deprecate 'secondary' color prop
* [security_solution] Deprecate 'secondary' color prop
NB: several conditional became `type === 'success' ? 'success' : type` after find&replace, which felt fairly redundant, so I simplified them
* [snapshot_restore] Deprecate 'secondary' color prop
* [spaces] Deprecate 'secondary' color prop
* [transform] Deprecate 'secondary' color prop
* [triggers_actions_ui] Deprecate 'secondary' color prop
* [uptime] Deprecate 'secondary' color prop
* [watcher] Deprecate 'secondary' color prop
* [infra] replace ambiguous 'secondary' color
- GaugesSectionVis doesn't appear to use the color property but it's required by the SeriesOverrides types, so changing it just in case
* [examples] Deprecate 'secondary' color prop
* [uptime] deprecate 'subdued' prop on EuiButtonIcon
* revert EuiKeyPadMenuItem betaBadge props
* mobileOptions
* examples/ updates
* fix brace import
* fix type exports
* update expressions_explorer requiredBundles
* remove make_id mocks
* snapshot updates
* fix import 🤦
* Fix `ReferenceError: ace is not defined` Jest failures
* Remove unused brace import (?)
- Assuming here, as no code editor is actually being used in this file
* Fix failing Jest test due to EuiCodeEditor moving to es_ui_shared plugin
+ minor cleanup of `jest.mock()`s
* Fix failing Jest test due to snapshot update
* Fix failing `TypeError: Cannot read properties of undefined (reading 'euiBorderRadius')` Jest test
- since this is being mount()'d, EuiThemeProvider as a wrapper is needed to prevent the failure
* access uiSettings
* Move react-ace dependency into kbn-ui-shared-deps-npm
* Revert App Search shenanigans
- caused local unsaved changes shenanigans, somehow
* secondary -> success
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
This commit is contained in:
parent
769e490a5b
commit
cd8c648012
246 changed files with 524 additions and 474 deletions
|
@ -10,5 +10,5 @@
|
|||
},
|
||||
"requiredPlugins": ["expressions", "inspector", "uiActions", "developerExamples"],
|
||||
"optionalPlugins": [],
|
||||
"requiredBundles": []
|
||||
"requiredBundles": ["kibanaReact"]
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
EuiText,
|
||||
EuiLink,
|
||||
} from '@elastic/eui';
|
||||
import { AppMountParameters } from '../../../src/core/public';
|
||||
import { AppMountParameters, IUiSettingsClient } from '../../../src/core/public';
|
||||
import { ExpressionsStart } from '../../../src/plugins/expressions/public';
|
||||
import { Start as InspectorStart } from '../../../src/plugins/inspector/public';
|
||||
import { RunExpressionsExample } from './run_expressions';
|
||||
|
@ -26,53 +26,58 @@ import { RenderExpressionsExample } from './render_expressions';
|
|||
import { ActionsExpressionsExample } from './actions_and_expressions';
|
||||
import { UiActionsStart } from '../../../src/plugins/ui_actions/public';
|
||||
import { ActionsExpressionsExample2 } from './actions_and_expressions2';
|
||||
import { createKibanaReactContext } from '../../../src/plugins/kibana_react/public';
|
||||
|
||||
interface Props {
|
||||
expressions: ExpressionsStart;
|
||||
inspector: InspectorStart;
|
||||
actions: UiActionsStart;
|
||||
uiSettings: IUiSettingsClient;
|
||||
}
|
||||
|
||||
const ExpressionsExplorer = ({ expressions, inspector, actions }: Props) => {
|
||||
const ExpressionsExplorer = ({ expressions, inspector, actions, uiSettings }: Props) => {
|
||||
const { Provider: KibanaReactContextProvider } = createKibanaReactContext({ uiSettings });
|
||||
return (
|
||||
<EuiPage>
|
||||
<EuiPageBody>
|
||||
<EuiPageHeader>Expressions Explorer</EuiPageHeader>
|
||||
<EuiPageContent>
|
||||
<EuiPageContentBody>
|
||||
<EuiText>
|
||||
<p>
|
||||
There are a couple of ways to run the expressions. Below some of the options are
|
||||
demonstrated. You can read more about it{' '}
|
||||
<EuiLink
|
||||
href={
|
||||
'https://github.com/elastic/kibana/blob/main/src/plugins/expressions/README.asciidoc'
|
||||
}
|
||||
>
|
||||
here
|
||||
</EuiLink>
|
||||
</p>
|
||||
</EuiText>
|
||||
<KibanaReactContextProvider>
|
||||
<EuiPage>
|
||||
<EuiPageBody>
|
||||
<EuiPageHeader>Expressions Explorer</EuiPageHeader>
|
||||
<EuiPageContent>
|
||||
<EuiPageContentBody>
|
||||
<EuiText>
|
||||
<p>
|
||||
There are a couple of ways to run the expressions. Below some of the options are
|
||||
demonstrated. You can read more about it{' '}
|
||||
<EuiLink
|
||||
href={
|
||||
'https://github.com/elastic/kibana/blob/main/src/plugins/expressions/README.asciidoc'
|
||||
}
|
||||
>
|
||||
here
|
||||
</EuiLink>
|
||||
</p>
|
||||
</EuiText>
|
||||
|
||||
<EuiSpacer />
|
||||
<EuiSpacer />
|
||||
|
||||
<RunExpressionsExample expressions={expressions} inspector={inspector} />
|
||||
<RunExpressionsExample expressions={expressions} inspector={inspector} />
|
||||
|
||||
<EuiSpacer />
|
||||
<EuiSpacer />
|
||||
|
||||
<RenderExpressionsExample expressions={expressions} inspector={inspector} />
|
||||
<RenderExpressionsExample expressions={expressions} inspector={inspector} />
|
||||
|
||||
<EuiSpacer />
|
||||
<EuiSpacer />
|
||||
|
||||
<ActionsExpressionsExample expressions={expressions} actions={actions} />
|
||||
<ActionsExpressionsExample expressions={expressions} actions={actions} />
|
||||
|
||||
<EuiSpacer />
|
||||
<EuiSpacer />
|
||||
|
||||
<ActionsExpressionsExample2 expressions={expressions} actions={actions} />
|
||||
</EuiPageContentBody>
|
||||
</EuiPageContent>
|
||||
</EuiPageBody>
|
||||
</EuiPage>
|
||||
<ActionsExpressionsExample2 expressions={expressions} actions={actions} />
|
||||
</EuiPageContentBody>
|
||||
</EuiPageContent>
|
||||
</EuiPageBody>
|
||||
</EuiPage>
|
||||
</KibanaReactContextProvider>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { EuiCodeEditor } from '@elastic/eui';
|
||||
import { CodeEditor } from '../../../../src/plugins/kibana_react/public';
|
||||
|
||||
interface Props {
|
||||
value: string;
|
||||
|
@ -16,19 +16,17 @@ interface Props {
|
|||
|
||||
export function ExpressionEditor({ value, onChange }: Props) {
|
||||
return (
|
||||
<EuiCodeEditor
|
||||
mode="javascript"
|
||||
theme="github"
|
||||
<CodeEditor
|
||||
languageId="javascript"
|
||||
width="100%"
|
||||
height="250px"
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
setOptions={{
|
||||
fontSize: '14px',
|
||||
enableBasicAutocompletion: true,
|
||||
enableSnippets: true,
|
||||
enableLiveAutocompletion: true,
|
||||
options={{
|
||||
fontSize: 14,
|
||||
fontFamily: 'monospace',
|
||||
quickSuggestions: true,
|
||||
}}
|
||||
onBlur={() => {}}
|
||||
aria-label="Code Editor"
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -59,6 +59,7 @@ export class ExpressionsExplorerPlugin implements Plugin<void, void, SetupDeps,
|
|||
expressions: depsStart.expressions,
|
||||
inspector: depsStart.inspector,
|
||||
actions: depsStart.uiActions,
|
||||
uiSettings: core.uiSettings,
|
||||
},
|
||||
params
|
||||
);
|
||||
|
|
|
@ -63,12 +63,12 @@ const TodoApp: React.FC<TodoAppProps> = ({ filter, stateContainer }) => {
|
|||
<>
|
||||
<div>
|
||||
<Link to={{ ...location, pathname: '/' }} data-test-subj={'filterLinkAll'}>
|
||||
<EuiButton size={'s'} color={!filter ? 'primary' : 'secondary'}>
|
||||
<EuiButton size={'s'} color={!filter ? 'primary' : 'success'}>
|
||||
All
|
||||
</EuiButton>
|
||||
</Link>
|
||||
<Link to={{ ...location, pathname: '/completed' }} data-test-subj={'filterLinkCompleted'}>
|
||||
<EuiButton size={'s'} color={filter === 'completed' ? 'primary' : 'secondary'}>
|
||||
<EuiButton size={'s'} color={filter === 'completed' ? 'primary' : 'success'}>
|
||||
Completed
|
||||
</EuiButton>
|
||||
</Link>
|
||||
|
@ -76,7 +76,7 @@ const TodoApp: React.FC<TodoAppProps> = ({ filter, stateContainer }) => {
|
|||
to={{ ...location, pathname: '/not-completed' }}
|
||||
data-test-subj={'filterLinkNotCompleted'}
|
||||
>
|
||||
<EuiButton size={'s'} color={filter === 'not-completed' ? 'primary' : 'secondary'}>
|
||||
<EuiButton size={'s'} color={filter === 'not-completed' ? 'primary' : 'success'}>
|
||||
Not Completed
|
||||
</EuiButton>
|
||||
</Link>
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
|
||||
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
|
||||
"@elastic/ems-client": "8.0.0",
|
||||
"@elastic/eui": "40.1.0",
|
||||
"@elastic/eui": "41.0.0",
|
||||
"@elastic/filesaver": "1.1.2",
|
||||
"@elastic/maki": "6.3.0",
|
||||
"@elastic/node-crypto": "1.2.1",
|
||||
|
|
|
@ -46,6 +46,7 @@ RUNTIME_DEPS = [
|
|||
"@npm//moment-timezone",
|
||||
"@npm//moment",
|
||||
"@npm//raw-loader",
|
||||
"@npm//react-ace",
|
||||
"@npm//react-dom",
|
||||
"@npm//react-intl",
|
||||
"@npm//react-is",
|
||||
|
|
|
@ -82,6 +82,7 @@ module.exports = (_, argv) => {
|
|||
'moment-timezone/moment-timezone',
|
||||
'moment-timezone/data/packed/latest.json',
|
||||
'moment',
|
||||
'react-ace',
|
||||
'react-beautiful-dnd',
|
||||
'react-dom',
|
||||
'react-dom/server',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
exports[`ServerStatus renders correctly for green state 2`] = `
|
||||
<EuiBadge
|
||||
aria-label="Green"
|
||||
color="secondary"
|
||||
color="success"
|
||||
data-test-subj="serverStatusTitleBadge"
|
||||
>
|
||||
<EuiInnerText>
|
||||
|
@ -36,7 +36,7 @@ exports[`ServerStatus renders correctly for green state 2`] = `
|
|||
exports[`ServerStatus renders correctly for red state 2`] = `
|
||||
<EuiBadge
|
||||
aria-label="Red"
|
||||
color="secondary"
|
||||
color="success"
|
||||
data-test-subj="serverStatusTitleBadge"
|
||||
>
|
||||
<EuiInnerText>
|
||||
|
|
|
@ -30,7 +30,7 @@ exports[`StatusTable renders when statuses is provided 1`] = `
|
|||
"id": "available",
|
||||
"message": "Ready",
|
||||
"title": "green",
|
||||
"uiColor": "secondary",
|
||||
"uiColor": "success",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
@ -14,7 +14,7 @@ import { FormattedStatus } from '../lib';
|
|||
const getStatus = (parts: Partial<FormattedStatus['state']> = {}): FormattedStatus['state'] => ({
|
||||
id: 'available',
|
||||
title: 'Green',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
message: '',
|
||||
...parts,
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ import { StatusTable } from './status_table';
|
|||
|
||||
const state = {
|
||||
id: 'available' as const,
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
message: 'Ready',
|
||||
title: 'green',
|
||||
};
|
||||
|
|
|
@ -174,7 +174,7 @@ describe('response processing', () => {
|
|||
id: 'available',
|
||||
title: 'Green',
|
||||
message: 'Elasticsearch is available',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -183,12 +183,12 @@ describe('response processing', () => {
|
|||
id: 'available',
|
||||
title: 'Green',
|
||||
message: 'SavedObjects service has completed migrations and is available',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'plugin:1',
|
||||
state: { id: 'available', title: 'Green', message: 'Ready', uiColor: 'secondary' },
|
||||
state: { id: 'available', title: 'Green', message: 'Ready', uiColor: 'success' },
|
||||
},
|
||||
{
|
||||
id: 'plugin:2',
|
||||
|
|
|
@ -128,7 +128,7 @@ const STATUS_LEVEL_UI_ATTRS: Record<ServiceStatusLevel, StatusUIAttributes> = {
|
|||
title: i18n.translate('core.status.greenTitle', {
|
||||
defaultMessage: 'Green',
|
||||
}),
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@ exports[`#start() returns \`Context\` component 1`] = `
|
|||
"euiCodeBlock.copyButton": "Copy",
|
||||
"euiCodeBlock.fullscreenCollapse": "Collapse",
|
||||
"euiCodeBlock.fullscreenExpand": "Expand",
|
||||
"euiCodeEditor.startEditing": "Press Enter to start editing.",
|
||||
"euiCodeEditor.startInteracting": "Press Enter to start interacting with the code.",
|
||||
"euiCodeEditor.stopEditing": "When you're done, press Escape to stop editing.",
|
||||
"euiCodeEditor.stopInteracting": "When you're done, press Escape to stop interacting with the code.",
|
||||
"euiCollapsedItemActions.allActions": "All actions",
|
||||
"euiColorPicker.alphaLabel": "Alpha channel (opacity) value",
|
||||
"euiColorPicker.closeLabel": "Press the down key to open a popover containing color options",
|
||||
|
|
|
@ -127,22 +127,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
|
|||
defaultMessage: 'Expand',
|
||||
description: 'ARIA label for a button that enters fullscreen view',
|
||||
}),
|
||||
'euiCodeEditor.startEditing': i18n.translate('core.euiCodeEditor.startEditing', {
|
||||
defaultMessage: 'Press Enter to start editing.',
|
||||
description: 'Screen reader text to prompt editing',
|
||||
}),
|
||||
'euiCodeEditor.startInteracting': i18n.translate('core.euiCodeEditor.startInteracting', {
|
||||
defaultMessage: 'Press Enter to start interacting with the code.',
|
||||
description: 'Screen reader text to prompt interaction',
|
||||
}),
|
||||
'euiCodeEditor.stopEditing': i18n.translate('core.euiCodeEditor.stopEditing', {
|
||||
defaultMessage: "When you're done, press Escape to stop editing.",
|
||||
description: 'Screen reader text to describe ending editing',
|
||||
}),
|
||||
'euiCodeEditor.stopInteracting': i18n.translate('core.euiCodeEditor.stopInteracting', {
|
||||
defaultMessage: "When you're done, press Escape to stop interacting with the code.",
|
||||
description: 'Screen reader text to describe ending interactions',
|
||||
}),
|
||||
'euiCollapsedItemActions.allActions': i18n.translate(
|
||||
'core.euiCollapsedItemActions.allActions',
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ describe('calculateLegacyStatus', () => {
|
|||
title: 'Green',
|
||||
nickname: 'Looking good',
|
||||
icon: 'success',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
since: expect.any(String),
|
||||
});
|
||||
});
|
||||
|
@ -80,7 +80,7 @@ describe('calculateLegacyStatus', () => {
|
|||
message: 'Available',
|
||||
since: expect.any(String),
|
||||
state: 'green',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
{
|
||||
icon: 'danger',
|
||||
|
|
|
@ -37,7 +37,7 @@ interface LegacyStatusOverall {
|
|||
|
||||
type LegacyStatusState = 'green' | 'yellow' | 'red';
|
||||
type LegacyStatusIcon = 'danger' | 'warning' | 'success';
|
||||
type LegacyStatusUiColor = 'secondary' | 'warning' | 'danger';
|
||||
type LegacyStatusUiColor = 'success' | 'warning' | 'danger';
|
||||
|
||||
interface LegacyStateAttr {
|
||||
id: LegacyStatusState;
|
||||
|
@ -141,7 +141,7 @@ const STATUS_LEVEL_LEGACY_ATTRS = deepFreeze<Record<string, LegacyStateAttr>>({
|
|||
defaultMessage: 'Green',
|
||||
}),
|
||||
icon: 'success',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
nickname: 'Looking good',
|
||||
},
|
||||
});
|
||||
|
|
|
@ -164,7 +164,7 @@ describe('GET /api/status', () => {
|
|||
since: expect.any(String),
|
||||
state: 'green',
|
||||
title: 'Green',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
statuses: [
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ describe('GET /api/status', () => {
|
|||
message: 'Service is working',
|
||||
since: expect.any(String),
|
||||
state: 'green',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
{
|
||||
icon: 'success',
|
||||
|
@ -181,7 +181,7 @@ describe('GET /api/status', () => {
|
|||
message: 'Service is working',
|
||||
since: expect.any(String),
|
||||
state: 'green',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
{
|
||||
icon: 'success',
|
||||
|
@ -189,7 +189,7 @@ describe('GET /api/status', () => {
|
|||
message: 'a is available',
|
||||
since: expect.any(String),
|
||||
state: 'green',
|
||||
uiColor: 'secondary',
|
||||
uiColor: 'success',
|
||||
},
|
||||
{
|
||||
icon: 'warning',
|
||||
|
|
|
@ -75,6 +75,6 @@ export const LICENSE_OVERRIDES = {
|
|||
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
|
||||
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
|
||||
'@elastic/ems-client@8.0.0': ['Elastic License 2.0'],
|
||||
'@elastic/eui@40.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
|
||||
'@elastic/eui@41.0.0': ['SSPL-1.0 OR Elastic License 2.0'],
|
||||
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
|
||||
};
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
import React, { PureComponent, Fragment } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import 'react-ace';
|
||||
import 'brace/theme/textmate';
|
||||
import 'brace/mode/markdown';
|
||||
import 'brace/mode/json';
|
||||
|
|
|
@ -368,7 +368,7 @@ export class Form extends PureComponent<FormProps> {
|
|||
<EuiButton
|
||||
className="mgtAdvancedSettingsForm__button"
|
||||
disabled={areChangesInvalid}
|
||||
color="secondary"
|
||||
color="success"
|
||||
fill
|
||||
size="s"
|
||||
iconType="check"
|
||||
|
|
|
@ -28,7 +28,7 @@ const LegendToggleComponent = ({ onClick, showLegend, legendPosition }: LegendTo
|
|||
<EuiButtonIcon
|
||||
type="button"
|
||||
iconType="list"
|
||||
color="subdued"
|
||||
color="text"
|
||||
onClick={onClick}
|
||||
className={classNames('echLegend__toggle', `echLegend__toggle--position-${legendPosition}`, {
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
|
|
|
@ -36,7 +36,7 @@ const mapStatusCodeToBadgeColor = (statusCode: number) => {
|
|||
}
|
||||
|
||||
if (statusCode <= 299) {
|
||||
return 'secondary';
|
||||
return 'success';
|
||||
}
|
||||
|
||||
if (statusCode <= 399) {
|
||||
|
|
|
@ -502,7 +502,7 @@ export function DashboardTopNav({
|
|||
{
|
||||
'data-test-subj': 'dashboardUnsavedChangesBadge',
|
||||
badgeText: unsavedChangesBadge.getUnsavedChangedBadgeText(),
|
||||
color: 'secondary',
|
||||
color: 'success',
|
||||
},
|
||||
]
|
||||
: undefined;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// These are the various types in the dropdown, they each get a color
|
||||
$kbnTypeaheadTypes: (
|
||||
field: $euiColorWarning,
|
||||
value: $euiColorSecondary,
|
||||
value: $euiColorSuccess,
|
||||
operator: $euiColorPrimary,
|
||||
conjunction: $euiColorVis3,
|
||||
);
|
||||
|
|
|
@ -55,7 +55,7 @@ export function DiscoverFieldBucket({ field, bucket, onAddFilter }: Props) {
|
|||
</EuiText>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false} className="eui-textTruncate">
|
||||
<EuiText color="secondary" size="xs" className="eui-textTruncate">
|
||||
<EuiText color="success" size="xs" className="eui-textTruncate">
|
||||
{bucket.percent}%
|
||||
</EuiText>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -18,7 +18,5 @@ interface Props {
|
|||
export function StringFieldProgressBar({ value, percent, count }: Props) {
|
||||
const ariaLabel = `${value}: ${count} (${percent}%)`;
|
||||
|
||||
return (
|
||||
<EuiProgress value={percent} max={100} color="secondary" aria-label={ariaLabel} size="s" />
|
||||
);
|
||||
return <EuiProgress value={percent} max={100} color="success" aria-label={ariaLabel} size="s" />;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ export const ExpandButton = ({ rowIndex, setCellProps }: EuiDataGridCellValueEle
|
|||
aria-label={buttonLabel}
|
||||
data-test-subj="docTableExpandToggleColumn"
|
||||
onClick={() => setExpanded(isCurrentRowExpanded ? undefined : current)}
|
||||
color={isCurrentRowExpanded ? 'primary' : 'subdued'}
|
||||
color={isCurrentRowExpanded ? 'primary' : 'text'}
|
||||
iconType={isCurrentRowExpanded ? 'minimize' : 'expand'}
|
||||
isSelected={isCurrentRowExpanded}
|
||||
/>
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
import React, { Component, AriaAttributes } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import AceEditor, { IAceEditorProps } from 'react-ace';
|
||||
import { EuiI18n } from '@elastic/eui';
|
||||
// @ts-ignore
|
||||
import { htmlIdGenerator, keys } from '@elastic/eui/lib/services';
|
||||
import { EuiI18n, htmlIdGenerator, keys } from '@elastic/eui';
|
||||
|
||||
import './_index.scss';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/*
|
||||
@TODO
|
||||
|
||||
The brace/mode/json import below is loaded eagerly - before this plugin is explicitly loaded by users. This makes
|
||||
The react-ace and brace/mode/json imports below are loaded eagerly - before this plugin is explicitly loaded by users. This makes
|
||||
the brace JSON mode, used for JSON syntax highlighting and grammar checking, available across all of Kibana plugins.
|
||||
|
||||
This is not ideal because we are loading JS that is not necessary for Kibana to start, but the alternative
|
||||
|
@ -19,6 +19,7 @@ EuiCodeEditor (for instance, explicitly).
|
|||
Importing here is a way of preventing a more sophisticated solution to this problem since we want to, eventually,
|
||||
migrate all code editors over to Monaco. Once that is done, we should remove this import.
|
||||
*/
|
||||
import 'react-ace';
|
||||
import 'brace/mode/json';
|
||||
|
||||
export * from './field';
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
exports[`props iconType 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel={null}
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": null,
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
@ -24,7 +28,11 @@ exports[`props iconType 1`] = `
|
|||
|
||||
exports[`props iconUrl 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel={null}
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": null,
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
@ -45,7 +53,11 @@ exports[`props iconUrl 1`] = `
|
|||
|
||||
exports[`props isBeta 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel="Beta"
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": "Beta",
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
@ -59,7 +71,11 @@ exports[`props isBeta 1`] = `
|
|||
|
||||
exports[`render 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel={null}
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": null,
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
}
|
||||
|
||||
&--securitySolution img {
|
||||
background-color: $euiColorSecondary;
|
||||
background-color: $euiColorSuccess;
|
||||
}
|
||||
}
|
|
@ -181,7 +181,7 @@ export class SampleDataSetCard extends React.Component {
|
|||
image={this.props.previewUrl}
|
||||
title={this.props.name}
|
||||
description={this.props.description}
|
||||
betaBadgeLabel={this.isInstalled() ? 'INSTALLED' : null}
|
||||
betaBadgeProps={{ label: this.isInstalled() ? 'INSTALLED' : null }}
|
||||
footer={this.renderBtn()}
|
||||
data-test-subj={`sampleDataSetCard${this.props.id}`}
|
||||
/>
|
||||
|
|
|
@ -22,7 +22,7 @@ export function Synopsis({ id, description, iconUrl, iconType, title, url, onCli
|
|||
|
||||
return (
|
||||
<EuiCard
|
||||
betaBadgeLabel={isBeta ? 'Beta' : null}
|
||||
betaBadgeProps={{ label: isBeta ? 'Beta' : null }}
|
||||
className="homSynopsis__card"
|
||||
data-test-subj={`homeSynopsisLink${id.toLowerCase()}`}
|
||||
description={description}
|
||||
|
|
|
@ -223,7 +223,7 @@ exports[`Table should render the boolean template (false) 1`] = `<span />`;
|
|||
exports[`Table should render the boolean template (true) 1`] = `
|
||||
<span
|
||||
aria-label="Is searchable"
|
||||
color="secondary"
|
||||
color="success"
|
||||
data-euiicon-type="dot"
|
||||
/>
|
||||
`;
|
||||
|
|
|
@ -225,7 +225,7 @@ export const renderFieldName = (field: IndexedFieldItem, timeFieldName?: string)
|
|||
|
||||
export class Table extends PureComponent<IndexedFieldProps> {
|
||||
renderBooleanTemplate(value: string, arialLabel: string) {
|
||||
return value ? <EuiIcon type="dot" color="secondary" aria-label={arialLabel} /> : <span />;
|
||||
return value ? <EuiIcon type="dot" color="success" aria-label={arialLabel} /> : <span />;
|
||||
}
|
||||
|
||||
renderFieldType(type: string, isConflict: boolean) {
|
||||
|
|
|
@ -114,7 +114,7 @@ export class RequestSelector extends Component<RequestSelectorProps> {
|
|||
}
|
||||
>
|
||||
<EuiBadge
|
||||
color={selectedRequest.status === RequestStatus.OK ? 'secondary' : 'danger'}
|
||||
color={selectedRequest.status === RequestStatus.OK ? 'success' : 'danger'}
|
||||
iconType={selectedRequest.status === RequestStatus.OK ? 'check' : 'cross'}
|
||||
>
|
||||
<FormattedMessage
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
}
|
||||
&.securitySolution {
|
||||
.euiCard__image {
|
||||
background-color: $euiColorSecondary;
|
||||
background-color: $euiColorSuccess;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
exports[`props iconType 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel={null}
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": null,
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card homSynopsis__card--noPanel"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
@ -24,7 +28,11 @@ exports[`props iconType 1`] = `
|
|||
|
||||
exports[`props iconUrl 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel={null}
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": null,
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card homSynopsis__card--noPanel"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
@ -45,7 +53,11 @@ exports[`props iconUrl 1`] = `
|
|||
|
||||
exports[`props isBeta 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel="Beta"
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": "Beta",
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card homSynopsis__card--noPanel"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
@ -59,7 +71,11 @@ exports[`props isBeta 1`] = `
|
|||
|
||||
exports[`render 1`] = `
|
||||
<EuiCard
|
||||
betaBadgeLabel={null}
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": null,
|
||||
}
|
||||
}
|
||||
className="homSynopsis__card homSynopsis__card--noPanel"
|
||||
data-test-subj="homeSynopsisLinktutorial"
|
||||
description="this is a great tutorial about..."
|
||||
|
|
|
@ -45,7 +45,7 @@ export function Synopsis({
|
|||
onClick={onClick}
|
||||
href={url}
|
||||
data-test-subj={`homeSynopsisLink${id.toLowerCase()}`}
|
||||
betaBadgeLabel={isBeta ? 'Beta' : null}
|
||||
betaBadgeProps={{ label: isBeta ? 'Beta' : null }}
|
||||
titleElement="h3"
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -35,7 +35,7 @@ export function createTheme(
|
|||
{ token: 'strong', fontStyle: 'bold' },
|
||||
|
||||
{ token: 'variable', foreground: euiTheme.euiColorPrimary },
|
||||
{ token: 'variable.predefined', foreground: euiTheme.euiColorSecondary },
|
||||
{ token: 'variable.predefined', foreground: euiTheme.euiColorSuccess },
|
||||
{ token: 'constant', foreground: euiTheme.euiColorAccent },
|
||||
{ token: 'comment', foreground: euiTheme.euiColorMediumShade },
|
||||
{ token: 'number', foreground: euiTheme.euiColorAccent },
|
||||
|
@ -52,7 +52,7 @@ export function createTheme(
|
|||
{ token: 'tag.id.jade', foreground: euiTheme.euiColorPrimary },
|
||||
{ token: 'tag.class.jade', foreground: euiTheme.euiColorPrimary },
|
||||
{ token: 'meta.scss', foreground: euiTheme.euiColorAccent },
|
||||
{ token: 'metatag', foreground: euiTheme.euiColorSecondary },
|
||||
{ token: 'metatag', foreground: euiTheme.euiColorSuccess },
|
||||
{ token: 'metatag.content.html', foreground: euiTheme.euiColorDanger },
|
||||
{ token: 'metatag.html', foreground: euiTheme.euiColorMediumShade },
|
||||
{ token: 'metatag.xml', foreground: euiTheme.euiColorMediumShade },
|
||||
|
@ -63,7 +63,7 @@ export function createTheme(
|
|||
{ token: 'string.value.json', foreground: euiTheme.euiColorPrimary },
|
||||
|
||||
{ token: 'attribute.name', foreground: euiTheme.euiColorDanger },
|
||||
{ token: 'attribute.name.css', foreground: euiTheme.euiColorSecondary },
|
||||
{ token: 'attribute.name.css', foreground: euiTheme.euiColorSuccess },
|
||||
{ token: 'attribute.value', foreground: euiTheme.euiColorPrimary },
|
||||
{ token: 'attribute.value.number', foreground: euiTheme.euiColorWarning },
|
||||
{ token: 'attribute.value.unit', foreground: euiTheme.euiColorWarning },
|
||||
|
|
|
@ -13,6 +13,11 @@ exports[`ElasticAgentCard props button 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiCard
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": undefined,
|
||||
}
|
||||
}
|
||||
description="Use Elastic Agent for a simple, unified way to collect data from your machines."
|
||||
footer={
|
||||
<EuiButton
|
||||
|
@ -48,6 +53,11 @@ exports[`ElasticAgentCard props category 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiCard
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": undefined,
|
||||
}
|
||||
}
|
||||
description="Use Elastic Agent for a simple, unified way to collect data from your machines."
|
||||
footer={
|
||||
<EuiButton
|
||||
|
@ -83,6 +93,11 @@ exports[`ElasticAgentCard props href 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiCard
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": undefined,
|
||||
}
|
||||
}
|
||||
description="Use Elastic Agent for a simple, unified way to collect data from your machines."
|
||||
footer={
|
||||
<EuiButton
|
||||
|
@ -118,7 +133,11 @@ exports[`ElasticAgentCard props recommended 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiCard
|
||||
betaBadgeLabel="Recommended"
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": "Recommended",
|
||||
}
|
||||
}
|
||||
description="Use Elastic Agent for a simple, unified way to collect data from your machines."
|
||||
footer={
|
||||
<EuiButton
|
||||
|
@ -154,6 +173,11 @@ exports[`ElasticAgentCard renders 1`] = `
|
|||
}
|
||||
>
|
||||
<EuiCard
|
||||
betaBadgeProps={
|
||||
Object {
|
||||
"label": undefined,
|
||||
}
|
||||
}
|
||||
description="Use Elastic Agent for a simple, unified way to collect data from your machines."
|
||||
footer={
|
||||
<EuiButton
|
||||
|
|
|
@ -91,7 +91,7 @@ export const ElasticAgentCard: FunctionComponent<ElasticAgentCardProps> = ({
|
|||
description={i18n.translate('kibana-react.noDataPage.elasticAgentCard.description', {
|
||||
defaultMessage: `Use Elastic Agent for a simple, unified way to collect data from your machines.`,
|
||||
})}
|
||||
betaBadgeLabel={recommended ? NO_DATA_RECOMMENDED : undefined}
|
||||
betaBadgeProps={{ label: recommended ? NO_DATA_RECOMMENDED : undefined }}
|
||||
footer={footer}
|
||||
layout={layout as 'vertical' | undefined}
|
||||
{...cardRest}
|
||||
|
|
|
@ -33,7 +33,7 @@ export const NoDataCard: FunctionComponent<NoDataPageActions> = ({
|
|||
description={i18n.translate('kibana-react.noDataPage.noDataCard.description', {
|
||||
defaultMessage: `Proceed without collecting data`,
|
||||
})}
|
||||
betaBadgeLabel={recommended ? NO_DATA_RECOMMENDED : undefined}
|
||||
betaBadgeProps={{ label: recommended ? NO_DATA_RECOMMENDED : undefined }}
|
||||
footer={footer}
|
||||
layout={layout as 'vertical' | undefined}
|
||||
{...cardRest}
|
||||
|
|
|
@ -174,7 +174,7 @@ export const ControlGroup = () => {
|
|||
<EuiButtonIcon
|
||||
aria-label={ControlGroupStrings.management.getManageButtonTitle()}
|
||||
iconType="gear"
|
||||
color="subdued"
|
||||
color="text"
|
||||
data-test-subj="inputControlsSortingButton"
|
||||
onClick={() => {
|
||||
const flyoutInstance = openFlyout(
|
||||
|
|
|
@ -92,7 +92,7 @@ export const OptionsListPopover = ({
|
|||
size="s"
|
||||
iconType="list"
|
||||
aria-pressed={showOnlySelected}
|
||||
color={showOnlySelected ? 'primary' : 'subdued'}
|
||||
color={showOnlySelected ? 'primary' : 'text'}
|
||||
display={showOnlySelected ? 'base' : 'empty'}
|
||||
aria-label={OptionsListStrings.popover.getClearAllSelectionsButtonTitle()}
|
||||
onClick={() => setShowOnlySelected(!showOnlySelected)}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
left: 4px;
|
||||
bottom: $euiSizeL;
|
||||
width: 4px;
|
||||
background: $euiColorSecondary;
|
||||
background: $euiColorSuccess;
|
||||
content: '';
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ export const ProjectListItem = ({ project, onStatusChange }: Props) => {
|
|||
content={strings.getOverriddenIconTipLabel()}
|
||||
position="top"
|
||||
type="dot"
|
||||
color="secondary"
|
||||
color="success"
|
||||
/>
|
||||
</span>
|
||||
) : null}
|
||||
|
|
|
@ -137,7 +137,7 @@ class AggBasedSelection extends React.Component<AggBasedSelectionProps, AggBased
|
|||
description={visType.type.description || ''}
|
||||
layout="horizontal"
|
||||
isDisabled={isDisabled}
|
||||
icon={<EuiIcon type={visType.type.icon || 'empty'} size="l" color="secondary" />}
|
||||
icon={<EuiIcon type={visType.type.icon || 'empty'} size="l" color="success" />}
|
||||
className="aggBasedDialog__card"
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -110,7 +110,7 @@ function GroupSelection(props: GroupSelectionProps) {
|
|||
'Use our classic visualize library to create charts based on aggregations.',
|
||||
}
|
||||
)}
|
||||
icon={<EuiIcon type="heatmap" size="xl" color="secondary" />}
|
||||
icon={<EuiIcon type="heatmap" size="xl" color="success" />}
|
||||
className="visNewVisDialog__groupsCard"
|
||||
>
|
||||
<EuiLink
|
||||
|
@ -203,7 +203,7 @@ const VisGroup = ({ visType, onVisTypeSelected }: VisCardProps) => {
|
|||
</>
|
||||
}
|
||||
layout="horizontal"
|
||||
icon={<EuiIcon type={visType.icon || 'empty'} size="xl" color="secondary" />}
|
||||
icon={<EuiIcon type={visType.icon || 'empty'} size="xl" color="success" />}
|
||||
className="visNewVisDialog__groupsCard"
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -9,7 +9,7 @@ import React, { useState, useEffect, Fragment } from 'react';
|
|||
|
||||
import {
|
||||
EuiText,
|
||||
EuiLoadingKibana,
|
||||
EuiLoadingLogo,
|
||||
EuiCallOut,
|
||||
EuiTextColor,
|
||||
EuiDescriptionList,
|
||||
|
@ -106,6 +106,6 @@ export const ViewAlertPage = withRouter(({ http, id }: Props) => {
|
|||
)}
|
||||
</Fragment>
|
||||
) : (
|
||||
<EuiLoadingKibana size="xl" />
|
||||
<EuiLoadingLogo logo="logoKibana" size="xl" />
|
||||
);
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ import React, { useState, useEffect, Fragment } from 'react';
|
|||
|
||||
import {
|
||||
EuiText,
|
||||
EuiLoadingKibana,
|
||||
EuiLoadingLogo,
|
||||
EuiCallOut,
|
||||
EuiTextColor,
|
||||
EuiDescriptionList,
|
||||
|
@ -114,6 +114,6 @@ export const ViewPeopleInSpaceAlertPage = withRouter(({ http, id }: Props) => {
|
|||
)}
|
||||
</Fragment>
|
||||
) : (
|
||||
<EuiLoadingKibana size="xl" />
|
||||
<EuiLoadingLogo logo="logoKibana" size="xl" />
|
||||
);
|
||||
});
|
||||
|
|
|
@ -101,7 +101,7 @@ export const DrilldownsWithoutEmbeddableExample: React.FC = () => {
|
|||
<EuiFlexItem grow={false}>{openManagerButton}</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
fill
|
||||
iconType="play"
|
||||
iconSide="left"
|
||||
|
|
|
@ -31,7 +31,7 @@ export const DrilldownsWithoutEmbeddableSingleButtonExample: React.FC = () => {
|
|||
<EuiFlexGroup>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
fill
|
||||
iconType="play"
|
||||
iconSide="left"
|
||||
|
|
|
@ -35,7 +35,7 @@ export function PercentileAnnotations({ percentiles }: Props) {
|
|||
const style: Partial<LineAnnotationStyle> = {
|
||||
line: {
|
||||
strokeWidth: 1,
|
||||
stroke: euiLightVars.euiColorSecondary,
|
||||
stroke: euiLightVars.euiColorSuccess,
|
||||
opacity: 1,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ import styled from 'styled-components';
|
|||
import { euiLightVars } from '@kbn/ui-shared-deps-src/theme';
|
||||
|
||||
const StyledSpan = styled.span`
|
||||
color: ${euiLightVars.euiColorSecondaryText};
|
||||
color: ${euiLightVars.euiColorSuccessText};
|
||||
font-weight: 500;
|
||||
:not(:last-of-type)::after {
|
||||
content: '•';
|
||||
|
|
|
@ -224,7 +224,7 @@ export function SettingsPage({
|
|||
fill
|
||||
isLoading={isSaving}
|
||||
isDisabled={!isFormValid}
|
||||
color="secondary"
|
||||
color="success"
|
||||
iconType="check"
|
||||
>
|
||||
{i18n.translate(
|
||||
|
|
|
@ -97,7 +97,7 @@ export function ServiceContents({
|
|||
</EuiButton>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiButton color="secondary" href={focusUrl} onClick={onFocusClick}>
|
||||
<EuiButton color="success" href={focusUrl} onClick={onFocusClick}>
|
||||
{i18n.translate('xpack.apm.serviceMap.focusMapButtonText', {
|
||||
defaultMessage: 'Focus map',
|
||||
})}
|
||||
|
|
|
@ -81,7 +81,7 @@ export function BreakdownChart({
|
|||
|
||||
const xFormatter = niceTimeFormatter([min, max]);
|
||||
|
||||
const annotationColor = theme.eui.euiColorSecondary;
|
||||
const annotationColor = theme.eui.euiColorSuccess;
|
||||
|
||||
const isEmpty = isTimeseriesEmpty(timeseries);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ export function TimeseriesChart({
|
|||
|
||||
const xFormatter = niceTimeFormatter([min, max]);
|
||||
const isEmpty = isTimeseriesEmpty(timeseries);
|
||||
const annotationColor = theme.eui.euiColorSecondary;
|
||||
const annotationColor = theme.eui.euiColorSuccess;
|
||||
const allSeries = [...timeseries, ...(anomalyTimeseries?.boundaries ?? [])];
|
||||
const xDomain = isEmpty ? { min: 0, max: 1 } : { min, max };
|
||||
|
||||
|
|
|
@ -27,21 +27,19 @@ export function LicensePrompt({
|
|||
<EuiCard
|
||||
display={showBetaBadge ? undefined : 'plain'}
|
||||
paddingSize="l"
|
||||
betaBadgeLabel={
|
||||
showBetaBadge
|
||||
betaBadgeProps={{
|
||||
label: showBetaBadge
|
||||
? i18n.translate('xpack.apm.license.betaBadge', {
|
||||
defaultMessage: 'Beta',
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
betaBadgeTooltipContent={
|
||||
showBetaBadge
|
||||
: undefined,
|
||||
tooltipContent: showBetaBadge
|
||||
? i18n.translate('xpack.apm.license.betaTooltipMessage', {
|
||||
defaultMessage:
|
||||
'This feature is currently in beta. If you encounter any bugs or have feedback, please open an issue or visit our discussion forum.',
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
: undefined,
|
||||
}}
|
||||
title={i18n.translate('xpack.apm.license.title', {
|
||||
defaultMessage: 'Start free 30-day trial',
|
||||
})}
|
||||
|
|
|
@ -98,7 +98,7 @@ function TutorialFleetInstructions({ http, basePath, isDarkTheme }: Props) {
|
|||
<>
|
||||
<EuiButton
|
||||
iconType="analyzeEvent"
|
||||
color="secondary"
|
||||
color="success"
|
||||
href={`${basePath}/app/integrations#/detail/apm-${SUPPORTED_APM_PACKAGE_VERSION}/overview`}
|
||||
>
|
||||
{i18n.translate(
|
||||
|
|
|
@ -52,7 +52,7 @@ export const ArgSimpleForm: React.FunctionComponent<Props> = ({
|
|||
{!required && (
|
||||
<EuiToolTip position="top" content={strings.getRemoveAriaLabel()}>
|
||||
<EuiButtonIcon
|
||||
color="subdued"
|
||||
color="text"
|
||||
onClick={onRemove}
|
||||
iconType="cross"
|
||||
iconSize="s"
|
||||
|
|
|
@ -140,7 +140,7 @@ exports[`Storyshots components/Assets/AssetManager no assets 1`] = `
|
|||
<progress
|
||||
aria-hidden={false}
|
||||
aria-labelledby="CanvasAssetManagerLabel"
|
||||
className="euiProgress euiProgress--native euiProgress--s euiProgress--secondary"
|
||||
className="euiProgress euiProgress--native euiProgress--s euiProgress--success"
|
||||
max={25000}
|
||||
style={null}
|
||||
value={0}
|
||||
|
@ -651,7 +651,7 @@ exports[`Storyshots components/Assets/AssetManager two assets 1`] = `
|
|||
<progress
|
||||
aria-hidden={false}
|
||||
aria-labelledby="CanvasAssetManagerLabel"
|
||||
className="euiProgress euiProgress--native euiProgress--s euiProgress--secondary"
|
||||
className="euiProgress euiProgress--native euiProgress--s euiProgress--success"
|
||||
max={25000}
|
||||
style={null}
|
||||
value={2}
|
||||
|
|
|
@ -154,7 +154,7 @@ export const AssetManager: FC<Props> = (props) => {
|
|||
<EuiProgress
|
||||
value={assetsTotal}
|
||||
max={ASSET_MAX_SIZE}
|
||||
color={percentageUsed < 90 ? 'secondary' : 'danger'}
|
||||
color={percentageUsed < 90 ? 'success' : 'danger'}
|
||||
size="s"
|
||||
aria-labelledby="CanvasAssetManagerLabel"
|
||||
/>
|
||||
|
|
|
@ -118,7 +118,7 @@ exports[`Storyshots components/datasource/DatasourceComponent simple datasource
|
|||
className="euiFlexItem euiFlexItem--flexGrowZero"
|
||||
>
|
||||
<button
|
||||
className="euiButton euiButton--secondary euiButton--small euiButton--fill"
|
||||
className="euiButton euiButton--success euiButton--small euiButton--fill"
|
||||
disabled={false}
|
||||
onClick={[Function]}
|
||||
style={
|
||||
|
|
|
@ -33,5 +33,5 @@
|
|||
}
|
||||
|
||||
.canvasDataSource__card--isCurrent {
|
||||
border-color: $euiColorSecondary;
|
||||
border-color: $euiColorSuccess;
|
||||
}
|
||||
|
|
|
@ -182,13 +182,7 @@ export class DatasourceComponent extends PureComponent {
|
|||
</EuiButtonEmpty>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
disabled={isInvalid}
|
||||
size="s"
|
||||
onClick={this.save}
|
||||
fill
|
||||
color="secondary"
|
||||
>
|
||||
<EuiButton disabled={isInvalid} size="s" onClick={this.save} fill color="success">
|
||||
{strings.getSaveButtonLabel()}
|
||||
</EuiButton>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -47,7 +47,7 @@ export const WorkpadTableTools = ({
|
|||
|
||||
const downloadButton = (
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
onClick={() => onExportWorkpads(selectedWorkpadIds)}
|
||||
iconType="exportAction"
|
||||
aria-label={strings.getExportButtonAriaLabel(selectedWorkpadIds.length)}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
.canvasPageManager__addPage {
|
||||
width: $euiSizeXXL + $euiSize;
|
||||
background: $euiColorSecondary;
|
||||
background: $euiColorSuccess;
|
||||
color: $euiColorGhost;
|
||||
opacity: 0;
|
||||
animation: buttonPop $euiAnimSpeedNormal $euiAnimSlightResistance;
|
||||
|
|
|
@ -234,7 +234,7 @@ Array [
|
|||
className="euiFlexItem euiFlexItem--flexGrowZero"
|
||||
>
|
||||
<button
|
||||
className="euiButton euiButton--secondary euiButton--small euiButton--fill"
|
||||
className="euiButton euiButton--success euiButton--small euiButton--fill"
|
||||
disabled={false}
|
||||
onClick={[Function]}
|
||||
style={
|
||||
|
@ -462,7 +462,7 @@ Array [
|
|||
className="euiFlexItem euiFlexItem--flexGrowZero"
|
||||
>
|
||||
<button
|
||||
className="euiButton euiButton--secondary euiButton--small euiButton--fill"
|
||||
className="euiButton euiButton--success euiButton--small euiButton--fill"
|
||||
disabled={false}
|
||||
onClick={[Function]}
|
||||
style={
|
||||
|
@ -690,7 +690,7 @@ Array [
|
|||
className="euiFlexItem euiFlexItem--flexGrowZero"
|
||||
>
|
||||
<button
|
||||
className="euiButton euiButton--secondary euiButton--small euiButton--fill"
|
||||
className="euiButton euiButton--success euiButton--small euiButton--fill"
|
||||
disabled={false}
|
||||
onClick={[Function]}
|
||||
style={
|
||||
|
@ -893,7 +893,7 @@ Array [
|
|||
className="euiFlexItem euiFlexItem--flexGrowZero"
|
||||
>
|
||||
<button
|
||||
className="euiButton euiButton--secondary euiButton--small euiButton--fill euiButton-isDisabled"
|
||||
className="euiButton euiButton--success euiButton--small euiButton--fill euiButton-isDisabled"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
style={
|
||||
|
|
|
@ -209,7 +209,7 @@ export const EditVar: FC<Props> = ({ variables, selectedVar, onCancel, onSave })
|
|||
<EuiFlexGroup alignItems="center">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
size="s"
|
||||
fill
|
||||
onClick={() =>
|
||||
|
|
|
@ -229,7 +229,7 @@ exports[`Storyshots components/WorkpadFilters/FilterComponent with component fie
|
|||
className="euiText euiText--medium"
|
||||
>
|
||||
<span
|
||||
className="euiTextColor euiTextColor--secondary"
|
||||
className="euiTextColor euiTextColor--success"
|
||||
style={Object {}}
|
||||
>
|
||||
<h3>
|
||||
|
|
|
@ -32,7 +32,7 @@ const filter: FormattedFilterViewInstance = {
|
|||
|
||||
const component: FC<any> = ({ value }) => (
|
||||
<EuiText>
|
||||
<EuiTextColor color="secondary">
|
||||
<EuiTextColor color="success">
|
||||
<h3>{value}</h3>
|
||||
</EuiTextColor>
|
||||
</EuiText>
|
||||
|
|
|
@ -20,7 +20,6 @@ import {
|
|||
import { Settings } from './settings';
|
||||
|
||||
jest.mock('../../../supported_renderers');
|
||||
jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `generated-id`);
|
||||
|
||||
jest.mock('@elastic/eui/lib/components/portal/portal', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
|
|
|
@ -187,7 +187,6 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
test: [
|
||||
require.resolve('@elastic/eui/es/components/code_editor'),
|
||||
require.resolve('@elastic/eui/es/components/drag_and_drop'),
|
||||
require.resolve('@elastic/eui/packages/react-datepicker'),
|
||||
require.resolve('highlight.js'),
|
||||
|
|
|
@ -36,9 +36,6 @@ Date.now = jest.fn(() => testTime.getTime());
|
|||
// Mock telemetry service
|
||||
jest.mock('../public/lib/ui_metric', () => ({ trackCanvasUiMetric: () => {} }));
|
||||
|
||||
// Mock EUI generated ids to be consistently predictable for snapshots.
|
||||
jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `generated-id`);
|
||||
|
||||
// Mock react-datepicker dep used by eui to avoid rendering the entire large component
|
||||
jest.mock('@elastic/eui/packages/react-datepicker', () => {
|
||||
return {
|
||||
|
|
|
@ -336,7 +336,7 @@ export const EditConnector = React.memo(
|
|||
<EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
data-test-subj="edit-connectors-submit"
|
||||
fill
|
||||
iconType="save"
|
||||
|
|
|
@ -91,7 +91,7 @@ const EditableTitleComponent: React.FC<EditableTitleProps> = ({
|
|||
<EuiFlexGroup gutterSize="none" responsive={false} wrap={true}>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
data-test-subj="editable-title-submit-btn"
|
||||
fill
|
||||
iconType="save"
|
||||
|
|
|
@ -163,7 +163,7 @@ export const TagList = React.memo(
|
|||
<EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
data-test-subj="edit-tags-submit"
|
||||
fill
|
||||
iconType="save"
|
||||
|
|
|
@ -57,7 +57,7 @@ describe('Callout', () => {
|
|||
const className =
|
||||
wrapper.find(`button[data-test-subj="callout-onclick-md5-hex"]`).first().prop('className') ??
|
||||
'';
|
||||
expect(className.includes('euiButton--secondary')).toBeTruthy();
|
||||
expect(className.includes('euiButton--success')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('transform the button color correctly - warning', () => {
|
||||
|
|
|
@ -59,7 +59,7 @@ const CallOutComponent = ({
|
|||
{!isCaseClosed && !hasLicenseError && (
|
||||
<EuiButton
|
||||
data-test-subj={`callout-onclick-${id}`}
|
||||
color={type === 'success' ? 'secondary' : type}
|
||||
color={type === 'success' ? 'success' : type}
|
||||
onClick={handleCallOut}
|
||||
>
|
||||
{i18n.ADD_CONNECTOR}
|
||||
|
|
|
@ -78,7 +78,7 @@ export const UserActionMarkdown = forwardRef<UserActionMarkdownRefObject, UserAc
|
|||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
data-test-subj="user-action-save-markdown"
|
||||
color="secondary"
|
||||
color="success"
|
||||
fill
|
||||
iconType="save"
|
||||
onClick={handleSaveAction}
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
EuiForm,
|
||||
EuiFormHelpText,
|
||||
EuiFormRow,
|
||||
EuiLoadingKibana,
|
||||
EuiLoadingLogo,
|
||||
EuiLoadingSpinner,
|
||||
EuiOverlayMask,
|
||||
EuiSpacer,
|
||||
|
@ -645,7 +645,7 @@ export class AutoFollowPatternForm extends PureComponent {
|
|||
<EuiFlexGroup gutterSize="m" alignItems="center">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
iconType="check"
|
||||
onClick={this.sendForm}
|
||||
fill
|
||||
|
@ -707,7 +707,7 @@ export class AutoFollowPatternForm extends PureComponent {
|
|||
if (apiStatus === API_STATUS.SAVING) {
|
||||
return (
|
||||
<EuiOverlayMask>
|
||||
<EuiLoadingKibana size="xl" />
|
||||
<EuiLoadingLogo logo="logoKibana" size="xl" />
|
||||
</EuiOverlayMask>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
EuiFlexItem,
|
||||
EuiForm,
|
||||
EuiHorizontalRule,
|
||||
EuiLoadingKibana,
|
||||
EuiLoadingLogo,
|
||||
EuiLoadingSpinner,
|
||||
EuiOverlayMask,
|
||||
EuiSpacer,
|
||||
|
@ -727,7 +727,7 @@ export class FollowerIndexForm extends PureComponent {
|
|||
<EuiFlexGroup gutterSize="m" alignItems="center">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButton
|
||||
color="secondary"
|
||||
color="success"
|
||||
iconType="check"
|
||||
onClick={this.sendForm}
|
||||
fill
|
||||
|
@ -794,7 +794,7 @@ export class FollowerIndexForm extends PureComponent {
|
|||
if (apiStatus === API_STATUS.SAVING) {
|
||||
return (
|
||||
<EuiOverlayMask>
|
||||
<EuiLoadingKibana size="xl" />
|
||||
<EuiLoadingLogo logo="logoKibana" size="xl" />
|
||||
</EuiOverlayMask>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
EuiInMemoryTable,
|
||||
EuiButton,
|
||||
EuiLink,
|
||||
EuiLoadingKibana,
|
||||
EuiLoadingLogo,
|
||||
EuiOverlayMask,
|
||||
EuiHealth,
|
||||
} from '@elastic/eui';
|
||||
|
@ -273,7 +273,7 @@ export class AutoFollowPatternTable extends PureComponent {
|
|||
if (apiStatusDelete === API_STATUS.DELETING) {
|
||||
return (
|
||||
<EuiOverlayMask>
|
||||
<EuiLoadingKibana size="xl" />
|
||||
<EuiLoadingLogo logo="logoKibana" size="xl" />
|
||||
</EuiOverlayMask>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import {
|
|||
EuiTextColor,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
import 'react-ace';
|
||||
import 'brace/theme/textmate';
|
||||
|
||||
import { getIndexListUri } from '../../../../../../../../../plugins/index_management/public';
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
EuiButton,
|
||||
EuiInMemoryTable,
|
||||
EuiLink,
|
||||
EuiLoadingKibana,
|
||||
EuiLoadingLogo,
|
||||
EuiOverlayMask,
|
||||
} from '@elastic/eui';
|
||||
|
||||
|
@ -262,7 +262,7 @@ export class FollowerIndicesTable extends PureComponent {
|
|||
if (apiStatusDelete === API_STATUS.DELETING) {
|
||||
return (
|
||||
<EuiOverlayMask>
|
||||
<EuiLoadingKibana size="xl" />
|
||||
<EuiLoadingLogo logo="logoKibana" size="xl" />
|
||||
</EuiOverlayMask>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ describe('Background Search Session management status labels', () => {
|
|||
const label = statusIndicator
|
||||
.find(`[data-test-subj="sessionManagementStatusLabel"][data-test-status="complete"]`)
|
||||
.first();
|
||||
expect((label.props() as EuiTextProps).color).toBe('secondary');
|
||||
expect((label.props() as EuiTextProps).color).toBe('success');
|
||||
expect(label.text()).toBe('Complete');
|
||||
});
|
||||
|
||||
|
|
|
@ -135,8 +135,8 @@ const getStatusAttributes = ({
|
|||
});
|
||||
|
||||
return {
|
||||
textColor: 'secondary',
|
||||
icon: <EuiIcon color="secondary" type="checkInCircleFilled" />,
|
||||
textColor: 'success',
|
||||
icon: <EuiIcon color="success" type="checkInCircleFilled" />,
|
||||
label: <TableText>{getStatusText(session.status)}</TableText>,
|
||||
toolTipContent,
|
||||
};
|
||||
|
|
|
@ -148,7 +148,7 @@ const searchSessionIndicatorViewStateToProps: {
|
|||
[SearchSessionState.None]: null,
|
||||
[SearchSessionState.Loading]: {
|
||||
button: {
|
||||
color: 'subdued',
|
||||
color: 'text',
|
||||
iconType: PartialClock,
|
||||
'aria-label': i18n.translate(
|
||||
'xpack.data.searchSessionIndicator.loadingResultsIconAriaLabel',
|
||||
|
@ -179,7 +179,7 @@ const searchSessionIndicatorViewStateToProps: {
|
|||
},
|
||||
[SearchSessionState.Completed]: {
|
||||
button: {
|
||||
color: 'subdued',
|
||||
color: 'text',
|
||||
iconType: 'check',
|
||||
'aria-label': i18n.translate('xpack.data.searchSessionIndicator.resultsLoadedIconAriaLabel', {
|
||||
defaultMessage: 'Search session complete',
|
||||
|
|
|
@ -25,7 +25,7 @@ export const IpContent: FC<FieldDataRowProps> = ({ config, onAddFilter }) => {
|
|||
<TopValues
|
||||
stats={stats}
|
||||
fieldFormat={fieldFormat}
|
||||
barColor="secondary"
|
||||
barColor="success"
|
||||
onAddFilter={onAddFilter}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -47,7 +47,7 @@ export const KeywordContent: FC<FieldDataRowProps> = ({ config, onAddFilter }) =
|
|||
<TopValues
|
||||
stats={stats}
|
||||
fieldFormat={fieldFormat}
|
||||
barColor="secondary"
|
||||
barColor="success"
|
||||
onAddFilter={onAddFilter}
|
||||
/>
|
||||
{EMSSuggestion && stats && <ChoroplethMap stats={stats} suggestion={EMSSuggestion} />}
|
||||
|
|
|
@ -127,7 +127,7 @@ export const NumberContent: FC<FieldDataRowProps> = ({ config, onAddFilter }) =>
|
|||
<TopValues
|
||||
stats={stats}
|
||||
fieldFormat={fieldFormat}
|
||||
barColor="secondary"
|
||||
barColor="success"
|
||||
compressed={true}
|
||||
onAddFilter={onAddFilter}
|
||||
/>
|
||||
|
|
|
@ -28,7 +28,7 @@ import { IndexPatternField } from '../../../../../../../../src/plugins/data_view
|
|||
interface Props {
|
||||
stats: FieldVisStats | undefined;
|
||||
fieldFormat?: any;
|
||||
barColor?: 'primary' | 'secondary' | 'danger' | 'subdued' | 'accent';
|
||||
barColor?: 'primary' | 'success' | 'danger' | 'subdued' | 'accent';
|
||||
compressed?: boolean;
|
||||
onAddFilter?: (field: IndexPatternField | string, value: string, type: '+' | '-') => void;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
|
||||
import React, { FC } from 'react';
|
||||
|
||||
import { EuiCodeEditor, EuiCodeEditorProps } from '@elastic/eui';
|
||||
import { expandLiteralStrings, XJsonMode } from '../../../shared_imports';
|
||||
import {
|
||||
expandLiteralStrings,
|
||||
XJsonMode,
|
||||
EuiCodeEditor,
|
||||
EuiCodeEditorProps,
|
||||
} from '../../../shared_imports';
|
||||
|
||||
export const EDITOR_MODE = { TEXT: 'text', JSON: 'json', XJSON: new XJsonMode() };
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
export { EuiCodeEditor } from '../../../../../src/plugins/es_ui_shared/public';
|
||||
export type { EuiCodeEditorProps } from '../../../../../src/plugins/es_ui_shared/public';
|
||||
|
||||
import { XJson } from '../../../../../src/plugins/es_ui_shared/public';
|
||||
const { collapseLiteralStrings, expandLiteralStrings } = XJson;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('getDateString', () => {
|
|||
|
||||
describe('getStatusColor', () => {
|
||||
it('returns a valid EUI badge color based on the status code', () => {
|
||||
expect(getStatusColor(200)).toEqual('secondary');
|
||||
expect(getStatusColor(200)).toEqual('success');
|
||||
expect(getStatusColor(301)).toEqual('primary');
|
||||
expect(getStatusColor(404)).toEqual('warning');
|
||||
expect(getStatusColor(503)).toEqual('danger');
|
||||
|
|
|
@ -13,7 +13,7 @@ export const getDateString = (offSetDays?: number) => {
|
|||
|
||||
export const getStatusColor = (status: number) => {
|
||||
let color = '';
|
||||
if (status >= 100 && status < 300) color = 'secondary';
|
||||
if (status >= 100 && status < 300) color = 'success';
|
||||
if (status >= 300 && status < 400) color = 'primary';
|
||||
if (status >= 400 && status < 500) color = 'warning';
|
||||
if (status >= 500) color = 'danger';
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue