All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

topper 740 Bytes
Newer Older
1
#!/usr/bin/perl -w
Chad Barb's avatar
Chad Barb committed
2 3 4

%color = (
  "pc850", "skyblue",
5
  "pc600", "steelblue",
6
  "pc",    "steelblue",
Chad Barb's avatar
Chad Barb committed
7 8 9 10 11 12 13 14 15 16
  "shark", "darkblue",
  "lan",   "green",
  "delay", "orange"
	  );

print "graph G {\n";
while (<>) {
    if (/^node/) {
	my ($nodename, $nodetype) = /^node\s+(\S+)\s+(\S+)/;
	$nodename =~ s/[^\w]/_/g;
17
	print "{node [label = $nodename, shape = box,";
Chad Barb's avatar
Chad Barb committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

	if (exists $color{ $nodetype }) {
	    print "color = " . $color{ $nodetype };
	} else {
	    warn "Warning! Unknown color for \"$nodetype\"--using default.\n";
	    print "color = skyblue";
	}
	print "] $nodename}\n";
    } elsif (/^link/) {
	my ($lhs, $rhs) = /^link\s+\S+\s+(\S+)\s+(\S+)/;
	$rhs =~ s/[^\w]/_/g;
	$lhs =~ s/[^\w]/_/g;
	print "$lhs -- $rhs;\n";
    }
}
print "}\n";