Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Explain log rate spikes: Fix data view title. #137053

Merged
merged 5 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { encode } from 'rison-node';
import { useHistory, useLocation } from 'react-router-dom';
import { SavedSearch } from '@kbn/discover-plugin/public';

import { EuiPageBody } from '@elastic/eui';

import type { DataView } from '@kbn/data-views-plugin/public';

import {
Expand Down Expand Up @@ -160,9 +158,7 @@ export const ExplainLogRateSpikesAppState: FC<ExplainLogRateSpikesAppStateProps>

return (
<UrlStateContextProvider value={{ searchString: urlSearchString, setUrlState }}>
<EuiPageBody data-test-subj="aiopsIndexPage" paddingSize="none" panelled={false}>
<ExplainLogRateSpikesPage dataView={dataView} savedSearch={savedSearch} />
</EuiPageBody>
<ExplainLogRateSpikesPage dataView={dataView} savedSearch={savedSearch} />
</UrlStateContextProvider>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* TODO Consolidate with code from `index_data_visualizer_view.tsx/scss`. */

.dataViewTitleHeader {
min-width: 300px;
display: flex;
flex-direction: row;
align-items: center;
}

@include euiBreakpoint('xs', 's', 'm', 'l') {
.aiopsPageHeader {
flex-direction: column;
align-items: flex-start;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
EuiPageBody,
EuiPageContentBody,
EuiPageContentHeader,
EuiPageContentHeaderSection,
Expand All @@ -35,6 +36,8 @@ import { SearchPanel } from '../search_panel';
import { restorableDefaults } from './explain_log_rate_spikes_app_state';
import { ExplainLogRateSpikesAnalysis } from './explain_log_rate_spikes_analysis';

import './explain_log_rate_spikes_page.scss';

/**
* ExplainLogRateSpikes props require a data view.
*/
Expand Down Expand Up @@ -156,14 +159,14 @@ export const ExplainLogRateSpikesPage: FC<ExplainLogRateSpikesPageProps> = ({
}, [dataService, searchQueryLanguage, searchString]);

return (
<>
<EuiPageBody data-test-subj="aiopsIndexPage" paddingSize="none" panelled={false}>
<EuiFlexGroup gutterSize="m">
<EuiFlexItem>
<EuiPageContentHeader className="aiopsPageHeader">
<EuiPageContentHeaderSection>
<div className="aiopsTitleHeader">
<div className="dataViewTitleHeader">
<EuiTitle size={'s'}>
<h2>{dataView.title}</h2>
<h2>{dataView.getName()}</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we add an EuiSpacer underneath?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2f404a8.

</EuiTitle>
</div>
</EuiPageContentHeaderSection>
Expand Down Expand Up @@ -233,6 +236,6 @@ export const ExplainLogRateSpikesPage: FC<ExplainLogRateSpikesPageProps> = ({
)}
</EuiFlexGroup>
</EuiPageContentBody>
</>
</EuiPageBody>
);
};