Skip to content

Commit

Permalink
Merge branch 'master' into reporting/api-test-unify
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed May 19, 2020
2 parents 4a6e200 + dfc3ccf commit 1975fd4
Show file tree
Hide file tree
Showing 337 changed files with 4,005 additions and 3,840 deletions.
5 changes: 4 additions & 1 deletion .github/paths-labeller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- "src/plugins/bfetch/**/*.*"
- "Team:apm":
- "x-pack/plugins/apm/**/*.*"
- "x-pack/plugins/apm/**/*.*"
- "Team:Ingest Management":
- "x-pack/plugins/ingest_manager/**/*.*"
- "x-pack/test/api_integration/apis/fleet/**/*.*"
- "x-pack/test/epm_api_integration/**/*.*"
- "Team:uptime":
- "x-pack/plugins/uptime/**/*.*"
1 change: 0 additions & 1 deletion examples/alerting_example/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "alertingExample",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["alerting_example"],
"server": true,
"ui": true,
"requiredPlugins": ["triggers_actions_ui", "charts", "data", "alerting", "actions"],
Expand Down
1 change: 0 additions & 1 deletion examples/bfetch_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "bfetchExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["bfetch_explorer"],
"server": true,
"ui": true,
"requiredPlugins": ["bfetch"],
Expand Down
1 change: 0 additions & 1 deletion examples/demo_search/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "demoSearch",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["demoSearch"],
"server": true,
"ui": true,
"requiredPlugins": ["data"],
Expand Down
1 change: 0 additions & 1 deletion examples/embeddable_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "embeddableExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["embeddable_examples"],
"server": true,
"ui": true,
"requiredPlugins": ["embeddable"],
Expand Down
1 change: 0 additions & 1 deletion examples/embeddable_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "embeddableExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["embeddable_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions", "inspector", "embeddable", "embeddableExamples"],
Expand Down
1 change: 0 additions & 1 deletion examples/search_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "searchExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["search_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["data", "demoSearch"],
Expand Down
1 change: 0 additions & 1 deletion examples/state_containers_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "stateContainersExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["state_containers_examples"],
"server": true,
"ui": true,
"requiredPlugins": ["navigation", "data"],
Expand Down
1 change: 0 additions & 1 deletion examples/ui_action_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "uiActionsExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["ui_actions_examples"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions"],
Expand Down
1 change: 0 additions & 1 deletion examples/ui_actions_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "uiActionsExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["ui_actions_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions", "uiActionsExamples"],
Expand Down
1 change: 0 additions & 1 deletion examples/url_generators_examples/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "urlGeneratorsExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["url_generators_examples"],
"server": false,
"ui": true,
"requiredPlugins": ["share"],
Expand Down
1 change: 0 additions & 1 deletion examples/url_generators_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"id": "urlGeneratorsExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["url_generators_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["share", "urlGeneratorsExamples"],
Expand Down
11 changes: 0 additions & 11 deletions src/core/server/core_app/core_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ export class CoreApp {
router.get({ path: '/core', validate: false }, async (context, req, res) =>
res.ok({ body: { version: '0.0.1' } })
);

coreSetup.savedObjects.registerType({
name: 'server',
hidden: false,
namespaceType: 'single',
mappings: {
properties: {
uuid: { type: 'keyword' },
},
},
});
}
private registerStaticDirs(coreSetup: InternalCoreSetup) {
coreSetup.http.registerStaticDir('/ui/{path*}', Path.resolve(__dirname, './assets'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ function discoverController(

$scope.resetQuery = function() {
history.push(`/${encodeURIComponent($route.current.params.id)}`);
$route.reload();
};

$scope.newQuery = function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { BasicOptions, SwitchOption } from '../../../../../charts/public';
import { GridPanel } from './grid_panel';
import { ThresholdPanel } from './threshold_panel';
import { BasicVislibParams } from '../../../types';
import { ChartTypes } from '../../../utils/collections';

function PointSeriesOptions(props: ValidationVisOptionsProps<BasicVislibParams>) {
const { stateParams, setValue, vis } = props;
Expand Down Expand Up @@ -67,8 +68,9 @@ function PointSeriesOptions(props: ValidationVisOptionsProps<BasicVislibParams>)
/>
)}

{vis.type.type === 'histogram' && (
{vis.type.name === ChartTypes.HISTOGRAM && (
<SwitchOption
data-test-subj="showValuesOnChart"
label={i18n.translate('visTypeVislib.editors.pointSeries.showLabels', {
defaultMessage: 'Show values on chart',
})}
Expand Down
17 changes: 17 additions & 0 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ export default function({ getService, getPageObjects }) {
const isVisible = await PageObjects.discover.hasNoResults();
expect(isVisible).to.be(false);
});

it('should reload the saved search with persisted query to show the initial hit count', async function() {
// apply query some changes
await queryBar.setQuery('test');
await queryBar.submitQuery();
await retry.try(async function() {
expect(await PageObjects.discover.getHitCount()).to.be('22');
});

// reset to persisted state
await PageObjects.discover.clickResetSavedSearchButton();
const expectedHitCount = '14,004';
await retry.try(async function() {
expect(await queryBar.getQueryString()).to.be('');
expect(await PageObjects.discover.getHitCount()).to.be(expectedHitCount);
});
});
});

describe('query #2, which has an empty time range', () => {
Expand Down
32 changes: 32 additions & 0 deletions test/functional/apps/visualize/_point_series_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,38 @@ export default function({ getService, getPageObjects }) {
});
});

describe('show values on chart', () => {
before(async () => {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVerticalBarChart();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
log.debug('Bucket = X-axis');
await PageObjects.visEditor.clickBucket('X-axis');
log.debug('Aggregation = Terms');
await PageObjects.visEditor.selectAggregation('Terms');
log.debug('Field = geo.src');
await PageObjects.visEditor.selectField('geo.src');
await PageObjects.visEditor.clickGo();
log.debug('Open Options tab');
await PageObjects.visEditor.clickOptionsTab();
});

it('should show values on bar chart', async () => {
await PageObjects.visEditor.toggleValuesOnChart();
await PageObjects.visEditor.clickGo();
const values = await PageObjects.visChart.getChartValues();
expect(values).to.eql(['2,592', '2,373', '1,194', '489', '415']);
});

it('should hide values on bar chart', async () => {
await PageObjects.visEditor.toggleValuesOnChart();
await PageObjects.visEditor.clickGo();
const values = await PageObjects.visChart.getChartValues();
expect(values.length).to.be(0);
});
});

describe('custom labels and axis titles', function() {
const visName = 'Visualization Point Series Test';
const customLabel = 'myLabel';
Expand Down
6 changes: 6 additions & 0 deletions test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
await testSubjects.click('discoverOpenButton');
}

public async clickResetSavedSearchButton() {
await testSubjects.moveMouseTo('resetSavedSearch');
await testSubjects.click('resetSavedSearch');
await header.waitUntilLoadingHasFinished();
}

public async closeLoadSavedSearchPanel() {
await testSubjects.click('euiFlyoutCloseButton');
}
Expand Down
11 changes: 11 additions & 0 deletions test/functional/page_objects/visualize_chart_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,17 @@ export function VisualizeChartPageProvider({ getService, getPageObjects }: FtrPr
};
});
}

public async getChartValues() {
const elements = await find.allByCssSelector('.series.histogram text');
const values = await Promise.all(
elements.map(async element => {
const text = await element.getVisibleText();
return text;
})
);
return values;
}
}

