Skip to content

Commit fc3cbb7

Browse files
Merge branch '7.x' into ua/update_readme
2 parents 86e68a6 + e31d32a commit fc3cbb7

80 files changed

Lines changed: 1898 additions & 1137 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) &gt; [hasUserIndexPattern](./kibana-plugin-plugins-data-public.indexpatternsservice.hasuserindexpattern.md)
4+
5+
## IndexPatternsService.hasUserIndexPattern() method
6+
7+
Checks if current user has a user created index pattern ignoring fleet's server default index patterns
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
hasUserIndexPattern(): Promise<boolean>;
13+
```
14+
<b>Returns:</b>
15+
16+
`Promise<boolean>`
17+

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export declare class IndexPatternsService
4545
| [createAndSave(spec, override, skipFetchFields)](./kibana-plugin-plugins-data-public.indexpatternsservice.createandsave.md) | | Create a new index pattern and save it right away |
4646
| [createSavedObject(indexPattern, override)](./kibana-plugin-plugins-data-public.indexpatternsservice.createsavedobject.md) | | Save a new index pattern |
4747
| [delete(indexPatternId)](./kibana-plugin-plugins-data-public.indexpatternsservice.delete.md) | | Deletes an index pattern from .kibana index |
48+
| [hasUserIndexPattern()](./kibana-plugin-plugins-data-public.indexpatternsservice.hasuserindexpattern.md) | | Checks if current user has a user created index pattern ignoring fleet's server default index patterns |
4849
| [migrate(indexPattern, newTitle)](./kibana-plugin-plugins-data-public.indexpatternsservice.migrate.md) | | |
4950
| [updateSavedObject(indexPattern, saveAttempts, ignoreErrors)](./kibana-plugin-plugins-data-public.indexpatternsservice.updatesavedobject.md) | | Save existing index pattern. Will attempt to merge differences if there are conflicts |
5051

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IndexPatternsService](./kibana-plugin-plugins-data-server.indexpatternsservice.md) &gt; [hasUserIndexPattern](./kibana-plugin-plugins-data-server.indexpatternsservice.hasuserindexpattern.md)
4+
5+
## IndexPatternsService.hasUserIndexPattern() method
6+
7+
Checks if current user has a user created index pattern ignoring fleet's server default index patterns
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
hasUserIndexPattern(): Promise<boolean>;
13+
```
14+
<b>Returns:</b>
15+
16+
`Promise<boolean>`
17+

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export declare class IndexPatternsService
4545
| [createAndSave(spec, override, skipFetchFields)](./kibana-plugin-plugins-data-server.indexpatternsservice.createandsave.md) | | Create a new index pattern and save it right away |
4646
| [createSavedObject(indexPattern, override)](./kibana-plugin-plugins-data-server.indexpatternsservice.createsavedobject.md) | | Save a new index pattern |
4747
| [delete(indexPatternId)](./kibana-plugin-plugins-data-server.indexpatternsservice.delete.md) | | Deletes an index pattern from .kibana index |
48+
| [hasUserIndexPattern()](./kibana-plugin-plugins-data-server.indexpatternsservice.hasuserindexpattern.md) | | Checks if current user has a user created index pattern ignoring fleet's server default index patterns |
4849
| [migrate(indexPattern, newTitle)](./kibana-plugin-plugins-data-server.indexpatternsservice.migrate.md) | | |
4950
| [updateSavedObject(indexPattern, saveAttempts, ignoreErrors)](./kibana-plugin-plugins-data-server.indexpatternsservice.updatesavedobject.md) | | Save existing index pattern. Will attempt to merge differences if there are conflicts |
5051

packages/kbn-alerts/.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["@kbn/babel-preset/node_preset"],
3+
"ignore": ["**/*.test.ts", "**/*.test.tsx"]
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["@kbn/babel-preset/webpack_preset"],
3+
"ignore": ["**/*.test.ts", "**/*.test.tsx"]
4+
}

packages/kbn-alerts/BUILD.bazel

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
22
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
3+
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
34

45
PKG_BASE_NAME = "kbn-alerts"
56

@@ -12,8 +13,7 @@ SOURCE_FILES = glob(
1213
],
1314
exclude = [
1415
"**/*.test.*",
15-
"**/*.mock.*",
16-
"**/*.mocks.*",
16+
"**/__snapshots__"
1717
],
1818
)
1919

