mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Revert "changes needed to run under web server subdirectory"
This commit is contained in:
@@ -149,7 +149,7 @@ if ($unknown) {
|
||||
var device_id = $(this).data("device_id");
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: { type: "rediscover-device", device_id: device_id },
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
|
||||
@@ -101,7 +101,7 @@ $('#newThread').on('click', function(e){
|
||||
var form = $('#alert-reset');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: form.serialize(),
|
||||
dataType: "html",
|
||||
success: function(data){
|
||||
@@ -125,7 +125,7 @@ $( ".sensor" ).blur(function() {
|
||||
var $this = $(this);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: { type: "health-update", device_id: device_id, data: data, sensor_id: sensor_id , value_type: value_type},
|
||||
dataType: "html",
|
||||
success: function(data){
|
||||
@@ -155,7 +155,7 @@ $('input[name="alert-status"]').on('switchChange.bootstrapSwitch', function(eve
|
||||
var sensor_id = $(this).data("sensor_id");
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: { type: "sensor-alert-update", device_id: device_id, sensor_id: sensor_id, state: state},
|
||||
dataType: "html",
|
||||
success: function(data){
|
||||
@@ -172,7 +172,7 @@ $("[name='remove-custom']").on('click', function(event) {
|
||||
var sensor_id = $(this).data("sensor_id");
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: { type: "sensor-alert-update", sensor_id: sensor_id, sub_type: "remove-custom" },
|
||||
dataType: "html",
|
||||
success: function(data){
|
||||
|
||||
@@ -153,7 +153,7 @@ echo('
|
||||
var device_id = $(this).data("device_id");
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: { type: "poller-module-update", poller_module: poller_module, device_id: device_id, state: state},
|
||||
dataType: "html",
|
||||
success: function(data){
|
||||
@@ -184,7 +184,7 @@ echo('
|
||||
var device_id = $(this).data("device_id");
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
url: '/ajax_form.php',
|
||||
data: { type: "discovery-module-update", discovery_module: discovery_module, device_id: device_id, state: state},
|
||||
dataType: "html",
|
||||
success: function(data){
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax_form.php",
|
||||
url: "/ajax_form.php",
|
||||
data: $('form#ignoreport').serialize(),
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
@@ -108,6 +108,6 @@
|
||||
device_id: "<?php echo $device['device_id']; ?>"
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php"
|
||||
url: "/ajax_table.php"
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -192,7 +192,7 @@ if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE port_id = '".$port['port_i
|
||||
echo "<span class='pagemenu-selected'>";
|
||||
}
|
||||
|
||||
echo "<a href='" . generate_url(array('page'=>'device','device'=>$device['device_id'], 'tab'=>'port', 'port'=>$port['port_id'])) . "/junose-atm-vp/bits/'>Bits</a>";
|
||||
echo "<a href='/device/device=".$device['device_id'].'/tab=port/port='.$port['port_id']."/junose-atm-vp/bits/'>Bits</a>";
|
||||
if ($vars['view'] == 'junose-atm-vp' && $vars['graph'] == 'bits') {
|
||||
echo '</span>';
|
||||
}
|
||||
@@ -202,7 +202,7 @@ if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE port_id = '".$port['port_i
|
||||
echo "<span class='pagemenu-selected'>";
|
||||
}
|
||||
|
||||
echo "<a href='" . generate_url(array('page'=>'device','device'=>$device['device_id'], 'tab'=>'port', 'port'=>$port['port_id'])) . "/junose-atm-vp/packets/'>Packets</a>";
|
||||
echo "<a href='device/device=".$device['device_id'].'/tab=port/port='.$port['port_id']."/junose-atm-vp/packets/'>Packets</a>";
|
||||
if ($vars['view'] == 'junose-atm-vp' && $vars['graph'] == 'bits') {
|
||||
echo '</span>';
|
||||
}
|
||||
@@ -212,7 +212,7 @@ if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE port_id = '".$port['port_i
|
||||
echo "<span class='pagemenu-selected'>";
|
||||
}
|
||||
|
||||
echo "<a href='" . generate_url(array('page'=>'device','device'=>$device['device_id'], 'tab'=>'port', 'port'=>$port['port_id'])) . "/junose-atm-vp/cells/'>Cells</a>";
|
||||
echo "<a href='device/device=".$device['device_id'].'/tab=port/port='.$port['port_id']."/junose-atm-vp/cells/'>Cells</a>";
|
||||
if ($vars['view'] == 'junose-atm-vp' && $vars['graph'] == 'bits') {
|
||||
echo '</span>';
|
||||
}
|
||||
@@ -222,14 +222,14 @@ if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE port_id = '".$port['port_i
|
||||
echo "<span class='pagemenu-selected'>";
|
||||
}
|
||||
|
||||
echo "<a href='" . generate_url(array('page'=>'device','device'=>$device['device_id'], 'tab'=>'port', 'port'=>$port['port_id'])) . "/junose-atm-vp/errors/'>Errors</a>";
|
||||
echo "<a href='device/device=".$device['device_id'].'/tab=port/port='.$port['port_id']."/junose-atm-vp/errors/'>Errors</a>";
|
||||
if ($vars['view'] == 'junose-atm-vp' && $vars['graph'] == 'bits') {
|
||||
echo '</span>';
|
||||
}
|
||||
}//end if
|
||||
|
||||
if ($_SESSION['userlevel'] >= '10') {
|
||||
echo "<span style='float: right;'><a href='" . generate_url(array('page'=>'bills', 'view'=>'add', 'port'=>$port['port_id'])) . "'><img src='images/16/money.png' border='0' align='absmiddle'> Create Bill</a></span>";
|
||||
echo "<span style='float: right;'><a href='bills/view=add/port=".$port['port_id']."/'><img src='images/16/money.png' border='0' align='absmiddle'> Create Bill</a></span>";
|
||||
}
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
@@ -85,7 +85,7 @@ foreach ($heads as $head => $extra) {
|
||||
$icon .= "'";
|
||||
}
|
||||
|
||||
echo '<th><a href="' . generate_url(array('page'=>'device','device'=>$device['device_id'], 'tab'=>'processes', 'order'=>$lhead, 'by'=>$bhead)) . '"><span'.$icon.'> ';
|
||||
echo '<th><a href="/device/device='.$device['device_id'].'/tab=processes/order='.$lhead.'/by='.$bhead.'"><span'.$icon.'> ';
|
||||
if (!empty($extra)) {
|
||||
echo "<abbr title='$extra'>$head</abbr>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user