Skip to content

Commit

Permalink
custom name => custom label
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Nov 18, 2020
1 parent 02dfc47 commit 0091625
Show file tree
Hide file tree
Showing 26 changed files with 117 additions and 117 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- 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; [IFieldType](./kibana-plugin-plugins-data-public.ifieldtype.md) &gt; [customName](./kibana-plugin-plugins-data-public.ifieldtype.customname.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IFieldType](./kibana-plugin-plugins-data-public.ifieldtype.md) &gt; [customLabel](./kibana-plugin-plugins-data-public.ifieldtype.customlabel.md)

## IFieldType.customName property
## IFieldType.customLabel property

<b>Signature:</b>

```typescript
customName?: string;
customLabel?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface IFieldType
| --- | --- | --- |
| [aggregatable](./kibana-plugin-plugins-data-public.ifieldtype.aggregatable.md) | <code>boolean</code> | |
| [count](./kibana-plugin-plugins-data-public.ifieldtype.count.md) | <code>number</code> | |
| [customName](./kibana-plugin-plugins-data-public.ifieldtype.customname.md) | <code>string</code> | |
| [customLabel](./kibana-plugin-plugins-data-public.ifieldtype.customlabel.md) | <code>string</code> | |
| [displayName](./kibana-plugin-plugins-data-public.ifieldtype.displayname.md) | <code>string</code> | |
| [esTypes](./kibana-plugin-plugins-data-public.ifieldtype.estypes.md) | <code>string[]</code> | |
| [filterable](./kibana-plugin-plugins-data-public.ifieldtype.filterable.md) | <code>boolean</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
```typescript
getFieldAttrs: () => {
[x: string]: {
customName: string;
customLabel: string;
};
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export declare class IndexPattern implements IIndexPattern
| [flattenHit](./kibana-plugin-plugins-data-public.indexpattern.flattenhit.md) | | <code>(hit: Record&lt;string, any&gt;, deep?: boolean) =&gt; Record&lt;string, any&gt;</code> | |
| [formatField](./kibana-plugin-plugins-data-public.indexpattern.formatfield.md) | | <code>FormatFieldFn</code> | |
| [formatHit](./kibana-plugin-plugins-data-public.indexpattern.formathit.md) | | <code>{</code><br/><code> (hit: Record&lt;string, any&gt;, type?: string): any;</code><br/><code> formatField: FormatFieldFn;</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-public.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: {</code><br/><code> customName: string;</code><br/><code> };</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-public.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: {</code><br/><code> customLabel: string;</code><br/><code> };</code><br/><code> }</code> | |
| [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md) | | <code>() =&gt; {</code><br/><code> fieldAttrs?: string &#124; undefined;</code><br/><code> title?: string &#124; undefined;</code><br/><code> timeFieldName?: string &#124; undefined;</code><br/><code> intervalName?: string &#124; undefined;</code><br/><code> fields?: string &#124; undefined;</code><br/><code> sourceFilters?: string &#124; undefined;</code><br/><code> fieldFormatMap?: string &#124; undefined;</code><br/><code> typeMeta?: string &#124; undefined;</code><br/><code> type?: string &#124; undefined;</code><br/><code> }</code> | Get last saved saved object fields |
| [id](./kibana-plugin-plugins-data-public.indexpattern.id.md) | | <code>string</code> | |
| [intervalName](./kibana-plugin-plugins-data-public.indexpattern.intervalname.md) | | <code>string &#124; undefined</code> | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- 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; [customName](./kibana-plugin-plugins-data-public.indexpatternfield.customname.md)
[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; [customLabel](./kibana-plugin-plugins-data-public.indexpatternfield.customlabel.md)

## IndexPatternField.customName property
## IndexPatternField.customLabel property

<b>Signature:</b>

```typescript
get customName(): string | undefined;
get customLabel(): string | undefined;

set customName(label: string | undefined);
set customLabel(customLabel: string | undefined);
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export declare class IndexPatternField implements IFieldType
| [aggregatable](./kibana-plugin-plugins-data-public.indexpatternfield.aggregatable.md) | | <code>boolean</code> | |
| [conflictDescriptions](./kibana-plugin-plugins-data-public.indexpatternfield.conflictdescriptions.md) | | <code>Record&lt;string, string[]&gt; &#124; undefined</code> | Description of field type conflicts across different indices in the same index pattern |
| [count](./kibana-plugin-plugins-data-public.indexpatternfield.count.md) | | <code>number</code> | Count is used for field popularity |
| [customName](./kibana-plugin-plugins-data-public.indexpatternfield.customname.md) | | <code>string &#124; undefined</code> | |
| [customLabel](./kibana-plugin-plugins-data-public.indexpatternfield.customlabel.md) | | <code>string &#124; undefined</code> | |
| [displayName](./kibana-plugin-plugins-data-public.indexpatternfield.displayname.md) | | <code>string</code> | |
| [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | <code>string[] &#124; undefined</code> | |
| [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | <code>boolean</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ toJSON(): {
aggregatable: boolean;
readFromDocValues: boolean;
subType: import("../types").IFieldSubType | undefined;
customName: string | undefined;
customLabel: string | undefined;
};
```
<b>Returns:</b>
Expand All @@ -38,6 +38,6 @@ toJSON(): {
aggregatable: boolean;
readFromDocValues: boolean;
subType: import("../types").IFieldSubType | undefined;
customName: string | undefined;
customLabel: string | undefined;
}`

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- 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; [IFieldType](./kibana-plugin-plugins-data-server.ifieldtype.md) &gt; [customName](./kibana-plugin-plugins-data-server.ifieldtype.customname.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IFieldType](./kibana-plugin-plugins-data-server.ifieldtype.md) &gt; [customLabel](./kibana-plugin-plugins-data-server.ifieldtype.customlabel.md)

## IFieldType.customName property
## IFieldType.customLabel property

<b>Signature:</b>

```typescript
customName?: string;
customLabel?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface IFieldType
| --- | --- | --- |
| [aggregatable](./kibana-plugin-plugins-data-server.ifieldtype.aggregatable.md) | <code>boolean</code> | |
| [count](./kibana-plugin-plugins-data-server.ifieldtype.count.md) | <code>number</code> | |
| [customName](./kibana-plugin-plugins-data-server.ifieldtype.customname.md) | <code>string</code> | |
| [customLabel](./kibana-plugin-plugins-data-server.ifieldtype.customlabel.md) | <code>string</code> | |
| [displayName](./kibana-plugin-plugins-data-server.ifieldtype.displayname.md) | <code>string</code> | |
| [esTypes](./kibana-plugin-plugins-data-server.ifieldtype.estypes.md) | <code>string[]</code> | |
| [filterable](./kibana-plugin-plugins-data-server.ifieldtype.filterable.md) | <code>boolean</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
```typescript
getFieldAttrs: () => {
[x: string]: {
customName: string;
customLabel: string;
};
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export declare class IndexPattern implements IIndexPattern
| [flattenHit](./kibana-plugin-plugins-data-server.indexpattern.flattenhit.md) | | <code>(hit: Record&lt;string, any&gt;, deep?: boolean) =&gt; Record&lt;string, any&gt;</code> | |
| [formatField](./kibana-plugin-plugins-data-server.indexpattern.formatfield.md) | | <code>FormatFieldFn</code> | |
| [formatHit](./kibana-plugin-plugins-data-server.indexpattern.formathit.md) | | <code>{</code><br/><code> (hit: Record&lt;string, any&gt;, type?: string): any;</code><br/><code> formatField: FormatFieldFn;</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-server.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: {</code><br/><code> customName: string;</code><br/><code> };</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-server.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: {</code><br/><code> customLabel: string;</code><br/><code> };</code><br/><code> }</code> | |
| [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md) | | <code>() =&gt; {</code><br/><code> fieldAttrs?: string &#124; undefined;</code><br/><code> title?: string &#124; undefined;</code><br/><code> timeFieldName?: string &#124; undefined;</code><br/><code> intervalName?: string &#124; undefined;</code><br/><code> fields?: string &#124; undefined;</code><br/><code> sourceFilters?: string &#124; undefined;</code><br/><code> fieldFormatMap?: string &#124; undefined;</code><br/><code> typeMeta?: string &#124; undefined;</code><br/><code> type?: string &#124; undefined;</code><br/><code> }</code> | Get last saved saved object fields |
| [id](./kibana-plugin-plugins-data-server.indexpattern.id.md) | | <code>string</code> | |
| [intervalName](./kibana-plugin-plugins-data-server.indexpattern.intervalname.md) | | <code>string &#124; undefined</code> | |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ export class IndexPatternField implements IFieldType {
this.spec.lang = lang;
}

public get customName() {
return this.spec.customName;
public get customLabel() {
return this.spec.customLabel;
}

public set customName(label) {
this.spec.customName = label;
public set customLabel(customLabel) {
this.spec.customLabel = customLabel;
}

/**
Expand All @@ -93,8 +93,8 @@ export class IndexPatternField implements IFieldType {
}

public get displayName(): string {
return this.spec.customName
? this.spec.customName
return this.spec.customLabel
? this.spec.customLabel
: this.spec.shortDotsEnable
? shortenDottedString(this.spec.name)
: this.spec.name;
Expand Down Expand Up @@ -163,7 +163,7 @@ export class IndexPatternField implements IFieldType {
aggregatable: this.aggregatable,
readFromDocValues: this.readFromDocValues,
subType: this.subType,
customName: this.customName,
customLabel: this.customLabel,
};
}

Expand All @@ -186,7 +186,7 @@ export class IndexPatternField implements IFieldType {
readFromDocValues: this.readFromDocValues,
subType: this.subType,
format: getFormatterForField ? getFormatterForField(this).toJSON() : undefined,
customName: this.customName,
customLabel: this.customLabel,
shortDotsEnable: this.spec.shortDotsEnable,
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/common/index_patterns/fields/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface IFieldType {
scripted?: boolean;
subType?: IFieldSubType;
displayName?: string;
customName?: string;
customLabel?: string;
format?: any;
toSpec?: (options?: { getFormatterForField?: IndexPattern['getFormatterForField'] }) => FieldSpec;
}
Loading

0 comments on commit 0091625

Please sign in to comment.