Add a package for the dashboard. and remove hardcoded IP address.

This commit is contained in:
jbnadal
2017-06-08 13:55:09 +02:00
parent acd61f82ba
commit 443f1d0269
4 changed files with 33 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ export default {
methods: {
/* Get Lights */
getLights () {
this.$http.get('http://192.168.1.6:8081/v1/capabilities/lights')
this.$http.get('/v1/capabilities/lights')
.then(function (response) {
this.$set('lights', response.data.Lights)
console.log('Success!:', response.data)
@@ -45,7 +45,7 @@ export default {
console.log(data)
msg = '{"id": ' + data.id + ', "state": ' + data.state + '}'
console.log(msg)
this.$http.post('http://192.168.1.6:8081/v1/capabilities/lights', msg)
this.$http.post('/v1/capabilities/lights', msg)
.then(function (response) {
console.log('Success!:', response.data)
}, function (err) {

View File

@@ -32,7 +32,7 @@ export default {
methods: {
/* Get Sprinklers */
getSprinklers () {
this.$http.get('http://192.168.1.6:8081/v1/capabilities/sprinklers')
this.$http.get('/v1/capabilities/sprinklers')
.then(function (response) {
this.$set('sprinklers', response.data.Sprinklers)
console.log('Success!:', response.data)
@@ -46,7 +46,7 @@ export default {
console.log(data)
msg = '{"id": ' + data.id + ', "state": ' + data.state + '}'
console.log(msg)
this.$http.post('http://192.168.1.6:8081/v1/capabilities/sprinklers', msg)
this.$http.post('/v1/capabilities/sprinklers', msg)
.then(function (response) {
console.log('Success!:', response.data)
}, function (err) {