Skip to content

Commit

Permalink
Merge branch 'master' into newplatform/data/cleanup-legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 11, 2020
2 parents d872bf8 + fbbf580 commit 442091f
Show file tree
Hide file tree
Showing 117 changed files with 2,145 additions and 2,649 deletions.
463 changes: 0 additions & 463 deletions docs/developer/visualize/development-create-visualization.asciidoc

This file was deleted.

This file was deleted.

27 changes: 16 additions & 11 deletions docs/developer/visualize/development-visualize-index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
[[development-visualize-index]]
== Developing Visualizations

Kibana Visualizations are the easiest way to add additional functionality to Kibana.
This part of documentation is split into two parts.
The first part tells you all you need to know on how to embed existing Kibana Visualizations in your plugin.
The second step explains how to create your own custom visualization.

[IMPORTANT]
==============================================
These pages document internal APIs and are not guaranteed to be supported across future versions of Kibana.
However, these docs will be kept up-to-date to reflect the current implementation of Visualization plugins in Kibana.
These pages document internal APIs and are not guaranteed to be supported across future versions of Kibana.
==============================================

* <<development-embedding-visualizations>>
* <<development-create-visualization>>
The internal APIs for creating custom visualizations are in a state of heavy churn as
they are being migrated to the new Kibana platform, and large refactorings have been
happening across minor releases in the `7.x` series. In particular, in `7.5` and later
we have made significant changes to the legacy APIs as we work to gradually replace them.

As a result, starting in `7.5` we have removed the documentation for the legacy APIs
to prevent confusion. We expect to be able to create new documentation later in `7.x`
when the visualizations plugin has been completed.

include::development-embedding-visualizations.asciidoc[]
We would recommend waiting until later in `7.x` to upgrade your plugins if possible.
If you would like to keep up with progress on the visualizations plugin in the meantime,
here are a few resources:

include::development-create-visualization.asciidoc[]
* The <<breaking-changes,breaking changes>> documentation, where we try to capture any changes to the APIs as they occur across minors.
* link:https://github.com/elastic/kibana/issues/44121[Meta issue] which is tracking the move of the plugin to the new Kibana platform
* Our link:https://www.elastic.co/blog/join-our-elastic-stack-workspace-on-slack[Elastic Stack workspace on Slack].
* The {repo}blob/{branch}/src/plugins/visualizations[source code], which will continue to be
the most accurate source of information.
2 changes: 0 additions & 2 deletions docs/visualize/aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ You can also nest these aggregations. For example, if you want to produce a thir

{ref}/search-aggregations-pipeline-serialdiff-aggregation.html[Serial diff]:: Values in a time series are subtracted from itself at different time lags or periods.

Custom {kib} plugins can <<development-visualize-index, add more capabilities to the default editor>>, which includes support for adding more aggregations.

[float]
[[visualize-sibling-pipeline-aggregations]]
=== Sibling pipeline aggregations
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"leaflet-responsive-popup": "0.6.4",
"leaflet-vega": "^0.8.6",
"leaflet.heat": "0.2.0",
"less": "^3.0.2",
"less": "^2.7.3",
"less-loader": "5.0.0",
"lodash": "npm:@elastic/[email protected]",
"lodash.clonedeep": "^4.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const mockPrepackagedRule = (): PrepackagedRules => ({
version: 1,
false_positives: [],
max_signals: 100,
note: '',
timeline_id: 'timeline-id',
timeline_title: 'timeline-title',
});
Expand Down Expand Up @@ -392,6 +393,7 @@ export const getResult = (): RuleAlertType => ({
},
],
references: ['http://www.example.com', 'https://ww.example.com'],
note: '# Investigative notes',
version: 1,
},
createdAt: new Date('2019-12-13T16:40:33.400Z'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@
}
}
},
"note": {
"type": "text"
},
"type": {
"type": "keyword"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const createRulesBulkRoute = (router: IRouter) => {
to,
type,
references,
note,
timeline_id: timelineId,
timeline_title: timelineTitle,
version,
Expand Down Expand Up @@ -131,6 +132,7 @@ export const createRulesBulkRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
});
return transformValidateBulkError(ruleIdOrUuid, createdRule);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const createRulesRoute = (router: IRouter): void => {
to,
type,
references,
note,
} = request.body;
const siemResponse = buildSiemResponse(response);

