]>
git.proxmox.com Git - pve-installer.git/blob - Proxmox/UI/StdIO.pm
75ddbeb6924d81e25710e7c469b426bcca01984c
1 package Proxmox
::UI
::StdIO
;
6 use base
qw(Proxmox::UI::Base);
17 my ($self, $msg) = @_;
19 print STDOUT
"message: $msg\n";
23 my ($self, $msg) = @_;
24 log_err
("error: $msg\n");
25 print STDOUT
"error: $msg\n";
29 my ($self, $success, $msg) = @_;
31 my $state = $success ?
'ok' : 'err';
32 log_info
("finished: $state, $msg\n");
33 print STDOUT
"finished: $state, $msg\n";
37 my ($self, $query) = @_;
39 $query =~ s/\n/ /g; # FIXME: use a better serialisation (e.g., JSON)
40 print STDOUT
"prompt: $query\n";
42 my $response = <STDIN
> // ''; # FIXME: error handling?
46 return lc($response) eq 'ok';
50 my ($raw_html, $html_dir) = @_;
56 my ($self, $ratio, $text) = @_;
58 $text = '' if !defined($text);
60 print STDOUT
"progress: $ratio $text\n";
66 # nothing to do for now?