Commit 573b9a345a3d2f19d51022d24975eff9f3293cd4
Committed by
GitHub
Merge pull request #3719 from ChantsovaEkaterina/improvement/service-completion-…
…get-entity-timeseries [3.2] Add getEntityTimeseries method to Service Completion
Showing
1 changed file
with
23 additions
and
0 deletions
@@ -56,6 +56,12 @@ export const customerHref = '<a href="https://github.com/thingsboard/thingsboard | @@ -56,6 +56,12 @@ export const customerHref = '<a href="https://github.com/thingsboard/thingsboard | ||
56 | 56 | ||
57 | export const attributeDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts#L76">Attribute Data</a>'; | 57 | export const attributeDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts#L76">Attribute Data</a>'; |
58 | 58 | ||
59 | +export const timeseriesDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/627c0577b08452308f925cecb3860e35292c649e/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts#L91">Timeseries Data</a>'; | ||
60 | + | ||
61 | +export const aggregationTypeHref = '<a href="https://github.com/thingsboard/thingsboard/blob/a8ea887eacf7729e603ace13ce2d7d89dae82931/ui-ngx/src/app/shared/models/time/time.models.ts#L54">Aggregation Type</a>'; | ||
62 | + | ||
63 | +export const dataSortOrderHref = '<a href="https://github.com/thingsboard/thingsboard/blob/627c0577b08452308f925cecb3860e35292c649e/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts#L95">Data Sort Order</a>'; | ||
64 | + | ||
59 | export const userHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/user.model.ts#L23">User</a>'; | 65 | export const userHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/user.model.ts#L23">User</a>'; |
60 | 66 | ||
61 | export const entityDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/query/query.models.ts#L567">Entity data</a>'; | 67 | export const entityDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/query/query.models.ts#L567">Entity data</a>'; |
@@ -1080,6 +1086,23 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1080,6 +1086,23 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1080 | ], | 1086 | ], |
1081 | return: observableReturnTypeVariable('any') | 1087 | return: observableReturnTypeVariable('any') |
1082 | }, | 1088 | }, |
1089 | + getEntityTimeseries: { | ||
1090 | + description: 'Get entity timeseries', | ||
1091 | + meta: 'function', | ||
1092 | + args: [ | ||
1093 | + {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | ||
1094 | + {name: 'keys', type: `Array<string>`, description: 'Array of the keys'}, | ||
1095 | + {name: 'startTs', type: 'number', description: 'Start time in milliseconds'}, | ||
1096 | + {name: 'endTs', type: 'number', description: 'End time in milliseconds'}, | ||
1097 | + {name: 'limit', type: 'number', description: 'Limit of values to receive for each key'}, | ||
1098 | + {name: 'agg', type: aggregationTypeHref, description: 'Aggregation type'}, | ||
1099 | + {name: 'interval', type: 'number', description: 'Aggregation interval'}, | ||
1100 | + {name: 'orderBy', type: dataSortOrderHref, description: 'Data order by time'}, | ||
1101 | + {name: 'useStrictDataTypes', type: 'boolean', description: 'If "false" all values will be returned as strings'}, | ||
1102 | + requestConfigArg | ||
1103 | + ], | ||
1104 | + return: observableReturnTypeVariable(timeseriesDataHref) | ||
1105 | + }, | ||
1083 | } | 1106 | } |
1084 | }, | 1107 | }, |
1085 | entityService: { | 1108 | entityService: { |