Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
b8465474
Commit
b8465474
authored
May 07, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 134571 - client-side image maps in showdependencygraph.cgi
Patch by zeroJ@null.net (John Vandenberg), r=bbaetz, justdave
parent
04fd648f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
showdependencygraph.cgi
showdependencygraph.cgi
+22
-2
dependency-graph.html.tmpl
template/en/default/bug/dependency-graph.html.tmpl
+12
-4
No files found.
showdependencygraph.cgi
View file @
b8465474
...
...
@@ -37,6 +37,26 @@ use vars qw($template $vars $userid $usergroupset);
my
%
seen
;
my
%
edgesdone
;
sub
CreateImagemap
{
my
$mapfilename
=
shift
;
my
$map
=
"<map name=\"imagemap\">\n"
;
my
$default
;
open
MAP
,
"<$mapfilename"
;
while
(
my
$line
=
<
MAP
>
)
{
if
(
$line
=~
/^default ([^ ]*)(.*)$/
)
{
$default
=
qq{<area shape="default" href="$1">\n}
;
}
if
(
$line
=~
/^rectangle \((.*),(.*)\) \((.*),(.*)\) (http[^ ]*)(.*)?$/
)
{
$map
.=
qq{<area name="bug$6" shape="rect" href="$5" coords="$1,$4,$3,$2">\n}
;
}
}
close
MAP
;
$map
.=
"$default</map>"
;
return
$map
;
}
sub
AddLink
{
my
(
$blocked
,
$dependson
)
=
(
@_
);
my
$key
=
"$blocked,$dependson"
;
...
...
@@ -162,9 +182,9 @@ if ($webdotbase =~ /^https?:/) {
my
$pngfilename
=
"data/webdot/$$.png"
;
my
$mapfilename
=
"data/webdot/$$.map"
;
system
(
"$webdotbase"
,
"-Tpng"
,
"-o"
,
"$pngfilename"
,
"$filename"
);
system
(
"$webdotbase"
,
"-Timap"
,
"-o"
,
"$mapfilename"
,
"$filename"
);
$vars
->
{
'image_url'
}
=
$pngfilename
;
$vars
->
{
'map_url'
}
=
$mapfilename
;
system
(
"$webdotbase"
,
"-Tismap"
,
"-o"
,
"$mapfilename"
,
"$filename"
);
$vars
->
{
'image_map'
}
=
CreateImagemap
(
$mapfilename
);
}
# Cleanup any old .dot files created from previous runs.
...
...
template/en/default/bug/dependency-graph.html.tmpl
View file @
b8465474
...
...
@@ -27,7 +27,9 @@
# rankdir: string. "TB" if we are ranking top-to-bottom,
"LR" if left-to-right.
# image_url: string. The URL of the graphic showing the dependencies.
# map_url: string. The URL of the map file for the image.
# map_url: string. The URL of the map file for the image. (Optional)
# image_map: string. The image map for the graphic showing the
dependencies. (Optional)
#%]
[% title = "Dependency Graph"
...
...
@@ -42,13 +44,19 @@
[% PROCESS global/header.html.tmpl %]
[% image_map %]
<p>
Green circles represent open bugs.
</p>
<a href="[% map_url %]">
<img src="[% image_url %]" ismap>
</a>
[% IF image_map %]
<img src="[% image_url %]" usemap="#imagemap">
[% ELSE %]
<a href="[% map_url %]">
<img src="[% image_url %]" ismap>
</a>
[% END %]
<hr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment