File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ import Ajax from 'simple-ajax';
1111
1212class Http {
1313 static get ( path , callback ) {
14+ var url = window . _da_address || 'http://localhost:27753'
1415 const ajax = new Ajax ( {
15- url : `http://localhost:27753 /${ path } ` ,
16+ url : `${ url } /${ path } ` ,
1617 method : 'GET' ,
1718 } ) ;
1819 ajax . on ( 'success' , event => {
@@ -23,8 +24,9 @@ class Http {
2324 }
2425
2526 static post ( path , data , callback ) {
27+ var url = window . _da_address || 'http://localhost:27753'
2628 const ajax = new Ajax ( {
27- url : `http://localhost:27753 /${ path } ` ,
29+ url : `${ url } /${ path } ` ,
2830 method : 'POST' ,
2931 data : data ,
3032 } ) ;
Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ class Screen extends React.Component {
3232 < div className = "section-caption" >
3333 Screen
3434 </ div >
35+ < div className = "port selection" >
36+ < input type = "text" id = "device-agent-endpoint" defaultValue = "http://localhost:41799" > </ input >
37+ < Button onClick = { ( ev ) => { this . setDeviceAgentPort ( ) ; } } >
38+ Set DA endpoint
39+ </ Button >
40+ </ div >
3541 < div >
3642 < Button onClick = { ( ev ) => { this . home ( ev ) ; } } >
3743 Home
@@ -68,6 +74,11 @@ class Screen extends React.Component {
6874 return this . _gestureRecognizer ;
6975 }
7076
77+ setDeviceAgentPort ( ) {
78+ window . _da_address = document . getElementById ( "device-agent-endpoint" ) . value ;
79+ this . props . refreshApp ( ) ;
80+ }
81+
7182 styleWithScreenSize ( ) {
7283 var screenshot = this . screenshot ( ) ;
7384 return {
You can’t perform that action at this time.
0 commit comments