From 3e570a118edbe407c2261bbd64215e0d3893f993 Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 16 Jun 2014 23:06:04 +0100 Subject: [PATCH 1/4] Tidied device setting pages --- html/pages/device/edit/alerts.inc.php | 53 +++---- html/pages/device/edit/apps.inc.php | 18 +-- html/pages/device/edit/device.inc.php | 96 +++++++------ html/pages/device/edit/ipmi.inc.php | 63 +++------ html/pages/device/edit/ports.inc.php | 42 +++--- html/pages/device/edit/snmp.inc.php | 195 +++++++++++++------------- 6 files changed, 223 insertions(+), 244 deletions(-) diff --git a/html/pages/device/edit/alerts.inc.php b/html/pages/device/edit/alerts.inc.php index 2e9679c11..be7bc7707 100644 --- a/html/pages/device/edit/alerts.inc.php +++ b/html/pages/device/edit/alerts.inc.php @@ -35,33 +35,26 @@ $disable_notify = get_dev_attrib($device,'disable_notify');

Alert settings

- - - - - - -
-
- - - - - - - - - - - - - - - -
/>
Override sysContact: value="" />
/>
Disable all alerting for this host
-
- -
-
-
-
+
+ +
+ +
+ /> +
+
+
+
+
+
+ value="" /> +
+
+
+ +
+ /> +
+
+ +
diff --git a/html/pages/device/edit/apps.inc.php b/html/pages/device/edit/apps.inc.php index 7807b2b48..d8450a15c 100644 --- a/html/pages/device/edit/apps.inc.php +++ b/html/pages/device/edit/apps.inc.php @@ -69,13 +69,14 @@ if (count($apps_enabled)) } } -echo("
-
+echo("
+
+ - +
- - + + "); @@ -86,19 +87,20 @@ foreach ($applications as $app) if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } echo(" "); - echo(" "); - echo(" "); + echo(" "); echo(" "); $row++; } -echo(''); +echo(''); echo('
EnableApplicationEnableApplication
"); + echo(" "); echo(" "); echo(" ". ucfirst($app) . "". ucfirst($app) . "
'); echo(''); echo('
'); +echo('
'); ?> diff --git a/html/pages/device/edit/device.inc.php b/html/pages/device/edit/device.inc.php index 8af554de0..3899e62f1 100644 --- a/html/pages/device/edit/device.inc.php +++ b/html/pages/device/edit/device.inc.php @@ -55,29 +55,24 @@ if ($updated && $update_message) } ?> - - - - -
-
-
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - -
Description:
- Type: - - + + +
+
+ +
+ +
+ +
+
+
+ +
+ -
/>
Override sysLocation: value="" />
Disable
/>
Ignore
/> 
- - - -
+ +
+ +
+ +
+
+ /> +
+
+
+
+
+
+
+ value="" /> +
+
+
+ +
+ /> +
+
+
+ +
+ /> +
+
+ +
- IPMI settings - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - -
IPMI/BMC Hostname
IPMI/BMC Username
IPMI/BMC Password
-
- -
- To disable IPMI polling, please clear the setting fields and click Save. -
-
-
-
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+

To disable IPMI polling, please clear the setting fields and click Save.

diff --git a/html/pages/device/edit/ports.inc.php b/html/pages/device/edit/ports.inc.php index ddd87052c..11f68cacd 100644 --- a/html/pages/device/edit/ports.inc.php +++ b/html/pages/device/edit/ports.inc.php @@ -18,53 +18,52 @@ if ($updated && $update_message) } echo("
-
+ "); -echo(" +echo("
- - - - - - + + + + + + - + - - - + + + "); ?> ". $port['ifOperStatus'].""); echo(""); echo(""); echo(""); diff --git a/html/pages/device/edit/snmp.inc.php b/html/pages/device/edit/snmp.inc.php index efe910577..9281706d1 100644 --- a/html/pages/device/edit/snmp.inc.php +++ b/html/pages/device/edit/snmp.inc.php @@ -6,6 +6,7 @@ if ($_POST['editing']) { $community = mres($_POST['community']); $snmpver = mres($_POST['snmpver']); + $transport = mres($_POST['transport']); $port = mres($_POST['port']); $timeout = mres($_POST['timeout']); $retries = mres($_POST['retries']); @@ -22,7 +23,8 @@ if ($_POST['editing']) $update = array( 'community' => $community, 'snmpver' => $snmpver, - 'port' => $port + 'port' => $port, + 'transport' => $transport ); if ($_POST['timeout']) { $update['timeout'] = $timeout; } @@ -58,85 +60,84 @@ if ($updated && $update_message) print_error($update_message); } -echo("
IndexNameAdminOperDisableIgnoreIndexNameAdminOperDisableIgnore Description
"); - echo(""); + echo(""); echo(""); echo(""); - echo(""); + echo(""); echo(""); echo("".$port['ifAlias'] . "
-
- - +echo(" + - - - - - -
- -
- - - - - - +
+ +
+ +
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - "); + + +
+ +
+ +
+
+
+ +
+ (milli)seconds +
+
+
+ +
+ +
+
"); echo(' -
SNMP Version
- -
SNMPv1/v2c Configuration
SNMP Community
-
SNMPv3 Configuration
Auth Level
- + + +
+ +
+
+ +
+ -
Auth User Name
Auth Password
Auth Algorithm
- -
Crypto Password
Crypto Algorithm
- -
SNMP Connectivity
SNMP Transport
- + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+ -
SNMP Port
-
SNMP Timeout
  - (milli)seconds -
SNMP Retries
-
- - + -
'); +'); ?> From 250d87cd60905aa012e55ba7d3608a8f622e63d3 Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 20 Jun 2014 23:01:21 +0100 Subject: [PATCH 2/4] Final fixes for device edit pages --- html/forms/discovery-module-update.inc.php | 37 +++ html/forms/poller-module-update.inc.php | 37 +++ html/pages/device/edit/apps.inc.php | 8 +- html/pages/device/edit/modules.inc.php | 281 +++++++++++++++------ 4 files changed, 287 insertions(+), 76 deletions(-) create mode 100644 html/forms/discovery-module-update.inc.php create mode 100644 html/forms/poller-module-update.inc.php diff --git a/html/forms/discovery-module-update.inc.php b/html/forms/discovery-module-update.inc.php new file mode 100644 index 000000000..224657ae5 --- /dev/null +++ b/html/forms/discovery-module-update.inc.php @@ -0,0 +1,37 @@ +'); +echo(' + + + + + +'); echo(''); echo(''); echo('
'); diff --git a/html/pages/device/edit/modules.inc.php b/html/pages/device/edit/modules.inc.php index 1e9ba7ff2..36a53b3f1 100644 --- a/html/pages/device/edit/modules.inc.php +++ b/html/pages/device/edit/modules.inc.php @@ -1,105 +1,236 @@ +
+
+ Poller Modules +
+
+ Discovery Modules +
+
+
+
+ + + + + + + '); -$i=0; - -echo('
Poller Modules
'); - -echo('
ModuleGlobalDevice
'); -echo(''); foreach ($config['poller_modules'] as $module => $module_status) { - if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } + echo(' + + + + + '); - $i++; + echo(' + + +'); } -echo('
ModuleGlobalDevice
'.$module.' +'); - echo('
'.$module.''); + if($module_status == 1) + { + echo('Enabled'); + } + else + { + echo('Disabled'); + } - echo(($module_status ? 'enabled' : 'disabled' )); - - echo(''); + echo(' + +'); if (isset($attribs['poll_'.$module])) { - if ($attribs['poll_'.$module]) {echo("enabled");} else { echo('disabled'); } - } else { - echo(($module_status ? 'enabled' : 'disabled' )); + if ($attribs['poll_'.$module]) + { + echo('Enabled'); + $module_checked = 'checked'; + } + else + { + echo('Disabled'); + $module_checked = ''; + } + } + else + { + if($module_status == 1) + { + echo('Enabled'); + $module_checked = 'checked'; + } + else + { + echo('Disabled'); + $module_checked = ''; + } } - echo(''); + echo(' + +'); - echo('
- - - -
'); + echo(' + +'); - echo('
'); -echo('
'); -echo('
'); -$i=0; -echo('
Discovery Modules
'); -echo(''); -echo(''); +?> + +
ModuleGlobalDevice
+
+
+ + + + + + + + + $module_status) { - if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } - echo(' + + + + '); + echo(' + + +'); - $i++; } -echo('
ModuleGlobalDevice
'.$module.''); - echo(($module_status ? 'enabled' : 'disabled' )); + echo(' +
+ '.$module.' + +'); - echo(''); + if($module_status == 1) + { + echo('Enabled'); + } + else + { + echo('Disabled'); + } + + echo(' + +'); if (isset($attribs['discover_'.$module])) { - if ($attribs['discover_'.$module]) {echo("enabled");} else { echo('disabled'); } - } else { - echo(($module_status ? 'enabled' : 'disabled' )); + if($attribs['discover_'.$module]) + { + echo('Enabled'); + $module_checked = 'checked'; + } + else + { + echo('Disabled'); + $module_checked = ''; + } + } + else + { + if($module_status == 1) + { + echo('Enabled'); + $module_checked = 'checked'; + } + else + { + echo('Disabled'); + $module_checked = ''; + } } - echo(''); + echo(' + +'); - echo('
- - - -
'); + echo(' + +'); - echo('
'); -echo('
'); +echo(' + +
+'); ?> + + From 8f1e48933b517c1d20649403e0f52333d0a4391b Mon Sep 17 00:00:00 2001 From: laf Date: Tue, 24 Jun 2014 00:53:11 +0100 Subject: [PATCH 3/4] Shrunk input boxes to col-sm-4 from 6 --- html/pages/device/edit/snmp.inc.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/html/pages/device/edit/snmp.inc.php b/html/pages/device/edit/snmp.inc.php index 9281706d1..1d0073e6e 100644 --- a/html/pages/device/edit/snmp.inc.php +++ b/html/pages/device/edit/snmp.inc.php @@ -65,7 +65,7 @@ echo("
-
+
@@ -87,7 +87,7 @@ echo("
-
+
-
+
-
+
-
+
"); foreach ($config['snmp']['transports'] as $transport) @@ -151,19 +151,19 @@ echo("
-
+
-
+
(milli)seconds
-
+
"); From 9ad725d36456b9569b2e1395329357f54b045ab7 Mon Sep 17 00:00:00 2001 From: laf Date: Tue, 24 Jun 2014 00:55:00 +0100 Subject: [PATCH 4/4] Removed (milli) from timeout section --- html/pages/device/edit/snmp.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/pages/device/edit/snmp.inc.php b/html/pages/device/edit/snmp.inc.php index 1d0073e6e..47ed24e49 100644 --- a/html/pages/device/edit/snmp.inc.php +++ b/html/pages/device/edit/snmp.inc.php @@ -158,7 +158,7 @@ echo("
- (milli)seconds + seconds