From: Andrea Righi [mailto:[EMAIL PROTECTED]
Sent: Wed 26/04/2006 06:47
To: Bernard Li
Cc: sisuite-devel@lists.sourceforge.net
Subject: Re: More si_monitortk ideas
Bernard Li wrote:
> Hi Andrea:
>
> I made the
modifications, the background of the progress bar is more
> obvious, but I
still cannot see the progress bar. I am testing on
> Fedora Core 5
with perl-Tk-804.026.
>
> With my "widget" application, there is no
#15, it only goes up to #5.
ouch! attached the progress bar demo that is
included in my perl-Tk package.
>
>
> I have no problems
seeing other perl-Tk progress bars (we have one
> with SystemInstaller's
Image creation GUI), so I'm not sure what the
> problem
is.
>
> I'll try to take a look at this later.
>
> Can
you perhaps take a screenshot?
attached.
>
> BTW, I would
recommend moving the "Status" column to the end so that
> when you
highlight the row, there won't be a huge gap.
I think that in this way
the interface could be less usable... I've not
the immediate view about the
status of the clients (which IMHO is the
more important information)... a
better solution could be to put an
option to check/uncheck the fields the
user want to see; in this way I
could choose to see a lot of info (loosing
the immediate view of the
status) or see only few info... what do you
think?
-Andrea
--- si_monitortk.orig 2006-04-27 02:30:54.000000000 -0700 +++ si_monitortk 2006-04-27 02:29:40.000000000 -0700 @@ -59,6 +59,9 @@ my $CONFDIR = '/etc/systemimager'; +# Global variable to store the numerical status (0..100) of imaging +our $global_status; + # load resources my %conf; my $conffile = "$CONFDIR/$program_name"; @@ -689,25 +692,25 @@ my $row = $tab->addchild(''); # Evaluate the status and adjust the style of the entry. my ($style, $status_icon); - my $status = $client->{$mac}->{'status'} || 0; - if (!$status) { + our $global_status = $client->{$mac}->{'status'} || 0; + if (!$global_status) { $num_inst++; $client->{$mac}->{'status'} = 'initializing...'; $style = $init_style; $status_icon = $server_init_icon; - } elsif ($status < 0) { + } elsif ($global_status < 0) { $num_fail++; $client->{$mac}->{'status'} = 'error!'; $style = $fail_style; $status_icon = $server_error_icon; - } elsif ($status == 100) { + } elsif ($global_status == 100) { $num_ok++; $client->{$mac}->{'status'} = 'done'; $style = $done_style; $status_icon = $server_ok_icon; - } elsif (($status > 0) && ($status < 100)) { + } elsif (($global_status > 0) && ($global_status < 100)) { $num_inst++; - $client->{$mac}->{'status'} = sprintf('%.2f%%', $status); + $client->{$mac}->{'status'} = sprintf('%.2f%%', $global_status); $style = $inst_style; $status_icon = $server_inst_icon; } else { @@ -716,6 +719,9 @@ $style = $unkn_style; $status_icon = $server_error_icon; } + + my $status; + # Create the installation progress bar. if ($progress) { $status_progress = $tab->ProgressBar( @@ -815,6 +821,13 @@ -statusmsg => "Managed nodes: " . ($num_ok + $num_inst + $num_unkn + $num_fail) . " ($num_ok ok, $num_inst installing, $num_unkn unknown, $num_fail error)", ); + + # Refresh progress bar. + if ($status_progress) { + $status_progress->value($global_status); + $status_progress->update(); + } + # Refresh view. $tab->update(); # Refresh the status bar.