projects
/
mirror
/
userdir-ldap-cgi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f1fadc
)
Make machines.cgi display the purpose attribute from LDAP
author
Marc 'HE' Brockschmidt
<he@debian.org>
Fri, 14 Mar 2008 20:17:51 +0000
(21:17 +0100)
committer
Marc 'HE' Brockschmidt
<he@debian.org>
Fri, 14 Mar 2008 20:17:51 +0000
(21:17 +0100)
machines.cgi
patch
|
blob
|
history
diff --git
a/machines.cgi
b/machines.cgi
index
383f7cd
..
8fe4bfa
100755
(executable)
--- 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',
'sshrsahostkey' => 'SSH host key',
'sshrsahostfprint' => 'SSH host fingerprint',
'description' => 'Description',
+ 'purpose' => 'purposes of this server',
# 'createtimestamp' => 'Entry created',
# 'modifytimestamp' => 'Entry modified'
);
# '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
@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',
# 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;
}
}
$output{sponsor} .= $sponsor;
}
}
+
+ #Reformat purposes to be pleasing for the human eye:
+ $output{purpose} = join(",", @{$data->{purpose}});
$selected = " selected ";
}
$selected = " selected ";
}