<% include('/elements/popup_link.html',
@@ -50,10 +97,24 @@ Click on a configuration value to change it.
'width' => $width,
'height' => $height,
'actionlabel' => 'Enter configuration value',
- 'label' => ''. $i->key. '',
- 'aname' => $i->key,
+ 'label' => "$label",
+ 'aname' => $i->key, #agentnum
+ # if $cgi->param('showagent')?
)
%>: <% $i->description %>
+% if ( $agent && $cgi->param('showagent') ) {
+% my $confnum = $conf->conf( $i->key, $agent->agentnum, 1 )->confnum;
+ (delete agent override)
+% } elsif ( $i->base_key
+% || ( $deleteable{$i->key} && $conf->exists($i->key) ) ) {
+% my $confnum =
+% $agent
+% ? $conf->conf( $i->key, $agent->agentnum, 1 )->confnum
+% : $conf->conf( $i->key )->confnum;
+% my $showagent = $cgi->param('showagent') ? '_showagent' : '';
+ (delete configuration item)
+% }
+
|
@@ -66,7 +127,7 @@ Click on a configuration value to change it.
no type |
-% } elsif ( $type eq 'image' ) {
+% } elsif ( $type eq 'image' ) {
@@ -86,7 +147,7 @@ Click on a configuration value to change it.
|
-% } elsif ( $type eq 'binary' ) {
+% } elsif ( $type eq 'binary' ) {
@@ -99,82 +160,196 @@ Click on a configuration value to change it.
% } elsif ( $type eq 'textarea'
% || $type eq 'editlist'
-% || $type eq 'selectmultiple' ) {
+% || $type eq 'selectmultiple'
+% )
+% {
|
-
-
-<% encode_entities(join("\n",
+
+<% encode_entities(join("\n",
map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
$conf->config($i->key, $agentnum)
) )
-%>
-
+%>
|
|
+
% } elsif ( $type eq 'checkbox' ) {
- YES' : 'ff0000">NO' %> |
+ YES' : 'ff0000">NO' %> |
+
+% } elsif ( $type eq 'select' && $i->select_hash ) {
+%
+% my %hash;
+% if ( ref($i->select_hash) eq 'ARRAY' ) {
+% tie %hash, 'Tie::IxHash', '' => '', @{ $i->select_hash };
+% } else {
+% tie %hash, 'Tie::IxHash', '' => '', %{ $i->select_hash };
+% }
+
+
+
+ <% $conf->exists($i->key, $agentnum) ? $hash{ $conf->config($i->key, $agentnum) } : '' %>
+ |
+
+
% } elsif ( $type eq 'text' || $type eq 'select' ) {
-
+ |
<% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' %>
- |
-% } elsif ( $type eq 'select-sub' ) {
+
+
+
+% } elsif ( $type eq 'select-sub' ) {
-
+ |
<% $conf->config($i->key, $agentnum) %>:
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
|
-% } else {
+
+% } elsif ( $type =~ /^select-(part_svc|part_pkg|pkg_class)$/ ) {
+%
+% my $table = $1;
+% my $namecol = $namecol{$table};
+% my $pkey = dbdef->table($table)->primary_key;
+%
+% my @keys = $conf->config($i->key, $agentnum);
+
+
+
+ <% join( ' ',
+ map {
+ my $key = $_;
+ my $record = qsearchs($table, { $pkey => $key });
+ $record ? "$key: ".$record->$namecol() : $key;
+ } @keys
+ )
+ %>
+ |
+
+
+% } else {
unknown type <% $type %>
|
-% }
+% }
% $n++;
% }
|
-% }
+
+% } # foreach my $agentnum
+
+% if ( @add_agents ) {
+
+
+
+
+ |
+
+
+% } #if @add_agents
+
+% } # foreach my $i