diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-04-14 22:59:58 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-04-14 22:59:58 -0400 |
| commit | c6360fb4aed348f6f6a3c7412b6acc0d1990c239 (patch) | |
| tree | 3018ea887b40bacac92a137206d5e5f5c34a12bd /src/client/northstar/dash-fields | |
| parent | 5fbee077873c3dd0a9b5939babbaa1fd4dfe1393 (diff) | |
| parent | c787b0eac374b4dabf6ede7ee40e77a28815d5c8 (diff) | |
merged with master
Diffstat (limited to 'src/client/northstar/dash-fields')
| -rw-r--r-- | src/client/northstar/dash-fields/HistogramField.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/client/northstar/dash-fields/HistogramField.ts b/src/client/northstar/dash-fields/HistogramField.ts index 90be70b80..82de51d56 100644 --- a/src/client/northstar/dash-fields/HistogramField.ts +++ b/src/client/northstar/dash-fields/HistogramField.ts @@ -16,7 +16,7 @@ export class HistogramField extends BasicField<HistogramOperation> { omitKeys(obj: any, keys: any) { var dup: any = {}; for (var key in obj) { - if (keys.indexOf(key) == -1) { + if (keys.indexOf(key) === -1) { dup[key] = obj[key]; } } @@ -27,7 +27,7 @@ export class HistogramField extends BasicField<HistogramOperation> { } Copy(): Field { - return new HistogramField(this.Data); + return new HistogramField(this.Data.Copy()); } ToScriptString(): string { @@ -35,13 +35,12 @@ export class HistogramField extends BasicField<HistogramOperation> { } - ToJson(): { type: Types, data: string, _id: string } { + ToJson() { return { type: Types.HistogramOp, - data: this.toString(), - _id: this.Id - } + id: this.Id + }; } @action @@ -54,13 +53,13 @@ export class HistogramField extends BasicField<HistogramOperation> { let schema = CurrentUserUtils.GetNorthstarSchema(jp.SchemaName); if (schema) { CurrentUserUtils.GetAllNorthstarColumnAttributes(schema).map(attr => { - if (attr.displayName == jp.X.AttributeModel.Attribute.DisplayName) { + if (attr.displayName === jp.X.AttributeModel.Attribute.DisplayName) { X = new AttributeTransformationModel(new ColumnAttributeModel(attr), jp.X.AggregateFunction); } - if (attr.displayName == jp.Y.AttributeModel.Attribute.DisplayName) { + if (attr.displayName === jp.Y.AttributeModel.Attribute.DisplayName) { Y = new AttributeTransformationModel(new ColumnAttributeModel(attr), jp.Y.AggregateFunction); } - if (attr.displayName == jp.V.AttributeModel.Attribute.DisplayName) { + if (attr.displayName === jp.V.AttributeModel.Attribute.DisplayName) { V = new AttributeTransformationModel(new ColumnAttributeModel(attr), jp.V.AggregateFunction); } }); |
