Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/elastic/kibana into alert…
Browse files Browse the repository at this point in the history
…ing/updated-at
  • Loading branch information
ymao1 committed Nov 19, 2020
2 parents 424af92 + 02cda96 commit 0d75832
Show file tree
Hide file tree
Showing 130 changed files with 1,826 additions and 646 deletions.
8 changes: 4 additions & 4 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ and actions.
|Backend and core front-end react-components for GeoJson file upload. Only supports the Maps plugin.
|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[fleet]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false)
|{kib-repo}blob/{branch}/x-pack/plugins/global_search/README.md[globalSearch]
|The GlobalSearch plugin provides an easy way to search for various objects, such as applications
or dashboards from the Kibana instance, from both server and client-side plugins
Expand Down Expand Up @@ -413,10 +417,6 @@ Index Management by running this series of requests in Console:
the infrastructure monitoring use-case within Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[ingestManager]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false)
|{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines]
|The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details.
Expand Down
74 changes: 0 additions & 74 deletions docs/plugins/known-plugins.asciidoc

This file was deleted.

89 changes: 80 additions & 9 deletions docs/user/plugins.asciidoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,90 @@
[chapter]
[[kibana-plugins]]
= Kibana plugins
= {kib} plugins

[partintro]
--
Add-on functionality for {kib} is implemented with plug-in modules. You use the `bin/kibana-plugin`
command to manage these modules.
Implement add-on functionality for {kib} with plug-in modules.

[IMPORTANT]
.Plugin compatibility
==============================================
The {kib} plugin interfaces are in a state of constant development. We cannot provide backwards compatibility for plugins due to the high rate of change. {kib} enforces that the installed plugins match the version of {kib} itself. Plugin developers will have to release a new version of their plugin for each new {kib} release as a result.
The {kib} plugin interfaces are in a state of constant development. We cannot provide backwards compatibility for plugins due to the high rate of change. {kib} enforces that the installed plugins match the version of {kib}.
Plugin developers must release a new version of their plugin for each new {kib} release.
==============================================
--

[float]
[[known-plugins]]
== Known plugins

The known plugins were tested for {kib} *5.x*, so we are unable to guarantee compatibility with your version of {kib}. The {kib} installer rejects any plugins that haven't been published for your specific version of {kib}.
We are unable to evaluate or maintain the known plugins, so care should be taken before installation.

[float]
=== Apps
* https://github.com/sivasamyk/logtrail[LogTrail] - View, analyze, search and tail log events in realtime with a developer/sysadmin friendly interface
* https://github.com/wtakase/kibana-own-home[Own Home] (wtakase) - enables multi-tenancy
* https://github.com/asileon/kibana_shard_allocation[Shard Allocation] (asileon) - visualize elasticsearch shard allocation
* https://github.com/wazuh/wazuh-kibana-app[Wazuh] - Wazuh provides host-based security visibility using lightweight multi-platform agents.
* https://github.com/TrumanDu/indices_view[Indices View] - View indices related information.
* https://github.com/johtani/analyze-api-ui-plugin[Analyze UI] (johtani) - UI for elasticsearch _analyze API
* https://github.com/TrumanDu/cleaner[Cleaner] (TrumanDu)- Setting index ttl.
* https://github.com/bitsensor/elastalert-kibana-plugin[ElastAlert Kibana Plugin] (BitSensor) - UI to create, test and edit ElastAlert rules
* https://github.com/query-ai/queryai-kibana-plugin[AI Analyst] (Query.AI) - App providing: NLP queries, automation, ML visualizations and insights

[float]
=== Timelion Extensions
* https://github.com/fermiumlabs/mathlion[mathlion] (fermiumlabs) - enables equation parsing and advanced math under Timelion

[float]
=== Visualizations
* https://github.com/virusu/3D_kibana_charts_vis[3D Charts] (virusu)
* https://github.com/JuanCarniglia/area3d_vis[3D Graph] (JuanCarniglia)
* https://github.com/TrumanDu/bmap[Bmap](TrumanDu) - integrated echarts for map visualization
* https://github.com/mstoyano/kbn_c3js_vis[C3JS Visualizations] (mstoyano)
* https://github.com/aaronoah/kibana_calendar_vis[Calendar Visualization] (aaronoah)
* https://github.com/elo7/cohort[Cohort analysis] (elo7)
* https://github.com/DeanF/health_metric_vis[Colored Metric Visualization] (deanf)
* https://github.com/JuanCarniglia/dendrogram_vis[Dendrogram] (JuanCarniglia)
* https://github.com/dlumbrer/kbn_dotplot[Dotplot] (dlumbrer)
* https://github.com/AnnaGerber/kibana_dropdown[Dropdown] (AnnaGerber)
* https://github.com/fbaligand/kibana-enhanced-table[Enhanced Table] (fbaligand)
* https://github.com/nreese/enhanced_tilemap[Enhanced Tilemap] (nreese)
* https://github.com/ommsolutions/kibana_ext_metrics_vis[Extended Metric] (ommsolutions)
* https://github.com/flexmonster/pivot-kibana[Flexmonster Pivot Table & Charts] - a customizable pivot table component for advanced data analysis and reporting.
* https://github.com/outbrain/ob-kb-funnel[Funnel Visualization] (roybass)
* https://github.com/sbeyn/kibana-plugin-gauge-sg[Gauge] (sbeyn)
* https://github.com/clamarque/Kibana_health_metric_vis[Health Metric] (clamarque)
* https://github.com/tshoeb/Insight[Insight] (tshoeb) - Multidimensional data exploration
* https://github.com/sbeyn/kibana-plugin-line-sg[Line] (sbeyn)
* https://github.com/walterra/kibana-milestones-vis[Milestones] (walterra)
* https://github.com/varundbest/navigation[Navigation] (varundbest)
* https://github.com/dlumbrer/kbn_network[Network Plugin] (dlumbrer)
* https://github.com/amannocci/kibana-plugin-metric-percent[Percent] (amannocci)
* https://github.com/dlumbrer/kbn_polar[Polar] (dlumbrer)
* https://github.com/dlumbrer/kbn_radar[Radar] (dlumbrer)
* https://github.com/dlumbrer/kbn_searchtables[Search-Tables] (dlumbrer)
* https://github.com/Smeds/status_light_visualization[Status Light] (smeds)
* https://github.com/prelert/kibana-swimlane-vis[Swimlanes] (prelert)
* https://github.com/sbeyn/kibana-plugin-traffic-sg[Traffic] (sbeyn)
* https://github.com/PhaedrusTheGreek/transform_vis[Transform Visualization] (PhaedrusTheGreek)
* https://github.com/nyurik/kibana-vega-vis[Vega-based visualizations] (nyurik) - Support for user-defined graphs, external data sources, maps, images, and user-defined interactivity.
* https://github.com/Camichan/kbn_aframe[VR Graph Visualizations] (Camichan)

[float]
=== Other
* https://github.com/nreese/kibana-time-plugin[Time filter as a dashboard panel] Widget to view and edit the time range from within dashboards.

* https://github.com/Webiks/kibana-API.git[Kibana-API] (webiks) Exposes an API with Kibana functionality.
Use it to create, edit and embed visualizations, and also to search inside an embedded dashboard.

* https://github.com/sw-jung/kibana_markdown_doc_view[Markdown Doc View] (sw-jung) - A plugin for custom doc view using markdown+handlebars template.
* https://github.com/datasweet-fr/kibana-datasweet-formula[Datasweet Formula] (datasweet) - enables calculated metric on any standard Kibana visualization.
* https://github.com/pjhampton/kibana-prometheus-exporter[Prometheus Exporter] - exports the Kibana metrics in the prometheus format

NOTE: To add your plugin to this page, open a {kib-repo}tree/{branch}/docs/plugins/known-plugins.asciidoc[pull request].

[float]
[[install-plugin]]
== Install plugins

Expand Down Expand Up @@ -60,6 +130,7 @@ You can specify the environment variable directly when installing plugins:
[source,shell]
$ http_proxy="http://proxy.local:4242" bin/kibana-plugin install <package name or URL>

[float]
[[update-remove-plugin]]
== Update and remove plugins

Expand All @@ -74,6 +145,7 @@ You can also remove a plugin manually by deleting the plugin's subdirectory unde

NOTE: Removing a plugin will result in an "optimize" run which will delay the next start of {kib}.

[float]
[[disable-plugin]]
== Disable plugins

Expand All @@ -88,6 +160,7 @@ NOTE: Disabling or enabling a plugin will result in an "optimize" run which will

<1> You can find a plugin's plugin ID as the value of the `name` property in the plugin's `package.json` file.

[float]
[[configure-plugin-manager]]
== Configure the plugin manager

