-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from kuzzleio/2.2.0-proposal
# [2.2.0](https://github.com/kuzzleio/kuzzle-device-manager/releases/tag/2.2.0) (2023-04-17) #### Bug fixes - [ [#290](#290) ] Historize asset for each same measurements ([tdislay](https://github.com/tdislay)) - [ [#288](#288) ] Full path nested metadata when create/update assets ([OlivierCavadenti](https://github.com/OlivierCavadenti)) - [ [#286](#286) ] ModelService upsert -> createOrReplace ([fmauNeko](https://github.com/fmauNeko)) - [ [#282](#282) ] Fix engine creation ([Aschen](https://github.com/Aschen)) #### New features - [ [#296](#296) ] Export measures to CSV ([Aschen](https://github.com/Aschen)) - [ [#291](#291) ] Add type of measure linked in each links of asset measures. ([OlivierCavadenti](https://github.com/OlivierCavadenti)) #### Enhancements - [ [#295](#295) ] Export default mappings ([Aschen](https://github.com/Aschen)) - [ [#293](#293) ] Allow JSONObject in metadata ([Aschen](https://github.com/Aschen)) - [ [#287](#287) ] Update metadata in existing assets when the model is modified ([fmauNeko](https://github.com/fmauNeko)) - [ [#283](#283) ] Store reason of discarded payloads ([OlivierCavadenti](https://github.com/OlivierCavadenti)) #### Others - [ [#289](#289) ] Split tsconfig for tests ([fmauNeko](https://github.com/fmauNeko)) ---
- Loading branch information
Showing
111 changed files
with
2,855 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Typedoc | ||
description: Build and deploy Typedoc | ||
# Inputs should be env variables | ||
inputs: | ||
SITE_BASE: | ||
description: Destination path of the deployment | ||
required: true | ||
AWS_ACCESS_KEY_ID: | ||
description: AWS Access key ID | ||
required: true | ||
AWS_SECRET_ACCESS_KEY: | ||
description: AWS secret key | ||
required: true | ||
S3_BUCKET: | ||
description: S3 bucket name | ||
required: true | ||
CLOUDFRONT_ID: | ||
description: Cloudfront distribution ID | ||
required: true | ||
REGION: | ||
description: AWS default region | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build Typedoc and deploy | ||
shell: bash | ||
run: | | ||
npm run docker npm ci | ||
npx typedoc index.ts | ||
echo "aws s3 sync ./docs s3://$S3_BUCKET$SITE_BASE --delete" | ||
echo "aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_ID --paths $SITE_BASE*" | ||
aws s3 sync ./docs s3://$S3_BUCKET$SITE_BASE --delete | ||
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_ID --paths $SITE_BASE* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ runs: | |
shell: bash | ||
run: | | ||
npm run docker npm ci | ||
npm run test:lint | ||
npm run lint | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
code: false | ||
type: branch | ||
title: Concepts | ||
description: Kuzzle IoT Platform - Device Manager Concepts | ||
order: 100 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: exportMeasures | ||
description: Export measure history from an asset | ||
--- | ||
|
||
# exportMeasures | ||
|
||
This action allow to export the measures history of an asset. | ||
|
||
The measures are exported as a CSV stream. | ||
|
||
The export process have two steps: | ||
|
||
1. execute the `exportMeasures` action with WebSocket or HTTP POST to prepare an export and retrieve an export link | ||
2. GET request to the generated export link through a tag `<a href="{export-link}">Download</a>` | ||
|
||
Those two steps are necessary to avoid the browser to crash when exporting a lot of data. | ||
|
||
Export link are valid for 2 minutes. | ||
|
||
::: info | ||
The generated export link does not have protocol, host and port. They should be added to the url. | ||
|
||
For example: | ||
|
||
```js | ||
// Query to `device-manager/assets:exportMeasures` | ||
const { result } = await sdk.query({ ... }); | ||
|
||
const fullLink = `http${sdk.protocol.ssl ? 's' : ''}://${sdk.protocol.host}:${sdk.protocol.port}${result.link}`; | ||
``` | ||
|
||
::: | ||
|
||
--- | ||
|
||
## Query Syntax | ||
|
||
### HTTP | ||
|
||
```http | ||
POST: http://kuzzle:7512/_/device-manager/:engineId/assets/:_id/measures/_export | ||
GET: device-manager/:engineId/assets/:_id/measures/_export/:exportId | ||
``` | ||
|
||
### Other protocols | ||
|
||
```js | ||
{ | ||
"controller": "device-manager/assets", | ||
"action": "exportMeasures", | ||
"engineId": "<engineId>", | ||
"_id": "<assetId>", | ||
"body": { | ||
"query": { | ||
// ... | ||
}, | ||
"sort": [ | ||
// ... | ||
] | ||
}, | ||
|
||
// optional: | ||
"startAt": "<beginning of time range>", | ||
"endAt": "<end of time range>", | ||
"type": "<measure type>" | ||
} | ||
``` | ||
|
||
--- | ||
|
||
## Arguments | ||
|
||
- `engineId`: engine id | ||
- `_id`: asset id | ||
ISO_8601 | ||
- `startAt`: beginning of time range (ISO 8601) | ||
- `endAt`: end of time range (ISO 8601) | ||
- `type`: measure type | ||
|
||
## Body properties | ||
|
||
- `query`: the search query itself, using the [Koncorde Filters DSL](/core/2/api/koncorde-filters-syntax) syntax. | ||
- `sort`: contains a list of fields, used to [sort search results](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-request-sort.html), in order of importance | ||
|
||
--- | ||
|
||
## Response | ||
|
||
```js | ||
{ | ||
"status": 200, | ||
"error": null, | ||
"controller": "device-manager/assets", | ||
"action": "search", | ||
"requestId": "<unique request identifier>", | ||
"result": { | ||
"link": " /_/device-manager/<engine id>/devices/<asset id>/measures/_export/<export id>?jwt=<token>" | ||
} | ||
} | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.