[Orca-dev] Volatile issue in SourceFile.pm (from 379 snapshot)
John Garner
jcgarner at douglas.co.us
Fri Jul 30 09:15:36 PDT 2004
In the 379 rev, the SourceFile.pm file trys to 'shorten' the names when
there is only one match for a plot with a regex in it. The problem is
that the regex pattern is kept in the resulting name. This wreaks havoc
with URL's since ?'s are 'special' unless escaped, and some of the regex
patterns have lots of ?'s in them.
The following patch basically removes the regex code from the names when
the 'volatile' rule is in effect. The modifications to the
$all_names_with_subgroup variable is trivial. The
@names_without_subgroup cleanup is a bit more of a crude hack since my
perl syntax skills are not as strong as i'd like (so if somebody can do
it without the '$nws' temporary assignment, by all means please do)
After making the changes, i went from getting 404's to seeing the graphs.
--john
--- /opt/monitor/src/orca-snapshot-r379/lib/Orca/SourceFile.pm Sun Jul
4 13:58:53 2004
+++ SourceFile.pm Fri Jul 30 09:51:55 2004
@@ -785,12 +785,17 @@
lc($plot->{data_type}[0]),
'volatile',
@{$original_plot->{data}[0]});
+ $all_names_with_subgroup =~ s/\(.*\)//g;
+
@my_short_rrds = ($all_names_with_subgroup);
- @names_without_subgroup = (join('_',
- $group_name,
- lc($plot->{data_type}[0]),
- 'volatile',
- @{$original_plot->{data}[0]}));
+
+ my $nws= (join('_',
+ $group_name,
+ lc($plot->{data_type}[0]),
+ 'volatile',
+ @{$original_plot->{data}[0]}));
+ $nws =~ s/\(.*\)//g;
+ @names_without_subgroup = ($nws);
} else {
$all_names_with_subgroup = join(',', sort @names_with_subgroup);
}
More information about the Orca-dev
mailing list