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

[Rollups] Rollup support in Kibana, phase 1 #21117

Merged
merged 52 commits into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
29a986b
Rollup index pattern creation as xpack plugin
jen-huang Apr 18, 2018
89ba089
Initial pass at limiting agg types based on rollup caps
jen-huang Jun 21, 2018
212d7df
Check if default agg type is part of filtered list and if not, change…
jen-huang Jul 3, 2018
4cb303d
Filter aggregation fields for rollup indices, reorganize rollup direc…
jen-huang Jul 13, 2018
5cb426e
Add rollupSearchStrategy and SearchError (#20505)
cjcenizal Jul 23, 2018
116ba1a
Rollup index patterns with live data (#21187)
jen-huang Jul 27, 2018
31e8374
Add support for multiple rollup searches. (#21755)
cjcenizal Aug 7, 2018
ecf8096
Add a simple read-only table of rollup jobs and a details panel (#21900)
cjcenizal Aug 17, 2018
48eb664
Add start, stop, and delete actions to rollup jobs table and detail p…
cjcenizal Aug 23, 2018
481af30
Add "Create rollup job" wizard foundation and logistics step (#22381)
cjcenizal Sep 5, 2018
a2b50e5
Fix table manipulation. (#22728)
cjcenizal Sep 5, 2018
e0858c9
Add date histogram step to Create Rollup Job Wizard (#22789)
cjcenizal Sep 11, 2018
fe610f4
Add Terms, Histogram, Metrics, and Review steps to Rollup Job Wizard …
cjcenizal Sep 13, 2018
96010ef
Localize JobDetails tabs. (#23020)
cjcenizal Sep 13, 2018
1e944a0
Patch for rollup visualizations not rendering (#22784)
jen-huang Sep 17, 2018
e1b31f8
Extract SearchSelect component into ui/public. (#23204)
cjcenizal Sep 14, 2018
4bf1eaa
Polish form UX in Rollup Job Wizard and list (#23196)
cjcenizal Sep 18, 2018
9424450
Fix bug in which the react router overwrote the URL when navigating a…
cjcenizal Sep 21, 2018
1cc228b
adding support for import/export of rollup index patterns (#23415)
bmcconaghy Sep 23, 2018
6370a5e
Add user-friendly cron editor to Rollup Job Wizard (#23384)
cjcenizal Sep 25, 2018
736b7f0
Create Rollup Job Wizard bug-fixes and polish, mostly regarding error…
cjcenizal Sep 28, 2018
40eb991
Limit visualization editor based on rollup capabilities (#23637)
jen-huang Oct 2, 2018
fe3c982
addressing PR feedback for i18n (#23687)
bmcconaghy Oct 2, 2018
0d65483
Use correct i18n export for vanilla JS translations. (#23731)
cjcenizal Oct 2, 2018
c9ec3e0
Use I18n provider instead of injector for simple component
jen-huang Oct 3, 2018
5b2734c
Remove forced time zone and interval
jen-huang Oct 3, 2018
5cc84d8
fixing tests broken by rollup changes (#23771)
bmcconaghy Oct 3, 2018
77a7a27
Rollups i18n fixes and renamed ES interval errors (#23796)
cjcenizal Oct 4, 2018
582f19b
Rollups Job Wizard bugs, round 2 (#23789)
cjcenizal Oct 4, 2018
3d20a95
Maintain position of detail panel context menu as the user scrolls.
cjcenizal Oct 4, 2018
846502e
Let search errors bubble up instead of killing all search requests du…
jen-huang Oct 5, 2018
56ca84e
block user from proceeding when she has no permissions to view rollup…
bmcconaghy Oct 15, 2018
7f3e871
adding ability to search by type to add terms flyout in rollup jobs w…
bmcconaghy Oct 17, 2018
fd3c0eb
sorting types for metrics on job details panel and matching sort for …
bmcconaghy Oct 17, 2018
4a28f3e
adding path element for job_list to fix management breadcrumbs (#24144)
bmcconaghy Oct 17, 2018
7061e30
Fix CI for rollups branch (#24105)
jen-huang Oct 17, 2018
68db4d2
Fix conflicts, convert to SASS, add redirect route for empty path
jen-huang Oct 17, 2018
792cba6
Address PR feedback
jen-huang Oct 17, 2018
a6b3055
Merge remote-tracking branch 'upstream/master' into feature/rollups
jen-huang Oct 18, 2018
723878c
Merge remote-tracking branch 'upstream/master' into feature/rollups
jen-huang Oct 22, 2018
fbaa4d8
Add Rollups telemetry collector (#23668)
cjcenizal Oct 22, 2018
4cc2df1
Merge remote-tracking branch 'upstream/master' into feature/rollups
jen-huang Oct 22, 2018
0cc042e
Convert crud less to scss
jen-huang Oct 23, 2018
fe0789d
Remove less file
jen-huang Oct 23, 2018
c066660
Remove less reference
jen-huang Oct 23, 2018
eea3b84
Replace i18n function with static strings to fix reporting tests
jen-huang Oct 23, 2018
35dab87
Merge remote-tracking branch 'upstream/master' into feature/rollups
jen-huang Oct 23, 2018
0c0cfbb
Remove delete of property on cached index pattern
jen-huang Oct 24, 2018
a654c1d
[Rollups] Add useNormalizedEsInterval param to date histogram bucket …
cjcenizal Oct 24, 2018
e6383d5
Merge branch 'master' of github.com:elastic/kibana into feature/rollups
cjcenizal Oct 24, 2018
ae06fc1
add rollups link to Kibana home (#24421)
bmcconaghy Oct 24, 2018
b57c0d5
Temporarily disable all endpoints other than the CRUD app.
cjcenizal Oct 24, 2018
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
6 changes: 6 additions & 0 deletions src/core_plugins/kibana/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
},
"title": {
"type": "text"
},
"type": {
"type": "keyword"
},
"typeMeta": {
"type": "keyword"
}
}
},
Expand Down
14 changes: 10 additions & 4 deletions src/core_plugins/kibana/public/discover/controllers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,17 @@ function discoverController(
.setField('highlightAll', true)
.setField('version', true);

// Even when searching rollups, we want to use the default strategy so that we get back a
// document-like response.
$scope.searchSource.setPreferredSearchStrategyId('default');

// searchSource which applies time range
const timeRangeSearchSource = savedSearch.searchSource.create();
timeRangeSearchSource.setField('filter', () => {
return timefilter.createFilter($scope.indexPattern);
});
if(isDefaultTypeIndexPattern($scope.indexPattern)) {
timeRangeSearchSource.setField('filter', () => {
return timefilter.createFilter($scope.indexPattern);
});
}

$scope.searchSource.setParent(timeRangeSearchSource);

Expand Down Expand Up @@ -393,7 +399,7 @@ function discoverController(
$scope.opts = {
// number of records to fetch, then paginate through
sampleSize: config.get('discover:sampleSize'),
timefield: $scope.indexPattern.timeFieldName,
timefield: isDefaultTypeIndexPattern($scope.indexPattern) && $scope.indexPattern.timeFieldName,
savedSearch: savedSearch,
indexPatternList: $route.current.locals.ip.list,
};
Expand Down
1 change: 1 addition & 0 deletions src/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import 'uiExports/fieldFormatEditors';
import 'uiExports/navbarExtensions';
import 'uiExports/contextMenuActions';
import 'uiExports/managementSections';
import 'uiExports/indexManagement';
import 'uiExports/devTools';
import 'uiExports/docViews';
import 'uiExports/embeddableFactories';
Expand Down
5 changes: 3 additions & 2 deletions src/core_plugins/kibana/public/management/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

@import 'hacks';

// Core
// Core
@import 'management_app';
@import 'sections/settings/advanced_settings';
@import 'sections/settings/advanced_settings';
@import 'sections/indices/index';
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
exports[`CreateIndexPatternWizard defaults to the loading state 1`] = `
<div>
<Header
indexPatternName="name"
isIncludingSystemIndices={false}
onChangeIncludingSystemIndices={[Function]}
showSystemIndices={false}
/>
<LoadingState />
</div>
Expand All @@ -13,8 +15,10 @@ exports[`CreateIndexPatternWizard defaults to the loading state 1`] = `
exports[`CreateIndexPatternWizard renders index pattern step when there are indices 1`] = `
<div>
<Header
indexPatternName="name"
isIncludingSystemIndices={false}
onChangeIncludingSystemIndices={[Function]}
showSystemIndices={false}
/>
<StepIndexPattern
allIndices={
Expand All @@ -26,6 +30,16 @@ exports[`CreateIndexPatternWizard renders index pattern step when there are indi
}
esService={Object {}}
goToNextStep={[Function]}
indexPatternCreationType={
Object {
"checkIndicesForErrors": [Function],
"getIndexPatternMappings": [Function],
"getIndexPatternName": [Function],
"getIndexPatternType": [Function],
"getShowSystemIndices": [Function],
"renderPrompt": [Function],
}
}
initialQuery=""
isIncludingSystemIndices={false}
savedObjectsClient={Object {}}
Expand All @@ -36,8 +50,10 @@ exports[`CreateIndexPatternWizard renders index pattern step when there are indi
exports[`CreateIndexPatternWizard renders the empty state when there are no indices 1`] = `
<div>
<Header
indexPatternName="name"
isIncludingSystemIndices={false}
onChangeIncludingSystemIndices={[Function]}
showSystemIndices={false}
/>
<EmptyState
onRefresh={[Function]}
Expand All @@ -48,13 +64,25 @@ exports[`CreateIndexPatternWizard renders the empty state when there are no indi
exports[`CreateIndexPatternWizard renders time field step when step is set to 2 1`] = `
<div>
<Header
indexPatternName="name"
isIncludingSystemIndices={false}
onChangeIncludingSystemIndices={[Function]}
showSystemIndices={false}
/>
<StepTimeField
createIndexPattern={[Function]}
goToPreviousStep={[Function]}
indexPattern=""
indexPatternCreationType={
Object {
"checkIndicesForErrors": [Function],
"getIndexPatternMappings": [Function],
"getIndexPatternName": [Function],
"getIndexPatternType": [Function],
"getShowSystemIndices": [Function],
"renderPrompt": [Function],
}
}
indexPatternsService={Object {}}
/>
</div>
Expand All @@ -63,8 +91,10 @@ exports[`CreateIndexPatternWizard renders time field step when step is set to 2
exports[`CreateIndexPatternWizard shows system indices even if there are no other indices if the include system indices is toggled 1`] = `
<div>
<Header
indexPatternName="name"
isIncludingSystemIndices={true}
onChangeIncludingSystemIndices={[Function]}
showSystemIndices={false}
/>
<StepIndexPattern
allIndices={
Expand All @@ -76,6 +106,16 @@ exports[`CreateIndexPatternWizard shows system indices even if there are no othe
}
esService={Object {}}
goToNextStep={[Function]}
indexPatternCreationType={
Object {
"checkIndicesForErrors": [Function],
"getIndexPatternMappings": [Function],
"getIndexPatternName": [Function],
"getIndexPatternType": [Function],
"getShowSystemIndices": [Function],
"renderPrompt": [Function],
}
}
initialQuery=""
isIncludingSystemIndices={true}
savedObjectsClient={Object {}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ import React from 'react';
import { shallow } from 'enzyme';

import { CreateIndexPatternWizard } from '../create_index_pattern_wizard';

const mockIndexPatternCreationType = {
getIndexPatternType: () => 'default',
getIndexPatternName: () => 'name',
checkIndicesForErrors: () => false,
getShowSystemIndices: () => false,
renderPrompt: () => {},
getIndexPatternMappings: () => { return {}; }
};
jest.mock('../components/step_index_pattern', () => ({ StepIndexPattern: 'StepIndexPattern' }));
jest.mock('../components/step_time_field', () => ({ StepTimeField: 'StepTimeField' }));
jest.mock('../components/header', () => ({ Header: 'Header' }));
Expand All @@ -44,6 +51,7 @@ const services = {
config: {},
changeUrl: () => {},
scopeApply: () => {},
indexPatternCreationType: mockIndexPatternCreationType,
};

describe('CreateIndexPatternWizard', () => {
Expand Down Expand Up @@ -154,6 +162,7 @@ describe('CreateIndexPatternWizard', () => {
cache: { clear }
},
changeUrl,
indexPatternCreationType: mockIndexPatternCreationType
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe('CreateIndexPatternWizardRender', () => {
savedObjectsClient: {},
config: {},
changeUrl: () => {},
indexPatternCreationType: {},
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ exports[`Header should render normally 1`] = `
>
<h1>
<FormattedMessage
defaultMessage="Create index pattern"
defaultMessage="Create {indexPatternName}"
id="kbn.management.createIndexPatternHeader"
values={Object {}}
values={
Object {
"indexPatternName": undefined,
}
}
/>
</h1>
</EuiTitle>
Expand Down Expand Up @@ -46,23 +50,6 @@ exports[`Header should render normally 1`] = `
</p>
</EuiText>
</EuiFlexItem>
<EuiFlexItem
component="div"
grow={false}
>
<EuiSwitch
checked={true}
id="checkboxShowSystemIndices"
label={
<FormattedMessage
defaultMessage="Include system indices"
id="kbn.management.createIndexPattern.includeSystemIndicesToggleSwitchLabel"
values={Object {}}
/>
}
onChange={[Function]}
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer
size="m"
Expand All @@ -80,9 +67,13 @@ exports[`Header should render without including system indices 1`] = `
>
<h1>
<FormattedMessage
defaultMessage="Create index pattern"
defaultMessage="Create {indexPatternName}"
id="kbn.management.createIndexPatternHeader"
values={Object {}}
values={
Object {
"indexPatternName": undefined,
}
}
/>
</h1>
</EuiTitle>
Expand Down Expand Up @@ -116,23 +107,6 @@ exports[`Header should render without including system indices 1`] = `
</p>
</EuiText>
</EuiFlexItem>
<EuiFlexItem
component="div"
grow={false}
>
<EuiSwitch
checked={false}
id="checkboxShowSystemIndices"
label={
<FormattedMessage
defaultMessage="Include system indices"
id="kbn.management.createIndexPattern.includeSystemIndicesToggleSwitchLabel"
values={Object {}}
/>
}
onChange={[Function]}
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer
size="m"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import React from 'react';
import React, { Fragment } from 'react';

import {
EuiSpacer,
Expand All @@ -32,6 +32,9 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';

export const Header = ({
prompt,
indexPatternName,
showSystemIndices,
isIncludingSystemIndices,
onChangeIncludingSystemIndices,
}) => (
Expand All @@ -41,7 +44,10 @@ export const Header = ({
<h1>
<FormattedMessage
id="kbn.management.createIndexPatternHeader"
defaultMessage="Create index pattern"
defaultMessage="Create {indexPatternName}"
values={{
indexPatternName
}}
/>
</h1>
</EuiTitle>
Expand All @@ -58,18 +64,30 @@ export const Header = ({
</p>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSwitch
label={<FormattedMessage
id="kbn.management.createIndexPattern.includeSystemIndicesToggleSwitchLabel"
defaultMessage="Include system indices"
/>}
id="checkboxShowSystemIndices"
checked={isIncludingSystemIndices}
onChange={onChangeIncludingSystemIndices}
/>
</EuiFlexItem>
{
showSystemIndices ? (
<EuiFlexItem grow={false}>
<EuiSwitch
label={<FormattedMessage
id="kbn.management.createIndexPattern.includeSystemIndicesToggleSwitchLabel"
defaultMessage="Include system indices"
/>}
id="checkboxShowSystemIndices"
checked={isIncludingSystemIndices}
onChange={onChangeIncludingSystemIndices}
/>
</EuiFlexItem>
) : null
}
</EuiFlexGroup>
{
prompt ? (
<Fragment>
<EuiSpacer size="s" />
{prompt}
</Fragment>
) : null
}
<EuiSpacer size="m"/>
</div>
);
Loading