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

Replace stubs in device views #373

Conversation

kschiffer
Copy link
Member

@kschiffer kschiffer commented Mar 27, 2019

Summary:
This PR replaces the stubs currently in place for displaying device info. There are some small marginally related fixes as well.

image

Changes:

  • Replace the stubs in the api tree for devices with the real SDK methods
  • Update store logic accordingly
  • Allow undefined values in data-sheet (shown as n/a)
  • Compose data sheet data of devices based on data available
  • Use <DateTime /> component for displaying date/time values
  • While at it, add selector values to application get commands (see Add selectors to sdk service get functions, update console calls #367)

Notes for Reviewers:

  • This PR merges into feature/webui-single-device-page, which was already reviewed via Single Device Overview Page (stubbed) #97
  • After this PR is merged we can PR feature/webui-single-device-page to merge into master
  • This is to avoid too big and unscoped PRs

@kschiffer kschiffer added the c/console This is related to the Console label Mar 27, 2019
@kschiffer kschiffer added this to the March 2019 milestone Mar 27, 2019
@kschiffer kschiffer self-assigned this Mar 27, 2019
@kschiffer kschiffer requested a review from bafonins March 27, 2019 13:38
@kschiffer kschiffer changed the title Feature/236 webui device stub replacement Replace stubs in device views Mar 27, 2019
}

// Add root keys, if available
if (Object.keys(root_keys) > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (Object.keys(root_keys) > 0) {
if (Object.keys(root_keys).length > 0) {

list: stubs.devices.list,
search: stubs.devices.search,
get: stubs.device.get,
list: ttnClient.Applications.Devices.getAll.bind(ttnClient.Applications.Devices),
Copy link
Contributor

Choose a reason for hiding this comment

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

gives Uncaught TypeError

Copy link
Member Author

Choose a reason for hiding this comment

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

Please try building the sdk again and then do
make js.build-dll -B; make js.serve

Copy link
Contributor

Choose a reason for hiding this comment

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

issue persists

@kschiffer kschiffer force-pushed the feature/236-webui-device-stub-replacement branch from 3234732 to d0f48c5 Compare March 28, 2019 08:09
@kschiffer kschiffer merged this pull request into feature/webui-single-device-page Mar 28, 2019
@kschiffer kschiffer deleted the feature/236-webui-device-stub-replacement branch March 28, 2019 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console This is related to the Console
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants