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

fix: requestBuffer #49

Merged
merged 12 commits into from
Feb 11, 2022
Merged
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ describe('handles gestures', () => {

cy.wait(SECOND_IN_MS * 2);

cy.matchImageSnapshot('zooms in', snapshotOptions);
cy.get(testChartContainerClassNameSelector).dblclick();

cy.wait(SECOND_IN_MS * 2);

cy.matchImageSnapshot('zooms in', snapshotOptions);

cy.get(testChartContainerClassNameSelector).dblclick({ shiftKey: true });

cy.wait(SECOND_IN_MS * 2);
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/testing/renderChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const defaultSettings = {
resolution: {
[3 * MINUTE_IN_MS]: '1m',
},
fetchAggregatedData: true,
};

const start = new Date(2022, 0, 0, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const AGGREGATED_DATA_QUERY = {
{
assetId: AGGREGATED_DATA_ASSET,
properties: [
{ propertyId: AGGREGATED_DATA_PROPERTY },
{ propertyId: AGGREGATED_DATA_PROPERTY_2, resolution: '1m' },
{ propertyId: AGGREGATED_DATA_PROPERTY, resolution: '0' },
{ propertyId: AGGREGATED_DATA_PROPERTY_2 },
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,74 +53,6 @@ export class TestingGround {
render() {
return (
<div>
<div style={{ width: '600px' }}>
<br />
<br />
<br />
<iot-kpi
appKitSession={this.appKitSession}
queries={[
{
source: 'site-wise',
assets: [
{
assetId: DEMO_TURBINE_ASSET_1,
properties: [
{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_1 },
{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_2 },
{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_3 },
{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_4 },
],
},
],
},
]}
viewport={VIEWPORT}
/>
<div style={{ width: '400px', height: '500px' }}>
<iot-line-chart
appKitSession={this.appKitSession}
queries={[
{
source: 'site-wise',
assets: [
{
assetId: DEMO_TURBINE_ASSET_1,
properties: [{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_3 }],
},
],
},
{
source: 'site-wise',
assets: [
{
assetId: DEMO_TURBINE_ASSET_1,
properties: [{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_1 }],
},
],
},
]}
viewport={{ duration: '5m', group: 'in-sync' }}
/>
</div>
<div style={{ width: '400px', height: '500px' }}>
<iot-line-chart
appKitSession={this.appKitSession}
queries={[
{
source: 'site-wise',
assets: [
{
assetId: DEMO_TURBINE_ASSET_1,
properties: [{ propertyId: DEMO_TURBINE_ASSET_1_PROPERTY_2 }],
},
],
},
]}
viewport={{ duration: '5m', group: 'in-sync' }}
/>
</div>
</div>
resolution:{' '}
<select onChange={this.changeResolution}>
<option value={'0'}>raw</option>
Expand All @@ -143,11 +75,9 @@ export class TestingGround {
appKitSession={this.appKitSession}
queries={[AGGREGATED_DATA_QUERY]}
viewport={this.viewport}
settings={{ resolution: this.resolution }}
settings={{ resolution: this.resolution, requestBuffer: 1 }}
/>
</div>
<iot-asset-details query={ASSET_DETAILS_QUERY} />
<iot-asset-tree-demo query={{ rootAssetId: undefined }} />
<sc-webgl-context />
</div>
);
Expand Down
Loading