Expand Down Expand Up @@ -125,5 +198,3 @@ you must specify the path to that configuration file each time you use the `bin/
64:: Unknown command or incorrect option parameter
74:: I/O error
70:: Other error

include::{kib-repo-dir}/plugins/known-plugins.asciidoc[]
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pageLoadAssetSize:
indexManagement: 140608
indexPatternManagement: 154222
infra: 197873
ingestManager: 415829
fleet: 415829
ingestPipelines: 58003
inputControlVis: 172675
inspector: 148711
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
addSerializer,
} from 'jest-snapshot';
import path from 'path';
import expect from '@kbn/expect';
import prettier from 'prettier';
import babelTraverse from '@babel/traverse';
import { flatten, once } from 'lodash';
Expand Down Expand Up @@ -227,7 +226,9 @@ function expectToMatchSnapshot(snapshotContext: SnapshotContext, received: any)
const matcher = toMatchSnapshot.bind(snapshotContext as any);
const result = matcher(received);

expect(result.pass).to.eql(true, result.message());
if (!result.pass) {
throw new Error(result.message());
}
}

function expectToMatchInlineSnapshot(
Expand All @@ -239,5 +240,7 @@ function expectToMatchInlineSnapshot(

const result = arguments.length === 2 ? matcher(received) : matcher(received, _actual);

expect(result.pass).to.eql(true, result.message());
if (!result.pass) {
throw new Error(result.message());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import { IndexPattern } from './index_pattern';

export interface PatternCache {
get: (id: string) => IndexPattern;
set: (id: string, value: IndexPattern) => IndexPattern;
get: (id: string) => Promise<IndexPattern> | undefined;
set: (id: string, value: Promise<IndexPattern>) => Promise<IndexPattern>;
clear: (id: string) => void;
clearAll: () => void;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function setDocsourcePayload(id: string | null, providedPayload: any) {
describe('IndexPatterns', () => {
let indexPatterns: IndexPatternsService;
let savedObjectsClient: SavedObjectsClientCommon;
let SOClientGetDelay = 0;

beforeEach(() => {
const indexPatternObj = { id: 'id', version: 'a', attributes: { title: 'title' } };
Expand All @@ -49,11 +50,14 @@ describe('IndexPatterns', () => {
);
savedObjectsClient.delete = jest.fn(() => Promise.resolve({}) as Promise<any>);
savedObjectsClient.create = jest.fn();
savedObjectsClient.get = jest.fn().mockImplementation(async (type, id) => ({
id: object.id,
version: object.version,
attributes: object.attributes,
}));
savedObjectsClient.get = jest.fn().mockImplementation(async (type, id) => {
await new Promise((resolve) => setTimeout(resolve, SOClientGetDelay));
return {
id: object.id,
version: object.version,
attributes: object.attributes,
};
});
savedObjectsClient.update = jest
.fn()
.mockImplementation(async (type, id, body, { version }) => {
Expand Down Expand Up @@ -87,6 +91,7 @@ describe('IndexPatterns', () => {
});

test('does cache gets for the same id', async () => {
SOClientGetDelay = 1000;
const id = '1';
setDocsourcePayload(id, {
id: 'foo',
Expand All @@ -96,10 +101,17 @@ describe('IndexPatterns', () => {
},
});

const indexPattern = await indexPatterns.get(id);
// make two requests before first can complete
const indexPatternPromise = indexPatterns.get(id);
indexPatterns.get(id);

expect(indexPattern).toBeDefined();
expect(indexPattern).toBe(await indexPatterns.get(id));
indexPatternPromise.then((indexPattern) => {
expect(savedObjectsClient.get).toBeCalledTimes(1);
expect(indexPattern).toBeDefined();
});

expect(await indexPatternPromise).toBe(await indexPatterns.get(id));
SOClientGetDelay = 0;
});

test('savedObjectCache pre-fetches only title', async () => {
Expand Down Expand Up @@ -211,4 +223,25 @@ describe('IndexPatterns', () => {

expect(indexPatterns.savedObjectToSpec(savedObject)).toMatchSnapshot();
});

test('failed requests are not cached', async () => {
savedObjectsClient.get = jest
.fn()
.mockImplementation(async (type, id) => {
return {
id: object.id,
version: object.version,
attributes: object.attributes,
};
})
.mockRejectedValueOnce({});

const id = '1';

// failed request!
expect(indexPatterns.get(id)).rejects.toBeDefined();

// successful subsequent request
expect(async () => await indexPatterns.get(id)).toBeDefined();
});
});
Loading

0 comments on commit 0d75832

Please sign in to comment.