-
+
-
+
);
diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar.test.js b/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar.test.js
index e40e2ba58a642..bac93fc658392 100644
--- a/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar.test.js
+++ b/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar.test.js
@@ -18,17 +18,15 @@ describe('TimeRangeBar', () => {
test('Renders gantt bar when isRunning is false', () => {
const wrapper = mount(
);
- const ganttBar = wrapper.find('.mlJobSelector__ganttBar');
+ const ganttBar = wrapper.find('[data-test-subj="mlJobSelectorGanttBar"]');
- expect(
- ganttBar.containsMatchingElement(
)
- ).toBeTruthy();
+ expect(ganttBar).toHaveLength(1);
});
test('Renders running animation bar when isRunning is true', () => {
const wrapper = mount(
);
- const runningBar = wrapper.find('.mlJobSelector__ganttBarRunning');
+ const runningBar = wrapper.find('[data-test-subj="mlJobSelectorGanttBarRunning"]');
- expect(runningBar.length).toEqual(1);
+ expect(runningBar).toHaveLength(1);
});
});
diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar_styles.ts b/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar_styles.ts
new file mode 100644
index 0000000000000..41f5989023adf
--- /dev/null
+++ b/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/timerange_bar/timerange_bar_styles.ts
@@ -0,0 +1,44 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { useEuiTheme } from '@elastic/eui';
+import { css } from '@emotion/react';
+
+export const useTimerangeBarStyles = () => {
+ const { euiTheme } = useEuiTheme();
+
+ return {
+ ganttBar: css({
+ backgroundColor: euiTheme.colors.vis.euiColorVis2,
+ height: euiTheme.size.m,
+ borderRadius: '2px',
+ }),
+ ganttBarBackEdge: css({
+ height: euiTheme.size.base,
+ borderLeft: `1px solid ${euiTheme.colors.borderBasePlain}`,
+ borderRight: `1px solid ${euiTheme.colors.borderBasePlain}`,
+ marginBottom: '-14px',
+ paddingTop: euiTheme.size.s,
+ }),
+ ganttBarDashed: css({
+ height: '1px',
+ borderTop: `1px dashed ${euiTheme.colors.borderBasePlain}`,
+ }),
+ ganttBarRunning: css({
+ backgroundImage: `linear-gradient(45deg,
+ rgba(255, 255, 255, .15) 25%,
+ transparent 25%,
+ transparent 50%,
+ rgba(255, 255, 255, .15) 50%,
+ rgba(255, 255, 255, .15) 75%,
+ transparent 75%,
+ transparent)`,
+ backgroundSize: `${euiTheme.size.xxl} ${euiTheme.size.xxl}`,
+ animation: 'progress-bar-stripes 2s linear infinite',
+ }),
+ };
+};
diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/__snapshots__/rule_editor_flyout.test.js.snap b/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/__snapshots__/rule_editor_flyout.test.js.snap
index d36d1c2b6a5c8..d3dce871eb9ed 100644
--- a/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/__snapshots__/rule_editor_flyout.test.js.snap
+++ b/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/__snapshots__/rule_editor_flyout.test.js.snap
@@ -8,7 +8,6 @@ exports[`RuleEditorFlyout renders the flyout after adding a condition to a rule
@@ -143,7 +142,6 @@ exports[`RuleEditorFlyout renders the flyout after adding a condition to a rule
/>
@@ -392,7 +389,6 @@ exports[`RuleEditorFlyout renders the flyout after setting the rule to edit 1`]
/>
@@ -627,7 +622,6 @@ exports[`RuleEditorFlyout renders the flyout for creating a rule with conditions
/>
+
@@ -571,7 +567,6 @@ class RuleEditorFlyoutUI extends Component {
flyout = (
@@ -648,7 +643,6 @@ class RuleEditorFlyoutUI extends Component {
{conditionSupported === true ? (
-
+
+
event.preventDefault()}
/>
diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/edit_condition_link.test.js.snap b/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/edit_condition_link.test.js.snap
index 22f1e1e059043..e3add7cfbb44e 100644
--- a/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/edit_condition_link.test.js.snap
+++ b/x-pack/platform/plugins/shared/ml/public/application/components/rule_editor/select_rule_action/__snapshots__/edit_condition_link.test.js.snap
@@ -23,7 +23,6 @@ exports[`EditConditionLink renders for a condition using actual 1`] = `
-
+
+