Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batching for historical property data requests #102

Merged
merged 1 commit into from
May 17, 2022

Conversation

boweihan
Copy link
Contributor

@boweihan boweihan commented May 13, 2022

Overview

Batch requests by frame for historical property data

Screen Shot 2022-05-16 at 3 37 28 PM

Implementation notes:

  • batches are sliced by maxResults, mirroring the API behaviour.
  • success and error handling should remain the same everywhere except in the client layer.
  • batch timeframe is not finalized, but currently per browser frame.

Legal

This project is available under the Apache 2.0 License.

@boweihan boweihan changed the base branch from batch-api to feature-batch May 16, 2022 19:06
@boweihan boweihan changed the title [draft] support batching for historical property data batching for historical property data requests May 16, 2022
@@ -64,7 +64,8 @@
"cypress-wait-until": "^1.7.2",
"jest": "26.3.0",
"jest-cli": "^26.5.1",
"vue": "^3.2.26"
"vue": "^3.2.26",
"uuid": "^3.3.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a build issue.

@boweihan boweihan requested review from diehbria and NorbertNader May 16, 2022 19:48
@boweihan boweihan requested a review from mpopv May 16, 2022 20:09
@boweihan boweihan force-pushed the batch-history branch 2 times, most recently from eb202e8 to 248081c Compare May 16, 2022 21:36
@@ -13,6 +16,15 @@ describe('kpi', () => {
const assetModelId = 'some-asset-model-id';

before(() => {
cy.intercept('/properties/batch/history', (req) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These requests were already being made but the errors ignored

onError: ({ errorMessage: msg = 'batch error', errorCode: status }) => {
onError({
id,
resolution: 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it correct to always report the raw data as what's failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this mirrors the existing behaviour - https://github.com/awslabs/iot-app-kit/blob/main/packages/source-iotsitewise/src/time-series-data/client/getHistoricalPropertyDataPoints.ts#L78.

this particular path only handles raw data, there will be a similar method for handling aggregated data coming in a future PR

@boweihan boweihan merged commit 4a87a62 into awslabs:feature-batch May 17, 2022
boweihan added a commit to boweihan/iot-app-kit-1 that referenced this pull request May 20, 2022
boweihan added a commit that referenced this pull request May 20, 2022
@awslabs awslabs deleted a comment from diehbria May 24, 2022
sheilaXu pushed a commit that referenced this pull request Sep 23, 2022
See all commit messages below

 Fixes the nested camera view locations for activeCameraSettings (#102)

* Fixes the nested camera view locations for activeCameraSettings

The problem is that the node.transform is not in world coordinates.
To accurately represent this we create the transform from the actualy object3D world position, rotation, and scale

* Clean up based on feedback

* Rebase needed

Fix target calculation for Camera settings (#104)

Have the Camera Preview pull from the selected node rather than using active camera settings (#101)

Adjusting the active Camera settings also affected the main camera's settings and was a bug.
Utilizing the camera component on the selected node allowed for the same render without the issue as the active Camera settings aren't necessarily set to active by editing anyway

Update the camera component inspector editor to match the UX (#99)

Visual restructuring
Bug fixes
Code clean up

Adds a CameraPreview component (#97)

This performs a LateRender to a smaller viewport designated by the tracked div element
When a camera is selected the div and the render of the camera's view will appear when in edit mode

Adds the activeCamera property (#66)

Based on this property we set the active camera unless we have a selected data binding as that should take precedence

Make TopBar always visible and Add Camera list (#64)

Clicking a camera name in the list will set that camera as the active camera in either editing or viewing
Add an incremental count to the Camera object to give unique names since creation

Revert "Add activeCamera Property to Scene Viewer (#56)" (#61)

This reverts commit 98bce138a4bf572b6f25562c458ace8d7ac3f560.

Add activeCamera Property to Scene Viewer (#56)

State setup seems to appear incorrectly in storybook such that the Camera View
is not utlizing the activeCamera unless the store has already been created.
This is something that will need to be looked into further.

Add Set from current view, button to inspector (#52)

Also refactors how we set the object from the current view
Fixes the bug where we only support one parent for rotational transform

Add basic Inspector Editor for the Camera Component (#49)

Change Camera creation mode to View Camera (From current) as in design (#46)

Update the CameraComponent to be creatable and selectable (#45)

This introduces the ability to set a globally stored active camera which can alter the settings and viewing location of the main camera. These are less cameras themselves than editor and data representations
TheEvilDev pushed a commit that referenced this pull request Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants