plugin-elastic-report 0.0.0-stage → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/elastic-report/SKILLS.md +34 -0
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/357.0dd385384cab5dbf.js +10 -0
- package/dist/client/index.js +10 -0
- package/dist/client-v2/851.142c93fc6d666b28.js +10 -0
- package/dist/client-v2/857.a5bf9637d5fd4ef5.js +10 -0
- package/dist/client-v2/877.f4095a3dbcadf98f.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +21 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +198 -0
- package/dist/locale/vi-VN.json +198 -0
- package/dist/locale/zh-CN.json +198 -0
- package/dist/node_modules/@elastic/elasticsearch/.dockerignore +11 -0
- package/dist/node_modules/@elastic/elasticsearch/LICENSE +202 -0
- package/dist/node_modules/@elastic/elasticsearch/NOTICE.txt +2 -0
- package/dist/node_modules/@elastic/elasticsearch/catalog-info.yaml +50 -0
- package/dist/node_modules/@elastic/elasticsearch/codecov.yml +14 -0
- package/dist/node_modules/@elastic/elasticsearch/index.d.ts +28 -0
- package/dist/node_modules/@elastic/elasticsearch/index.js +85525 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/async_search.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/async_search.js +155 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/autoscaling.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/autoscaling.js +130 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/bulk.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/bulk.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/capabilities.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/capabilities.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cat.d.ts +193 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cat.js +766 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ccr.d.ts +102 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ccr.js +395 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/clear_scroll.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/clear_scroll.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/close_point_in_time.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/close_point_in_time.js +56 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cluster.d.ts +123 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cluster.js +482 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/connector.d.ts +245 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/connector.js +1121 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/count.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/count.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/create.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/create.js +53 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/dangling_indices.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/dangling_indices.js +100 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query_rethrottle.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query_rethrottle.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_script.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_script.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/enrich.d.ts +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/enrich.js +169 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/eql.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/eql.js +139 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/esql.d.ts +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/esql.js +170 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists_source.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists_source.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/explain.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/explain.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/features.d.ts +25 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/features.js +75 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/field_caps.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/field_caps.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/fleet.d.ts +50 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/fleet.js +211 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_context.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_context.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_source.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_source.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/graph.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/graph.js +70 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/health_report.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/health_report.js +54 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ilm.d.ts +88 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ilm.js +329 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/index.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/index.js +61 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/indices.d.ts +494 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/indices.js +2133 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/inference.d.ts +221 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/inference.js +1167 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/info.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/info.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ingest.d.ts +95 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ingest.js +389 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/knn_search.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/knn_search.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/license.d.ts +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/license.js +194 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/logstash.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/logstash.js +118 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mget.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mget.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/migration.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/migration.js +107 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ml.d.ts +522 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ml.js +2468 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/monitoring.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/monitoring.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch_template.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch_template.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mtermvectors.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mtermvectors.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/nodes.d.ts +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/nodes.js +290 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/open_point_in_time.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/open_point_in_time.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ping.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ping.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/profiling.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/profiling.js +135 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/put_script.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/put_script.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/query_rules.d.ts +67 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/query_rules.js +260 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rank_eval.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rank_eval.js +67 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex.js +56 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex_rethrottle.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex_rethrottle.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/render_search_template.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/render_search_template.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rollup.d.ts +67 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rollup.js +263 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scripts_painless_execute.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scripts_painless_execute.js +57 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scroll.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scroll.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search.js +75 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_application.d.ts +81 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_application.js +313 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_mvt.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_mvt.js +63 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_shards.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_shards.js +54 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_template.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_template.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/searchable_snapshots.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/searchable_snapshots.js +167 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/security.d.ts +459 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/security.js +1982 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/shutdown.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/shutdown.js +125 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/simulate.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/simulate.js +78 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/slm.d.ts +74 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/slm.js +253 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/snapshot.d.ts +102 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/snapshot.js +410 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/sql.d.ts +53 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/sql.js +205 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ssl.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ssl.js +54 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/streams.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/streams.js +96 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/synonyms.d.ts +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/synonyms.js +223 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/tasks.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/tasks.js +109 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/terms_enum.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/terms_enum.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/termvectors.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/termvectors.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/text_structure.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/text_structure.js +148 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/transform.d.ts +101 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/transform.js +386 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query_rethrottle.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query_rethrottle.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/watcher.d.ts +102 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/watcher.js +405 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/xpack.d.ts +25 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/xpack.js +75 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/index.d.ts +265 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/index.js +632 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/types.d.ts +19933 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/types.js +21 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/typesWithBodyKey.d.ts +20606 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/typesWithBodyKey.js +21 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/client.d.ts +152 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/client.js +369 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/helpers.d.ts +184 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/helpers.js +889 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/sniffingTransport.d.ts +4 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/sniffingTransport.js +56 -0
- package/dist/node_modules/@elastic/elasticsearch/node_modules/.bin/arrow2csv +15 -0
- package/dist/node_modules/@elastic/elasticsearch/node_modules/.bin/arrow2csv.cmd +7 -0
- package/dist/node_modules/@elastic/elasticsearch/package.json +1 -0
- package/dist/node_modules/@elastic/elasticsearch/tsconfig.json +38 -0
- package/dist/server/acl-guard.js +179 -0
- package/dist/server/collections/es-report-data-views.js +85 -0
- package/dist/server/collections/es-reports.js +101 -0
- package/dist/server/index.js +58 -0
- package/dist/server/mcp/ElasticReportMcpServer.js +344 -0
- package/dist/server/mcp/ElasticReportToolCatalog.js +639 -0
- package/dist/server/plugin.js +529 -0
- package/dist/server/services/ElasticReportService.js +377 -0
- package/dist/server/services/ElasticsearchConnectionService.js +572 -0
- package/dist/server/services/ReportExportService.js +243 -0
- package/dist/server/services/ReportQueryCompiler.js +1299 -0
- package/dist/server/workflow/ElasticReportQueryInstruction.js +123 -0
- package/dist/shared/constants.js +96 -0
- package/dist/shared/types.js +24 -0
- package/package.json +62 -4
- package/server.d.ts +2 -0
- package/server.js +1 -0
- package/src/client/index.tsx +34 -0
- package/src/client/workflow-instructions.tsx +44 -0
- package/src/client-v2/__tests__/elastic-report.test.tsx +791 -0
- package/src/client-v2/__tests__/kql-autocomplete.test.ts +178 -0
- package/src/client-v2/api.ts +320 -0
- package/src/client-v2/bus/DashboardFilterBus.ts +212 -0
- package/src/client-v2/components/ElasticBasicCharts.tsx +652 -0
- package/src/client-v2/components/ElasticFilterBar.tsx +372 -0
- package/src/client-v2/components/ElasticKqlInput.tsx +421 -0
- package/src/client-v2/components/ElasticReportBlock.tsx +306 -0
- package/src/client-v2/components/ElasticReportRenderer.tsx +1257 -0
- package/src/client-v2/components/HighlightText.tsx +50 -0
- package/src/client-v2/components/ReportSelect.tsx +85 -0
- package/src/client-v2/index.tsx +14 -0
- package/src/client-v2/locale.ts +23 -0
- package/src/client-v2/models/ElasticFilterBarBlockModel.tsx +115 -0
- package/src/client-v2/models/ElasticReportBlockModel.tsx +118 -0
- package/src/client-v2/pages/ElasticReportManager.tsx +1453 -0
- package/src/client-v2/plugin.tsx +72 -0
- package/src/client-v2/utils/kqlAutocomplete.ts +861 -0
- package/src/client-v2/workflow/instructions.tsx +149 -0
- package/src/index.ts +11 -0
- package/src/locale/en-US.json +198 -0
- package/src/locale/vi-VN.json +198 -0
- package/src/locale/zh-CN.json +198 -0
- package/src/server/__tests__/query-compiler.test.ts +620 -0
- package/src/server/__tests__/report-mcp-acl.integration.test.ts +645 -0
- package/src/server/acl-guard.ts +194 -0
- package/src/server/collections/es-report-data-views.ts +64 -0
- package/src/server/collections/es-reports.ts +80 -0
- package/src/server/index.ts +15 -0
- package/src/server/mcp/ElasticReportMcpServer.ts +391 -0
- package/src/server/mcp/ElasticReportToolCatalog.ts +663 -0
- package/src/server/plugin.ts +599 -0
- package/src/server/services/ElasticReportService.ts +486 -0
- package/src/server/services/ElasticsearchConnectionService.ts +728 -0
- package/src/server/services/ReportExportService.ts +282 -0
- package/src/server/services/ReportQueryCompiler.ts +1552 -0
- package/src/server/workflow/ElasticReportQueryInstruction.ts +124 -0
- package/src/shared/constants.ts +36 -0
- package/src/shared/types.ts +272 -0
- package/README.md +0 -3
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var ElasticReportQueryInstruction_exports = {};
|
|
28
|
+
__export(ElasticReportQueryInstruction_exports, {
|
|
29
|
+
ElasticReportQueryInstruction: () => ElasticReportQueryInstruction,
|
|
30
|
+
evaluateThreshold: () => evaluateThreshold
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(ElasticReportQueryInstruction_exports);
|
|
33
|
+
var import_plugin_workflow = require("@nocobase/plugin-workflow");
|
|
34
|
+
function evaluateThreshold(actual, operator, threshold) {
|
|
35
|
+
if (actual === null || actual === void 0 || !Number.isFinite(actual)) return false;
|
|
36
|
+
if (!operator || threshold === void 0 || !Number.isFinite(threshold)) return false;
|
|
37
|
+
switch (operator) {
|
|
38
|
+
case "gt":
|
|
39
|
+
return actual > threshold;
|
|
40
|
+
case "gte":
|
|
41
|
+
return actual >= threshold;
|
|
42
|
+
case "lt":
|
|
43
|
+
return actual < threshold;
|
|
44
|
+
case "lte":
|
|
45
|
+
return actual <= threshold;
|
|
46
|
+
case "eq":
|
|
47
|
+
return actual === threshold;
|
|
48
|
+
case "ne":
|
|
49
|
+
return actual !== threshold;
|
|
50
|
+
default:
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class ElasticReportQueryInstruction extends import_plugin_workflow.Instruction {
|
|
55
|
+
constructor(workflow, reportService) {
|
|
56
|
+
super(workflow);
|
|
57
|
+
this.reportService = reportService;
|
|
58
|
+
}
|
|
59
|
+
async run(node, _input, processor) {
|
|
60
|
+
const rawConfig = node.config ?? {};
|
|
61
|
+
const parsedConfig = processor.getParsedValue(rawConfig, node.id);
|
|
62
|
+
const reportId = parsedConfig == null ? void 0 : parsedConfig.reportId;
|
|
63
|
+
if (reportId === void 0 || reportId === null || String(reportId).trim() === "") {
|
|
64
|
+
return {
|
|
65
|
+
status: import_plugin_workflow.JOB_STATUS.ERROR,
|
|
66
|
+
result: {
|
|
67
|
+
error: "reportId is required in Elastic Report workflow node configuration"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
const overrides = {};
|
|
73
|
+
if (typeof parsedConfig.queryOverride === "string" && parsedConfig.queryOverride.trim()) {
|
|
74
|
+
overrides.query = parsedConfig.queryOverride.trim();
|
|
75
|
+
}
|
|
76
|
+
if (typeof parsedConfig.timePreset === "string" && parsedConfig.timePreset.trim()) {
|
|
77
|
+
overrides.timeRange = { preset: parsedConfig.timePreset };
|
|
78
|
+
}
|
|
79
|
+
const { report, result } = await this.reportService.runSavedReport({
|
|
80
|
+
reportId,
|
|
81
|
+
overrides: Object.keys(overrides).length > 0 ? overrides : void 0,
|
|
82
|
+
requirePublished: false,
|
|
83
|
+
forMcp: true
|
|
84
|
+
});
|
|
85
|
+
const targetField = parsedConfig.thresholdField ?? "total";
|
|
86
|
+
const comparedValue = targetField === "metricValue" ? result.metricValue ?? result.total : targetField === "deltaPercent" ? result.deltaPercent ?? null : result.total;
|
|
87
|
+
const breached = evaluateThreshold(
|
|
88
|
+
comparedValue,
|
|
89
|
+
parsedConfig.thresholdOperator,
|
|
90
|
+
typeof parsedConfig.thresholdValue === "number" ? parsedConfig.thresholdValue : parsedConfig.thresholdValue !== void 0 ? Number(parsedConfig.thresholdValue) : void 0
|
|
91
|
+
);
|
|
92
|
+
return {
|
|
93
|
+
status: import_plugin_workflow.JOB_STATUS.RESOLVED,
|
|
94
|
+
result: {
|
|
95
|
+
reportId: report.id,
|
|
96
|
+
title: report.title,
|
|
97
|
+
visualization: report.visualization,
|
|
98
|
+
total: result.total,
|
|
99
|
+
totalRelation: result.totalRelation,
|
|
100
|
+
metricValue: result.metricValue ?? result.total,
|
|
101
|
+
previousMetricValue: result.previousMetricValue ?? null,
|
|
102
|
+
deltaPercent: result.deltaPercent ?? null,
|
|
103
|
+
breached,
|
|
104
|
+
topBuckets: result.series.slice(0, 10),
|
|
105
|
+
sampleRows: result.rows.slice(0, 10).map((r) => r.source),
|
|
106
|
+
executedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
} catch (error) {
|
|
110
|
+
return {
|
|
111
|
+
status: import_plugin_workflow.JOB_STATUS.ERROR,
|
|
112
|
+
result: {
|
|
113
|
+
error: error instanceof Error ? error.message : String(error)
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
ElasticReportQueryInstruction,
|
|
122
|
+
evaluateThreshold
|
|
123
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var constants_exports = {};
|
|
28
|
+
__export(constants_exports, {
|
|
29
|
+
ACL_SNIPPET: () => ACL_SNIPPET,
|
|
30
|
+
DATA_VIEWS_COLLECTION: () => DATA_VIEWS_COLLECTION,
|
|
31
|
+
DEFAULT_MAX_EXPORT_ROWS: () => DEFAULT_MAX_EXPORT_ROWS,
|
|
32
|
+
DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
|
|
33
|
+
EXPORT_BATCH_SIZE: () => EXPORT_BATCH_SIZE,
|
|
34
|
+
HIGHLIGHT_POST_TAG: () => HIGHLIGHT_POST_TAG,
|
|
35
|
+
HIGHLIGHT_PRE_TAG: () => HIGHLIGHT_PRE_TAG,
|
|
36
|
+
MAX_MCP_PREVIEW_SIZE: () => MAX_MCP_PREVIEW_SIZE,
|
|
37
|
+
MAX_RESULT_WINDOW: () => MAX_RESULT_WINDOW,
|
|
38
|
+
MAX_SPLIT_SERIES: () => MAX_SPLIT_SERIES,
|
|
39
|
+
MAX_TERMS_BUCKETS: () => MAX_TERMS_BUCKETS,
|
|
40
|
+
MAX_UI_PAGE_SIZE: () => MAX_UI_PAGE_SIZE,
|
|
41
|
+
MCP_RELATIVE_PATH: () => MCP_RELATIVE_PATH,
|
|
42
|
+
MCP_RESOURCE_NAME: () => MCP_RESOURCE_NAME,
|
|
43
|
+
MCP_SERVER_NAME: () => MCP_SERVER_NAME,
|
|
44
|
+
PLUGIN_NAME: () => PLUGIN_NAME,
|
|
45
|
+
REPORTS_COLLECTION: () => REPORTS_COLLECTION,
|
|
46
|
+
SERVICE_RESOURCE: () => SERVICE_RESOURCE,
|
|
47
|
+
SETTINGS_MENU_KEY: () => SETTINGS_MENU_KEY,
|
|
48
|
+
WORKFLOW_GROUP_KEY: () => WORKFLOW_GROUP_KEY,
|
|
49
|
+
WORKFLOW_INSTRUCTION_TYPE: () => WORKFLOW_INSTRUCTION_TYPE
|
|
50
|
+
});
|
|
51
|
+
module.exports = __toCommonJS(constants_exports);
|
|
52
|
+
const PLUGIN_NAME = "plugin-elastic-report";
|
|
53
|
+
const SETTINGS_MENU_KEY = "elastic-report";
|
|
54
|
+
const ACL_SNIPPET = "pm.elastic-report";
|
|
55
|
+
const DATA_VIEWS_COLLECTION = "esReportDataViews";
|
|
56
|
+
const REPORTS_COLLECTION = "esReports";
|
|
57
|
+
const SERVICE_RESOURCE = "esReportService";
|
|
58
|
+
const MCP_SERVER_NAME = "elastic-report";
|
|
59
|
+
const MCP_RESOURCE_NAME = "elastic-report-mcp";
|
|
60
|
+
const MCP_RELATIVE_PATH = "/elastic-report-mcp";
|
|
61
|
+
const HIGHLIGHT_PRE_TAG = "__ES_HL_START__";
|
|
62
|
+
const HIGHLIGHT_POST_TAG = "__ES_HL_END__";
|
|
63
|
+
const DEFAULT_PAGE_SIZE = 20;
|
|
64
|
+
const MAX_UI_PAGE_SIZE = 200;
|
|
65
|
+
const MAX_MCP_PREVIEW_SIZE = 20;
|
|
66
|
+
const MAX_RESULT_WINDOW = 1e4;
|
|
67
|
+
const MAX_TERMS_BUCKETS = 50;
|
|
68
|
+
const MAX_SPLIT_SERIES = 10;
|
|
69
|
+
const DEFAULT_MAX_EXPORT_ROWS = 5e4;
|
|
70
|
+
const EXPORT_BATCH_SIZE = 500;
|
|
71
|
+
const WORKFLOW_GROUP_KEY = "elastic-report";
|
|
72
|
+
const WORKFLOW_INSTRUCTION_TYPE = "elastic-report-query";
|
|
73
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
+
0 && (module.exports = {
|
|
75
|
+
ACL_SNIPPET,
|
|
76
|
+
DATA_VIEWS_COLLECTION,
|
|
77
|
+
DEFAULT_MAX_EXPORT_ROWS,
|
|
78
|
+
DEFAULT_PAGE_SIZE,
|
|
79
|
+
EXPORT_BATCH_SIZE,
|
|
80
|
+
HIGHLIGHT_POST_TAG,
|
|
81
|
+
HIGHLIGHT_PRE_TAG,
|
|
82
|
+
MAX_MCP_PREVIEW_SIZE,
|
|
83
|
+
MAX_RESULT_WINDOW,
|
|
84
|
+
MAX_SPLIT_SERIES,
|
|
85
|
+
MAX_TERMS_BUCKETS,
|
|
86
|
+
MAX_UI_PAGE_SIZE,
|
|
87
|
+
MCP_RELATIVE_PATH,
|
|
88
|
+
MCP_RESOURCE_NAME,
|
|
89
|
+
MCP_SERVER_NAME,
|
|
90
|
+
PLUGIN_NAME,
|
|
91
|
+
REPORTS_COLLECTION,
|
|
92
|
+
SERVICE_RESOURCE,
|
|
93
|
+
SETTINGS_MENU_KEY,
|
|
94
|
+
WORKFLOW_GROUP_KEY,
|
|
95
|
+
WORKFLOW_INSTRUCTION_TYPE
|
|
96
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var types_exports = {};
|
|
24
|
+
module.exports = __toCommonJS(types_exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plugin-elastic-report",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"displayName": "Elastic Report",
|
|
4
|
+
"displayName.vi-VN": "Báo cáo Elasticsearch",
|
|
5
|
+
"displayName.zh-CN": "Elasticsearch 报表",
|
|
6
|
+
"description": "Kibana-style Elasticsearch Discover & Visualization reports with reusable blocks and a dedicated MCP server for AI Employees.",
|
|
7
|
+
"description.vi-VN": "Tạo báo cáo bảng và biểu đồ từ dữ liệu Elasticsearch theo phong cách Kibana, gắn dưới dạng Block và cung cấp MCP riêng cho AI Employee.",
|
|
8
|
+
"description.zh-CN": "连接 Elasticsearch 构建类 Kibana 的检索、筛选、排序与基础图表报表区块,并提供专属 MCP 服务供 AI 员工调用。",
|
|
9
|
+
"version": "0.7.0",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/server/index.js",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"AI",
|
|
14
|
+
"Blocks",
|
|
15
|
+
"Charts",
|
|
16
|
+
"Data sources",
|
|
17
|
+
"Elasticsearch",
|
|
18
|
+
"MCP",
|
|
19
|
+
"Reports"
|
|
20
|
+
],
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"ai",
|
|
24
|
+
"src",
|
|
25
|
+
"client.js",
|
|
26
|
+
"client.d.ts",
|
|
27
|
+
"client-v2.js",
|
|
28
|
+
"client-v2.d.ts",
|
|
29
|
+
"server.js",
|
|
30
|
+
"server.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"nocobase": {
|
|
33
|
+
"supportedVersions": [
|
|
34
|
+
"2.x"
|
|
35
|
+
],
|
|
36
|
+
"editionLevel": 0
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@elastic/elasticsearch": "^8.17.0",
|
|
40
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
41
|
+
"@nocobase/acl": "2.x",
|
|
42
|
+
"@nocobase/actions": "2.x",
|
|
43
|
+
"@nocobase/ai": "2.x",
|
|
44
|
+
"@nocobase/client": "2.x",
|
|
45
|
+
"@nocobase/client-v2": "2.x",
|
|
46
|
+
"@nocobase/data-source-manager": "2.x",
|
|
47
|
+
"@nocobase/database": "2.x",
|
|
48
|
+
"@nocobase/flow-engine": "2.x",
|
|
49
|
+
"@nocobase/plugin-ai": "2.x",
|
|
50
|
+
"@nocobase/plugin-data-source-manager": "2.x",
|
|
51
|
+
"@nocobase/plugin-workflow": "2.x",
|
|
52
|
+
"@nocobase/server": "2.x"
|
|
53
|
+
},
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/OrgGem/nocobase-beta.git",
|
|
57
|
+
"directory": "packages/plugins/plugin-elastic-report"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "3680e22db0068952760bb3b869a054cef57a6d77",
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public",
|
|
62
|
+
"registry": "https://registry.npmjs.org/"
|
|
63
|
+
}
|
|
64
|
+
}
|
package/server.d.ts
ADDED
package/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/server/index.js');
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { Plugin } from '@nocobase/client';
|
|
11
|
+
import { ElasticFilterBarBlockModel } from '../client-v2/models/ElasticFilterBarBlockModel';
|
|
12
|
+
import { ElasticReportBlockModel } from '../client-v2/models/ElasticReportBlockModel';
|
|
13
|
+
import type { WorkflowClientRegistry } from '../client-v2/workflow/instructions';
|
|
14
|
+
|
|
15
|
+
export class PluginElasticReportLegacyClient extends Plugin {
|
|
16
|
+
async load() {
|
|
17
|
+
this.flowEngine?.registerModels?.({
|
|
18
|
+
ElasticReportBlockModel,
|
|
19
|
+
ElasticFilterBarBlockModel,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const workflow = (
|
|
23
|
+
this.app as unknown as {
|
|
24
|
+
pm?: { get?: (name: string) => WorkflowClientRegistry | undefined };
|
|
25
|
+
}
|
|
26
|
+
).pm?.get?.('workflow');
|
|
27
|
+
if (workflow && typeof workflow.registerInstruction === 'function') {
|
|
28
|
+
const { registerLegacyWorkflowInstructions } = await import('./workflow-instructions');
|
|
29
|
+
registerLegacyWorkflowInstructions(workflow);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default PluginElasticReportLegacyClient;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { BarChartOutlined } from '@ant-design/icons';
|
|
11
|
+
import { Instruction, type VariableOption } from '@nocobase/plugin-workflow/client';
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import {
|
|
14
|
+
ElasticReportQueryFieldset,
|
|
15
|
+
buildElasticReportWorkflowVariables,
|
|
16
|
+
type WorkflowClientRegistry,
|
|
17
|
+
} from '../client-v2/workflow/instructions';
|
|
18
|
+
import { tExpr } from '../client-v2/locale';
|
|
19
|
+
import { WORKFLOW_GROUP_KEY, WORKFLOW_INSTRUCTION_TYPE } from '../shared/constants';
|
|
20
|
+
|
|
21
|
+
export function registerLegacyWorkflowInstructions(workflow: WorkflowClientRegistry): void {
|
|
22
|
+
workflow.registerInstructionGroup(WORKFLOW_GROUP_KEY, {
|
|
23
|
+
key: WORKFLOW_GROUP_KEY,
|
|
24
|
+
label: tExpr('Elastic Report'),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
workflow.registerInstruction(
|
|
28
|
+
WORKFLOW_INSTRUCTION_TYPE,
|
|
29
|
+
class extends Instruction {
|
|
30
|
+
type = WORKFLOW_INSTRUCTION_TYPE;
|
|
31
|
+
title = tExpr('Query Elasticsearch Report');
|
|
32
|
+
description = tExpr(
|
|
33
|
+
'Execute a Saved Elasticsearch Report and evaluate threshold conditions for scheduled alerts or reports.',
|
|
34
|
+
);
|
|
35
|
+
group = WORKFLOW_GROUP_KEY;
|
|
36
|
+
icon = (<BarChartOutlined />);
|
|
37
|
+
FieldsetLoader = async () => ({ default: ElasticReportQueryFieldset });
|
|
38
|
+
|
|
39
|
+
useVariables(node: { key: string; title: string }): VariableOption {
|
|
40
|
+
return buildElasticReportWorkflowVariables(node);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
}
|