Skip to content

Commit 6015066

Browse files
iot-app-kit-botNorbertNaderdiehbriaTheEvilDevboweihan
authored
commit by Octane (#25)
* Release 1.2.1 (#85) * fix: unsubrscribe data provider on component updates * Release 1.2.1 Co-authored-by: Norbert Nader <[email protected]> * fix: resolves #83 (#87) * fix: resolves #83 * Update index.ts Co-authored-by: Norbert Nader <[email protected]> * feat: improve documentation (#90) * Run tests on pull request (#91) * Update reference to code name (#86) AWS-UI internal code name is mentioned in the readme. Co-authored-by: Norbert Nader <[email protected]> * feat: update synchro charts to 3.1.0, update docs (#92) * feat: Improve documentation formatting (#93) * feat: Improve resource explorer docs (#95) * Update README.md (#94) * feat: support fetchMostRecentBeforeStart (#79) * Update documentation & make react-components easier to use (#98) * Utilize lock file in CI (#99) * build(deps): bump async from 2.6.3 to 2.6.4 (#100) Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](caolan/async@v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: support auto-assigning colors for certain components (#96) * feat: support auto-assigning colors for certain components * Update package.json * Update cypress to v9, added stricted linting, fixed linting warnings and errors (#104) * Add stylelint and enforce via global package.json (#106) * use most recent synchro-charts version, 4.0.1 (#111) * build(deps): bump eventsource from 1.1.0 to 1.1.1 (#116) Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/EventSource/eventsource/releases) - [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md) - [Commits](EventSource/eventsource@v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: eventsource dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: expand children in resource explorer (#115) * feat: expand children in resource explorer * fix typo * Fix asset module cache * Add logic for fetching hierarchies * Add tests * Improve insert * Fix linting Co-authored-by: Norbert Nader <[email protected]> * Update README.md (#121) Fix test runner status badge * Bump minor version (#120) * specify react types package version to be 17 (#134) Co-authored-by: Xinyi <[email protected]> * build(deps): bump parse-url from 6.0.0 to 6.0.2 (#142) Bumps [parse-url](https://github.com/IonicaBizau/parse-url) from 6.0.0 to 6.0.2. - [Release notes](https://github.com/IonicaBizau/parse-url/releases) - [Commits](https://github.com/IonicaBizau/parse-url/commits) --- updated-dependencies: - dependency-name: parse-url dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: Development Quick Start Docs/Scripts (#148) * add yarn bootstrap script to replace lerna bootstrap * specify supported node and yarn engines * simplify development docs and update build steps Co-authored-by: Thomas Juranek <[email protected]> * build(deps): bump moment from 2.29.2 to 2.29.4 (#149) Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](moment/moment@2.29.2...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: update @testing-library/react to use create root (#151) Co-authored-by: Norbert Nader <[email protected]> * feat(props): adapt props for synchro-charts (#133) * feat(props): adapt props for synchro-charts * add testing for new props * fix(tests): cleanup tests from devwork * Update changelog * update tests to wait for intercepts Co-authored-by: Norbert Nader <[email protected]> * feat: batch API for historical, aggregated, and latest value data (#137) * fix: resolve float decimal precision issue on round() function. (#160) * fix: update @testing-library/react to use create root * fix: resolve float decimal precision issue on round() function. * Simplify round() function. Remove managing the negative sign separately. Co-authored-by: Norbert Nader <[email protected]> * sync changes with private repo for common files (#150) * sync changes with private repo for common files * Revert "fix: update @testing-library/react to use create root (#151)" This reverts commit 960f53f. Co-authored-by: Xinyi <[email protected]> * Update npm packages repository (#161) * build(deps): bump terser from 4.8.0 to 4.8.1 (#168) Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * remove node version requirement for now until switched internal package to v16 Co-authored-by: Norbert Nader <[email protected]> Co-authored-by: Norbert Nader <[email protected]> Co-authored-by: db <[email protected]> Co-authored-by: Mitchell Lee <[email protected]> Co-authored-by: Bowei Han <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Xinyi Xu <[email protected]> Co-authored-by: Xinyi <[email protected]> Co-authored-by: Thomas Juranek <[email protected]> Co-authored-by: Thomas Juranek <[email protected]> Co-authored-by: Xiao(Bill) Li <[email protected]> Co-authored-by: jmbuss <[email protected]>
1 parent 1ab1ed8 commit 6015066

File tree

61 files changed

+4495
-1584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4495
-1584
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ __diff_output__
3838
# Cypress screenshots
3939
**/cypress/screenshots
4040
**/cypress/videos
41+
**/cypress/snapshots/All Specs
4142

4243
# Local development hard-coded credentials for use with the AWS SDK.
4344
creds.json

.stylelintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ dist/
33
www/
44
loader/
55
node_modules/
6-
**/coverage/
6+
coverage/

docs/AWSIoTSiteWiseSource.md

+28
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ You can download the AWS IoT SiteWise source from the following location: https:
88

99
To set up the AWS IoT SiteWise source, follow the instructions in [Getting started with IoT Application Kit](https://github.com/awslabs/iot-app-kit/tree/main/docs/GettingStarted.md).
1010

11+
---
12+
1113
## Queries
1214

1315
The AWS IoT SiteWise source provides queries that you can use to filter AWS IoT SiteWise data and assets.
@@ -34,6 +36,8 @@ query.timeSeriesData({
3436

3537
This query for time series data, can then be provided to any of the IoT App Kit components that support time series data.
3638

39+
---
40+
3741
## API
3842

3943
### `timeSeriesData`
@@ -140,6 +144,7 @@ const { query } = initialize({ iotsitewiseClient });
140144
]}
141145
/>
142146
```
147+
---
143148

144149
### `assetTree`
145150

@@ -206,3 +211,26 @@ Type: Boolean
206211

207212
Type: Boolean
208213

214+
---
215+
216+
## SiteWiseDataSourceSettings
217+
218+
(Optional) Settings that can be provided when initializing the AWS IoT SiteWise source.
219+
220+
```
221+
import { initialize } from '@iot-app-kit/source-iotsitewise';
222+
223+
const { IoTSiteWiseClient } = require("@aws-sdk/client-iotsitewise");
224+
225+
const iotsitewiseClient = new IoTSiteWiseClient({ region: "REGION" });
226+
227+
const { query } = initialize({ iotsitewiseClient, settings: { batchDuration: 100 } });
228+
```
229+
230+
`batchDuration`
231+
232+
(Optional) Timeframe over which to coalesce time-series data requests before executing a batch request, specified in ms. e.g. a `batchDuration` of 100 will cause the AWS IoT SiteWise source to repeatedly batch all requests that occur within a 100 ms timeframe.
233+
234+
Type: Number
235+
236+
The AWS IoT SiteWise source communicates with SiteWise using batch APIs to reduce network overhead. By default, all individual requests for time-series data that occur within a single frame of execution are coalesced and executed in a batch request. This behaviour is scheduled using the [Job and JobQueue](https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues) concepts. Depending on dashboard configuration, widget configuration, latency, and a multitude of other factors, batching on a single frame of execution might not be desirable.

docs/development.md

+11-36
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,20 @@
1-
## Quick start for development
1+
## Development Quick Start
22

3-
1. Environment setup
3+
### Environment setup
44

5-
Ensure you have node version 16 and the latest version of yarn installed.
5+
Iot-App-Kit runs on node and uses yarn for package management. Specific versions are required in order to keep builds working with the current monorepo tooling.
66

7+
- Node: any `v16` or higher
8+
- Yarn: any `v1`, but not `v2` or higher
79

8-
To do this, execute the following commands:
9-
```
10-
# Install `n`, a node package manager, globally to help switch between node versions.
11-
npm i n -g
10+
### Building Iot-App-Kit
1211

13-
# Update to node version 16
14-
sudo n 16
12+
With supported versions of node and yarn installed, you're ready to connect to SiteWise and start building for Iot-App-Kit. You'll need to pull in credentials, specify the SiteWise assets you'd like to connect to, build the project, and then run locally.
1513

16-
# Install the latest version of yarn
17-
npm i yarn@latest -g
14+
1. Copy a set of AWS JSON formatted credentials to the account with the access to the SiteWise resources you are requesting, at `<rootDir>/packages/components/creds.json`.
1815

19-
# Optionally, install lerna
20-
npm i lerna -g
21-
```
22-
23-
2. Build project
24-
25-
```
26-
# Without installing lerna locally...
27-
npx lerna bootstrap
28-
29-
# With lerna installed locally
30-
lerna bootstrap
31-
```
32-
33-
4. Provide credentials
34-
Copy a set of AWS JSON formatted credentials to the account with the access to the SiteWise resources you are requesting, at `<rootDir>/packages/components/creds.json`.
35-
36-
These credentials should not be uploaded to the repository.
37-
38-
5. Point to valid SiteWise resources
39-
40-
Alter the file `siteWiseQueries` within `@iot-app-kit/components` to point to valid SiteWise asset properties for the accounts credentials from the prior step.
41-
42-
6. Test locally
43-
run `yarn run start` at the project root, and then view `localhost:3333`. Here you should see example IoT App Kit components requesting data from SiteWise.
16+
2. Alter the file `siteWiseQueries` within `@iot-app-kit/components` to point to valid SiteWise asset properties for the account credentials from the prior step.
4417

18+
3. `yarn bootstrap` installs dependencies and builds the Iot-App-Kit packages. Note: this is different than using `lerna bootstrap`, which installs dependencies but doesn't build the packages.
4519

20+
4. `yarn start` will run the project at `localhost:3333`. You should see example IoT App Kit components requesting data from SiteWise.

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.4.0",
2+
"version": "1.5.0",
33
"packages": [
44
"packages/*"
55
],

package.json

+8
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
"main": "index.js",
66
"license": "Apache-2.0",
77
"repository": "[email protected]:awslabs/iot-app-kit.git",
8+
"engines": {
9+
"yarn": ">=1.0.0 <2.0.0"
10+
},
811
"workspaces": {
912
"packages": [
1013
"packages/*"
1114
]
1215
},
1316
"scripts": {
1417
"start": "cd packages/components && yarn run start",
18+
"bootstrap": "yarn install && yarn build",
1519
"build": "lerna run build --stream",
1620
"clean": "git clean -dxf -e /.idea -e /.vscode -e creds.json",
1721
"fix": "npm-run-all -p fix:eslint fix:stylelint",
@@ -23,6 +27,10 @@
2327
"test:unit": "lerna run test --stream --concurrency 1",
2428
"test:git": "git diff --exit-code",
2529
"pack": "lerna run pack",
30+
"versionup:auto": "lerna version --conventional-commits --no-changelog --no-push --no-git-tag-version --yes",
31+
"versionup:patch": "lerna version patch --conventional-commits --no-changelog --no-push --no-git-tag-version --yes",
32+
"versionup:minor": "lerna version minor --conventional-commits --no-changelog --no-push --no-git-tag-version --yes",
33+
"versionup:major": "lerna version major --conventional-commits --no-changelog --no-push --no-git-tag-version --yes",
2634
"publishToNpm": "lerna publish from-package --no-verify-access --yes"
2735
},
2836
"devDependencies": {

packages/components/CHANGELOG.md

+72
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,78 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# 1.5.0 (2022-07-09)
7+
8+
9+
### Features
10+
11+
* synchro-charts version updated to 5.0.0
12+
13+
* Added properties to the following components:
14+
15+
IotBarChart:
16+
* alarms
17+
* axis
18+
* gestures
19+
* layout
20+
* legend
21+
* messageOverrides
22+
* movement
23+
* scale
24+
* size
25+
* trends
26+
27+
IotKpi:
28+
* messageOverrides
29+
30+
IotLineChart:
31+
* axis
32+
* gestures
33+
* layout
34+
* legend
35+
* messageOverrides
36+
* movement
37+
* scale
38+
* size
39+
* trends
40+
41+
IotScatterChart:
42+
* alarms
43+
* axis
44+
* gestures
45+
* layout
46+
* legend
47+
* messageOverrides
48+
* movement
49+
* scale
50+
* size
51+
* trends
52+
53+
IotStatusGrid:
54+
* labelsConfig
55+
56+
IotStatusTimeline:
57+
* alarms
58+
* annotations
59+
* axis
60+
* gestures
61+
* layout
62+
* messageOverrides
63+
* movement
64+
* scale
65+
* size
66+
67+
IotTable:
68+
* messageOverrides
69+
* trends
70+
71+
### Fixes
72+
73+
* integration tests asset model and asset summary mocks updated to return current response.
74+
75+
76+
77+
678
# 1.4.0 (2022-06-09)
779

880

packages/components/package.json

+14-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "1.4.0",
6+
"version": "1.5.0",
77
"description": "IoT App Kit Components",
88
"main": "dist/index.cjs.js",
99
"module": "dist/custom-elements/index.js",
@@ -20,6 +20,15 @@
2020
"CHANGELOG.md",
2121
"*NOTICE"
2222
],
23+
"author": {
24+
"name": "Amazon Web Services",
25+
"url": "https://aws.amazon.com/"
26+
},
27+
"repository": {
28+
"type": "git",
29+
"url": "https://github.com/awslabs/iot-app-kit.git",
30+
"directory": "packages/components"
31+
},
2332
"scripts": {
2433
"build": "stencil build",
2534
"copy:license": "cp ../../LICENSE LICENSE",
@@ -41,11 +50,11 @@
4150
"@awsui/collection-hooks": "^1.0.0",
4251
"@awsui/components-react": "^3.0.0",
4352
"@awsui/design-tokens": "^3.0.0",
44-
"@iot-app-kit/core": "^1.4.0",
45-
"@iot-app-kit/related-table": "^1.4.0",
46-
"@iot-app-kit/source-iotsitewise": "^1.4.0",
53+
"@iot-app-kit/core": "^1.5.0",
54+
"@iot-app-kit/related-table": "^1.5.0",
55+
"@iot-app-kit/source-iotsitewise": "^1.5.0",
4756
"@stencil/core": "^2.7.0",
48-
"@synchro-charts/core": "^4.0.1",
57+
"@synchro-charts/core": "^5.0.0",
4958
"styled-components": "^5.3.0"
5059
},
5160
"devDependencies": {

0 commit comments

Comments
 (0)