Skip to content
Snippets Groups Projects
Commit 60e04dc8 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

Uprava formatovani tabulky

parent 5b557ca0
Branches
Tags
No related merge requests found
...@@ -10,7 +10,7 @@ use strict; ...@@ -10,7 +10,7 @@ use strict;
use Getopt::Std; use Getopt::Std;
use File::Basename; use File::Basename;
our $VERSION = "2.0"; our $VERSION = "2.1";
my $warden_path = '/opt/warden-server'; my $warden_path = '/opt/warden-server';
require $warden_path . '/lib/WardenStatus.pm'; require $warden_path . '/lib/WardenStatus.pm';
...@@ -71,22 +71,22 @@ if ($UID != 0) { ...@@ -71,22 +71,22 @@ if ($UID != 0) {
my @clients = WardenStatus::getClients($warden_path); my @clients = WardenStatus::getClients($warden_path);
print "+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
print "| Client ID | Hostname | Registered | Requestor | Service | CT | Type | ROE | Description tags | IP Net Client |\n"; print "| Client ID | Hostname | Registered | Requestor | Service | CT | Type | ROE | Description tags | IP Net Client |\n";
print "+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
foreach (@clients) { foreach (@clients) {
printf("| %-10s ", @$_[0]); printf("| %-10s ", @$_[0]);
printf("| %-30s ", @$_[1]); printf("| %-30s ", @$_[1]);
printf("| %19s ", @$_[2]); printf("| %19s ", @$_[2]);
printf("| %-10s ", @$_[3]); printf("| %-23s ", @$_[3]);
printf("| %-20s ", @$_[4]); printf("| %-25s ", @$_[4]);
printf("| %-2s ", @$_[5]); printf("| %-2s ", @$_[5]);
printf("| %-15s ", @$_[6]); printf("| %-15s ", @$_[6]);
printf("| %-4s ", @$_[7]); printf("| %-4s ", @$_[7]);
printf("| %-30s ", @$_[8]); printf("| %-50s ", @$_[8]);
printf("| %-18s |\n", @$_[9]); printf("| %-18s |\n", @$_[9]);
} }
print "+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
print "\n"; print "\n";
print "Current registered clients in: " . scalar localtime(time) . "\n"; print "Current registered clients in: " . scalar localtime(time) . "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment