[tools] testbot/web: Simplify the stats page initialization.
Pass the property descriptors directly to FormPage::_initialize(). Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- testbot/web/Stats.pl | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/testbot/web/Stats.pl b/testbot/web/Stats.pl index ab086976f7..c96e6fdafb 100644 --- a/testbot/web/Stats.pl +++ b/testbot/web/Stats.pl @@ -41,7 +41,10 @@ sub _initialize($$$) $self->Validate(); $self->{start} = Time(); - $self->SUPER::_initialize($Request, $RequiredRole); + my @PropertyDescriptors = ( + CreateBasicPropertyDescriptor("Days", "Days to analyze", !1, 1, "N", 2), + ); + $self->SUPER::_initialize($Request, $RequiredRole, \@PropertyDescriptors); } sub Validate($) @@ -374,17 +377,6 @@ sub GenerateBody($) print "</tbody></table></div>\n"; } -sub GetPropertyDescriptors($) -{ - my ($self) = @_; - - $self->{PropertyDescriptors} ||= [ - CreateBasicPropertyDescriptor("Days", "Days to analyze", !1, !1, "N", 2), - ]; - - return $self->SUPER::GetPropertyDescriptors(); -} - sub GetDisplayValue($$) { my ($self, $PropertyDescriptor) = @_; -- 2.30.2
participants (1)
-
Francois Gouget