Giter VIP home page Giter VIP logo

iot-app-kit's Introduction

IoT Application Kit

Build Status NPM Version License Bundle Size Downloads

Overview

IoT Application Kit is a development library for building Industrial IoT web based applications.

IoT App Kit is an open-source library consisting of front-end components and utilities. With IoT App Kit, you can build front-end applications and webpages to utilize IoT data. By default, IoT App Kit helps to retrieve data from AWS IoT SiteWise and AWS IoT TwinMaker You can also install plugins to retrieve data from your own sources. There’s no charge for using IoT App Kit.

For an example of a real world use case using the IoT App Kit, visit this tutorial on how to use IoT App Kit

IoT App Kit Demo

Contributors guide to IoT App Kit

Learn how to contribute by reviewing the following documents:

License

This project is licensed under the Apache-2.0 License.

iot-app-kit's People

Contributors

boweihan avatar chandru-hm avatar chejimmy avatar corteggiano avatar dependabot[bot] avatar diehbria avatar divya-sea avatar fpauer avatar gareth-amazon avatar github-actions[bot] avatar gmuralidharreddy avatar gsechkin-aws avatar haweston avatar hwandersman avatar jacksonvogt avatar jmbuss avatar jwills-jdubs avatar kausar-hm avatar mnischay avatar mo-elmu avatar mukeshsahay avatar mumanity avatar norbertnader avatar priyanshu44 avatar sheilaxu avatar square-li avatar ssjagad avatar theevildev avatar tjuranek avatar tracy-french avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iot-app-kit's Issues

Sufficiently Large models in Scene Composer will get rendered outside the visible range of the Viewer, resulting in a confusing customer experience

Describe the bug
When you load a large size model in the Scene Viewer, the default camera logic can zoom so far out that the model itself is rendered outside the visible range of the viewer, resulting in it seeming not to have been rendered at all.

To Reproduce
Steps to reproduce the behavior:

  1. Create a scene in TwinMaker with a very large (geometrically, not necessarily complexity) model
  2. Open the Scene Viewer in Grafana or AppKit

Expected behavior
A clear and concise description of what you expected to happen.

  • Model should download and be rendered visually with the default camera position

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 2022-10-31 at 12 44 52

Additional context
Add any other context about the problem here.

Resource explorer shows expand/collapse when no children present

Describe the bug
SiteWise assets are sometmes present with an expand/collapse UX presented, with no children to be displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the amazon owned AWS account 956523055275 in SiteWise Monitor
  2. Visit the asset explorer workflow
  3. Wait for all assets to load
  4. Find the asset arangol, which demonstrates this behavior. click expand, and no children will render

Expected behavior
To not present the open/close UX when no children present

Screenshots
https://user-images.githubusercontent.com/77755322/191551255-5bdab249-2b89-4ccc-ba90-01e02a18e55b.mov

Dashboard: keyboard navigation

Make sure that the dashboard supports keyboard navigation.

Support:

  1. tab through and add components from the toolbar
  2. properties panel support

Dashboard: settings panel data stream aggregations

As a user I want to be able to select different data stream aggregations and resolutions and visualize multiple data streams of the same property across multiple aggregations and resolutions

TASK BLOCKED until completion of the Aggregate Data Milestone

Dashboard: time selection controls

Add the time selection controls to the dashboard

Mock up:
Screen Shot 2022-11-30 at 9 55 07 AM

Requirements:

  • follow cloudscape design system
  • ability to select relative time spans i.e. last 10 minutes, last day
  • ability to select absolute time spans i.e. from Tuesday to Wednesday

Probably a `WebglContext` issue

Describe the bug
When using LineChart or BarChart within a ReactJS display component, the axes and chart do not seem to be aligned.

To Reproduce
Steps to reproduce the behavior:

  1. Create an empty react app
npx create-react-app my-app --template typescript
  1. Install dependencies to reproduce issue
npm install @iot-app-kit/[email protected] @iot-app-kit/[email protected] @iot-app-kit/[email protected] @awsui/components-react @awsui/global-styles @aws-sdk/types
  1. Create a .env file in project root with following contents
