mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* [Index patterns] Deprecate scripted field API functions (#100907) * deprecate scripted field functions in index patterns api * merge
This commit is contained in:
parent
1609e136a3
commit
725d413131
11 changed files with 54 additions and 4 deletions
|
@ -4,6 +4,11 @@
|
|||
|
||||
## IndexPattern.addScriptedField() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> use runtime field instead
|
||||
>
|
||||
|
||||
Add scripted field to field list
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## IndexPattern.getNonScriptedFields() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> use runtime field instead
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## IndexPattern.getScriptedFields() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> use runtime field instead
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## IndexPattern.removeScriptedField() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> use runtime field instead
|
||||
>
|
||||
|
||||
Remove scripted field from field list
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
## IndexPattern.addScriptedField() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
>
|
||||
|
||||
Add scripted field to field list
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
## IndexPattern.getNonScriptedFields() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
## IndexPattern.getScriptedFields() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
## IndexPattern.removeScriptedField() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
>
|
||||
|
||||
Remove scripted field from field list
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -240,6 +240,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
* @param script script code
|
||||
* @param fieldType
|
||||
* @param lang
|
||||
* @deprecated use runtime field instead
|
||||
*/
|
||||
async addScriptedField(name: string, script: string, fieldType: string = 'string') {
|
||||
const scriptedFields = this.getScriptedFields();
|
||||
|
@ -265,6 +266,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
/**
|
||||
* Remove scripted field from field list
|
||||
* @param fieldName
|
||||
* @deprecated use runtime field instead
|
||||
*/
|
||||
|
||||
removeScriptedField(fieldName: string) {
|
||||
|
@ -274,10 +276,18 @@ export class IndexPattern implements IIndexPattern {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated use runtime field instead
|
||||
*/
|
||||
getNonScriptedFields() {
|
||||
return [...this.fields.getAll().filter((field) => !field.scripted)];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated use runtime field instead
|
||||
*/
|
||||
getScriptedFields() {
|
||||
return [...this.fields.getAll().filter((field) => field.scripted)];
|
||||
}
|
||||
|
|
|
@ -1356,6 +1356,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
// Warning: (ae-forgotten-export) The symbol "IndexPatternDeps" needs to be exported by the entry point index.d.ts
|
||||
constructor({ spec, fieldFormats, shortDotsEnable, metaFields, }: IndexPatternDeps);
|
||||
addRuntimeField(name: string, runtimeField: RuntimeField): void;
|
||||
// @deprecated
|
||||
addScriptedField(name: string, script: string, fieldType?: string): Promise<void>;
|
||||
readonly allowNoIndex: boolean;
|
||||
// (undocumented)
|
||||
|
@ -1409,7 +1410,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
getFormatterForFieldNoDefault(fieldname: string): FieldFormat | undefined;
|
||||
// (undocumented)
|
||||
getIndex(): string;
|
||||
// (undocumented)
|
||||
// @deprecated (undocumented)
|
||||
getNonScriptedFields(): IndexPatternField[];
|
||||
getOriginalSavedObjectBody: () => {
|
||||
fieldAttrs?: string | undefined;
|
||||
|
@ -1422,7 +1423,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
typeMeta?: string | undefined;
|
||||
type?: string | undefined;
|
||||
};
|
||||
// (undocumented)
|
||||
// @deprecated (undocumented)
|
||||
getScriptedFields(): IndexPatternField[];
|
||||
getSourceFiltering(): {
|
||||
excludes: any[];
|
||||
|
@ -1442,6 +1443,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
// (undocumented)
|
||||
metaFields: string[];
|
||||
removeRuntimeField(name: string): void;
|
||||
// @deprecated
|
||||
removeScriptedField(fieldName: string): void;
|
||||
resetOriginalSavedObjectBody: () => void;
|
||||
// (undocumented)
|
||||
|
|
|
@ -753,6 +753,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
// Warning: (ae-forgotten-export) The symbol "IndexPatternDeps" needs to be exported by the entry point index.d.ts
|
||||
constructor({ spec, fieldFormats, shortDotsEnable, metaFields, }: IndexPatternDeps);
|
||||
addRuntimeField(name: string, runtimeField: RuntimeField): void;
|
||||
// @deprecated
|
||||
addScriptedField(name: string, script: string, fieldType?: string): Promise<void>;
|
||||
readonly allowNoIndex: boolean;
|
||||
// (undocumented)
|
||||
|
@ -810,7 +811,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
getIndex(): string;
|
||||
// Warning: (ae-forgotten-export) The symbol "IndexPatternField" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
// @deprecated (undocumented)
|
||||
getNonScriptedFields(): IndexPatternField[];
|
||||
getOriginalSavedObjectBody: () => {
|
||||
fieldAttrs?: string | undefined;
|
||||
|
@ -823,7 +824,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
typeMeta?: string | undefined;
|
||||
type?: string | undefined;
|
||||
};
|
||||
// (undocumented)
|
||||
// @deprecated (undocumented)
|
||||
getScriptedFields(): IndexPatternField[];
|
||||
getSourceFiltering(): {
|
||||
excludes: any[];
|
||||
|
@ -843,6 +844,7 @@ export class IndexPattern implements IIndexPattern {
|
|||
// (undocumented)
|
||||
metaFields: string[];
|
||||
removeRuntimeField(name: string): void;
|
||||
// @deprecated
|
||||
removeScriptedField(fieldName: string): void;
|
||||
resetOriginalSavedObjectBody: () => void;
|
||||
// (undocumented)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue