Changeset 14 for src/main/webapp/plotlog.xhtml
- Timestamp:
- 06/11/20 16:34:50 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/webapp/plotlog.xhtml
r10 r14 26 26 <canvas id="canvas"></canvas> 27 27 </div> 28 29 Agreement: <div id="agreement" style="display:inline;">?</div> 28 30 </body> 29 31 … … 127 129 var keys = Object.keys(partyprofileURIs); 128 130 if (keys.length==0) { 129 plotResults(computeUtils(json, partyprofiles) );131 plotResults(computeUtils(json, partyprofiles), isAgreement(json)); 130 132 return; 131 133 } … … 158 160 159 161 /** 162 @return true if there is agreement 163 */ 164 function isAgreement(logfile) { 165 var actions=logfile['actions']; 166 var lastact = actions[actions.length -1]; 167 return 'accept' in lastact; 168 } 169 /** 160 170 @json the log file contents 161 171 @param partyprofiles a dict with key=party id and value a the (linear additive) profile … … 199 209 /** 200 210 @param utilities the dict with key=party id of the utilities of all steps for each party ) 201 */ 202 203 function plotResults( utilities) { 211 @param isAgreement true iff there is agreement reached 212 */ 213 214 function plotResults( utilities, isAgreement) { 204 215 setStatus("Plotting" ) 216 217 document.getElementById('agreement').innerHTML=isAgreement?"Yes":"No"; 205 218 206 219 var parties=Object.keys(utilities);
Note:
See TracChangeset
for help on using the changeset viewer.