REACT_APP_AWS_ACCESS_KEY_ID=<replace-with-aws-access-key-id>
REACT_APP_AWS_SECRET_ACCESS_KEY=<replace-with-aws-access-key>
REACT_APP_AWS_SESSION_TOKEN=<replace-with-aws-session-token>
  1. Create a src/fromEnv.ts as follows
import { CredentialProvider } from "@aws-sdk/types";

// REACT_APP prefix so that react-app picks them up by default
const ENV_KEY = "REACT_APP_AWS_ACCESS_KEY_ID";
const ENV_SECRET = "REACT_APP_AWS_SECRET_ACCESS_KEY";
const ENV_SESSION = "REACT_APP_AWS_SESSION_TOKEN";
const ENV_EXPIRATION = "REACT_APP_AWS_CREDENTIAL_EXPIRATION";

export const fromEnvReactApp = (): CredentialProvider => {
    return () => {
            const accessKeyId = process.env[ENV_KEY];
            const secretAccessKey = process.env[ENV_SECRET];
            const expiry = process.env[ENV_EXPIRATION];
            if (accessKeyId && secretAccessKey) {
                return Promise.resolve({
                    accessKeyId: accessKeyId,
                    secretAccessKey: secretAccessKey,
                    sessionToken: process.env[ENV_SESSION],
                    expiration: expiry ? new Date(expiry) : undefined,
                });
        };
        return Promise.reject(new Error("Unable to find environment variable credentials. Expected REACT_APP_AWS_ACCESS_KEY_ID and REACT_APP_AWS_SECRET_ACCESS_KEY to be defined"));
    }
}
  1. Use the App.tsx file contents shown below to replace the App.tsx created by create-react-app replacing Asset Ids and Asset Property Ids based on your sitewise assets.
import { AppLayout, BreadcrumbGroup, Container, Grid, Header, TopNavigation } from "@awsui/components-react";
/* --- BEGIN: AWS @iot-app-kit and related implementation*/
import { initialize } from "@iot-app-kit/source-iotsitewise";
import { fromEnvReactApp } from "./fromEnv";
import { BarChart, LineChart, StatusTimeline, ResourceExplorer, WebglContext, } from "@iot-app-kit/react-components";

import "./App.css";

const { defineCustomElements } = require("@iot-app-kit/components/loader");

const { query } = initialize({
    awsCredentials: fromEnvReactApp(),
    awsRegion: "us-east-1",
});


defineCustomElements();
/* --- END: AWS @iot-app-kit and related implementation*/

function Breadcrumbs() {
    const breadcrumbItems = [
        {
            text: 'Bottling Line',
            href: '#'
        },
        {
            text: 'Machine Dashboard',
            href: '#'
        }
    ];

    return <BreadcrumbGroup items={breadcrumbItems} expandAriaLabel="Show path" ariaLabel="Breadcrumbs"/>;
}

function PageHeader() {
    return <Header variant="h1">Machine Dashboard</Header>;
}

function SitwiseResourceExplorer() {
    const columnDefinitions = [{
        sortingField: 'name',
        id: 'name',
        header: 'Asset Name',
        cell: ({ name }: any) => name,
    }];

    return (
        <Container 
            disableContentPaddings={true}
            header={ <Header variant="h2" description="List of sitewise assets"> Sitewise Assets </Header> }
        >
            {/* --- BEGIN: `ResourceExplorer` implementation*/}
            <ResourceExplorer
                query={query.assetTree.fromRoot()}
                onSelectionChange={(event) => console.log("changes asset", event)}
                columnDefinitions={columnDefinitions}
            />
            {/* --- END: `ResourceExplorer` implementation*/}
        </Container>
    );
}

