Giter Club home page Giter Club logo

nordicsemiconductor / asset-tracker-cloud-app-js Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 104.04 MB

The nRF Asset Tracker Web Application is a reference single-page application (SPA) developed using create-react-app in TypeScript.

Home Page: https://github.com/NordicSemiconductor/asset-tracker-cloud-app-js#readme

License: BSD 3-Clause "New" or "Revised" License

JavaScript 0.11% HTML 1.18% TypeScript 98.71%
webapp nrf-asset-tracker iot web-app

asset-tracker-cloud-app-js's People

Contributors

coderbyheart avatar dependabot[bot] avatar greenkeeper[bot] avatar lenakh97 avatar mlopezj avatar msftgits avatar renovate-bot avatar renovate[bot] avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

asset-tracker-cloud-app-js's Issues

Refactor the web application

The current implementation has a number of problems

  • first and foremost the overwhelming use of property drilling -> refactor to use custom hooks (see an example of this method use here)
  • hardcoded UI design (this can be changed once hooks are used)
  • uses outdated UI framework, #277
  • has code for both supported cloud platforms, which is not relevant for users, and should be separated
  • does only support one use case (pet tracker), but should in the future provide a UI / instructions for different nRF9160 application use cases
  • very little to no tests, and it keeps breaking when libraries are merged that compile (TypeScript API did not change), but have bugs

Solves

New version:

Handle token expiry

Currently the user has to reload the page.
Expiry of tokens should be handled more gracefully.

Cat view crashes if devices sends invalid GPS data

This shadow will crash the cat view:

{
  "reported": {
    "cfg": {
      "act": true,
      "gpst": 300,
      "actwt": 600,
      "mvres": 60,
      "mvt": 3600,
      "acct": 10
    },
    "gps": {
      "v": "$GPGGA,154821.59,6325.99925,N,01026.23650,E,1,04,2.06,80.51,M,0,,*13\r\n",
      "ts": 1623426501142
    },
    "bat": {
      "v": 5187,
      "ts": 1623426498299
    },
    "roam": {
      "v": {
        "rsrp": 49
      },
      "ts": 1623426498180
    }
  }
}

Related:

Add ability to control time range for charts and map

It should be possible for the user to select the time range of the charts and the map so they are comparable.
Right now every chart has it's own time range depending on the amount of messages, because most queries use LIMIT 100.

image

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Fallback to renovate.json file as a preset is deprecated, please use a default.json file instead.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @babel/plugin-proposal-optional-chaining Unavailable
npm @types/react-leaflet Unavailable
npm @types/twemoji Unavailable
npm msal Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/twemoji to v13.1.2
  • chore(deps): update dependency eslint-plugin-import to v2.29.1
  • chore(deps): update dependency husky to v9.0.11
  • fix(deps): update dependency @amcharts/amcharts4 to v4.10.39
  • fix(deps): update dependency @nordicsemiconductor/timestream-helpers to v6.0.2
  • fix(deps): update dependency azure-iothub to v1.16.5
  • fix(deps): update dependency fp-ts to v2.16.8
  • fix(deps): update dependency io-ts to v2.2.21
  • chore(deps): update dependency @commitlint/config-conventional to v18.6.3
  • chore(deps): update dependency @types/lodash to v4.17.6
  • chore(deps): update dependency @types/node to v20.14.10
  • chore(deps): update dependency eslint-plugin-jsx-a11y to v6.9.0
  • chore(deps): update dependency eslint-plugin-react to v7.34.3
  • chore(deps): update react monorepo (@types/react, @types/react-dom, eslint-plugin-react-hooks)
  • chore(deps): update dependency @commitlint/config-conventional to v19
  • fix(deps): update dependency @microsoft/signalr to v8
  • fix(deps): update dependency @nordicsemiconductor/rsrp-bar to v8
  • fix(deps): update dependency date-fns to v3
  • fix(deps): update dependency e118-iin-list to v4
  • fix(deps): update dependency styled-components to v6
  • fix(deps): update dependency use-debounce to v10
  • fix(deps): update dependency uuid to v10 (uuid, @types/uuid)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/sync-issue-labels.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/test-and-release.yaml
  • actions/checkout v4
  • actions/setup-node v4
  • ubuntu 22.04
.github/workflows/update-repo-info.yaml
  • actions/checkout v4
  • ubuntu 22.04
html
public/index.html
  • intro.js 6.0.0@sha512-ZltC0pC5nP28uLJ2SBRo8EmFHA+giWPQC6nM4xzwW4hXsTaIsfSMn0qTtotOP8NNWlAohVlJtDfLRKXxA7mJ4A==
