Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP CRUD+ API for Index Patterns #83576

Merged
merged 110 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
b9b3f5c
refactor: 💡 extract out createIndexPatternsService() method
streamich Nov 16, 2020
3a1c1c3
feat: 🎸 add create index pattern route
streamich Nov 16, 2020
bea76f1
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 17, 2020
d92eef5
feat: 🎸 add index patterns http context
streamich Nov 17, 2020
302e34b
feat: 🎸 add schema for index pattern create method
streamich Nov 17, 2020
c5d11db
refactor: 💡 compose schema out of variables
streamich Nov 17, 2020
75fc9b7
feat: 🎸 allow to not make the new index pattern a default one
streamich Nov 17, 2020
60a1f87
feat: 🎸 implement index pattern create endpoint
streamich Nov 17, 2020
f5f51bf
docs: ✏️ add index pattern create endpoint docs
streamich Nov 17, 2020
c66eb96
fix: 🐛 add error handling wrapper
streamich Nov 18, 2020
0f0b4d6
feat: 🎸 add index pattern GET route
streamich Nov 18, 2020
d13c146
docs: ✏️ add index pattern GET mention to docs
streamich Nov 18, 2020
6d54f2e
feat: 🎸 add higher order route handler to check for context
streamich Nov 18, 2020
feacd9e
feat: 🎸 add index pattern deletion endpoint
streamich Nov 18, 2020
1530e94
docs: ✏️ add delete endpoint docs entry
streamich Nov 18, 2020
5e9a79b
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 18, 2020
5128872
feat: 🎸 add index pattern update route
streamich Nov 19, 2020
9dfbc35
feat: 🎸 add ability to update timeFieldName
streamich Nov 19, 2020
6a2af50
feat: 🎸 add ability to edit intervalName, sourceFilters, fields
streamich Nov 19, 2020
0b013dd
feat: 🎸 allow updating index pattern type and typeMeta
streamich Nov 19, 2020
b6bb3ae
feat: 🎸 add ability to update index_pattern fields
streamich Nov 19, 2020
96cd8ff
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 19, 2020
544f2be
docs: ✏️ add index pattern update endpoint docs
streamich Nov 19, 2020
01994be
docs: ✏️ fix typo
streamich Nov 19, 2020
21f79b9
feat: 🎸 disable XSRF and add Content-Type
streamich Nov 19, 2020
27ac115
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 20, 2020
e56c89f
fix: 🐛 enable xsrf
streamich Nov 20, 2020
7eb224e
feat: 🎸 send 404 status code when index pattern is not found
streamich Nov 20, 2020
15e4150
fix: 🐛 correctly report empty change set error
streamich Nov 20, 2020
6094e3d
feat: 🎸 fields API add route for adding field to IP
streamich Nov 20, 2020
e2d6c5d
docs: ✏️ add index pattern field create route
streamich Nov 20, 2020
d53b5aa
fix: 🐛 throw on creating an existing index pattern field
streamich Nov 20, 2020
7e2ded6
feat: 🎸 add field upsert route
streamich Nov 20, 2020
bc7dc4a
feat: 🎸 add field get api endpoint
streamich Nov 20, 2020
8e785c7
feat: 🎸 add field delete endpoint
streamich Nov 20, 2020
aa94b96
refactor: 💡 improve 404 error handling
streamich Nov 20, 2020
6b6a0ad
refactor: 💡 improve index pattern 404 error class
streamich Nov 20, 2020
3b35afa
feat: 🎸 add field update api endpoint
streamich Nov 20, 2020
660d24d
docs: ✏️ typo
streamich Nov 20, 2020
5f493db
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 23, 2020
d5ddd53
refactor: 💡 rename ski_field_refresh to refresh_fields in creat
streamich Nov 23, 2020
3952729
refactor: 💡 rename to refresh_fields param in update call
streamich Nov 23, 2020
8802b3d
refactor: 💡 rename parameter to refresh_fields in fields api
streamich Nov 23, 2020
efbe296
feat: 🎸 allow creating and deleting only scripted fields
streamich Nov 23, 2020
52bf57a
style: 💄 fix TypeScript/Prettier error
streamich Nov 23, 2020
2143547
test: 💍 add index pattern creation negative tests
streamich Nov 23, 2020
ac28cae
test: 💍 add index pattern create method tests
streamich Nov 23, 2020
5b71aea
feat: 🎸 remove make_default flag
streamich Nov 23, 2020
7058916
docs: ✏️ update docs
streamich Nov 23, 2020
b8d140f
test: 💍 add index patter api get tests
streamich Nov 23, 2020
bf5b366
test: 💍 add delete index pattern tests
streamich Nov 23, 2020
19974ee
fix: 🐛 fix TypeScript error after refactor
streamich Nov 23, 2020
a87f39a
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 23, 2020
22a6fa5
chore: 🤖 catch up with master
streamich Nov 25, 2020
1cef682
docs: ✏️ update autogenerated docs
streamich Nov 26, 2020
6bab4cf
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 26, 2020
c1d9963
docs: ✏️ update autogenerated docs
streamich Nov 26, 2020
8d051f2
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Nov 30, 2020
a82a21e
refactor: 💡 change Fields API to Scripted Fields API
streamich Nov 30, 2020
8254ca9
feat: 🎸 allow only scripted fields in Scripted Fields API
streamich Nov 30, 2020
d1fcb11
test: 💍 add index patter api update tests
streamich Nov 30, 2020
92160a5
test: 💍 add scripted field create api tests
streamich Nov 30, 2020
f83b52d
test: 💍 add scripted field delete api tests
streamich Nov 30, 2020
8e50647
test: 💍 add scripted fields fetch api tests
streamich Nov 30, 2020
7c4872b
test: 💍 add scripted field field put api tests
streamich Nov 30, 2020
1860070
test: 💍 add scripted field update api test
streamich Nov 30, 2020
1f85490
feat: 🎸 add index pattern field update endpoint
streamich Nov 30, 2020
d7dafdb
feat: 🎸 improve index patterns fields api
streamich Nov 30, 2020
987fe35
test: 💍 fix test
streamich Nov 30, 2020
357fdbf
docs: ✏️ update docs README
streamich Nov 30, 2020
393bbdf
test: 💍 add field metadata deletion teests
streamich Nov 30, 2020
a2e4744
docs: ✏️ improve index pattern api readme
streamich Nov 30, 2020
edc7b05
fix: 🐛 fix TypeScript errors
streamich Dec 1, 2020
4c70388
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 1, 2020
e650438
test: 💍 update jest tests
streamich Dec 1, 2020
dadcad4
docs: ✏️ update auto-generated docs
streamich Dec 1, 2020
7ef2449
feat: 🎸 remove intervalName from index pattern create API
streamich Dec 1, 2020
10aae1e
test: 💍 fix integration tests
streamich Dec 1, 2020
8062fb5
fix: 🐛 make refresh_fields default to false
streamich Dec 1, 2020
deb8e97
chore: 🤖 remove searchable and aggregatable from public API
streamich Dec 1, 2020
f5b9b4e
chore: 🤖 remove various field properties
streamich Dec 1, 2020
bd38e4d
chore: 🤖 remove "index" attribute from public field schema
streamich Dec 1, 2020
987ad71
docs: ✏️ update docs to match API
streamich Dec 1, 2020
9b18f3a
chore: 🤖 fix TypeScript errors
streamich Dec 1, 2020
616faf1
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 1, 2020
bc3360e
test: 💍 try fixing functional tests
streamich Dec 1, 2020
319523c
docs: ✏️ update auto-generated docs
streamich Dec 1, 2020
cefbe5f
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 2, 2020
10c6d90
chore: 🤖 check if this fixes security tests
streamich Dec 2, 2020
b990de7
fix: 🐛 create index patterns context only if user is authc
streamich Dec 2, 2020
1b12743
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 2, 2020
05e7dba
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 3, 2020
9dbe3f9
fix: 🐛 assert on index patterns service
streamich Dec 3, 2020
9cc0817
test: 💍 try fixing integration tests
streamich Dec 3, 2020
9d54c5e
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 3, 2020
cce1c9a
fix: 🐛 try fixing integration tests
streamich Dec 3, 2020
d241801
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 4, 2020
1df4320
chore: 🤖 update auto-generated docs
streamich Dec 4, 2020
4816387
refactor: 💡 directly inject index pattern provider into create
streamich Dec 4, 2020
2d9e321
refactor: 💡 create index pattern service directly in each route
streamich Dec 4, 2020
b6d49f8
refactor: 💡 remove index pattern route context provider
streamich Dec 4, 2020
3155206
chore: 🤖 remove unused code
streamich Dec 7, 2020
29e9e03
Merge remote-tracking branch 'upstream/master' into index-patterns-ht…
streamich Dec 7, 2020
fe56673
chore: 🤖 remove refresh_fields from scripted fields
streamich Dec 7, 2020
9a94fc4
style: 💄 change template param names
streamich Dec 7, 2020
37a654a
refactor: 💡 make field.count always be an integer
streamich Dec 7, 2020
2bb780f
docs: ✏️ update auto-generated docs
streamich Dec 7, 2020
87732fb
refactor: 💡 inject index patterns using getStartServices
streamich Dec 7, 2020
0a3bb86
docs: ✏️ update autogenerated docs
streamich Dec 7, 2020
28086cb
docs: ✏️ update docs
streamich Dec 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
deleteFieldFormat: (fieldName: string) => void;
readonly deleteFieldFormat: (fieldName: string) => void;
```
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ export declare class IndexPattern implements IIndexPattern
| [isTimeBased()](./kibana-plugin-plugins-data-public.indexpattern.istimebased.md) | | |
| [isTimeNanosBased()](./kibana-plugin-plugins-data-public.indexpattern.istimenanosbased.md) | | |
| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | Remove scripted field from field list |
| [setFieldAttrs(fieldName, attrName, value)](./kibana-plugin-plugins-data-public.indexpattern.setfieldattrs.md) | | |
| [setFieldCount(fieldName, count)](./kibana-plugin-plugins-data-public.indexpattern.setfieldcount.md) | | |
| [setFieldCustomLabel(fieldName, customLabel)](./kibana-plugin-plugins-data-public.indexpattern.setfieldcustomlabel.md) | | |
| [toSpec()](./kibana-plugin-plugins-data-public.indexpattern.tospec.md) | | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) &gt; [setFieldAttrs](./kibana-plugin-plugins-data-public.indexpattern.setfieldattrs.md)

## IndexPattern.setFieldAttrs() method

<b>Signature:</b>

```typescript
protected setFieldAttrs<K extends keyof FieldAttrSet>(fieldName: string, attrName: K, value: FieldAttrSet[K]): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | <code>string</code> | |
| attrName | <code>K</code> | |
| value | <code>FieldAttrSet[K]</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) &gt; [setFieldCount](./kibana-plugin-plugins-data-public.indexpattern.setfieldcount.md)