function MachineState(props: any) {
    return (
        <Container
            disableContentPaddings={true}
            header={ <Header variant="h2" description="Operational state of the machine as timeline"> Machine State </Header> }
        >
            {/* --- BEGIN: `StatusTimeline` implementation*/}
            <StatusTimeline
                viewport={{ duration: '15m' }}
                // annotations={{ 
                //     y: [
                //         { color: '#FF0000', comparisonOperator: 'EQ', value: 30.45 },
                //         { color: '#0000FF', comparisonOperator: 'EQ', value: 2.93 },
                //         { color: '#00FF00', comparisonOperator: 'EQ', value: 2.93 },
                //     ] 
                // }}
                queries={[
                    query.timeSeriesData({
                        assets: [{
                            assetId: props.assetId,
                            properties: [{
                                propertyId: props.propertyId
                            }]
                        }]
                    })
                ]}
            />
            <WebglContext/>
            {/* --- END: `StatusTimeline` implementation*/}
        </Container>
    );
}

function ProductionCount(props: any) {
    return (
        <Container disableContentPaddings={true} header={ <Header variant="h2" description="Count of total and bad output from machine"> Production Count </Header> } >
            {/* --- BEGIN: `LineChart` implementation*/}
            <BarChart
                viewport={{ duration: "15m" }}
                queries={[
                    query.timeSeriesData({
                        assets: [
                            {
                                assetId: props.assetId,
                                properties: [
                                    {
                                        propertyId: props.badPartsCountPropertyId,
                                        refId: 'bad-parts-count'
                                    },
                                    {
                                        propertyId: props.totalPartsCountPropertyId,
                                        refId: 'total-parts-count'
                                    },
                                ],
                            },
                        ],
                    }),
                ]}
                styleSettings={{
                    'bad-parts-count': { color: '#d13212', name: 'Bad Count' },
                    'total-parts-count': { color: '#1d8102', name: 'Total Count' }
                }}
            />
            <WebglContext />
            {/* --- END: `LineChart` implementation*/}
        </Container>
    );
}

function Content() {
    // Replace the asset ids and asset property ids before you run the application
    const WASHING_MACHINE_ASSET_ID = '<replace-with-sitwise-asset-id>';
    const BAD_PARTS_COUNT_PROPERTY = '<replace-with-corresponding-sitwise-asset-property-id>';
    const TOTAL_PARTS_COUNT_PROPERTY = '<replace-with-corresponding-sitwise-asset-property-id>';
    const MACHINE_STATE_PROPERTY = '<replace-with-corresponding-sitwise-asset-property-id>';

    return (
        <Grid gridDefinition={[
            { colspan: { l: 2, m: 2, default: 12 } },
            { colspan: { l: 5, m: 5, default: 12 } },
            { colspan: { l: 5, m: 5, default: 12 } }
        ]}>
            <SitwiseResourceExplorer/>
            <MachineState 
                assetId={WASHING_MACHINE_ASSET_ID} 
                propertyId={MACHINE_STATE_PROPERTY}
            />
            <ProductionCount 
                assetId={WASHING_MACHINE_ASSET_ID} 
                badPartsCountPropertyId={BAD_PARTS_COUNT_PROPERTY} 
                totalPartsCountPropertyId={TOTAL_PARTS_COUNT_PROPERTY}
            />
        </Grid>
    );
}

function App() {
    return (
        <>
            <TopNavigation 
                identity={{
                    href: "#",
                    title: "AWS IoT Application Kit Demo",
                }}
                i18nStrings={{ overflowMenuTitleText: "More", overflowMenuTriggerText: "More" }}
            />
            <AppLayout
                breadcrumbs={<Breadcrumbs/>}
                contentHeader={<PageHeader/>}
                content={<Content/>}
                navigationHide={true}
                toolsHide={true}
            />
        </>   
    );
}

export default App;
  1. Run the app
npm start
  1. See error

Expected behavior

  • The charts and axes should align
  • The charts should not stretch beyond the boundary if of <Container>
  • The <AppLayout> should occupy 100% of viewport height and width

Screenshots
If applicable, add screenshots to help explain your problem.
WebglContext

Desktop (please complete the following information):

  • OS: MacOs
  • Browser Chrome Version 98.0.4758.109 (Official Build) (x86_64)
  • Version 98.0.4758.109 (Official Build) (x86_64)

Additional context
Add any other context about the problem here.

Dashboard: Widget settings panel

Create and add the panel to the dashboard which allows for the editing of widgets on the dashboard

Mockup:

Screen Shot 2022-11-30 at 10 02 45 AM

