Removed node-wot but kept centralised TD store
I had intended to store a ConsumedThing for each Thing, in a module in the store. Until that is possible (will require some more attention to dependency management) I will just store the TDs instead. This commit includes a lot of the code I wrote for node-wot use, but without any dependence on node-wot.
This commit is contained in:
parent
45d2884159
commit
595101248e
6 changed files with 265 additions and 16 deletions
|
|
@ -305,22 +305,22 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
checkConnection: function() {
|
||||
async checkConnection() {
|
||||
var baseUri = this.$store.getters.baseUri;
|
||||
this.$store.commit("changeWaiting", true);
|
||||
axios
|
||||
// TODO: more robust check - e.g. use a microscope Thing
|
||||
.get(`${baseUri}/stage/`)
|
||||
.then(() => {
|
||||
this.$store.commit("setConnected");
|
||||
this.$store.commit("setErrorMessage", null);
|
||||
})
|
||||
.catch(error => {
|
||||
this.$store.commit("setErrorMessage", error);
|
||||
})
|
||||
.finally(() => {
|
||||
this.$store.commit("changeWaiting", false);
|
||||
});
|
||||
// TODO: more robust check - e.g. use a microscope Thing
|
||||
// TODO: should we purge existing consumedThings?
|
||||
try {
|
||||
await axios.get(`${baseUri}/things/`);
|
||||
await this.getThingDescription("stage");
|
||||
await this.getThingDescription("camera");
|
||||
this.$store.commit("setConnected");
|
||||
this.$store.commit("setErrorMessage", null);
|
||||
} catch (error) {
|
||||
this.$store.commit("setErrorMessage", error);
|
||||
} finally {
|
||||
this.$store.commit("changeWaiting", false);
|
||||
}
|
||||
},
|
||||
|
||||
handleExit: function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue