Skip to content

Commit

Permalink
[SearchProfiler] Copy updates (#51700) (#51716)
Browse files Browse the repository at this point in the history
* Update search profiler copy

* Fix pristine logic

* Update searchprofiler styles
  • Loading branch information
jloleysens authored Nov 26, 2019
1 parent 286c1f0 commit 31b20f4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 34 deletions.
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

0 comments on commit 31b20f4

Please sign in to comment.