Changeset 6 for src/main/webapp/newsession.xhtml
- Timestamp:
- 09/30/19 15:37:07 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/webapp/newsession.xhtml
r5 r6 46 46 next party</b> <br /> Party: <select id="partyselection"> 47 47 </select> <br /> Profile: <select id="profileselection"> 48 </select> <br /> 48 </select> <br /> Parameters: { <input type="text" id="parameters" 49 onchange="updateParameters()" value="" maxlength="100" /> } <br /> <br /> 49 50 50 51 <button onclick="addParty()">Add</button> … … 55 56 <thead> 56 57 <th align="left" width='40%'>Party</th> 58 <th align="left" width='20%'>Parameters</th> 57 59 <th align="left" width='40%'>Profile</th> 58 60 </thead> … … 75 77 </div> 76 78 <div id="results" style="visibility: hidden"> 77 Session completed. <a href="" id="logref">view the log 78 file</a> <br /><a href="" id="plotref">render a utilities plot</a>.79 Session completed. <a href="" id="logref">view the log file</a> <br /> 80 <a href="" id="plotref">render a utilities plot</a>. 79 81 </div> 80 82 … … 82 84 83 85 <script type="application/javascript"> 86 84 87 85 88 … … 94 97 var domainwebsocket = null; 95 98 var partieswebsocket=null; 99 // current setting of parameters 100 var parameters = {}; 101 96 102 // currently known domains (and profiles) as coming from domainwebsocket. 97 103 // keys are domain names, values are list of profile names 98 104 var knowndomains={}; 105 99 106 100 107 /** … … 231 238 232 239 233 240 /** 241 updates parameters field to match the given text. 242 */ 243 function updateParameters() { 244 var text="{"+document.getElementById("parameters").value+"}"; 245 try { 246 parameters=JSON.parse(text); 247 } catch(e) { 248 alert("Parameters can not be parsed. "+e); 249 return; 250 } 251 } 234 252 235 253 /** … … 269 287 } 270 288 var newpartyprof = {}; 271 newpartyprof["party"]=partycombo.options[partycombo.selectedIndex].value; 289 290 newpartyprof["party"]={"partyref":partycombo.options[partycombo.selectedIndex].value, 291 "parameters":parameters }; 272 292 newpartyprof["profile"]=profilecombo.options[profilecombo.selectedIndex].value; 273 293 … … 284 304 var cell1 = row.insertCell(-1); 285 305 var cell2 = row.insertCell(-1); 286 cell1.innerHTML = partyprofiles[pp]["party"]; 287 cell2.innerHTML = partyprofiles[pp]["profile"]; 306 var cell3 = row.insertCell(-1); 307 cell1.innerHTML = partyprofiles[pp]["party"]["partyref"]; 308 cell2.innerHTML = JSON.stringify(partyprofiles[pp]["party"]["parameters"]); 309 cell3.innerHTML = partyprofiles[pp]["profile"]; 288 310 } 289 311 … … 298 320 {"SAOPSettings": 299 321 {"participants":[ 300 {"party": "http://party1","profile":"ws://profile1"},301 {"party": "http://party2","profile":"ws://profile2"}],322 {"party":{"partyref":"http://party1","parameters":{}},"profile":"ws://profile1"}, 323 {"party":{"partyref",}"http://party2","parameters":{}},"profile":"ws://profile2"}], 302 324 "deadline":{"deadlinetime":{"durationms":100}}}} 303 325 … … 384 406 385 407 408 386 409 </script> 387 410
Note:
See TracChangeset
for help on using the changeset viewer.