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

Enhancement/update esdocs datasource #59512

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
48dcefa
Initial Commit
maggieghamry Mar 5, 2020
361e8f2
Updates
maggieghamry Mar 6, 2020
6ea9917
Updates II
maggieghamry Mar 6, 2020
352213a
Merge branch 'master' of https://github.com/elastic/kibana into enhan…
maggieghamry Mar 6, 2020
cb85a63
Updates III
maggieghamry Mar 7, 2020
ef3032e
design tweaks
ryankeairns Mar 9, 2020
bc60acb
Merge pull request #2 from ryankeairns/enhancement/update-esdocs-data…
maggieghamry Mar 9, 2020
c1b4884
Adding lucene hyperlink
maggieghamry Mar 9, 2020
2062873
Consollidating datasources to sort
maggieghamry Mar 9, 2020
f4d0074
updates for i18n
maggieghamry Mar 9, 2020
fd77af2
Updates
maggieghamry Mar 17, 2020
b88fd32
Update ui.ts
maggieghamry Mar 17, 2020
6a37a62
Updates for datasource order
maggieghamry Mar 17, 2020
a55d3d8
Update datasource_component.js
maggieghamry Mar 17, 2020
bcecfcb
Update ui.ts
maggieghamry Mar 18, 2020
cd7e713
Update ui.ts
maggieghamry Mar 18, 2020
c96a4b0
Update to Timelion URL
maggieghamry Mar 18, 2020
80f646c
Update ui.ts
maggieghamry Mar 18, 2020
5779d30
Update ui.ts
maggieghamry Mar 18, 2020
f49e3ca
Update ui.ts
maggieghamry Mar 18, 2020
af4694d
Merge branch 'master' into enhancement/update-esdocs-datasource
elasticmachine Mar 18, 2020
7e458a5
i18n updates
maggieghamry Mar 18, 2020
aea06b4
Merge branch 'enhancement/update-esdocs-datasource' of https://github…
maggieghamry Mar 18, 2020
8840013
Merge branch 'master' into enhancement/update-esdocs-datasource
elasticmachine Mar 18, 2020
178704e
Updates
maggieghamry Mar 18, 2020
000ea33
Merge branch 'enhancement/update-esdocs-datasource' of https://github…
maggieghamry Mar 18, 2020
0f4fb1f
Update timelion.js
maggieghamry Mar 18, 2020
5bdb2c1
More i18n updates
maggieghamry Mar 18, 2020
e44347f
Update datasource_component.js
maggieghamry Mar 18, 2020
ba95628
Update ui.ts
maggieghamry Mar 18, 2020
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 @@ -21,6 +21,6 @@ export const demodata = () => ({
name: 'demodata',
displayName: strings.getDisplayName(),
help: strings.getHelp(),
image: 'logoElasticStack',
image: 'visualizeApp',
template: templateFromReactComponent(DemodataDatasource),
});
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export const essql = () => ({
name: 'essql',
displayName: strings.getDisplayName(),
help: strings.getHelp(),
// Replace this with a SQL logo when we have one in EUI
image: 'logoElasticsearch',
image: 'sqlApp',
template: templateFromReactComponent(EssqlDatasource),
});
8 changes: 1 addition & 7 deletions x-pack/legacy/plugins/canvas/i18n/expression_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,7 @@ export const ExpressionDataSourceStrings = {
getWarning: () =>
i18n.translate('xpack.canvas.expressionTypes.datasources.esdocs.warningDescription', {
defaultMessage: `
This datasource pulls directly from {elasticsearch}
without the use of aggregations. It is best used with low volume datasets and in
situations where you need to view raw documents or plot exact, non-aggregated values on a
chart.`,
values: {
elasticsearch: ELASTICSEARCH,
},
This datasource does not use aggregations, and is best used with low volume datasets.`,
}),
getIndexTitle: () =>
i18n.translate('xpack.canvas.expressionTypes.datasources.esdocs.indexTitle', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@

import React from 'react';
import PropTypes from 'prop-types';
import { EuiFormRow, EuiSelect, EuiTextArea, EuiCallOut, EuiSpacer } from '@elastic/eui';
import {
EuiFormRow,
EuiAccordion,
EuiSelect,
EuiTextArea,
EuiCallOut,
EuiSpacer,
} from '@elastic/eui';
import { getSimpleArg, setSimpleArg } from '../../lib/arg_helpers';
import { ESFieldsSelect } from '../../components/es_fields_select';
import { ESFieldSelect } from '../../components/es_field_select';
Expand Down Expand Up @@ -74,12 +81,6 @@ const EsdocsDatasource = ({ args, updateArgs, defaultIndex }) => {

return (
<div>
<EuiCallOut size="s" title={strings.getWarningTitle()} iconType="alert" color="warning">
<p>{strings.getWarning()}</p>
</EuiCallOut>

<EuiSpacer size="m" />

<EuiFormRow
label={strings.getIndexTitle()}
helpText={strings.getIndexLabel()}
Expand All @@ -88,18 +89,6 @@ const EsdocsDatasource = ({ args, updateArgs, defaultIndex }) => {
<ESIndexSelect value={index} onChange={index => setArg('index', index)} />
</EuiFormRow>

<EuiFormRow
label={strings.getQueryTitle()}
helpText={strings.getQueryLabel()}
display="rowCompressed"
>
<EuiTextArea
value={getQuery()}
onChange={e => setArg(getArgName(), e.target.value)}
compressed
/>
</EuiFormRow>

<EuiFormRow
label={strings.getFieldsTitle()}
helpText={fields.length <= 10 ? strings.getFieldsLabel() : strings.getFieldsWarningLabel()}
Expand All @@ -112,30 +101,54 @@ const EsdocsDatasource = ({ args, updateArgs, defaultIndex }) => {
/>
</EuiFormRow>

<EuiFormRow
label={strings.getSortFieldTitle()}
helpText={strings.getSortFieldLabel()}
display="columnCompressed"
<EuiAccordion
id="accordionAdvancedSettings"
buttonContent="Advanced Settings"
arrowDisplay="right"
>
<ESFieldSelect
index={index}
value={sortField}
onChange={field => setArg('sort', [field, sortOrder].join(', '))}
/>
</EuiFormRow>
<EuiFormRow
label={strings.getSortFieldTitle()}
helpText={strings.getSortFieldLabel()}
display="columnCompressed"
>
<ESFieldSelect
index={index}
value={sortField}
onChange={field => setArg('sort', [field, sortOrder].join(', '))}
/>
</EuiFormRow>

<EuiFormRow
label={strings.getSortOrderTitle()}
helpText={strings.getSortOrderLabel()}
display="columnCompressed"
>
<EuiSelect
value={sortOrder.toLowerCase()}
onChange={e => setArg('sort', [sortField, e.target.value].join(', '))}
options={sortOptions}
compressed
/>
</EuiFormRow>

<EuiFormRow
label={strings.getQueryTitle()}
helpText={strings.getQueryLabel()}
display="rowCompressed"
>
<EuiTextArea
value={getQuery()}
onChange={e => setArg(getArgName(), e.target.value)}
compressed
/>
</EuiFormRow>
</EuiAccordion>

<EuiFormRow
label={strings.getSortOrderTitle()}
helpText={strings.getSortOrderLabel()}
display="columnCompressed"
>
<EuiSelect
value={sortOrder.toLowerCase()}
onChange={e => setArg('sort', [sortField, e.target.value].join(', '))}
options={sortOptions}
compressed
/>
</EuiFormRow>
<EuiSpacer size="m" />

<EuiCallOut size="s" title={strings.getWarningTitle()} iconType="alert" color="warning">
<p>{strings.getWarning()}</p>
</EuiCallOut>
</div>
);
};
Expand All @@ -150,6 +163,6 @@ export const esdocs = () => ({
name: 'esdocs',
displayName: strings.getDisplayName(),
help: strings.getHelp(),
image: 'logoElasticsearch',
image: 'filebeatApp',
template: templateFromReactComponent(EsdocsDatasource),
});