Changeset 254 for trunk/klask


Ignore:
Timestamp:
Sep 8, 2017, 6:09:52 PM (3 years ago)
Author:
g7moreau
Message:
  • Better dot result
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r253 r254  
    27682768         for my $sw (keys %{$db_building{$building}->{$loc}}) {
    27692769
    2770             print "\"$sw:$db_switch_output_port{$sw}\" [label = \"".format_aggregator4dot($db_switch_output_port{$sw})."\", color = black, fillcolor = lightblue,  peripheries = 2, style = filled];\n";
     2770            my $peripheries = 1;
     2771            $peripheries = 2 if $db_switch_output_port{$sw} =~ m/^(Trk|Br|Po)/;
     2772            print "\"$sw:$db_switch_output_port{$sw}\" [label = \"".format_aggregator4dot($db_switch_output_port{$sw})."\", color = black, fillcolor = lightblue,  peripheries = $peripheries, style = filled];\n";
    27712773
    27722774            my $swname  = $sw;
     
    27812783               next if not $sw_connect eq $sw;
    27822784               next if $port_connect eq $db_switch_output_port{$sw};
    2783                print "\"$sw:$port_connect\" [label = \"".format_aggregator4dot($port_connect)."\", color = black, fillcolor = plum,  peripheries = 1, style = filled];\n";
     2785               my $peripheries = 1;
     2786               $peripheries = 2 if $port_connect =~ m/^(Trk|Br|Po)/;
     2787               print "\"$sw:$port_connect\" [label = \"".format_aggregator4dot($port_connect)."\", color = black, fillcolor = plum,  peripheries = $peripheries, style = filled];\n";
    27842788               print "\"$sw:$port_connect\" -> \"$sw\" [len=2, style=bold, arrowhead= normal, arrowtail = inv]\n";
    27852789              }
     
    28052809      my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2;
    28062810      for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
     2811         my $style = 'solid';
     2812         $style = 'bold' if $port_connect =~ m/^(Trk|Br|Po)/;
    28072813         if (exists $db_switch_output_port{$sw}) {
    2808             printf "   \"%s:%s\" -> \"%s:%s\" [color = navyblue]\n", $sw, $db_switch_output_port{$sw}, $sw_connect, $port_connect;
     2814            printf "   \"%s:%s\" -> \"%s:%s\" [style=$style, color = navyblue]\n", $sw, $db_switch_output_port{$sw}, $sw_connect, $port_connect;
    28092815            }
    28102816         else {
    2811             printf "   \"%s\"   -> \"%s%s\"\n", $sw, $sw_connect, $port_connect;
     2817            printf "   \"%s\"   -> \"%s:%s\" [style=$style]\n", $sw, $sw_connect, $port_connect;
    28122818            }
    28132819         }
Note: See TracChangeset for help on using the changeset viewer.