[Rt-commit] r13347 - in rt/3.8/trunk: share/html/Ticket/Graphs share/html/Ticket/Graphs/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Mon Jun 16 22:08:10 EDT 2008
Author: ruz
Date: Mon Jun 16 22:08:04 2008
New Revision: 13347
Modified:
rt/3.8/trunk/lib/RT/Graph/Tickets.pm
rt/3.8/trunk/share/html/Ticket/Graphs/Elements/EditGraphProperties
rt/3.8/trunk/share/html/Ticket/Graphs/index.html
Log:
* add support for graphs direction
Modified: rt/3.8/trunk/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Graph/Tickets.pm (original)
+++ rt/3.8/trunk/lib/RT/Graph/Tickets.pm Mon Jun 16 22:08:04 2008
@@ -267,6 +267,7 @@
Ticket => undef,
Graph => undef,
+ Direction => 'TB',
Seen => undef,
SeenEdge => undef,
@@ -283,6 +284,8 @@
$args{'Graph'} = GraphViz->new(
name => 'ticket_links_'. $args{'Ticket'}->id,
bgcolor => "transparent",
+# TODO: patch GraphViz to support all posible RDs
+ rankdir => ($args{'Direction'} || "TB") eq "LR",
node => { shape => 'box', style => 'filled,rounded', fillcolor => 'white' },
);
%fill_cache = ();
Modified: rt/3.8/trunk/share/html/Ticket/Graphs/Elements/EditGraphProperties
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Graphs/Elements/EditGraphProperties (original)
+++ rt/3.8/trunk/share/html/Ticket/Graphs/Elements/EditGraphProperties Mon Jun 16 22:08:04 2008
@@ -47,6 +47,14 @@
%# END BPS TAGGED BLOCK }}}
<&| /Widgets/TitleBox, title => loc('Graph Properties') &>
+<% loc('Direction') %> <select name="Direction">
+<option value="TB" <% ($Direction||'TB') eq 'TB'? 'selected="selected"': '' |n %>><% loc('top to bottom') %></option>
+<option value="LR" <% ($Direction||'TB') eq 'LR'? 'selected="selected"': '' |n %>><% loc('left to right') %></option>
+%# XXX: not supported by GraphViz perl module
+%#<option value="BT" <% ($Direction||'TB') eq 'BT'? 'selected="selected"': '' |n %>><% loc('bottom to top') %></option>
+%#<option value="RL" <% ($Direction||'TB') eq 'RL'? 'selected="selected"': '' |n %>><% loc('right to left') %></option>
+</select><br />
+
<% loc('Main type of links') %> <select name="LeadingLink">
% foreach ( @link_types ) {
<option value="<% $_ %>" <% ($LeadingLink||'Members') eq $_? 'selected="selected"': '' |n %>><% loc($_) %></option>
@@ -116,6 +124,7 @@
<%ARGS>
$id => undef
+$Direction => 'TB'
$LeadingLink => 'Members'
@ShowLinks => ('MemberOf', 'DependsOn', 'RefersTo')
$MaxDepth => 3
Modified: rt/3.8/trunk/share/html/Ticket/Graphs/index.html
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Graphs/index.html (original)
+++ rt/3.8/trunk/share/html/Ticket/Graphs/index.html Mon Jun 16 22:08:04 2008
@@ -78,7 +78,7 @@
use RT::Graph::Tickets;
my @results;
-my @save_arguments = qw(id LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
+my @save_arguments = qw(id Direction LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
foreach my $level ( 0 .. 6 ) {
push @save_arguments, "Level-". $level ."-Properties";
}
More information about the Rt-commit
mailing list