Skip to content

Commit

Permalink
Merge branch 'main' into add-index-fast-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
MiriamAparicio authored Jul 13, 2023
2 parents b972b07 + 64f5252 commit d314aac
Show file tree
Hide file tree
Showing 74 changed files with 1,627 additions and 1,146 deletions.
266 changes: 129 additions & 137 deletions examples/preboot_example/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
EuiFieldText,
EuiFlexGroup,
EuiFlexItem,
EuiPageTemplate_Deprecated as EuiPageTemplate,
EuiPageTemplate,
EuiPanel,
EuiText,
} from '@elastic/eui';
Expand Down Expand Up @@ -73,147 +73,139 @@ export const App = ({ http, token }: { http: HttpSetup; token?: string }) => {

if (!isSetupModeActive) {
return (
<EuiPageTemplate
restrictWidth={false}
template="empty"
pageHeader={{
iconType: 'logoElastic',
pageTitle: 'Welcome to Elastic',
}}
>
<EuiPanel>
<EuiText>Kibana server is not ready yet.</EuiText>
</EuiPanel>
<EuiPageTemplate restrictWidth={false}>
<EuiPageTemplate.Header iconType="logoElastic" pageTitle="Welcome to Elastic" />
<EuiPageTemplate.Section>
<EuiPanel>
<EuiText>Kibana server is not ready yet.</EuiText>
</EuiPanel>
</EuiPageTemplate.Section>
</EuiPageTemplate>
);
}

return (
<EuiPageTemplate
restrictWidth={false}
template="empty"
pageHeader={{
iconType: 'logoElastic',
pageTitle: 'Welcome to Elastic',
}}
>
<EuiPanel>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction={'column'}>
<EuiFlexItem>
<EuiFieldText
placeholder="Config key"
value={configKeyValue.key}
onChange={(e) => {
setConfigKeyValue({ ...configKeyValue, key: e.target.value });
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldText
placeholder="Config value"
value={configKeyValue.value}
onChange={(e) => {
setConfigKeyValue({ ...configKeyValue, value: e.target.value });
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'danger'}
onClick={onWriteToken}
disabled={!configKeyValue.key || !configKeyValue.value}
>
Write config
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction={'column'}>
<EuiFlexItem>
<EuiText>Token from config: {token}</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'danger'}
onClick={() => onCompleteSetup({ shouldReloadConfig: true })}
>
Reload config and proceed to `setup`
</EuiButton>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'primary'}
onClick={() => onCompleteSetup({ shouldReloadConfig: false })}
>
DO NOT reload config and proceed to `setup`
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction={'column'}>
<EuiFlexItem>
<EuiFieldText
placeholder="elasticsearch.hosts"
value={elasticsearchConfig.host}
onChange={(e) => {
setElasticsearchConfig({ ...elasticsearchConfig, host: e.target.value });
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldText
placeholder="elasticsearch.username"
value={elasticsearchConfig.username}
onChange={(e) => {
setElasticsearchConfig({
...elasticsearchConfig,
username: e.target.value,
});
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldText
placeholder="elasticsearch.password"
value={elasticsearchConfig.password}
onChange={(e) => {
setElasticsearchConfig({
...elasticsearchConfig,
password: e.target.value,
});
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'danger'}
onClick={onConnect}
disabled={
!elasticsearchConfig.host ||
!elasticsearchConfig.username ||
!elasticsearchConfig.password
}
>
Connect
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem>
<EuiCodeBlock language="json" paddingSize="s" isCopyable>
{connectResponse ?? ''}
</EuiCodeBlock>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
<EuiPageTemplate restrictWidth={false}>
<EuiPageTemplate.Header iconType="logoElastic" pageTitle="Welcome to Elastic" />
<EuiPageTemplate.Section>
<EuiPanel>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction={'column'}>
<EuiFlexItem>
<EuiFieldText
placeholder="Config key"
value={configKeyValue.key}
onChange={(e) => {
setConfigKeyValue({ ...configKeyValue, key: e.target.value });
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldText
placeholder="Config value"
value={configKeyValue.value}
onChange={(e) => {
setConfigKeyValue({ ...configKeyValue, value: e.target.value });
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'danger'}
onClick={onWriteToken}
disabled={!configKeyValue.key || !configKeyValue.value}
>
Write config
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction={'column'}>
<EuiFlexItem>
<EuiText>Token from config: {token}</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'danger'}
onClick={() => onCompleteSetup({ shouldReloadConfig: true })}
>
Reload config and proceed to `setup`
</EuiButton>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'primary'}
onClick={() => onCompleteSetup({ shouldReloadConfig: false })}
>
DO NOT reload config and proceed to `setup`
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction={'column'}>
<EuiFlexItem>
<EuiFieldText
placeholder="elasticsearch.hosts"
value={elasticsearchConfig.host}
onChange={(e) => {
setElasticsearchConfig({ ...elasticsearchConfig, host: e.target.value });
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldText
placeholder="elasticsearch.username"
value={elasticsearchConfig.username}
onChange={(e) => {
setElasticsearchConfig({
...elasticsearchConfig,
username: e.target.value,
});
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiFieldText
placeholder="elasticsearch.password"
value={elasticsearchConfig.password}
onChange={(e) => {
setElasticsearchConfig({
...elasticsearchConfig,
password: e.target.value,
});
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiButton
size="m"
color={'danger'}
onClick={onConnect}
disabled={
!elasticsearchConfig.host ||
!elasticsearchConfig.username ||
!elasticsearchConfig.password
}
>
Connect
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem>
<EuiCodeBlock language="json" paddingSize="s" isCopyable>
{connectResponse ?? ''}
</EuiCodeBlock>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiPageTemplate.Section>
</EuiPageTemplate>
);
};
28 changes: 13 additions & 15 deletions examples/routing_example/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { AppMountParameters } from '@kbn/core/public';
import {
EuiPage,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageTemplate,
EuiPageSection,
EuiText,
EuiHorizontalRule,
EuiPageContentHeader_Deprecated as EuiPageContentHeader,
EuiListGroup,
} from '@elastic/eui';
import { RandomNumberRouteExample } from './random_number_example';
Expand All @@ -34,14 +32,14 @@ function RoutingExplorer({
getMessageById,
}: Props) {
return (
<EuiPage>
<EuiPageBody>
<EuiPageContent>
<EuiPageContentHeader>
<EuiText>
<h1>Routing examples</h1>
</EuiText>
</EuiPageContentHeader>
<EuiPageTemplate>
<EuiPageTemplate.Header>
<EuiText>
<h1>Routing examples</h1>
</EuiText>
</EuiPageTemplate.Header>
<EuiPageTemplate.Section>
<EuiPageSection>
<EuiText>
<EuiListGroup
listItems={[
Expand Down Expand Up @@ -79,9 +77,9 @@ function RoutingExplorer({

<EuiHorizontalRule />
<GetMessageRouteExample getMessageById={getMessageById} />
</EuiPageContent>
</EuiPageBody>
</EuiPage>
</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageTemplate>
);
}

Expand Down
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
[
{
"name": "apm",
"version": "8.10.0-preview-1688475406",
"version": "8.10.0-preview-1689234434",
"forceAlignStackVersion": true,
"allowSyncToPrerelease": true
},
Expand Down
Loading

0 comments on commit d314aac

Please sign in to comment.