@@ -25,32 +25,40 @@ filegroup(
2525
)
2626

2727
NPM_MODULE_EXTRA_FILES = [
28-
"react/package.json",
2928
"package.json",
3029
"README.md",
3130
]
3231

33-
SRC_DEPS = [
34-
"//packages/kbn-babel-preset",
35-
"//packages/kbn-dev-utils",
32+
RUNTIME_DEPS = [
3633
"//packages/kbn-i18n",
37-
"@npm//@babel/core",
38-
"@npm//babel-loader",
3934
"@npm//@elastic/eui",
35+
"@npm//enzyme",
4036
"@npm//react",
4137
"@npm//resize-observer-polyfill",
42-
"@npm//rxjs",
43-
"@npm//tslib",
4438
]
4539

4640
TYPES_DEPS = [
47-
"@npm//typescript",
41+
"//packages/kbn-i18n",
42+
"@npm//@elastic/eui",
43+
"@npm//resize-observer-polyfill",
44+
"@npm//@types/enzyme",
4845
"@npm//@types/jest",
4946
"@npm//@types/node",
5047
"@npm//@types/react",
5148
]
5249

53-
DEPS = SRC_DEPS + TYPES_DEPS
50+
jsts_transpiler(
51+
name = "target_node",
52+
srcs = SRCS,
53+
build_pkg_name = package_name(),
54+
)
55+
56+
jsts_transpiler(
57+
name = "target_web",
58+
srcs = SRCS,
59+
build_pkg_name = package_name(),
60+
config_file = ".babelrc.browser"
61+
)
5462

5563
ts_config(
5664
name = "tsconfig",
@@ -61,50 +69,26 @@ ts_config(
6169
],
6270
)
6371

64-
ts_config(
65-
name = "tsconfig_browser",
66-
src = "tsconfig.browser.json",
67-
deps = [
68-
"//:tsconfig.base.json",
69-
"//:tsconfig.browser.json",
70-
"//:tsconfig.browser_bazel.json",
71-
],
72-
)
73-
7472
ts_project(
75-
name = "tsc",
73+
name = "tsc_types",
7674
args = ["--pretty"],
7775
srcs = SRCS,
78-
deps = DEPS,
79-
allow_js = True,
76+
deps = TYPES_DEPS,
8077
declaration = True,
81-
declaration_dir = "target_types",
8278
declaration_map = True,
83-
out_dir = "target_node",
79+
emit_declaration_only = True,
80+
out_dir = "target_types",
8481
root_dir = "src",
8582
source_map = True,
8683
tsconfig = ":tsconfig",
8784
)
8885

89-
ts_project(
90-
name = "tsc_browser",
91-
args = ['--pretty'],
92-
srcs = SRCS,
93-
deps = DEPS,
94-
allow_js = True,
95-
declaration = False,
96-
out_dir = "target_web",
97-
source_map = True,
98-
root_dir = "src",
99-
tsconfig = ":tsconfig_browser",
100-
)
101-
10286
js_library(
10387
name = PKG_BASE_NAME,
104-
package_name = PKG_REQUIRE_NAME,
10588
srcs = NPM_MODULE_EXTRA_FILES,
89+
deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"],
90+
package_name = PKG_REQUIRE_NAME,
10691
visibility = ["//visibility:public"],
107-
deps = [":tsc", ":tsc_browser"] + DEPS,
10892
)
10993

11094
pkg_npm(
@@ -120,4 +104,4 @@ filegroup(
120104
":npm_module",
121105
],
122106
visibility = ["//visibility:public"],
123-
)
107+
)

packages/kbn-alerts/react/package.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/kbn-alerts/tsconfig.browser.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/kbn-alerts/tsconfig.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
22
"extends": "../../tsconfig.bazel.json",
33
"compilerOptions": {
4-
"allowJs": true,
5-
"declarationDir": "./target_types",
6-
"outDir": "target_node",
74
"declaration": true,
85
"declarationMap": true,
6+
"emitDeclarationOnly": true,
7+
"outDir": "target_types",
8+
"rootDir": "src",
99
"sourceMap": true,
1010
"sourceRoot": "../../../../packages/kbn-alerts/src",
11-
"rootDir": "src",
1211
"types": ["jest", "node", "resize-observer-polyfill"]
1312
},
14-
"include": ["src/**/*"]
15-
}
13+
"include": ["src/**/*"],
14+
}

0 commit comments

Comments
 (0)