npm
package.json
  • @amcharts/amcharts4 4.10.38
  • @microsoft/signalr 7.0.14
  • @nordicsemiconductor/cell-geolocation-helpers 6.0.0
  • @nordicsemiconductor/rsrp-bar 6.0.0
  • @nordicsemiconductor/timestream-helpers 6.0.1
  • @react-leaflet/core 1.0.2
  • azure-iothub 1.16.4
  • date-fns 2.30.0
  • deepmerge 4.3.1
  • e118-iin-list 3.1.0
  • fast-deep-equal 3.1.3
  • fp-ts 2.16.1
  • history 5.3.0
  • intro.js 6.0.0
  • io-ts 2.2.20
  • io-ts-types 0.5.19
  • leaflet 1.9.4
  • lodash 4.17.21
  • mcc-mnc-list 1.1.11
  • memoize-one 6.0.0
  • msal 1.4.18
  • react 17.0.2
  • react-dom 17.0.2
  • react-leaflet 3.1.0
  • react-router-dom 5.3.4
  • reactstrap 8.10.1
  • styled-components 5.3.11
  • twemoji 14.0.2
  • use-debounce 9.0.4
  • uuid 9.0.1
  • @babel/plugin-proposal-optional-chaining 7.21.0
  • @commitlint/config-conventional 18.4.3
  • @nordicsemiconductor/asset-tracker-cloud-code-style 11.0.186
  • @types/intro.js 5.1.5
  • @types/lodash 4.14.202
  • @types/node 20.10.1
  • @types/react 18.2.39
  • @types/react-dom 18.2.17
  • @types/react-leaflet 2.8.3
  • @types/react-router-dom 5.3.3
  • @types/semver 7.5.8
  • @types/styled-components 5.1.34
  • @types/twemoji 13.1.1
  • @types/uuid 9.0.8
  • eslint-config-react-app 7.0.1
  • eslint-plugin-import 2.29.0
  • eslint-plugin-jsx-a11y 6.8.0
  • eslint-plugin-react 7.33.2
  • eslint-plugin-react-hooks 4.6.0
  • husky 9.0.7
  • react-scripts 4.0.3
  • node >=20
  • npm >=10

  • Check this box to trigger a request for Renovate to run again on this repository

Falsely displayed GPS location without GPS object in reported state.

Shadow state:

{
  "desired": {
    "cfg": {
      "gpst": 60,
      "mvres": 120,
      "mvt": 3600,
      "acct": 7.5,
      "actwt": 120
    }
  },
  "reported": {
    "bat": {
      "v": 5121,
      "ts": 1613651588962
    },
    "dev": {
      "v": {
        "band": 20,
        "nw": "LTE-M",
        "iccid": "89450421180216216095",
        "modV": "mfw_nrf9160_1.2.3",
        "brdV": "nrf9160dk_nrf9160",
        "appV": "0.0.0-development"
      },
      "ts": 1613650488083
    },
    "roam": {
      "v": {
        "rsrp": 66,
        "area": 2305,
        "mccmnc": 24202,
        "cell": 26902,
        "ip": "10.81.168.74"
      },
      "ts": 1613651588939
    },
    "cfg": {
      "act": true,
      "gpst": 60,
      "actwt": 120,
      "mvres": 120,
      "mvt": 3600,
      "acct": 7.5
    }
  }
}

In the web UI the location is located outside the coast of Africa. long: 0, lat: 0, alt: 0.

Error with SignalR: Connection count reaches limit

image

App tries to establish connect, but

fetch("https://assettrackerprodsignalr.service.signalr.net/client/negotiate?hub=deviceupdates&negotiateVersion=1", {
  "headers": {
    "accept": "*/*",
    "accept-language": "en-US,en;q=0.9,nb;q=0.8,de;q=0.7",
    "authorization": "Bearer eyJxxx0XA",
    "cache-control": "max-age=0",
    "content-type": "text/plain;charset=UTF-8",
    "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
    "sec-ch-ua-mobile": "?0",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "x-requested-with": "XMLHttpRequest",
    "x-signalr-user-agent": "Microsoft SignalR/5.0 (5.0.6; Unknown OS; Browser; Unknown Runtime Version)"
  },
  "referrer": "https://assettrackerprodapp.z16.web.core.windows.net/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "",
  "method": "POST",
  "mode": "cors"
});

returns

Connection count reaches limit.

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.