[!
use strict;
use PVE::I18N;
use PVE::ConfigServer;
use PVE::HTMLUtils;
use PVE::HTMLControls;
use IO::File;
!]
[-
use strict;
my $cinfo = $fdat{__cinfo};
my $veid = $fdat{veid};
my $cid = $fdat{cid};
if (!($veid && defined ($cid))) {
print OUT "NO CID/VEID
\n";
return;
}
#my $conn = PVE::ConfigClient::connect ();
#my $vzlist = $conn->cluster_vzlist()->result;
my $out = '';
my $upid;
my $filename = "/tmp/vmops-$veid.out";
if (my $fh = IO::File->new ($filename, "r")) {
$upid = <$fh>;
close ($fh);
chomp $upid;
}
# my $running = 0;
#if ($upid) {
# $running = PVE::ConfigServer->check_worker ($upid);
#}
#$out .= "TEST: $upid $running
";
if ($upid) {
my $href = "javascript:command_abort(\"$upid\");";
my $abort = "";
$out .= PVE::HTMLUtils::create_statusframe ('logview', undef, $abort, undef, 450);
$out .= PVE::HTMLControls::create_command_viewer ('logview', 'logviewleft', 'abortbutton', $upid);
} else {
$out .= __("Nothing to view.");
}
print OUT $out;
-]