Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow users to add native web thing by URL from UI. #815

Merged
merged 1 commit into from
Mar 30, 2018

Conversation

mrstegeman
Copy link
Contributor

Fixes #69

@ghost ghost assigned mrstegeman Mar 29, 2018
@ghost ghost added the review label Mar 29, 2018
@codecov-io
Copy link

codecov-io commented Mar 29, 2018

Codecov Report

Merging #815 into master will decrease coverage by 0.63%.
The diff coverage is 41.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #815      +/-   ##
==========================================
- Coverage   77.74%   77.11%   -0.64%     
==========================================
  Files          87       87              
  Lines        3721     3762      +41     
  Branches      497      501       +4     
==========================================
+ Hits         2893     2901       +8     
- Misses        760      789      +29     
- Partials       68       72       +4
Impacted Files Coverage Δ
src/controllers/addons_controller.js 49.09% <0%> (ø) ⬆️
src/models/thing.js 93.44% <100%> (ø) ⬆️
src/models/things.js 94.64% <100%> (ø) ⬆️
src/controllers/new_things_controller.js 43.75% <26.31%> (-31.25%) ⬇️
src/controllers/things_controller.js 82.8% <37.93%> (-10.49%) ⬇️
src/addon-manager.js 62.06% <57.14%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3439605...2a8f114. Read the comment docs.

throw new Error('Setting is undefined.');
}

current.moziot.config.urls.push(description.webthingUrl);
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if the list of urls already contains the web thing's url? (user presses enter twice or just forgets)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be handled by the adapter just fine, since the adapter keeps track of "known URLs" when loading things.

Copy link
Contributor

@hobinjk hobinjk left a comment

Choose a reason for hiding this comment

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

LGTM

@mrstegeman mrstegeman merged commit 4825444 into WebThingsIO:master Mar 30, 2018
@ghost ghost removed the review label Mar 30, 2018
@mrstegeman mrstegeman deleted the add-thing-by-url branch March 30, 2018 14:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants