Ignore:
Timestamp:
06/11/20 16:34:50 (5 years ago)
Author:
bart
Message:

Update to version 1.41

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/webapp/plotlog.xhtml

    r10 r14  
    2626                <canvas id="canvas"></canvas>
    2727        </div>
     28       
     29        Agreement: <div id="agreement" style="display:inline;">?</div>
    2830</body>
    2931
     
    127129                var keys = Object.keys(partyprofileURIs);
    128130                        if (keys.length==0) {
    129                                 plotResults(computeUtils(json, partyprofiles));
     131                                plotResults(computeUtils(json, partyprofiles), isAgreement(json));
    130132                                return;
    131133                        }
     
    158160       
    159161        /**
     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        /**
    160170        @json the log file contents
    161171        @param partyprofiles a dict with key=party id and value a the (linear additive) profile
     
    199209        /**
    200210        @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) {
    204215                setStatus("Plotting" )
     216               
     217            document.getElementById('agreement').innerHTML=isAgreement?"Yes":"No";
    205218
    206219                var parties=Object.keys(utilities);
Note: See TracChangeset for help on using the changeset viewer.