Skip to content

Commit

Permalink
[ML] General ML style tweaks for K7 compatibility (#30536) (#30793)
Browse files Browse the repository at this point in the history
* [ML] [WIP] General ML style tweaks for K7 compatibility

* file data viz clean up
  • Loading branch information
jgowdyelastic authored Feb 12, 2019
1 parent e2affc4 commit 95979f6
Show file tree
Hide file tree
Showing 21 changed files with 56 additions and 95 deletions.
16 changes: 1 addition & 15 deletions x-pack/plugins/ml/public/_hacks.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
.tab-settings,
.tab-datavisualizer,
.tab-datavisualizer_index_select,
.tab-timeseriesexplorer,
.tab-explorer,
.tab-jobs {
// Make all page background white until More of the pages use EuiPage to wrap in panel-like components
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;
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/ml/public/datavisualizer/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@import './selector/index';
@import 'datavisualizer';

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import { checkFindFileStructurePrivilege } from 'plugins/ml/privilege/check_priv

import uiRoutes from 'ui/routes';

const template = `<ml-nav-menu name="datavisualizer" /><datavisualizer-selector class="ml-datavisualizer-selector"/>`;
const template = `
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="datavisualizer" />
<datavisualizer-selector />
`;

uiRoutes
.when('/datavisualizer', {
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/plugins/ml/public/file_datavisualizer/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import 'file_datavisualizer';
@import 'components/index';
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.file-datavisualizer-about-panel__content {
margin-top: $euiSize;
}

.file-datavisualizer-about-panel__icon {
width: $euiSizeXL * 3;
height: $euiSizeXL * 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
EuiSpacer,
EuiPage,
EuiPageBody,
EuiPanel,
EuiPageContent,
EuiHorizontalRule,
EuiFilePicker,
EuiLoadingSpinner,
Expand All @@ -27,9 +27,11 @@ export const AboutPanel = injectI18n(function AboutPanel({ onFilePickerChange, i
return (
<EuiPage restrictWidth={1000}>
<EuiPageBody>
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem grow={true}>
<EuiPanel paddingSize="l">
<EuiPageContent
className="file-datavisualizer-about-panel__content"
>
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem grow={true}>
<WelcomeContent />

<EuiHorizontalRule margin="l" />
Expand All @@ -45,10 +47,10 @@ export const AboutPanel = injectI18n(function AboutPanel({ onFilePickerChange, i
className="file-datavisualizer-file-picker"
/>
</div>
</EuiPanel>
<EuiSpacer size="l" />
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="l" />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContent>
</EuiPageBody>
</EuiPage>
);
Expand All @@ -58,25 +60,25 @@ export function LoadingPanel() {
return (
<EuiPage restrictWidth={400}>
<EuiPageBody>
<EuiFlexGroup gutterSize="xl">
<EuiFlexItem grow={false}>
<EuiPanel paddingSize="l" style={{ textAlign: 'center' }} >
<EuiTitle size="s">
<h3>
<FormattedMessage
id="xpack.ml.fileDatavisualizer.aboutPanel.analyzingDataTitle"
defaultMessage="Analyzing data"
/>
</h3>
</EuiTitle>

<EuiSpacer size="l" />
<EuiPageContent
className="file-datavisualizer-about-panel__content"
paddingSize="l"
>
<div style={{ textAlign: 'center' }}>
<EuiTitle size="s">
<h3>
<FormattedMessage
id="xpack.ml.fileDatavisualizer.aboutPanel.analyzingDataTitle"
defaultMessage="Analyzing data"
/>
</h3>
</EuiTitle>

<EuiLoadingSpinner size="xl"/>
<EuiSpacer size="l" />

</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
<EuiLoadingSpinner size="xl"/>
</div>
</EuiPageContent>
</EuiPageBody>
</EuiPage>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,6 @@ export class FileDataVisualizerView extends Component {
{(mode === MODE.READ) &&
<React.Fragment>


{/* <EuiSpacer size="l" /> */}

{(!loading && !loaded) &&
<AboutPanel
onFilePickerChange={this.onFilePickerChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export function FileDataVisualizerPage({ indexPatterns, kibanaConfig }) {
timefilter.disableAutoRefreshSelector();

return (
<div className="file-datavisualizer-container">
<FileDataVisualizerView indexPatterns={indexPatterns} kibanaConfig={kibanaConfig} />
</div>
<FileDataVisualizerView indexPatterns={indexPatterns} kibanaConfig={kibanaConfig} />
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import { FileDataVisualizerPage } from './file_datavisualizer';

import uiRoutes from 'ui/routes';

const template = '<ml-nav-menu name="datavisualizer" /><file-datavisualizer-page />';
const template = `
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="datavisualizer" />
<file-datavisualizer-page />
`;

uiRoutes
.when('/filedatavisualizer/?', {
Expand Down
5 changes: 0 additions & 5 deletions x-pack/plugins/ml/public/settings/_settings.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
.mlSettingsPage {

.mlSettingsPage__body {
background: $euiPageBackgroundColor;
min-height: 100vh;
}

.mlSettingsPage__content {
width: map-get($euiBreakpoints, 'xl');
margin-top: $euiSize;
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/ml/public/settings/calendars/_calendars.scss

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/plugins/ml/public/settings/calendars/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import 'calendars';
@import 'edit/index';
@import 'list/index';
5 changes: 2 additions & 3 deletions x-pack/plugins/ml/public/settings/calendars/edit/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ import uiRoutes from 'ui/routes';
import { I18nContext } from 'ui/i18n';

const template = `
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="settings" />
<div class="mlCalendarManagement">
<ml-new-calendar />
</div>
<ml-new-calendar />
`;

uiRoutes
Expand Down
5 changes: 2 additions & 3 deletions x-pack/plugins/ml/public/settings/calendars/list/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ import uiRoutes from 'ui/routes';
import { I18nContext } from 'ui/i18n';

const template = `
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="settings" />
<div class="mlCalendarManagement">
<ml-calendars-list />
</div>
<ml-calendars-list />
`;

uiRoutes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.ml-filter-lists {
background: $euiPageBackgroundColor;
min-height: 100vh;
}

.ml-list-filter-lists {

.ml-list-filter-lists-content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import { EditFilterList } from './edit_filter_list';
import uiRoutes from 'ui/routes';

const template = `
<ml-nav-menu name="settings"></ml-nav-menu>
<div class="ml-filter-lists">
<ml-edit-filter-list></ml-edit-filter-list>
</div>
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="settings" />
<ml-edit-filter-list />
`;

uiRoutes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import { FilterLists } from './filter_lists';
import uiRoutes from 'ui/routes';

const template = `
<ml-nav-menu name="settings"></ml-nav-menu>
<div class="ml-filter-lists">
<ml-filter-lists></ml-filter-lists>
</div>
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="settings" />
<ml-filter-lists />
`;

uiRoutes
Expand Down
5 changes: 2 additions & 3 deletions x-pack/plugins/ml/public/settings/settings_directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ import uiRoutes from 'ui/routes';
import { timefilter } from 'ui/timefilter';

const template = `
<div class="euiSpacer euiSpacer--s" />
<ml-nav-menu name="settings" />
<div class="mlSettingsPage">
<ml-settings />
</div>
<ml-settings />
`;

uiRoutes
Expand Down

0 comments on commit 95979f6

Please sign in to comment.