Add a package for the dashboard. and remove hardcoded IP address.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user