From beceaeac140991c67a064ddbbff6f8445dceb9f6 Mon Sep 17 00:00:00 2001 From: Marc 'HE' Brockschmidt Date: Fri, 14 Mar 2008 21:17:51 +0100 Subject: [PATCH] Make machines.cgi display the purpose attribute from LDAP --- machines.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/machines.cgi b/machines.cgi index 383f7cd..8fe4bfa 100755 --- a/machines.cgi +++ b/machines.cgi @@ -36,6 +36,7 @@ my (%attrs, @attrorder, %summaryattrs, @summaryorder); 'sshrsahostkey' => 'SSH host key', 'sshrsahostfprint' => 'SSH host fingerprint', 'description' => 'Description', + 'purpose' => 'purposes of this server', # 'createtimestamp' => 'Entry created', # 'modifytimestamp' => 'Entry modified' ); @@ -44,7 +45,7 @@ my (%attrs, @attrorder, %summaryattrs, @summaryorder); @attrorder = qw(hostname admin architecture distribution access sponsor sponsor-admin location machine memory disk bandwidth status notes sshrsahostkey sshrsahostfprint - description); + description purpose); # ditto for summary %summaryattrs = ('hostname' => 'Host name', @@ -144,6 +145,9 @@ foreach $dn (sort {$entries->{$a}->{host}->[0] cmp $entries->{$b}->{host}->[0]} $output{sponsor} .= $sponsor; } } + + #Reformat purposes to be pleasing for the human eye: + $output{purpose} = join(",", @{$data->{purpose}}); $selected = " selected "; } -- 2.20.1