@@ -131,9 +131,21 @@ class App extends React.Component {
131
131
}
132
132
133
133
render ( ) {
134
- const listSerialDevices = this . state . serialDevices . map ( ( device , i ) => < li key = { i } > { device . Name } - IsOpen: < span className = { device . IsOpen ? 'open' : 'closed' } > { device . IsOpen ? 'true' : 'false' } </ span > - < a href = "#" onClick = { ( e ) => this . handleOpen ( e , device . Name ) } > open</ a > - < a href = "#" onClick = { ( e ) => this . handleClose ( e , device . Name ) } > close</ a > </ li > ) ;
134
+ const listSerialDevices = this . state . serialDevices . map ( ( device , i ) =>
135
+ < li key = { i } >
136
+ { device . Name } - IsOpen: < span className = { device . IsOpen ? 'open' : 'closed' } >
137
+ { device . IsOpen ? 'true' : 'false' }
138
+ </ span > - < a href = "#" onClick = { ( e ) => this . handleOpen ( e , device . Name ) } >
139
+ open
140
+ </ a > - < a href = "#" onClick = { ( e ) => this . handleClose ( e , device . Name ) } >
141
+ close
142
+ </ a >
143
+ </ li > ) ;
135
144
136
- const listNetworkDevices = this . state . networkDevices . map ( ( device , i ) => < li key = { i } > { device . Name } </ li > ) ;
145
+ const listNetworkDevices = this . state . networkDevices . map ( ( device , i ) =>
146
+ < li key = { i } >
147
+ { device . Name }
148
+ </ li > ) ;
137
149
138
150
const supportedBoards = this . state . supportedBoards . map ( ( board , i ) =>
139
151
< li key = { i } >
@@ -154,15 +166,24 @@ class App extends React.Component {
154
166
return (
155
167
< div >
156
168
< h1 > Test Arduino Create Plugin</ h1 >
157
- < p > Agent status: < span id = "agent-status" className = { this . state . agentStatus ? 'found' : 'not-found' } >
158
- { this . state . agentStatus ? 'Found' : 'Not found' }
159
- </ span > </ p >
160
- < p > Web socket status: < span id = "ws-status" className = { this . state . wsStatus ? 'found' : 'not-found' } >
161
- { this . state . wsStatus ? 'Connected' : 'Not connected' }
162
- </ span > </ p >
169
+
170
+ < p >
171
+ Agent status:
172
+ < span id = "agent-status" className = { this . state . agentStatus ? 'found' : 'not-found' } >
173
+ { this . state . agentStatus ? 'Found' : 'Not found' }
174
+ </ span >
175
+ </ p >
176
+ < p >
177
+ Web socket status:
178
+ < span id = "ws-status" className = { this . state . wsStatus ? 'found' : 'not-found' } >
179
+ { this . state . wsStatus ? 'Connected' : 'Not connected' }
180
+ </ span >
181
+ </ p >
182
+
163
183
< pre id = "agent-info" >
164
184
{ this . state . agentInfo }
165
185
</ pre >
186
+
166
187
< div className = "section" >
167
188
< h2 > Devices</ h2 >
168
189
< strong > serial:</ strong >
@@ -195,6 +216,7 @@ class App extends React.Component {
195
216
</ form >
196
217
< textarea id = "serial-textarea" value = { this . state . serialMonitorContent } />
197
218
</ div >
219
+
198
220
< div className = "section" >
199
221
< button onClick = { this . handleUpload } disabled = { this . state . uploadStatus === UPLOAD_STATUS_IN_PROGRESS } > Upload Sketch</ button >
200
222
< div > Upload status: < span className = { uploadClass } > { this . state . uploadStatus } </ span > </ div >
0 commit comments