@@ -23,7 +23,7 @@ angular.module('MeasPoints.controllers', [])
2323 $scope . logout = function ( ) {
2424 $ . ajax ( {
2525 type : "GET" ,
26- url : "http://110.174.118.24:8001 /sap/public/bc/icf/logoff" , //Clear SSO cookies: SAP Provided service to do that
26+ url : "http://[Host IP]:[Port] /sap/public/bc/icf/logoff" , //Clear SSO cookies: SAP Provided service to do that
2727 } ) . done ( function ( data ) { //Now clear the authentication header stored in the browser
2828 console . log ( "logout" ) ;
2929 $state . go ( 'app.login' ) ;
@@ -32,7 +32,7 @@ angular.module('MeasPoints.controllers', [])
3232 //console.log("if");
3333 $ . ajax ( {
3434 type : "GET" ,
35- url : "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints" , //any URL to a Gateway service
35+ url : "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints" , //any URL to a Gateway service
3636 username : 'dummy' , //dummy credentials: when request fails, will clear the authentication header
3737 password : 'dummy' ,
3838 statusCode : {
@@ -88,7 +88,7 @@ angular.module('MeasPoints.controllers', [])
8888 // create basic auth for SAP with user and pwd
8989 var auth = basicAuth . makeBasicAuth ( $scope . loginData . user , $scope . loginData . pwd ) ;
9090 // GW URL used for login
91- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/UserDetailSet(Username='" + $scope . loginData . user + "')?$format=json" ;
91+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/UserDetailSet(Username='" + $scope . loginData . user + "')?$format=json" ;
9292 // execute http GET request
9393 OData . request
9494 ( {
@@ -181,9 +181,9 @@ angular.module('MeasPoints.controllers', [])
181181 console . log ( $scope . search . val ) ;
182182 console . log ( isNaN ( $scope . search . val ) ) ;
183183 if ( isNaN ( $scope . search . val ) == true ) { //not a number
184- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$filter=substring(Pttxt, 0, " + len + ") eq '" + val + "'" ;
184+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$filter=substring(Pttxt, 0, " + len + ") eq '" + val + "'" ;
185185 } else { //it is a number
186- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$filter=substring(Point, 0, " + len + ") eq '" + val + "'" ;
186+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$filter=substring(Point, 0, " + len + ") eq '" + val + "'" ;
187187 } ;
188188
189189 console . log ( url ) ;
@@ -203,7 +203,7 @@ angular.module('MeasPoints.controllers', [])
203203 template : '<ion-spinner></ion-spinner> Loading...'
204204 } ) ;
205205 var auth = basicAuth . getMytoken ( ) ;
206- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$format=json" ;
206+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$format=json" ;
207207 $http ( {
208208 method : 'GET' ,
209209 url : url ,
@@ -315,7 +315,7 @@ angular.module('MeasPoints.controllers', [])
315315 $ionicLoading . show ( {
316316 template : '<ion-spinner></ion-spinner> Loading...'
317317 } ) ;
318- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasDocSet(Point='" + point + "')?$format=json" ;
318+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasDocSet(Point='" + point + "')?$format=json" ;
319319 $http ( {
320320 method : 'GET' ,
321321 url : url ,
@@ -400,7 +400,7 @@ angular.module('MeasPoints.controllers', [])
400400
401401 // get and store last measurement doc. values from server of a given point
402402 function getLastValues ( point ) {
403- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasDocSet(Point='" + point + "')?$format=json" ;
403+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasDocSet(Point='" + point + "')?$format=json" ;
404404 $http ( {
405405 method : 'GET' ,
406406 url : url ,
@@ -457,7 +457,7 @@ angular.module('MeasPoints.controllers', [])
457457 // create meas. doc
458458 $scope . createMeasDoc = function ( ) {
459459 //console.log("creating measdoc..");
460- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasDocSet" ;
460+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasDocSet" ;
461461
462462 // get X-CSRF-Token
463463 header_xcsrf_token = basicAuth . getXCSRF_Token ( ) ;
@@ -601,7 +601,7 @@ angular.module('MeasPoints.controllers', [])
601601 if ( len > 0 ) {
602602 //console.log($scope.search.val);
603603 //console.log(isNaN($scope.search.val));
604- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$filter=substring(Pttxt, 0, " + len + ") eq '" + val + "'" ;
604+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/MeasPoints?$filter=substring(Pttxt, 0, " + len + ") eq '" + val + "'" ;
605605 //console.log(url);
606606 measPointFactory . getPoints ( url ) . then ( function ( data ) {
607607 //console.log("meas pos doc:");
@@ -661,7 +661,7 @@ angular.module('MeasPoints.controllers', [])
661661
662662 //get default user details
663663 var user = login . getUser ( ) ;
664- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/UserDetailSet(Username='" + user + "')?$format=json" ;
664+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/UserDetailSet(Username='" + user + "')?$format=json" ;
665665 userDetailFactory . getUserDetails ( url ) . then ( function ( data ) {
666666 console . log ( "data:" ) ;
667667 console . log ( data ) ;
@@ -707,7 +707,7 @@ angular.module('MeasPoints.controllers', [])
707707 // Save user details on server
708708 $scope . saveUserDetails = function ( ) {
709709 //console.log("creating measdoc..");
710- var url = "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/UserDetailSet" ;
710+ var url = "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/UserDetailSet" ;
711711
712712 // get X-CSRF-Token
713713 header_xcsrf_token = basicAuth . getXCSRF_Token ( ) ;
@@ -788,8 +788,8 @@ angular.module('MeasPoints.controllers', [])
788788 "d" : {
789789
790790 "__metadata" : {
791- "id" : "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/TimeConfSet('')",
792- "uri" : "http://110.174.118.24:8001 /sap/opu/odata/sap/ZMPOINT4_SRV/TimeConfSet('')",
791+ "id" : "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/TimeConfSet('')",
792+ "uri" : "http://[Host IP]:[Port] /sap/opu/odata/sap/ZMPOINT4_SRV/TimeConfSet('')",
793793 "type" : "ZMPOINT4_SRV.TimeConf"
794794 },
795795 "Orderid" : "",
@@ -873,4 +873,4 @@ angular.module('MeasPoints.controllers', [])
873873 } } ) ;
874874
875875
876- ;
876+ ;
0 commit comments