File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -45,23 +45,30 @@ class SrFormComponent extends HTMLElement {
4545 </div>
4646 </div>
4747
48+ <div class="form-group row onconnect">
49+ <label for="authHeader" class="col-sm-2 col-form-label">Authentication Header</label>
50+ <div class="col-sm-10 offset-sm-2">
51+ <input type="text" class="form-control" id="authHeader" placeholder="Token">
52+ </div>
53+ </div>
54+
4855 <div class="form-group row onconnect" ${ divStyle } id="protocol-support">
4956 <label class="col-sm-2 col-form-label">Protocol Supported</label>
5057 <div class="col-sm-10 offset-sm-2">
5158 <div class="form-check form-check-inline">
52- <input type="checkbox" id="chk-ws" class="form-check-input" value="ws" checked/>
59+ <input type="checkbox" id="chk-ws" class="form-check-input protocol-support " value="ws" checked/>
5360 <label class="form-check-label" for="chk-ws">
5461 WebSocket
5562 </label>
5663 </div>
5764 <div class="form-check form-check-inline">
58- <input type="checkbox" id="chk-lp" class="form-check-input" disabled checked value="lp" />
65+ <input type="checkbox" id="chk-lp" class="form-check-input protocol-support " disabled checked value="lp" />
5966 <label class="form-check-label" for="chk-lp">
6067 Long Pooling
6168 </label>
6269 </div>
6370 <div class="form-check form-check-inline">
64- <input type="checkbox" id="chk-sse" class="form-check-input" checked value="sse" />
71+ <input type="checkbox" id="chk-sse" class="form-check-input protocol-support " checked value="sse" />
6572 <label class="form-check-label" for="chk-sse">
6673 Server Send Event
6774 </label>
Original file line number Diff line number Diff line change @@ -264,6 +264,11 @@ export function connectToServer(url) {
264264}
265265
266266export function OnConnect ( ) {
267+
268+ if ( isAdvanceView ) {
269+ SetConnectionProtocol ( ) ;
270+ }
271+
267272 var url = document . getElementById ( "inputUrl" ) . value ;
268273 connectToServer ( url ) ;
269274 console . log ( "OnConnect" ) ;
@@ -299,10 +304,9 @@ export function SetConnectionProtocol()
299304 // {
300305 // return;
301306 // }
302-
303307 //Start work from here.
304308 var counter = 0 ;
305- var elements = document . querySelectorAll ( ".lst-con- protocol" ) ;
309+ var elements = document . querySelectorAll ( ".protocol-support " ) ;
306310
307311 for ( var i = 0 ; i < elements . length ; i ++ )
308312 {
@@ -367,8 +371,11 @@ export function OnDisConnect() {
367371 }
368372
369373 Reset ( ) ;
374+ debugger ;
375+
370376 EnableElementByClassName ( 'connectbtn' ) ;
371377 NotConnected ( ) ;
378+ AdvanceViewElements ( isAdvanceView ) ;
372379}
373380
374381export function Reset ( ) {
You can’t perform that action at this time.
0 commit comments