Requirements:

  • when i select a single widget, i should see settings which are relevant to the selected widget
  • When I select multiple widgets, I should see messaging which explains that widgets must be edited one at a time
  • The widget settings pane should be resizable

Support ability to pre-filter asset ids before initial render in `ResourceExplorer`

Is your feature request related to a problem? Please describe.
Resource explorer should support props for filtering a list of sitewise asset ids without relying on any relation to sitewise hierarchy trees. Consider the situation where a customer is building a dashboard for selected sitewise assets only from a large list of many assets they have in sitewise. Since, the customer would like to focus on limited assets for the custom dashboard, they don't want to display all sitewise assets by default when they use:

...
<ResourceExplorer
    query={query.assetTree.fromRoot()}
    columnDefinitions={columnDefinitions}
/>
...

Describe the solution you'd like

  • If this is currently possible, documentation should be improved demonstrating how to pre-filter matching asset ids on initial render.
  • If this is currently not possible, then a prop should be provided in ResourceExplorer component to pre-filter matching asset ids and display only matching assets on initial render.

Describe alternatives you've considered
There are no documented alternatives as of now. All sitewise assets are displayed by default when using query.assetTree.fromRoot().

Additional context
Add any other context or screenshots about the feature request here.

viewport skitter bug

Describe the bug
Widget viewport resets to live mode on first load, even after it is already interactive and gestures have been applied.

To Reproduce
Steps to reproduce the behavior:

Create a web page with an app kit component configured.

  1. Refresh page
  2. IMMEDIATELY pan to the left
  3. IMMEDIATELY pan to the left again
  4. Wait from a small moment
  5. Viewport hops back into live mode, incorrectly

Expected behavior
Once a component is interactive, any panning should remain intact.

Screenshots
bug-jumpy mp4

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Chrome

Support for ES6 import declaration of `@iot-app-kit/components/loader`

Is your feature request related to a problem? Please describe.
Currently a ReactJS app built with @iot-app-kit doesn't work when using ES6 style imports of @iot-app-kit/components/loader

...
import { defineCustomElements } from "@iot-app-kit/components/loader";
...

Because of the above missing feature we have to rely on ES5 style imports

...
const { defineCustomElements } = require("@iot-app-kit/components/loader");
...

Describe the solution you'd like
We would like ES6 style imports for @iot-app-kit/components/loader to be supported i.e.,

import { defineCustomElements } from "@iot-app-kit/components/loader";

should be natively supported.

Describe alternatives you've considered
The only other available alternative is ES5 style imports as mentioned above.

Additional context
Add any other context or screenshots about the feature request here.

Dashboard: view mode

Add a component which presents a view only mode of the dashboard

Requirements

  • Exposed as separate component
  • From the edit mode, some ability to toggle back and forth to the view mode temporarily

Data incorrectly pushed to series-connector

Describe the bug
Data is being pushed upon every Live tick to iot-time-series-connector when in Live mode. The prevDataCache for hasRequestedInformationChanged() is sometimes undefined, which causes hasRequestedInformationChanged to always return true.

To Reproduce
Steps to reproduce the behavior:

  1. Have a working testing-ground with working assetIds
  2. Produce a time series chart with duration '1m' (preferably line chart so that the data is aggregated compared to scatter)
  3. Have some console logs in hasRequestedInformationChanged that details prevDataStreamStore
  4. Run the App Kit locally and inspect the page
  5. See that prevDataStreamStore is occasionally undefined in console

Expected behavior
Only new incoming data should be pushed to iot-time-series-connector in Live mode. hasRequestedInformationChanged should only return true if there's new incoming data that needs to be rendered, and prevDataCache should only be undefined upon initialization of DataCache.

Screenshots
example of prevDataStreamStore being undefined while currDataStreamStore is defined after letting App Kit run locally for a while.
Screen Shot 2022-07-08 at 3 59 35 PM
Screen Shot 2022-07-08 at 4 00 38 PM

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Browser Firefox
  • Version 91.10.0esr

Additional context
The frequency of prevDataCache being undefined depends on the duration of the viewport. The smaller the duration (e.g. 1 minute), the more often prevDataCache is undefined (about every other tick).

