Commit 2b60ee7c authored by ueli heuer's avatar ueli heuer 👾
Browse files

show attribute has_HC and make it editable

parent 01379064
......@@ -660,6 +660,9 @@ function detail_host($host_id, $action, $group_id=null) // {{{
$table->add_row('description');
}
$table->add_row('value');
$table->add_cell(gettext('64Bit Counter:'),1,'description');
$table->add_cell($has_HC,DVG_table::WHOLE_ROW,'value');
$table->add_row('value');
$table->add_cell(gettext('Check Host:'),1,'description');
$table->add_cell($check_host,DVG_table::WHOLE_ROW,'value');
$table->add_row('value');
......@@ -733,8 +736,8 @@ function edit_host($host_id, $group_id, $loc_id, $param = null) // {{{
dh.securityName, dh.context, dh.securityLevel,
dh.authProtocol, dh.authKey, dh.privProtocol, dh.privKey,
dh.snmpport, dh.snmptimeout,
dh.snmpretries, dh.radiussecret, dh.activ,
dh.start_date, dh.stop_date, dh.check_host,
dh.snmpretries, dh.radiussecret, dh.activ, dh.has_HC,
dh.start_date, dh.stop_date, dh.check_host,
ds.description, dhw.id, dhw.model
from dvg_host dh
left join dvg_sysObjectID ds on dh.sysObjectID_id = ds.id
......@@ -748,7 +751,7 @@ function edit_host($host_id, $group_id, $loc_id, $param = null) // {{{
$snmpsecurityname, $snmpcontext, $snmpsecuritylevel,
$snmpauthprotocol, $snmpauthkey, $snmpprivprotocol, $snmpprivkey,
$snmpport, $snmptimeout, $snmpretries,
$radiussecret, $activ, $start_date, $stop_date, $check_host) =
$radiussecret, $activ, $has_HC, $start_date, $stop_date, $check_host) =
$result;
$count_devices = DVG_database::getOne($CONFIG->DB,sprintf('select count(id)
from dvg_device
......@@ -781,6 +784,7 @@ function edit_host($host_id, $group_id, $loc_id, $param = null) // {{{
$snmpprivprotocol = '';
$snmpprivkey = '';
$check_host = '';
$has_HC = 'y';
$start_date = '';
$stop_date = '';
}
......@@ -1014,6 +1018,12 @@ function edit_host($host_id, $group_id, $loc_id, $param = null) // {{{
$table->add_cell(DVG_interface::input('text','ord', $ord,
gettext('Reihenfolge'),3),DVG_table::WHOLE_ROW,'value');
$table->add_row('description');
$table->add_cell(gettext('64Bit Counter?:'));
$table->add_cell(DVG_interface::check_yes_no('has_HC',
$has_HC == 'y',
gettext('This host has 64Bit Counter')),DVG_table::WHOLE_ROW,'value');
$table->add_row('description');
$table->add_cell(gettext('check host:'));
$table->add_cell(DVG_interface::check_yes_no('check_host',
......@@ -1136,6 +1146,11 @@ function save_host () // {{{
} else {
$check_host = 'n';
}
if (DVG_input::check_checkbox('has_HC',DVG_input::SRC_POST)) {
$has_HC = 'y';
} else {
$has_HC = 'n';
}
if (! $hw_id ) { $hw_id = 'null'; }
if (! $rt_nr ) { $rt_nr = 'null'; }
......@@ -1251,6 +1266,7 @@ function save_host () // {{{
snmpretries='$snmpretries',
radiussecret=$radiussecret,
activ='$activ',
has_HC='$has_HC',
start_date='$start_date',
stop_date=$stop_date,
check_host='$check_host',
......@@ -1275,12 +1291,12 @@ function save_host () // {{{
dvg_host(id,ord,name,host,loc_id,type_id,host_group,
cust_id, hw_id, rt_id, snmpversion, community,
write_community, trap_community, snmpport, snmptimeout,
snmpretries, radiussecret, check_host, activ,
snmpretries, radiussecret, check_host, activ, has_HC,
start_date, stop_date, user, changed, creator, created)
values (null, $ord,'$name', $fqdn,'$loc_id','$host_type', $group_id,
$cust_id, $hw_id, $rt_nr, $snmpversion, '$read_community',
$write_community, $trap_community, '$snmpport','$snmptimeout',
'$snmpretries', $radiussecret,'$check_host','$activ',
'$snmpretries', $radiussecret,'$check_host','$activ', '$has_HC',
'$start_date', $stop_date,
'$USER->user_name',now(),'$USER->user_name',now())");
DVG_error::check($result);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment