Module: tools Branch: master Commit: 13acc1eef093ef6688964794d5b73d9fc4e459ab URL: https://source.winehq.org/git/tools.git/?a=commit;h=13acc1eef093ef6688964794...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Mar 4 18:36:46 2022 +0100
[tools] testbot/web: Simplify the stats page initialization.
Pass the property descriptors directly to FormPage::_initialize().
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 ab08697..c96e6fd 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) = @_;