Dashboard Context Menu

Overview

Create a context menu for quick actions in the dashboard.

Mockup / design

Requirements

  1. Context menu appears on right click (web) long press (mobile)
  2. Context menu closes on action press / click away / escape press
  3. Context menu can perform these actions:
  • copy
  • paste (pastes the items at the location of the right click)
  • delete
  • bring to front
  • send to back

@iot-app-kit/components live mode is broken

Describe the bug
The data is being requested but the viewport stops scrolling after a few minutes.

To Reproduce
Steps to reproduce the behavior:

  1. Change the duration in testing ground to 10 minutes
    https://github.com/awslabs/iot-app-kit/blob/main/packages/components/src/testing/testing-ground/testing-ground.tsx#L61
    https://github.com/awslabs/iot-app-kit/blob/main/packages/components/src/testing/testing-ground/testing-ground.tsx#L75
  2. Update the asset and property ids for the queries, e.g. use SiteWise Demo Assets for a steady stream of data
  3. Start the server yarn start
  4. The viewport will freeze after a few minutes

Expected behavior
The viewport scrolls to current time

Desktop (please complete the following information):

  • OS: macOS Catalina
  • Browser: chrome
  • Version: 101.0.4951.64

Dashboard: Component pallete

Create the component pallete for the dashboard.

Mock up
Note: this is a rough mock up, and the end result is not expected to look like this.
Screen Shot 2022-11-30 at 9 40 52 AM

Requirements

  • Allow creating the following widgets on the dashboard
    • text
    • line/scatter/bar chart
    • kpi
    • status grid
    • status timeline
    • table

core: v1 update dataStream definition to support aggregations and multiple resolutions

✅ reach decision on dataStream change by jan.9 2023

one to one relationship between a line on a widget and a dataStream
so one widget will have multiple dataStreams representing different aggregations and/or raw data

DataStream {
  id: DataStreamId;
  name: string;             
  detailedName?: string;
  color?: string;       
  unit?: string;       
  data: DataPoint<T>[];
  meta?: Record<string, string | number | boolean>;
  resolution: number | undefined;*
  dataType: DataType;
  aggregationType: AggregationType | undefined;
  streamType?: StreamType;
  associatedStreams?: StreamAssociation[];
  isLoading?: boolean;
  isRefreshing?: boolean;
  error?: string;
}

Default refresh rate is ~1s instead of 5s

Describe the bug
Widgets (i.e line chart) are fetching data on a 1s interval by default, rather than 5s.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a Line Chart to pull data from SiteWise
  2. Observe the network tab

Expected behavior
Default refresh rate should be 5s.

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Chrome

Additional context
This may be caused by an interaction between synchro-charts live mode and app kit event handling.

Expand all feature broken in @iot-app-kit/related-table

Describe the bug
When a row is already expanded and expanded prop is set to true the icons turns to '+'

To Reproduce
Steps to reproduce the behavior:

  1. Expand a row with at least 2 hierarchy levels
  2. Switch the expanded prop to true
  3. The already expanded row '-' turn to '+', the row remains expanded though which is expected

Expected behavior
The row should remain as '-'

Screenshots

Screen.Recording.2022-11-03.at.5.13.16.PM.mov

Refactor related-table tests to use create root

Is your feature request related to a problem? Please describe.
ReactDOM.render is no longer supported in react 18, but is utilized in the related table tests.

This causes the following warning

 Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

Describe the solution you'd like
Follow guide https://reactjs.org/link/switch-to-createroot

Type checking error on `comparisonOperator` in annotations

Describe the bug
Can't build ReactJS Typescript project because of the following type checking error

Code

{/* --- BEGIN: `StatusTimeline` implementation*/}
<StatusTimeline
    viewport={{ duration: '15m' }}
    annotations={{ 
        y: [
            { color: '#FF0000', comparisonOperator: 'EQ', value: 30.45 },
            { color: '#0000FF', comparisonOperator: 'EQ', value: 2.93 },
            { color: '#00FF00', comparisonOperator: 'EQ', value: 2.93 },
        ] 
    }}
    queries={[
        query.timeSeriesData({
            assets: [{
                assetId: props.assetId,
                properties: [{
                    propertyId: props.propertyId
                }]
            }]
        })
    ]}
