Bug 40933

Dependency graph changes for 3.2


git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@118 6955db30-a419-402b-8a0d-67ecbb4d7f56
custis
vfilippov 2009-02-02 12:39:26 +00:00
parent abf1ac394d
commit 2d411856b7
5 changed files with 30 additions and 10 deletions

View File

@ -45,7 +45,15 @@ sub get_param_list {
type => 't',
default => 'http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%',
checker => \&check_webdotbase
} );
},
{
name => 'graph_rankdir',
type => 's',
choices => ['LR', 'RL', 'TB', 'BT'],
default => 'LR'
},
);
return @param_list;
}

View File

@ -98,11 +98,12 @@ sub AddLink {
# The list of valid directions. Some are not proposed in the dropdrown
# menu despite the fact that they are valid.
my @valid_rankdirs = ('LR', 'RL', 'TB', 'BT');
my $default_rankdir = Bugzilla->params->{graph_rankdir} || 'LR';
my $rankdir = $cgi->param('rankdir') || 'TB';
my $rankdir = $cgi->param('rankdir') || $default_rankdir;
# Make sure the submitted 'rankdir' value is valid.
if (lsearch(\@valid_rankdirs, $rankdir) < 0) {
$rankdir = 'TB';
$rankdir = $default_rankdir;
}
my $display = $cgi->param('display') || 'tree';
@ -115,7 +116,7 @@ if (!defined $cgi->param('id') && $display ne 'doall') {
my ($fh, $filename) = File::Temp::tempfile("XXXXXXXXXX",
SUFFIX => '.dot',
DIR => $webdotdir);
my $urlbase = Bugzilla->params->{'urlbase'};
my $urlbase = Bugzilla->params->{urlbase};
print $fh "digraph G {";
print $fh qq{

View File

@ -45,5 +45,7 @@
this value, make certain that the webdot server can read files from your
webdot directory. On Apache you do this by editing the .htaccess file,
for other systems the needed measures may vary. You can run checksetup.pl
to recreate the .htaccess file if it has been lost."}
to recreate the .htaccess file if it has been lost.",
graph_rankdir => "Default dependency graph orientation",
}
%]

View File

@ -49,15 +49,21 @@
[% image_map %]
<p>
Green circles represent open [% terms.bugs %].
</p>
<table cellpadding="2" style="margin-bottom: 16px"><tr>
<td>Bug States:</td>
<td style="border: 1px solid gray; background-color:#FFA000">NEW</td>
<td style="border: 1px solid gray; background-color:#FFFF00">ASSIGNED</td>
<td style="border: 1px solid gray; background-color:#00FF00">RESOLVED</td>
<td style="border: 1px solid gray; background-color:#675ACD">VERIFIED</td>
<td style="border: 1px solid gray; background-color:#D0D0D0">CLOSED</td>
<td style="border: 1px solid gray; background-color:#FF4000">REOPENED</td>
</tr></table>
[% IF image_map %]
<img src="[% image_url %]" alt="Dependency graph" usemap="#imagemap">
<img src="[% image_url %]" alt="Dependency graph" usemap="#imagemap" style="border: 1px solid gray">
[% ELSE %]
<a href="[% map_url %]">
<img src="[% image_url %]" alt="Dependency graph" ismap="ismap">
<img src="[% image_url %]" alt="Dependency graph" ismap="ismap" style="border: 1px solid gray">
</a>
[% END %]

View File

@ -174,6 +174,9 @@
<td>&nbsp;</td>
<td valign="middle" class="bz_query_links">
[% IF bugs.size > 1 && caneditbugs && !dotweak %]
<a target="graphview" href="showdependencygraph.cgi?id=[% buglist_joined FILTER html %]">Graph</a> |
[% END %]
<a href="buglist.cgi?
[% urlquerypart FILTER html %]&amp;ctype=csv">CSV</a> |
<a href="buglist.cgi?