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

[SearchProfiler] Copy updates #51700

Merged
merged 3 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -15,13 +15,12 @@ export const EmptyTreePlaceHolder = () => {
{/* TODO: translations */}
<h1>
{i18n.translate('xpack.searchProfiler.emptyProfileTreeTitle', {
defaultMessage: 'Nothing to see here yet.',
defaultMessage: 'No queries to profile',
})}
</h1>
<p>
{i18n.translate('xpack.searchProfiler.emptyProfileTreeDescription', {
defaultMessage:
'Enter a query and press the "Profile" button or provide profile data in the editor.',
defaultMessage: 'Enter a query, click Profile, and see the results here.',
})}
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ProfileLoadingPlaceholder = () => {
<EuiText color="subdued">
<h1>
{i18n.translate('xpack.searchProfiler.profilingLoaderText', {
defaultMessage: 'Profiling...',
defaultMessage: 'Loading query profiles...',
})}
</h1>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const Main = () => {

return (
<>
<EuiPage className="prfDevTool__page">
<EuiPage className="prfDevTool__page appRoot">
<EuiPageBody className="prfDevTool__page__pageBody">
{renderLicenseWarning()}
<EuiPageContent className="prfDevTool__page__pageBodyContent">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@ import { OnHighlightChangeArgs } from '../components/profile_tree';
import { ShardSerialized, Targets } from '../types';

export type Action =
| { type: 'setPristine'; value: boolean }
| { type: 'setProfiling'; value: boolean }
| { type: 'setHighlightDetails'; value: OnHighlightChangeArgs | null }
| { type: 'setActiveTab'; value: Targets | null }
| { type: 'setCurrentResponse'; value: ShardSerialized[] | null };

export const reducer: Reducer<State, Action> = (state, action) =>
produce<State>(state, draft => {
if (action.type === 'setPristine') {
draft.pristine = action.value;
return;
}

if (action.type === 'setProfiling') {
draft.pristine = false;
draft.profiling = action.value;
if (draft.profiling) {
draft.currentResponse = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface State {

export const initialState: State = {
profiling: false,
pristine: false,
pristine: true,
highlightDetails: null,
activeTab: null,
currentResponse: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
@import 'containers/main';
@import 'containers/profile_query_editor';

#searchProfilerAppRoot {
height: 100%;
display: flex;
flex: 1 1 auto;
}

.prfDevTool__licenseWarning {
&__container {
max-width: 1000px;
Expand Down Expand Up @@ -55,19 +49,10 @@
}
}

.prfDevTool {
height: calc(100vh - #{$euiHeaderChildSize});
.appRoot {
height: calc(100vh - calc(#{$euiHeaderChildSize} * 2));
overflow: hidden;

.devApp__container {
height: 100%;
overflow: hidden;
flex-shrink: 1;
}

&__container {
overflow: hidden;
}
flex-shrink: 1;
}

.prfDevTool__detail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ $badgeSize: $euiSize * 5.5;

.prfDevTool__profileTree {

&__container {
height: 100%;
}

&__shardDetails--dim small {
color: $euiColorDarkShade;
}
Expand Down