/>
<WebglContext/>
{/* --- END: `StatusTimeline` implementation*/}

Error
image

To Reproduce
Steps to reproduce the behavior:

  1. Try implementing annotations in StatusTimeline component in ReactJS Typescript project
  2. See error

image

Expected behavior
Type check should be successful

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 98.0.4758.109 (Official Build) (x86_64)

Additional context
Add any other context about the problem here.

Dashboard: text-widget

Add support for a text widget in the dashboard.

Requirements:

  • Basic support for font-size
  • Should support the ability to represent a link
  • Should be editable directly on the dashboard

Dashboard: Initial resource explorer

Create the side pane which allows exploring resources (such as SiteWise assets/properties) for utilization in the dashboard (such as adding properties to dashboard widgets)

Mock up:
Screen Shot 2022-11-30 at 9 43 05 AM

Followup requirements:

  • Support SiteWise assets and properties
  • Ability to drag and drop properties (eventually will need to be able to drag and drop assets as well however)
  • Basic search/filter functionality

iot-resource-explorer jest test failures locally

Describe the bug
iot-resource-explorer jest tests failure, but only locally

@iot-app-kit/components: FAIL src/components/iot-resource-explorer/iot-resource-explorer.spec.ts
@iot-app-kit/components:   ● Test suite failed to run
@iot-app-kit/components:     Call retries were exceeded
@iot-app-kit/components:       at ChildProcessWorker.initialize (../../node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)

To Reproduce
Steps to reproduce the behavior:

  1. run yarn run test from the workspace root

Expected behavior
All tests pass locally

Desktop (please complete the following information):

  • OS: macOS
  • node version: 16.17.0

Developer experience: support common build systems

Problem: IoT App Kit's use is limited by how the code is bundled preventing it from being used in some major build systems, such as vite.

Goal: Identify which build systems are critical to support, and make the changes necessary to support those build systems

Pagination size in `IotResourceExplorer` or `ResourceExplorer` should be configurable

Is your feature request related to a problem? Please describe.
I want to display my sitewise assets in pages of size 10 as I have multiple production lines each containing 10 numbered assets. Displaying 20 assets by default leads to confusion among operators.

Describe the solution you'd like
I wish that an optional prop be introduced for IotResourceExplorer or ResourceExplorer with which I can define the page size when I pass paginationEnabled={true}. This is currently blocked by a hardcoded pageSize shown below from

if (this.paginationEnabled) {
    collectionOptions.pagination = { pageSize: 20 };
  }

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

I do not see any viable alternatives as of now.

Additional context
Add any other context or screenshots about the feature request here.

SiteWise datasource: Improved boolean / string support

Support for boolean and string data types in the SiteWise data source.

Requirements

  • gracefully handle invalid scenarios, such as attempting to request aggregated boolean data
  • ability to query boolean and string data through the SiteWise data source

Dashboard: dynamic widget

Overview

Enable dashboard to display iot-appkit components

Mockup / design

Requirements

The dashboard should render an iot-appkit component based on the dashboard configuration.

@iot-app-kit/source-iotsitewise tries to aggregate string data using AVERAGE

Describe the bug
When requesting aggregated data and panning an error is thrown to the console and datapoints are missing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to testing ground and add a line chart with a query for a string property
            <iot-line-chart
              widgetId="line-chart"
              viewport={{ duration: '10m' }}
              queries={[
                this.query.timeSeriesData({
                  assets: [
                    {
                      assetId: DEMO_ASSET,
                      properties: [
                        {
                          propertyId: DEMO_STRING_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET2,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET3,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET4,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                  ],
                }),
              ]}
            />
  1. Zoom in on the line chart
  2. Errors are thrown as shown in the recording and screenshots

Expected behavior
String data is should not be aggregated and always be raw.

Screenshots

Screen.Recording.2022-09-29.at.12.37.20.PM.mov

Screen Shot 2022-09-29 at 12 38 00 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.