return new VisualizeChart();
Expand Down
4 changes: 4 additions & 0 deletions test/functional/page_objects/visualize_editor_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ export function VisualizeEditorPageProvider({ getService, getPageObjects }: FtrP
return await testSubjects.click('showCategoryLines');
}

public async toggleValuesOnChart() {
return await testSubjects.click('showValuesOnChart');
}

public async setGridValueAxis(axis: string) {
log.debug(`setGridValueAxis(${axis})`);
await find.selectValue('select#gridAxis', axis);
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/public/style/hackery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
when the UI framework implements everything we need
*/

#canvas-app { // sass-lint:disable-line no-ids
.canvasContainerWrapper {
// Give buttons some room to the right
.euiAccordion__childWrapper {
overflow-x: hidden;
Expand Down
6 changes: 0 additions & 6 deletions x-pack/plugins/endpoint/common/schema/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions x-pack/plugins/endpoint/kibana.json

This file was deleted.

18 changes: 0 additions & 18 deletions x-pack/plugins/endpoint/package.json

This file was deleted.

28 changes: 0 additions & 28 deletions x-pack/plugins/endpoint/public/applications/endpoint/README.md

This file was deleted.

30 changes: 0 additions & 30 deletions x-pack/plugins/endpoint/public/applications/endpoint/index.tsx

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1975fd4

Please sign in to comment.