Expand Down Expand Up @@ -117,6 +118,7 @@ export const createRulesRoute = (router: IRouter): void => {
type,
threat,
references,
note,
version: 1,
});
const ruleStatuses = await savedObjectsClient.find<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const importRulesRoute = (router: IRouter, config: LegacyServices['config
to,
type,
references,
note,
timeline_id: timelineId,
timeline_title: timelineTitle,
version,
Expand Down Expand Up @@ -183,6 +184,7 @@ export const importRulesRoute = (router: IRouter, config: LegacyServices['config
type,
threat,
references,
note,
version,
});
resolve({ rule_id: ruleId, status_code: 200 });
Expand Down Expand Up @@ -217,6 +219,7 @@ export const importRulesRoute = (router: IRouter, config: LegacyServices['config
type,
threat,
references,
note,
version,
});
resolve({ rule_id: ruleId, status_code: 200 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const patchRulesBulkRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
} = payloadRule;
const idOrRuleIdOrUnknown = id ?? ruleId ?? '(unknown id)';
Expand Down Expand Up @@ -104,6 +105,7 @@ export const patchRulesBulkRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
});
if (rule != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const patchRulesRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
} = request.body;
const siemResponse = buildSiemResponse(response);
Expand Down Expand Up @@ -101,6 +102,7 @@ export const patchRulesRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
});
if (rule != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const updateRulesBulkRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
} = payloadRule;
const finalIndex = outputIndex ?? siemClient.signalsIndex;
Expand Down Expand Up @@ -107,6 +108,7 @@ export const updateRulesBulkRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
});
if (rule != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const updateRulesRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
} = request.body;
const siemResponse = buildSiemResponse(response);
Expand Down Expand Up @@ -103,6 +104,7 @@ export const updateRulesRoute = (router: IRouter) => {
type,
threat,
references,
note,
version,
});
if (rule != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(rule).toEqual(expected);
Expand Down Expand Up @@ -154,6 +155,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(omitData).toEqual(expected);
Expand Down Expand Up @@ -218,6 +220,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(rule).toEqual(expected);
Expand Down Expand Up @@ -282,6 +285,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(rule).toEqual(expected);
Expand Down Expand Up @@ -344,6 +348,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(omitData).toEqual(expected);
Expand Down Expand Up @@ -409,6 +414,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(ruleWithEnabledFalse).toEqual(expected);
Expand Down Expand Up @@ -474,6 +480,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(ruleWithEnabledFalse).toEqual(expected);
Expand Down Expand Up @@ -539,6 +546,7 @@ describe('utils', () => {
timeline_title: 'some-timeline-title',
to: 'now',
type: 'query',
note: '# Investigative notes',
version: 1,
};
expect(rule).toEqual(expected);
Expand Down Expand Up @@ -688,6 +696,7 @@ describe('utils', () => {
},
timeline_id: 'some-timeline-id',
timeline_title: 'some-timeline-title',
note: '# Investigative notes',
version: 1,
};
expect(output).toEqual({
Expand Down Expand Up @@ -769,6 +778,7 @@ describe('utils', () => {
},
timeline_id: 'some-timeline-id',
timeline_title: 'some-timeline-title',
note: '# Investigative notes',
version: 1,
};
expect(output).toEqual(expected);
Expand Down Expand Up @@ -941,6 +951,7 @@ describe('utils', () => {
},
timeline_id: 'some-timeline-id',
timeline_title: 'some-timeline-title',
note: '# Investigative notes',
version: 1,
};
expect(output).toEqual(expected);
Expand Down Expand Up @@ -1053,6 +1064,7 @@ describe('utils', () => {
type: 'query',
updated_at: '2019-12-13T16:40:33.400Z',
updated_by: 'elastic',
note: '# Investigative notes',
version: 1,
},
]);
Expand Down Expand Up @@ -1112,6 +1124,7 @@ describe('utils', () => {
type: 'query',
updated_at: '2019-12-13T16:40:33.400Z',
updated_by: 'elastic',
note: '# Investigative notes',
version: 1,
},
{
Expand Down Expand Up @@ -1160,6 +1173,7 @@ describe('utils', () => {
type: 'query',
updated_at: '2019-12-13T16:40:33.400Z',
updated_by: 'elastic',
note: '# Investigative notes',
version: 1,
},
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export const transformAlertToRule = (
to: alert.params.to,
type: alert.params.type,
threat: alert.params.threat,
note: alert.params.note,
version: alert.params.version,
status: ruleStatus?.attributes.status,
status_date: ruleStatus?.attributes.statusDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const ruleOutput: RulesSchema = {
meta: {
someMeta: 'someField',
},
note: '# Investigative notes',
timeline_title: 'some-timeline-title',
timeline_id: 'some-timeline-id',
};
Expand Down
Loading

0 comments on commit 442091f

Please sign in to comment.