fix device.inc.php indents and switch to using offsets

This commit is contained in:
Arjit Chaudhary
2015-09-16 16:00:07 +05:30
parent ea5b86529f
commit a827b3daab
+8 -14
View File
@@ -1,5 +1,4 @@
<?php
if ($_POST['editing']) {
if ($_SESSION['userlevel'] > "7") {
$updated = 0;
@@ -65,15 +64,13 @@ elseif ($update_message) {
?>
<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-1">
<div class="col-md-1 col-md-offset-2">
<form id="delete_host" name="delete_host" method="post" action="delhost/" role="form">
<input type="hidden" name="id" value="<?php echo($device['device_id']); ?>">
<button type="submit" class="btn btn-danger" name="Submit"><i class="fa fa-trash"></i> Delete device</button>
</form>
</div>
<div class="col-sm-1"></div>
<div class="col-sm-1">
<div class="col-md-1 col-md-offset-2">
<?php
if($config['enable_clear_discovery'] == 1) {
?>
@@ -83,7 +80,7 @@ elseif ($update_message) {
?>
</div>
</div>
<br />
<br>
<form id="edit" name="edit" method="post" action="" role="form" class="form-horizontal">
<input type=hidden name="editing" value="yes">
<div class="form-group">
@@ -123,8 +120,7 @@ if ($unknown) {
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
</div>
<div class="col-sm-2"></div>
<div class="col-sm-6">
<input id="sysLocation" name="sysLocation" class="form-control" <?php if (!$override_sysLocation) echo(' disabled="1"'); ?> value="<?php echo($override_sysLocation_string); ?>" />
</div>
@@ -141,8 +137,11 @@ if ($unknown) {
<input name="ignore" type="checkbox" id="ignore" value="1" <?php if ($device['ignore']) echo("checked=checked"); ?> />
</div>
</div>
<div class="col-sm-2"></div>
<div class="row">
<div class="col-md-1 col-md-offset-2">
<button type="submit" name="Submit" class="btn btn-default"><i class="fa fa-check"></i> Save</button>
</div>
</div>
</form>
<br />
<script>
@@ -167,13 +166,8 @@ if ($unknown) {
});
</script>
<?php
print_optionbar_start();
list($sizeondisk, $numrrds) = foldersize($config['rrd_dir']."/".$device['hostname']);
echo("Size on Disk: <b>" . formatStorage($sizeondisk) . "</b> in <b>" . $numrrds . " RRD files</b>.");
print_optionbar_end();
?>