Changeset 1683


Ignore:
Timestamp:
07/23/19 11:54:42 (5 years ago)
Author:
yushan
Message:

MARK: Dynamic workflow graph developement. Branch up to date with trunk @1676. Code cleanup

Location:
XIOS/dev/dev_trunk_omp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/inputs/vis.html

    r1682 r1683  
    113113 
    114114            //=========================================================== 
     115            $('#clusteringcid2').on('click', function()  
     116            { 
     117                network.setData(data); 
     118                var clusterOptionsByData =  
     119                { 
     120                    joinCondition:function(childOptions)  
     121                    { 
     122                        return childOptions.cid === 2; 
     123                    }, 
     124                    clusterNodeProperties: {id:'cidCluster', borderWidth:3, shape:'database'} 
     125                }; 
     126                network.clustering.cluster(clusterOptionsByData); 
     127                var allNode = nodes.get(); 
     128                nodes.update(allNode); 
     129            }); 
     130 
     131 
     132 
     133            //=========================================================== 
    115134            $('#lastTemporal').on('click', function()  
    116135            { 
    117136                var node = nodes.get(nodeSelected); 
    118137 
    119                 if(node.class == '5') //temporal filter 
     138                if(node.class == 5) //temporal filter 
    120139                { 
    121140                    var inputnodes = network.getConnectedNodes(node.id, 'from'); 
     
    142161                    edges.update(edges_ofinputnode); 
    143162 
    144                     allNode = nodes.get(); 
     163                    var allNode = nodes.get(); 
    145164                    nodes.update(allNode); 
    146165 
     
    211230                    var node = allNode[i]; 
    212231 
    213                     if(node.class == '1') 
     232                    if(node.class == 1) 
    214233                    { 
    215234                        node.hidden = false;  
     
    230249                    var node = allNode[i]; 
    231250 
    232                     if(node.class >= '6' || node.filled==1) 
     251                    if(node.class >= 6 || node.filled==1) 
    233252                    { 
    234253                        node.hidden = false; 
     
    724743                } 
    725744 
     745 
    726746                var reader = new FileReader(); 
    727747                var json; 
     
    749769                                var nboutVal = node.nbout; 
    750770 
    751                                 // if (node.class == '6' || node.filled == 1 ) 
    752                                 if (true) 
    753                                 { 
    754                                     node.color = { 
     771                                node.color = { 
     772                                    background: styleArr[classVal].background, 
     773                                    border: styleArr[classVal].border, 
     774                                    hover: styleArr[classVal].background, 
     775                                    highlight: { 
    755776                                        background: styleArr[classVal].background, 
    756                                         border: styleArr[classVal].border, 
    757                                         hover: styleArr[classVal].background, 
    758                                         highlight: { 
    759                                             background: styleArr[classVal].background, 
    760                                             border: 'blue' 
    761                                         } 
     777                                        border: 'blue' 
    762778                                    } 
    763779                                } 
    764                                 else 
    765                                 {     
    766                                     node.color = { 
    767                                         background: 'white', 
    768                                         border: 'LightGray', 
    769                                         hover: 'LightGray', 
    770                                         highlight: { 
    771                                             background: 'LightGray', 
    772                                             border: 'blue' 
    773                                         } 
    774                                     } 
    775                                     node.font = { 
    776                                         color:'white' 
    777                                     } 
    778                                 } 
     780                                 
    779781                                node.shape = styleArr[classVal].shape; 
    780782 
    781                                 if (node.class == '1' || node.class >= '6') 
     783                                if (node.class == 1 || node.class >= 6) 
    782784                                    node.title = "node id = "+node.id+"</br>"+labelVal +"</br>field attributes : </br>" + attrVal + "</br>filter entry nb = " + entryVal + "</br>cid = " + cidVal + "</br>distance = " + distVal ; 
    783                                 else if (node.class == '5') 
     785                                else if (node.class == 5) 
    784786                                    node.title = "node id = "+node.id+"</br>"+labelVal +"</br>filter type = " + typeVal + "</br> entry nb = " + entryVal + "</br> inputs_complete = " + inputsVal + "</br>cid = " + cidVal + "</br>distance = " + distVal ; 
    785787                                else 
     
    802804                                node.level = distVal; 
    803805 
    804                                 if (node.class == '6' || node.filled == 1) node.hidden = true; 
     806                                if (node.class >= 6 || node.filled == 1) node.hidden = true; 
    805807                                else node.hidden = true; 
    806808 
     
    868870                                    } 
    869871                                }, 
     872 
     873                                joinCondition:function(nodeOptions) { 
     874                                    return nodeOptions.cid === 2; 
     875   
     876                                } 
     877 
    870878                                 
    871879                            }; 
     
    873881                            //================================================== 
    874882                            network = new vis.Network(container, data, options); 
     883 
     884 
    875885 
    876886                            //================================================== 
     
    10001010            <button type="button" class="btn btn-default" id="disableAllChild">Disable all children</button> 
    10011011            <button type="button" class="btn btn-default" id="lastTemporal">Enable last temporal input</button> 
     1012 
     1013 
     1014            <button type="button" class="btn btn-default" id="clusteringcid2">Clustering cid=2</button> 
    10021015        </div> 
    10031016 
  • XIOS/dev/dev_trunk_omp/src/graphviz.cpp

    r1681 r1683  
    9797        else 
    9898          fs_json << "       \"label\": \""<<it->second.filter_name<<"\", "<<std::endl; 
    99         fs_json << "       \"class\": \""<<it->second.filter_class<<"\", "<<std::endl; 
    100         fs_json << "       \"filled\": \""<<it->second.filter_filled<<"\", "<<std::endl; 
     99        fs_json << "       \"class\": "<<it->second.filter_class<<", "<<std::endl; 
     100        fs_json << "       \"filled\": "<<it->second.filter_filled<<", "<<std::endl; 
    101101        fs_json << "       \"type\": \""<<it->second.transform_type<<"\", "<<std::endl; 
    102         fs_json << "       \"entry\": \""<<it->second.expected_entry_nb<<"\", "<<std::endl; 
    103         fs_json << "       \"inputs\": \""<<it->second.inputs_complete<<"\", "<<std::endl; 
    104         fs_json << "       \"tag\": \""<<it->second.filter_tag<<"\", "<<std::endl; 
    105         fs_json << "       \"cid\": \""<<it->second.clusterID<<"\", "<<std::endl; 
    106         fs_json << "       \"distance\": \""<<it->second.distance<<"\", "<<std::endl; 
     102        fs_json << "       \"entry\": "<<it->second.expected_entry_nb<<", "<<std::endl; 
     103        fs_json << "       \"inputs\": "<<it->second.inputs_complete<<", "<<std::endl; 
     104        fs_json << "       \"tag\": "<<it->second.filter_tag<<", "<<std::endl; 
     105        fs_json << "       \"cid\": "<<it->second.clusterID<<", "<<std::endl; 
     106        fs_json << "       \"distance\": "<<it->second.distance<<", "<<std::endl; 
    107107        fs_json << "       \"attributes\": \""<<it->second.attributes<<"\"}"<<std::endl<<"      "; 
    108108      } 
Note: See TracChangeset for help on using the changeset viewer.