File tree Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Original file line number Diff line number Diff line change 1212 </div >
1313 <div class =" main-middle-container" >
1414 <Events />
15- <iframe src =" http://localhost:8082/" frameborder =" none" ></iframe >
15+ <iframe :src =" visionClientAddress" frameborder =" none" v-if =" showVisionClient"
16+ class =" vision-client" ></iframe >
17+ <div class =" vision-client" v-show =" !showVisionClient" >
18+ <p >The vision-client is shown here, if it is running.</p >
19+ <p >It is expected to run at <a :href =" visionClientAddress" >{{visionClientAddress}}</a ></p >
20+ <b-button variant =" primary" @click =" checkVisionClientAvailability" >Reload</b-button >
21+ </div >
1622 </div >
1723 <div class =" team-container" >
1824 <h2 >Blue Team</h2 >
4147 ControlGeneral,
4248 TeamOverview,
4349 GameState
50+ },
51+ props: {
52+ visionClientAddress: {
53+ type: String ,
54+ default: " http://localhost:8082"
55+ }
56+ },
57+ data () {
58+ return {
59+ showVisionClient: false
60+ }
61+ },
62+ methods: {
63+ checkVisionClientAvailability () {
64+ let rq = new XMLHttpRequest ();
65+
66+ rq .onreadystatechange = function (vm ) {
67+ if (this .readyState === XMLHttpRequest .DONE ) {
68+ vm .showVisionClient = this .status === 200 ;
69+ }
70+ }.bind (rq, this );
71+
72+ rq .open (" GET" , this .visionClientAddress );
73+ rq .send ();
74+ }
75+ },
76+ mounted () {
77+ this .checkVisionClientAvailability ();
4478 }
4579 }
4680 </script >
95129 flex-grow : 1 ;
96130 }
97131
98- .main-middle-container iframe {
132+ .vision-client {
99133 flex-grow : 1 ;
100134 width : 100% ;
101135 height : 100% ;
You can’t perform that action at this time.
0 commit comments