Changeset 282
- Timestamp:
- Sep 25, 2017, 8:17:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r281 r282 2818 2818 #print "splines=polyline;\n"; 2819 2819 2820 print "site [label = \"site\", color = black, fillcolor = gold, shape = invhouse, style =filled];\n";2821 print "internet [label = \"internet\", color = black, fillcolor = cyan, shape = house, style =filled];\n";2820 print "site [label=\"site\", color=black, fillcolor=gold, shape=invhouse, style=filled];\n"; 2821 print "internet [label=\"internet\", color=black, fillcolor=cyan, shape=house, style=filled];\n"; 2822 2822 2823 2823 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime $timestamp; … … 2825 2825 $mon++; 2826 2826 my $date = sprintf '%04i-%02i-%02i %02i:%02i', $year, $mon, $mday, $hour, $min; 2827 print "\"$date\" [ color = white, fillcolor = black, shape = polygon, sides=14, style = filled, fontcolor = white ]\n";2827 print "\"$date\" [color=white, fillcolor=black, shape=polygon, sides=14, style=filled, fontcolor=white];\n"; 2828 2828 print "site -> \"$date\" [color = white];\n"; 2829 2829 … … 2832 2832 $b++; 2833 2833 2834 print "\"building$b\" [label = \"$building\", color = black, fillcolor = gold, style =filled];\n";2835 print "site -> \"building$b\" [len = 2, color =firebrick];\n";2834 print "\"building$b\" [label=\"$building\", color=black, fillcolor=gold, style=filled];\n"; 2835 print "site -> \"building$b\" [len=2, color=firebrick];\n"; 2836 2836 2837 2837 my $l = 0; … … 2839 2839 $l++; 2840 2840 2841 print "\"location$b-$l\" [label = \"$building" . q{/} . join(q{\n}, split(m{ / }xms, $loc)) . "\", color = black, fillcolor = orange, style =filled];\n";2842 # print "\"location$b-$l\" [label = \"$building / $loc\", color = black, fillcolor = orange, style =filled];\n";2843 print "\"building$b\" -> \"location$b-$l\" [len = 2, color =firebrick]\n";2841 print "\"location$b-$l\" [label=\"$building" . q{/} . join(q{\n}, split(m{ / }xms, $loc)) . "\", color=black, fillcolor=orange, style=filled];\n"; 2842 # print "\"location$b-$l\" [label=\"$building / $loc\", color=black, fillcolor=orange, style=filled];\n"; 2843 print "\"building$b\" -> \"location$b-$l\" [len=2, color=firebrick]\n"; 2844 2844 2845 2845 for my $sw (keys %{$db_building{$building}->{$loc}}) { … … 2851 2851 $color = "\"$color:invis:$color\""; 2852 2852 } 2853 print "\"$sw:$db_switch_output_port{$sw}\" [label = \"".format_aggregator4dot($db_switch_output_port{$sw})."\", color = black, fillcolor = lightblue, peripheries = $peripheries, style =filled];\n";2853 print "\"$sw:$db_switch_output_port{$sw}\" [label=\"".format_aggregator4dot($db_switch_output_port{$sw})."\", color=black, fillcolor=lightblue, peripheries=$peripheries, style=filled];\n"; 2854 2854 2855 2855 my $swname = $sw; 2856 2856 $swname .= q{\n-\n} . "$db_switch_global{$sw}->{model}" if exists $db_switch_global{$sw} and exists $db_switch_global{$sw}->{model}; 2857 print "\"$sw\" [label = \"$swname\", color = black, fillcolor = palegreen, shape = rect, style =filled];\n";2858 print "\"location$b-$l\" -> \"$sw\" [len = 2, color = firebrick, arrowtail = dot]\n";2859 print "\"$sw\" -> \"$sw:$db_switch_output_port{$sw}\" [len=2, style=bold, color = $color, arrowhead = normal, arrowtail = invdot]\n";2857 print "\"$sw\" [label=\"$swname\", color=black, fillcolor=palegreen, shape=rect, style=filled];\n"; 2858 print "\"location$b-$l\" -> \"$sw\" [len=2, color=firebrick, arrowtail=dot];\n"; 2859 print "\"$sw\" -> \"$sw:$db_switch_output_port{$sw}\" [len=2, style=bold, color=$color, arrowhead=normal, arrowtail=invdot];\n"; 2860 2860 2861 2861 … … 2870 2870 $color = "\"$color:invis:$color\""; 2871 2871 } 2872 print "\"$sw:$port_connect\" [label = \"".format_aggregator4dot($port_connect)."\", color = black, fillcolor = plum, peripheries = $peripheries, style =filled];\n";2873 print "\"$sw:$port_connect\" -> \"$sw\" [len=2, style=bold, color = $color, arrowhead= normal, arrowtail = inv]\n";2872 print "\"$sw:$port_connect\" [label=\"".format_aggregator4dot($port_connect)."\", color=black, fillcolor=plum, peripheries=$peripheries, style=filled];\n"; 2873 print "\"$sw:$port_connect\" -> \"$sw\" [len=2, style=bold, color=$color, arrowhead=normal, arrowtail=inv];\n"; 2874 2874 2875 2875 $db_switch_line{$sw}++; 2876 if ($db_switch_line{$sw} % 9 == 0) {2877 # Create invisible node2878 $invisible_node++;2879 my $invisible = '__Invisible_' . $invisible_node;2880 print "$invisible [shape=none, label=\"\"]\n";2881 print "\"$sw:$port_connect\" -> $invisible [style=invis]\n";2882 print "$invisible -> \"$sw\" [style=invis]\n";2883 }2876 #if ($db_switch_line{$sw} % 9 == 0) { 2877 # # Create invisible node 2878 # $invisible_node++; 2879 # my $invisible = '__Invisible_' . $invisible_node; 2880 # print "$invisible [shape=none, label=\"\"]\n"; 2881 # print "\"$sw:$port_connect\" -> $invisible [style=invis]\n"; 2882 # print "$invisible -> \"$sw\" [style=invis]\n"; 2883 # } 2884 2884 } 2885 2885 } … … 2900 2900 $color = "\"$color:invis:$color\""; 2901 2901 } 2902 printf " \"%s:%s\" -> internet [style=$style, color = $color]\n", $sw, $db_switch_output_port{$sw};2902 printf " \"%s:%s\" -> internet [style=$style, color=$color];\n", $sw, $db_switch_output_port{$sw}; 2903 2903 } 2904 2904 } … … 2917 2917 } 2918 2918 if (exists $db_switch_output_port{$sw}) { 2919 printf " \"%s:%s\" -> \"%s:%s\" [style=$style, color = $color]\n", $sw, $db_switch_output_port{$sw}, $sw_connect, $port_connect; 2919 printf " \"%s:%s\" -> \"%s:%s\" [style=$style, color=$color];\n", $sw, $db_switch_output_port{$sw}, $sw_connect, $port_connect; 2920 2921 if ($db_switch_line{$sw_connect} % 9 == 0) { 2922 # Create invisible node 2923 $invisible_node++; 2924 my $invisible = '__Invisible_' . $invisible_node; 2925 print " $invisible [shape=none, label=\"\"];\n"; 2926 printf " \"%s:%s\" -> $invisible [style=invis];\n", $sw, $db_switch_output_port{$sw}; 2927 printf " $invisible -> \"%s:%s\" [style=invis];\n", $sw_connect, $port_connect; 2928 } 2920 2929 } 2921 2930 else { 2922 printf " \"%s\" -> \"%s:%s\" [style=$style] \n", $sw, $sw_connect, $port_connect;2931 printf " \"%s\" -> \"%s:%s\" [style=$style];\n", $sw, $sw_connect, $port_connect; 2923 2932 } 2924 2933 }
Note: See TracChangeset
for help on using the changeset viewer.