Skip to content

Commit

Permalink
Merge branch 'master' into discover-chart-replace
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Sep 10, 2019
2 parents ff9f75b + 7fe7b34 commit f9bbb01
Show file tree
Hide file tree
Showing 703 changed files with 6,767 additions and 4,509 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/ui/public/saved_objects @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
/x-pack/plugins/features/ @elastic/kibana-platform

# Security
/x-pack/legacy/plugins/security/ @elastic/kibana-security
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": "src/legacy/core_plugins/timelion",
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"tsvb": "src/legacy/core_plugins/metrics",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"kbnESQuery": "packages/kbn-es-query",
"inspector": "src/plugins/inspector",
"kibana-react": "src/plugins/kibana_react",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/features/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ experimental[This API is *experimental* and may be changed or removed completely
[[features-api-get-request]]
==== Request

`GET /api/features/v1`
`GET /api/features`

[[features-api-get-codes]]
==== Response code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ init(server) {
-----------

===== Feature details
Registering a feature consists of the following fields. For more information, consult the {repo}blob/{branch}/x-pack/legacy/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[feature registry interface].
Registering a feature consists of the following fields. For more information, consult the {repo}blob/{branch}/x-pack/plugins/features/server/feature_registry.ts[feature registry interface].


[cols="1a, 1a, 1a, 1a"]
Expand All @@ -45,7 +45,7 @@ Registering a feature consists of the following fields. For more information, co
|An array of applications this feature enables. Typically, all of your plugin's apps (from `uiExports`) will be included here.

|`privileges` (required)
|{repo}blob/{branch}/x-pack/legacy/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[`FeatureWithAllOrReadPrivileges`].
|{repo}blob/{branch}/x-pack/plugins/features/server/feature.ts[`FeatureWithAllOrReadPrivileges`].
|see examples below
|The set of privileges this feature requires to function.

Expand All @@ -63,7 +63,7 @@ Registering a feature consists of the following fields. For more information, co
===== Privilege definition
The `privileges` section of feature registration allows plugins to implement read/write and read-only modes for their applications.

For a full explanation of fields and options, consult the {repo}blob/{branch}/x-pack/legacy/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts[feature registry interface].
For a full explanation of fields and options, consult the {repo}blob/{branch}/x-pack/plugins/features/server/feature_registry.ts[feature registry interface].

==== Using UI Capabilities

Expand Down Expand Up @@ -142,7 +142,7 @@ init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
id: 'dev_tools',
name: i18n.translate('xpack.main.featureRegistry.devToolsFeatureName', {
name: i18n.translate('xpack.features.devToolsFeatureName', {
defaultMessage: 'Dev Tools',
}),
icon: 'devToolsApp',
Expand All @@ -167,7 +167,7 @@ init(server) {
ui: ['show'],
},
},
privilegesTooltip: i18n.translate('xpack.main.featureRegistry.devToolsPrivilegesTooltip', {
privilegesTooltip: i18n.translate('xpack.features.devToolsPrivilegesTooltip', {
defaultMessage:
'User should also be granted the appropriate Elasticsearch cluster and index privileges',
}),
Expand Down
Binary file modified docs/infrastructure/images/infra-view-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/infrastructure/view-metrics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
== Viewing infrastructure metrics

When you select *View Metrics* for a component in your infrastructure from the <<infra-ui, Infrastructure app in Kibana>>, you can view detailed metrics for that component, and for any related components.
You can also view additional component metadata.

[role="screenshot"]
image::infrastructure/images/infra-view-metrics.png[Infrastructure View Metrics in Kibana]
Expand Down
Binary file modified docs/siem/images/network-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"request": "^2.88.0",
"reselect": "^3.0.1",
"resize-observer-polyfill": "^1.5.0",
"rimraf": "2.6.3",
"rimraf": "2.7.1",
"rison-node": "1.0.2",
"rxjs": "^6.2.1",
"script-loader": "0.7.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-eslint-import-resolver-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"url": "https://github.com/elastic/kibana/tree/master/packages/kbn-eslint-import-resolver-kibana"
},
"dependencies": {
"debug": "^2.6.6",
"debug": "^2.6.9",
"eslint-import-resolver-node": "0.3.2",
"eslint-import-resolver-webpack": "0.11.1",
"glob-all": "^3.1.0",
"lru-cache": "^4.1.3",
"lru-cache": "^4.1.5",
"resolve": "^1.7.1",
"webpack": "^4.39.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ui-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"grunt-babel": "^8.0.0",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-copy": "^1.0.0",
"highlight.js": "9.15.8",
"highlight.js": "9.15.10",
"html": "1.0.0",
"html-loader": "^0.5.5",
"imports-loader": "^0.8.0",
Expand Down
1 change: 1 addition & 0 deletions src/core/server/http/http_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,5 @@ export const httpServiceMock = {
createSetupContract: createSetupContractMock,
createOnPreAuthToolkit: createOnPreAuthToolkitMock,
createAuthToolkit: createAuthToolkitMock,
createRouter: createRouterMock,
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,39 @@ describe('IndexPattern', () => {
});
});

describe('getComputedFields', () => {
test('should be a function', () => {
expect(indexPattern.getComputedFields).toBeInstanceOf(Function);
});

test('should request all stored fields', () => {
expect(indexPattern.getComputedFields().storedFields).toContain('*');
});

test('should request date fields as docvalue_fields', () => {
const { docvalueFields } = indexPattern.getComputedFields();
const docValueFieldNames = docvalueFields.map(field => field.field);

expect(Object.keys(docValueFieldNames).length).toBe(3);
expect(docValueFieldNames).toContain('@timestamp');
expect(docValueFieldNames).toContain('time');
expect(docValueFieldNames).toContain('utc_time');
});

test('should request date field doc values in date_time format', () => {
const { docvalueFields } = indexPattern.getComputedFields();
const timestampField = docvalueFields.find(field => field.field === '@timestamp');

expect(timestampField).toHaveProperty('format', 'date_time');
});

test('should not request scripted date fields as docvalue_fields', () => {
const { docvalueFields } = indexPattern.getComputedFields();

expect(docvalueFields).not.toContain('script date');
});
});

describe('getNonScriptedFields', () => {
test('should return all non-scripted fields', () => {
const notScriptedNames = mockLogStashFields()
Expand Down
7 changes: 6 additions & 1 deletion src/legacy/core_plugins/data/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export class DataPlugin implements Plugin<DataSetup, DataStart, DataPluginSetupD
private readonly query: QueryService = new QueryService();
private readonly search: SearchService = new SearchService();

private setupApi!: DataSetup;

public setup(core: CoreSetup, { __LEGACY }: DataPluginSetupDependencies): DataSetup {
const { uiSettings } = core;
const savedObjectsClient = __LEGACY.savedObjectsClient;
Expand All @@ -87,7 +89,7 @@ export class DataPlugin implements Plugin<DataSetup, DataStart, DataPluginSetupD
uiSettings,
savedObjectsClient,
});
return {
this.setupApi = {
expressions: this.expressions.setup(),
indexPatterns: indexPatternsService,
filter: this.filter.setup({
Expand All @@ -97,10 +99,13 @@ export class DataPlugin implements Plugin<DataSetup, DataStart, DataPluginSetupD
query: this.query.setup(),
search: this.search.setup(savedObjectsClient),
};

return this.setupApi;
}

public start(core: CoreStart, plugins: DataPluginStartDependencies) {
return {
...this.setupApi!,
expressions: this.expressions.start({ inspector: plugins.inspector }),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,6 @@ class SearchBarUI extends Component<SearchBarProps, State> {
if (this.props.onSaved) {
this.props.onSaved(response);
}

if (this.props.onQuerySubmit) {
this.props.onQuerySubmit({
query: this.state.query,
dateRange: {
from: this.state.dateRangeFrom,
to: this.state.dateRangeTo,
},
});
}
} catch (error) {
toastNotifications.addDanger(`An error occured while saving your query: ${error.message}`);
throw error;
Expand Down
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/interpreter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ export default function InterpreterPlugin(kibana: any) {
uiExports: {
injectDefaultVars: server => ({
serverBasePath: server.config().get('server.basePath'),
interpreterConfig: server.config().get('interpreter'),
}),
},
config: (Joi: any) => {
return Joi.object({
enabled: Joi.boolean().default(true),
enableInVisualize: Joi.boolean().default(true),
}).default();
},
init,
Expand Down
Loading

0 comments on commit f9bbb01

Please sign in to comment.