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 12
12
</div >
13
13
<div class =" main-middle-container" >
14
14
<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 >
16
22
</div >
17
23
<div class =" team-container" >
18
24
<h2 >Blue Team</h2 >
41
47
ControlGeneral,
42
48
TeamOverview,
43
49
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 ();
44
78
}
45
79
}
46
80
</script >
95
129
flex-grow : 1 ;
96
130
}
97
131
98
- .main-middle-container iframe {
132
+ .vision-client {
99
133
flex-grow : 1 ;
100
134
width : 100% ;
101
135
height : 100% ;
You can’t perform that action at this time.
0 commit comments