From 95979f633426eb002d68e18ec10c1d242e9006b9 Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Tue, 12 Feb 2019 15:30:17 +0000 Subject: [PATCH] [ML] General ML style tweaks for K7 compatibility (#30536) (#30793) * [ML] [WIP] General ML style tweaks for K7 compatibility * file data viz clean up --- x-pack/plugins/ml/public/_hacks.scss | 16 +----- .../ml/public/datavisualizer/_index.scss | 1 - .../datavisualizer/selector/_index.scss | 1 - .../datavisualizer/selector/_selector.scss | 5 -- .../datavisualizer/selector/directive.js | 6 ++- .../_file_datavisualizer.scss | 7 --- .../ml/public/file_datavisualizer/_index.scss | 2 +- .../components/about_panel/_about_panel.scss | 4 ++ .../components/about_panel/about_panel.js | 52 ++++++++++--------- .../file_datavisualizer_view.js | 3 -- .../file_datavisualizer.js | 4 +- .../file_datavisualizer_directive.js | 6 ++- .../plugins/ml/public/settings/_settings.scss | 5 -- .../public/settings/calendars/_calendars.scss | 4 -- .../ml/public/settings/calendars/_index.scss | 1 - .../settings/calendars/edit/directive.js | 5 +- .../settings/calendars/list/directive.js | 5 +- .../settings/filter_lists/_filter_lists.scss | 5 -- .../settings/filter_lists/edit/directive.js | 7 ++- .../settings/filter_lists/list/directive.js | 7 ++- .../ml/public/settings/settings_directive.js | 5 +- 21 files changed, 56 insertions(+), 95 deletions(-) delete mode 100644 x-pack/plugins/ml/public/datavisualizer/selector/_index.scss delete mode 100644 x-pack/plugins/ml/public/datavisualizer/selector/_selector.scss delete mode 100644 x-pack/plugins/ml/public/file_datavisualizer/_file_datavisualizer.scss delete mode 100644 x-pack/plugins/ml/public/settings/calendars/_calendars.scss diff --git a/x-pack/plugins/ml/public/_hacks.scss b/x-pack/plugins/ml/public/_hacks.scss index a089d6d55eeed..a48782cc73daa 100644 --- a/x-pack/plugins/ml/public/_hacks.scss +++ b/x-pack/plugins/ml/public/_hacks.scss @@ -1,5 +1,4 @@ -.tab-settings, -.tab-datavisualizer, +.tab-datavisualizer_index_select, .tab-timeseriesexplorer, .tab-explorer, .tab-jobs { @@ -7,19 +6,6 @@ background-color: $euiColorEmptyShade; } -// These are hacks that were near ML's root. Unsure if they still need to be here. -.tab-jobs, -.edit-job-modal, -.create-watch-modal { - label { - display: inline-block; - } - - .validation-error { - margin-top: $euiSizeXS; - } -} - // ML specific bootstrap hacks .button-wrapper { display: inline; diff --git a/x-pack/plugins/ml/public/datavisualizer/_index.scss b/x-pack/plugins/ml/public/datavisualizer/_index.scss index bb9e75eeca96d..b0866a85f080a 100644 --- a/x-pack/plugins/ml/public/datavisualizer/_index.scss +++ b/x-pack/plugins/ml/public/datavisualizer/_index.scss @@ -1,2 +1 @@ -@import './selector/index'; @import 'datavisualizer'; diff --git a/x-pack/plugins/ml/public/datavisualizer/selector/_index.scss b/x-pack/plugins/ml/public/datavisualizer/selector/_index.scss deleted file mode 100644 index 75f8d1c014393..0000000000000 --- a/x-pack/plugins/ml/public/datavisualizer/selector/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'selector'; diff --git a/x-pack/plugins/ml/public/datavisualizer/selector/_selector.scss b/x-pack/plugins/ml/public/datavisualizer/selector/_selector.scss deleted file mode 100644 index fa7c58612cb2f..0000000000000 --- a/x-pack/plugins/ml/public/datavisualizer/selector/_selector.scss +++ /dev/null @@ -1,5 +0,0 @@ -.ml-datavisualizer-selector { - flex-grow: 1; - background-color: $euiPageBackgroundColor; - min-height: 100vh; -} diff --git a/x-pack/plugins/ml/public/datavisualizer/selector/directive.js b/x-pack/plugins/ml/public/datavisualizer/selector/directive.js index 3b00bf7430e73..10efa9bbb830b 100644 --- a/x-pack/plugins/ml/public/datavisualizer/selector/directive.js +++ b/x-pack/plugins/ml/public/datavisualizer/selector/directive.js @@ -16,7 +16,11 @@ import { checkFindFileStructurePrivilege } from 'plugins/ml/privilege/check_priv import uiRoutes from 'ui/routes'; -const template = ``; +const template = ` +
+ + +`; uiRoutes .when('/datavisualizer', { diff --git a/x-pack/plugins/ml/public/file_datavisualizer/_file_datavisualizer.scss b/x-pack/plugins/ml/public/file_datavisualizer/_file_datavisualizer.scss deleted file mode 100644 index 119ebaeb4b228..0000000000000 --- a/x-pack/plugins/ml/public/file_datavisualizer/_file_datavisualizer.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import 'components/index'; - -.file-datavisualizer-container { - padding: 20px; - background-color: $euiPageBackgroundColor; - min-height: calc(100vh - 70px); -} diff --git a/x-pack/plugins/ml/public/file_datavisualizer/_index.scss b/x-pack/plugins/ml/public/file_datavisualizer/_index.scss index 9e91116dfcf62..841415620d691 100644 --- a/x-pack/plugins/ml/public/file_datavisualizer/_index.scss +++ b/x-pack/plugins/ml/public/file_datavisualizer/_index.scss @@ -1 +1 @@ -@import 'file_datavisualizer'; +@import 'components/index'; diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/_about_panel.scss b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/_about_panel.scss index e4decb0d45522..052740f97e251 100644 --- a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/_about_panel.scss +++ b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/_about_panel.scss @@ -1,3 +1,7 @@ +.file-datavisualizer-about-panel__content { + margin-top: $euiSize; +} + .file-datavisualizer-about-panel__icon { width: $euiSizeXL * 3; height: $euiSizeXL * 3; diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js index 712439de32b3e..24ab0c48cd44a 100644 --- a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js +++ b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js @@ -14,7 +14,7 @@ import { EuiSpacer, EuiPage, EuiPageBody, - EuiPanel, + EuiPageContent, EuiHorizontalRule, EuiFilePicker, EuiLoadingSpinner, @@ -27,9 +27,11 @@ export const AboutPanel = injectI18n(function AboutPanel({ onFilePickerChange, i return ( - - - + + + @@ -45,10 +47,10 @@ export const AboutPanel = injectI18n(function AboutPanel({ onFilePickerChange, i className="file-datavisualizer-file-picker" />
- - - - + + + + ); @@ -58,25 +60,25 @@ export function LoadingPanel() { return ( - - - - -

- -

-
- - + +
+ +

+ +

+
- + - - - + +
+
); diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/file_datavisualizer_view/file_datavisualizer_view.js b/x-pack/plugins/ml/public/file_datavisualizer/components/file_datavisualizer_view/file_datavisualizer_view.js index 6c8f804634273..4bac8202c4949 100644 --- a/x-pack/plugins/ml/public/file_datavisualizer/components/file_datavisualizer_view/file_datavisualizer_view.js +++ b/x-pack/plugins/ml/public/file_datavisualizer/components/file_datavisualizer_view/file_datavisualizer_view.js @@ -263,9 +263,6 @@ export class FileDataVisualizerView extends Component { {(mode === MODE.READ) && - - {/* */} - {(!loading && !loaded) && - - + ); } diff --git a/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js b/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js index 7ba3c83f3b318..ee5731edcd7d8 100644 --- a/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js +++ b/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js @@ -22,7 +22,11 @@ import { FileDataVisualizerPage } from './file_datavisualizer'; import uiRoutes from 'ui/routes'; -const template = ''; +const template = ` +
+ + +`; uiRoutes .when('/filedatavisualizer/?', { diff --git a/x-pack/plugins/ml/public/settings/_settings.scss b/x-pack/plugins/ml/public/settings/_settings.scss index e529d32ba568e..beeb07381b90b 100644 --- a/x-pack/plugins/ml/public/settings/_settings.scss +++ b/x-pack/plugins/ml/public/settings/_settings.scss @@ -1,10 +1,5 @@ .mlSettingsPage { - .mlSettingsPage__body { - background: $euiPageBackgroundColor; - min-height: 100vh; - } - .mlSettingsPage__content { width: map-get($euiBreakpoints, 'xl'); margin-top: $euiSize; diff --git a/x-pack/plugins/ml/public/settings/calendars/_calendars.scss b/x-pack/plugins/ml/public/settings/calendars/_calendars.scss deleted file mode 100644 index 65116c266bbc2..0000000000000 --- a/x-pack/plugins/ml/public/settings/calendars/_calendars.scss +++ /dev/null @@ -1,4 +0,0 @@ -.mlCalendarManagement { - background: $euiPageBackgroundColor; - min-height: 100vh; -} diff --git a/x-pack/plugins/ml/public/settings/calendars/_index.scss b/x-pack/plugins/ml/public/settings/calendars/_index.scss index 7284feef6a46e..59e1c881a284e 100644 --- a/x-pack/plugins/ml/public/settings/calendars/_index.scss +++ b/x-pack/plugins/ml/public/settings/calendars/_index.scss @@ -1,3 +1,2 @@ -@import 'calendars'; @import 'edit/index'; @import 'list/index'; diff --git a/x-pack/plugins/ml/public/settings/calendars/edit/directive.js b/x-pack/plugins/ml/public/settings/calendars/edit/directive.js index 9819dacde9ca5..ca9d86a6572a7 100644 --- a/x-pack/plugins/ml/public/settings/calendars/edit/directive.js +++ b/x-pack/plugins/ml/public/settings/calendars/edit/directive.js @@ -22,10 +22,9 @@ import uiRoutes from 'ui/routes'; import { I18nContext } from 'ui/i18n'; const template = ` +
-
- -
+ `; uiRoutes diff --git a/x-pack/plugins/ml/public/settings/calendars/list/directive.js b/x-pack/plugins/ml/public/settings/calendars/list/directive.js index cd142f85de621..3d72eb7912ac6 100644 --- a/x-pack/plugins/ml/public/settings/calendars/list/directive.js +++ b/x-pack/plugins/ml/public/settings/calendars/list/directive.js @@ -22,10 +22,9 @@ import uiRoutes from 'ui/routes'; import { I18nContext } from 'ui/i18n'; const template = ` +
-
- -
+ `; uiRoutes diff --git a/x-pack/plugins/ml/public/settings/filter_lists/_filter_lists.scss b/x-pack/plugins/ml/public/settings/filter_lists/_filter_lists.scss index a0d554a2d87d9..c1d5287575578 100644 --- a/x-pack/plugins/ml/public/settings/filter_lists/_filter_lists.scss +++ b/x-pack/plugins/ml/public/settings/filter_lists/_filter_lists.scss @@ -1,8 +1,3 @@ -.ml-filter-lists { - background: $euiPageBackgroundColor; - min-height: 100vh; -} - .ml-list-filter-lists { .ml-list-filter-lists-content { diff --git a/x-pack/plugins/ml/public/settings/filter_lists/edit/directive.js b/x-pack/plugins/ml/public/settings/filter_lists/edit/directive.js index eabf0575f67d5..e51d700eb90e6 100644 --- a/x-pack/plugins/ml/public/settings/filter_lists/edit/directive.js +++ b/x-pack/plugins/ml/public/settings/filter_lists/edit/directive.js @@ -23,10 +23,9 @@ import { EditFilterList } from './edit_filter_list'; import uiRoutes from 'ui/routes'; const template = ` - -
- -
+
+ + `; uiRoutes diff --git a/x-pack/plugins/ml/public/settings/filter_lists/list/directive.js b/x-pack/plugins/ml/public/settings/filter_lists/list/directive.js index 7e5b90add912f..f27f6e0609e26 100644 --- a/x-pack/plugins/ml/public/settings/filter_lists/list/directive.js +++ b/x-pack/plugins/ml/public/settings/filter_lists/list/directive.js @@ -23,10 +23,9 @@ import { FilterLists } from './filter_lists'; import uiRoutes from 'ui/routes'; const template = ` - -
- -
+
+ + `; uiRoutes diff --git a/x-pack/plugins/ml/public/settings/settings_directive.js b/x-pack/plugins/ml/public/settings/settings_directive.js index 1aa1d7c2a6bb6..68ac533089558 100644 --- a/x-pack/plugins/ml/public/settings/settings_directive.js +++ b/x-pack/plugins/ml/public/settings/settings_directive.js @@ -22,10 +22,9 @@ import uiRoutes from 'ui/routes'; import { timefilter } from 'ui/timefilter'; const template = ` +
-
- -
+ `; uiRoutes