|
32 | 32 | $timeout($rootScope.$emit('openhab-update'));
|
33 | 33 | }
|
34 | 34 |
|
35 |
| - $http.get('/rest/items') |
| 35 | + $http.get('../rest/items') |
36 | 36 | .then(function (data) {
|
37 | 37 | if (angular.isArray(data.data)) {
|
38 | 38 | console.log("Loaded " + data.data.length + " openHAB items");
|
|
71 | 71 | function sendCmd(item, cmd) {
|
72 | 72 | $http({
|
73 | 73 | method : 'POST',
|
74 |
| - url : '/rest/items/' + item, |
| 74 | + url : '../rest/items/' + item, |
75 | 75 | data : cmd,
|
76 | 76 | headers: { 'Content-Type': 'text/plain' }
|
77 | 77 | }).then(function (data) {
|
|
92 | 92 | if (locale) {
|
93 | 93 | deferred.resolve(locale);
|
94 | 94 | } else {
|
95 |
| - $http.get('/rest/') |
| 95 | + $http.get('../rest/') |
96 | 96 | .then(function (response) {
|
97 | 97 | if (!response.data.locale) {
|
98 | 98 | if (navigator && navigator.languages) {
|
|
145 | 145 | function sendVoice(text) {
|
146 | 146 | $http({
|
147 | 147 | method : 'POST',
|
148 |
| - url : '/rest/voice/interpreters', |
| 148 | + url : '../rest/voice/interpreters', |
149 | 149 | data : text,
|
150 | 150 | headers: { 'Content-Type': 'text/plain' }
|
151 | 151 | }).then(function (data) {
|
|
161 | 161 |
|
162 | 162 | function registerEventSource() {
|
163 | 163 | if (typeof(EventSource) !== "undefined") {
|
164 |
| - var source = new EventSource('/rest/events?topics=openhab/items/*/statechanged,openhab/items/*/*/statechanged,openhab/webaudio/playurl'); |
| 164 | + var source = new EventSource('../rest/events?topics=openhab/items/*/statechanged,openhab/items/*/*/statechanged,openhab/webaudio/playurl'); |
165 | 165 | liveUpdatesEnabled = true;
|
166 | 166 |
|
167 | 167 | source.onmessage = function (event) {
|
|
192 | 192 | }
|
193 | 193 | } else {
|
194 | 194 | // fetch the new transformed state
|
195 |
| - $http.get('/rest/items/' + item.name).then(function (response) { |
| 195 | + $http.get('../rest/items/' + item.name).then(function (response) { |
196 | 196 | if (response.data && response.data.transformedState) {
|
197 | 197 | item.transformedState = response.data.transformedState;
|
198 | 198 | $rootScope.$emit('openhab-update', item);
|
|
0 commit comments