## IndexPattern.setFieldCount() method

<b>Signature:</b>

```typescript
setFieldCount(fieldName: string, count: number | undefined | null): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | <code>string</code> | |
| count | <code>number &#124; undefined &#124; null</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) &gt; [setFieldCustomLabel](./kibana-plugin-plugins-data-public.indexpattern.setfieldcustomlabel.md)

## IndexPattern.setFieldCustomLabel() method

<b>Signature:</b>

```typescript
setFieldCustomLabel(fieldName: string, customLabel: string | undefined | null): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | <code>string</code> | |
| customLabel | <code>string &#124; undefined &#124; null</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
setFieldFormat: (fieldName: string, format: SerializedFieldFormat) => void;
readonly setFieldFormat: (fieldName: string, format: SerializedFieldFormat) => void;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) &gt; [deleteCount](./kibana-plugin-plugins-data-public.indexpatternfield.deletecount.md)

## IndexPatternField.deleteCount() method

<b>Signature:</b>

```typescript
deleteCount(): void;
```
<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export declare class IndexPatternField implements IFieldType

| Method | Modifiers | Description |
| --- | --- | --- |
| [deleteCount()](./kibana-plugin-plugins-data-public.indexpatternfield.deletecount.md) | | |
| [toJSON()](./kibana-plugin-plugins-data-public.indexpatternfield.tojson.md) | | |
| [toSpec({ getFormatterForField, })](./kibana-plugin-plugins-data-public.indexpatternfield.tospec.md) | | |

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
deleteFieldFormat: (fieldName: string) => void;
readonly deleteFieldFormat: (fieldName: string) => void;
```
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ export declare class IndexPattern implements IIndexPattern
| [isTimeBased()](./kibana-plugin-plugins-data-server.indexpattern.istimebased.md) | | |
| [isTimeNanosBased()](./kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md) | | |
| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md) | | Remove scripted field from field list |
| [setFieldAttrs(fieldName, attrName, value)](./kibana-plugin-plugins-data-server.indexpattern.setfieldattrs.md) | | |
| [setFieldCount(fieldName, count)](./kibana-plugin-plugins-data-server.indexpattern.setfieldcount.md) | | |
| [setFieldCustomLabel(fieldName, customLabel)](./kibana-plugin-plugins-data-server.indexpattern.setfieldcustomlabel.md) | | |
| [toSpec()](./kibana-plugin-plugins-data-server.indexpattern.tospec.md) | | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) &gt; [setFieldAttrs](./kibana-plugin-plugins-data-server.indexpattern.setfieldattrs.md)

## IndexPattern.setFieldAttrs() method

<b>Signature:</b>

```typescript
protected setFieldAttrs<K extends keyof FieldAttrSet>(fieldName: string, attrName: K, value: FieldAttrSet[K]): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | <code>string</code> | |
| attrName | <code>K</code> | |
| value | <code>FieldAttrSet[K]</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) &gt; [setFieldCount](./kibana-plugin-plugins-data-server.indexpattern.setfieldcount.md)

## IndexPattern.setFieldCount() method

<b>Signature:</b>

```typescript
setFieldCount(fieldName: string, count: number | undefined | null): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | <code>string</code> | |
| count | <code>number &#124; undefined &#124; null</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) &gt; [setFieldCustomLabel](./kibana-plugin-plugins-data-server.indexpattern.setfieldcustomlabel.md)

## IndexPattern.setFieldCustomLabel() method

<b>Signature:</b>

```typescript
setFieldCustomLabel(fieldName: string, customLabel: string | undefined | null): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | <code>string</code> | |
| customLabel | <code>string &#124; undefined &#124; null</code> | |

<b>Returns:</b>

`void`

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
setFieldFormat: (fieldName: string, format: SerializedFieldFormat) => void;
readonly setFieldFormat: (fieldName: string, format: SerializedFieldFormat) => void;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
export declare class IndexPatternsService implements Plugin<void, IndexPatternsServiceStart>
export declare class IndexPatternsServiceProvider implements Plugin<void, IndexPatternsServiceStart>
```

## Methods
Expand Down
Loading