mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Small Best Practice Fixes
This commit is contained in:
committed by
Neil Lathwood
parent
28dff189c7
commit
cdef7885aa
@@ -62,5 +62,5 @@ if (defined('SHOW_SETTINGS') || empty($widget_settings)) {
|
||||
} else {
|
||||
$widget_settings['image_url'] .= "?".mt_rand();
|
||||
}
|
||||
$common_output[] = '<a target="_blank" href="'.$widget_settings['target_url'].'"><img class="minigraph-image" style="max-width: '.$widget_dimensions['x'].'px; max-height:'.$widget_dimensions['y'].'px;" src="'.$widget_settings['image_url'].'"/></a>';
|
||||
$common_output[] = '<a target="_blank" rel="noopener" href="'.$widget_settings['target_url'].'"><img class="minigraph-image" style="max-width: '.$widget_dimensions['x'].'px; max-height:'.$widget_dimensions['y'].'px;" src="'.$widget_settings['image_url'].'"/></a>';
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ if (device_permitted($device['device_id'])) {
|
||||
<a href="ssh://'.$device['hostname'].'"><img src="images/16/ssh.png" alt="ssh" title="SSH to '.$device['hostname'].'" border="0" width="16" height="16"></a>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<a href="https://'.$device['hostname'].'"><img src="images/16/http.png" alt="https" title="Launch browser https://'.$device['hostname'].'" border="0" width="16" height="16" target="_blank"></a>
|
||||
<a href="https://'.$device['hostname'].'"><img src="images/16/http.png" alt="https" title="Launch browser https://'.$device['hostname'].'" border="0" width="16" height="16" target="_blank" rel="noopener"></a>
|
||||
</div>
|
||||
</div>';
|
||||
}//end if
|
||||
|
@@ -631,7 +631,7 @@ if ($_SESSION['userlevel'] >= '10') {
|
||||
<a href="#"><i class="fa fa-code fa-fw fa-lg" aria-hidden="true"></i> API</a>
|
||||
<ul class="dropdown-menu scrollable-menu">
|
||||
<li><a href="api-access/"><i class="fa fa-wrench fa-fw fa-lg" aria-hidden="true"></i> API Settings</a></li>
|
||||
<li><a href="http://docs.librenms.org/API/API-Docs/" target="_blank"><i class="fa fa-book fa-fw fa-lg" aria-hidden="true"></i> API Docs</a></li>
|
||||
<li><a href="http://docs.librenms.org/API/API-Docs/" target="_blank" rel="noopener"><i class="fa fa-book fa-fw fa-lg" aria-hidden="true"></i> API Docs</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li role="presentation" class="divider"></li>');
|
||||
|
@@ -181,7 +181,7 @@ foreach (dbFetchRows($sql, $param) as $device) {
|
||||
$actions .= '
|
||||
<div class="col-xs-1"><a href="telnet://' . $device['hostname'] . '"><img src="images/16/telnet.png" alt="telnet" title="Telnet to ' . $device['hostname'] . '" border="0" width="16" height="16"></a></div>
|
||||
<div class="col-xs-1"><a href="ssh://' . $device['hostname'] . '"><img src="images/16/ssh.png" alt="ssh" title="SSH to ' . $device['hostname'] . '" border="0" width="16" height="16"></a></div>
|
||||
<div class="col-xs-1"><a href="https://' . $device['hostname'] . '"><img src="images/16/http.png" alt="https" title="Launch browser https://' . $device['hostname'] . '" border="0" width="16" height="16" target="_blank"></a></div>
|
||||
<div class="col-xs-1"><a href="https://' . $device['hostname'] . '"><img src="images/16/http.png" alt="https" title="Launch browser https://' . $device['hostname'] . '" border="0" width="16" height="16" target="_blank" rel="noopener"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
@@ -299,7 +299,7 @@ if ($config['enable_footer'] == 1 && (isset($vars['bare']) && $vars['bare'] != "
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<?php
|
||||
echo('<h5>Powered by <a href="' . $config['project_home'] . '" target="_blank" class="red">' . $config['project_name'].'</a>.</h5>');
|
||||
echo('<h5>Powered by <a href="' . $config['project_home'] . '" target="_blank" rel="noopener" class="red">' . $config['project_name'].'</a>.</h5>');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -76,7 +76,7 @@ if ($callback_status == 1) {
|
||||
}
|
||||
|
||||
if (extension_loaded('curl')) {
|
||||
$callback = 'Opt in to send anonymous usage statistics to LibreNMS? <input type="checkbox" data-on-text="Yes" data-off-text="No" data-size="mini" name="statistics" '.$stats_checked.'>';
|
||||
$callback = '<label for="callback"> Opt in to send anonymous usage statistics to LibreNMS?</label><input type="checkbox" id="callback" data-on-text="Yes" data-off-text="No" data-size="mini" name="statistics" '.$stats_checked.'>';
|
||||
} else {
|
||||
$callback = "PHP Curl module isn't installed, please install this, restart your web service and refresh this page.";
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<?php
|
||||
print_error('Documentation for the API has now been moved to GitHub, you can go straight to the API Wiki from <a href="https://github.com/librenms/librenms/wiki/API-Docs" target="_blank">here</a>.');
|
||||
print_error('Documentation for the API has now been moved to GitHub, you can go straight to the API Wiki from <a href="https://github.com/librenms/librenms/wiki/API-Docs" target="_blank" rel="noopener">here</a>.');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -407,9 +407,9 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) {
|
||||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><i class="fa fa-cog"></i>
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="https://'.$device['hostname'].'" target="_blank"><img src="images/16/http.png" alt="https" title="Launch browser to https://'.$device['hostname'].'" border="0" width="16" height="16" target="_blank"> Web</a></li>
|
||||
<li><a href="ssh://'.$device['hostname'].'" target="_blank"><img src="images/16/ssh.png" alt="ssh" title="SSH to '.$device['hostname'].'" border="0" width="16" height="16"> SSH</a></li>
|
||||
<li><a href="telnet://'.$device['hostname'].'" target="_blank"><img src="images/16/telnet.png" alt="telnet" title="Telnet to '.$device['hostname'].'" border="0" width="16" height="16"> Telnet</a></li>';
|
||||
<li><a href="https://'.$device['hostname'].'" target="_blank" rel="noopener"><img src="images/16/http.png" alt="https" title="Launch browser to https://'.$device['hostname'].'" border="0" width="16" height="16" target="_blank" rel="noopener"> Web</a></li>
|
||||
<li><a href="ssh://'.$device['hostname'].'" target="_blank" rel="noopener"><img src="images/16/ssh.png" alt="ssh" title="SSH to '.$device['hostname'].'" border="0" width="16" height="16"> SSH</a></li>
|
||||
<li><a href="telnet://'.$device['hostname'].'" target="_blank" rel="noopener"><img src="images/16/telnet.png" alt="telnet" title="Telnet to '.$device['hostname'].'" border="0" width="16" height="16"> Telnet</a></li>';
|
||||
if (is_admin()) {
|
||||
echo '<li>
|
||||
<a href="'.generate_device_url($device, array('tab' => 'edit')).'">
|
||||
|
@@ -55,7 +55,7 @@ foreach ($menu_options as $option => $text) {
|
||||
echo('<div style="float: right;">');
|
||||
?>
|
||||
|
||||
<a href="csv.php/report=<?php echo generate_url($vars, array('format'=>'')); ?>" title="Export as CSV" target="_blank">Export CSV</a> |
|
||||
<a href="csv.php/report=<?php echo generate_url($vars, array('format'=>'')); ?>" title="Export as CSV" target="_blank" rel="noopener">Export CSV</a> |
|
||||
<a href="<?php echo(generate_url($vars)); ?>" title="Update the browser URL to reflect the search criteria." >Update URL</a> |
|
||||
|
||||
<?php
|
||||
|
Reference in New Issue
Block a user