Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify UI as in add device.. #1798

Merged
merged 1 commit into from Aug 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 28 additions & 27 deletions html/pages/delhost.inc.php
@@ -1,5 +1,3 @@
<h1>Delete Host</h1>

<?php

if ($_SESSION['userlevel'] < 10) {
Expand Down Expand Up @@ -27,6 +25,7 @@
print_error("Are you sure you want to delete device " . $device['hostname'] . "?");
?>
<br />

<form name="form1" method="post" action="" class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-4">
Expand All @@ -46,37 +45,39 @@
else {
?>

<form name="form1" method="post" action="" class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-7">
<?php print_error("Warning, this will remove the device from being monitered!</p>
<p>It will also remove historical data about this device such as <mark>Syslog</mark>, <mark>Eventlog</mark> and <mark>Alert log</mark> data.</p>");?>
</div>
</div>
<div class="form-group">
<label for="id" class="col-sm-2 control-label">Device:</label>
<div class="col-sm-7">
<select name="id" class="form-control" id="id">
<form name="form1" method="post" action="" class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-7">
<div><h2>Delete Device</h2></div>
<div class="alert alert-danger" role="alert">
<center>
<p>Warning, this will remove the device from being monitered!</p>
<p>It will also remove historical data about this device such as <mark>Syslog</mark>, <mark>Eventlog</mark> and <mark>Alert log</mark> data.</p>
</center>
</div>
<div class="well">
<div class="form-group">
<label for="id" class="col-sm-2 control-label">Device:</label>
<div class="col-sm-7">
<select name="id" class="form-control" id="id">
<?php
foreach (dbFetchRows("SELECT * FROM `devices` ORDER BY `hostname`") as $data) {
echo("<option value='".$data['device_id']."'>".$data['hostname']."</option>");
}

<?php

foreach (dbFetchRows("SELECT * FROM `devices` ORDER BY `hostname`") as $data) {
echo("<option value='".$data['device_id']."'>".$data['hostname']."</option>");
}

?>
</select>
</div>
</div>
?>
</select>
<hr>
<input id="confirm" type="hidden" name="confirm" value="0" />
<center><button id="confirm_delete" type="submit" class="btn btn-default">Delete Device</button></center>
</div>
</div>
</div>
<div class="form-group">
<!-- <tr>
<td>Remove RRDs (Data files): </td>
<td><input type="checkbox" name="remove_rrd" value="yes"></td>
</tr>-->
<div class="col-sm-offset-2 col-sm-8">
<input id="confirm" type="hidden" name="confirm" value="0" />
<button id="confirm_delete" type="submit" class="btn btn-default">Delete Device</button>
</div>
</form>
<?php
}
Expand Down