Ignore:
Timestamp:
02/03/21 17:42:33 (9 months ago)
Author:
yushan
Message:

Graph intermediate commit to a tmp branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_graph/src/workflow_graph.cpp

    r2026 r2028  
    44namespace xios 
    55{ 
    6  
    7    
    8  
    96 
    107  std::vector<graph_node_object> *CWorkflowGraph::vectorOfNodes_ = 0; 
    118  std::vector<graph_edge_object> *CWorkflowGraph::vectorOfEdges_ = 0; 
    129  std::vector<StdString> *CWorkflowGraph::vectorOfContexts_ = 0; 
    13    
    1410 
    1511  std::vector<graph_node_object> *CWorkflowGraph::vectorOfNodes_srv_ = 0; 
     
    1915  bool CWorkflowGraph::clientGraphBuilt = false; 
    2016  bool CWorkflowGraph::serverGraphBuilt = false; 
    21  
    22  
    23  
    2417  bool CWorkflowGraph::build_begin = false; 
    2518 
     
    10598      edge_obj.field = packet->graphPackage->currentField; 
    10699      edge_obj.show = true; 
     100       
     101      if(vectorOfNodes_->at(from).filter_class == 2) // from pass through filter 
     102      { 
     103        edge_obj.label_info = vectorOfNodes_->at(from).label_field_id; 
     104      } 
     105       
    107106      for(int i=0; i<vectorOfContexts_->size(); i++) 
    108107      { 
     
    273272      outfiles[ctx] << "\"from\":"<<vectorOfEdges_->at(i).from<<","<<std::endl; 
    274273      outfiles[ctx] << "\"to\":"<<vectorOfEdges_->at(i).to<<","<<std::endl; 
    275       if(vectorOfEdges_->at(i).show) outfiles[ctx] << "\"label\":"<<"\""<<vectorOfEdges_->at(i).field->getId()<<"\\n"<<vectorOfEdges_->at(i).date<<"\","<<std::endl; 
    276       else outfiles[ctx] << "\"label\":"<<"\"\\n"<<vectorOfEdges_->at(i).date<<"\","<<std::endl; 
     274      if(vectorOfEdges_->at(i).label_info != "none") 
     275      { 
     276        if(vectorOfEdges_->at(i).show) outfiles[ctx] << "\"label\":"<<"\""<<vectorOfEdges_->at(i).label_info<<"\\n"<<vectorOfEdges_->at(i).date<<"\","<<std::endl; 
     277        else outfiles[ctx] << "\"label\":"<<"\"\\n"<<vectorOfEdges_->at(i).date<<"\","<<std::endl; 
     278      } 
     279      else 
     280      { 
     281        if(vectorOfEdges_->at(i).show) outfiles[ctx] << "\"label\":"<<"\""<<vectorOfEdges_->at(i).field->getId()<<"\\n"<<vectorOfEdges_->at(i).date<<"\","<<std::endl; 
     282        else outfiles[ctx] << "\"label\":"<<"\"\\n"<<vectorOfEdges_->at(i).date<<"\","<<std::endl; 
     283      } 
    277284      outfiles[ctx] << "\"context\":"<<"\""<<vectorOfEdges_->at(i).context_id<<"\","<<std::endl; 
    278285      outfiles[ctx] << "\"attributes\":"<<"\""<<vectorOfEdges_->at(i).attributes<<"\","<<std::endl; 
Note: See TracChangeset for help on using the changeset viewer.