aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-05-17 17:00:03 +0900
committerKazuki Yamaguchi <k@rhe.jp>2023-08-07 16:59:22 +0900
commiteb8e024b7313b48bbc04ec0bff43e22720936232 (patch)
tree39aac308d45025124aecdbc5e39e0c080a733ec8
parent654e12fd07d119d0ff7742aec2b1bcd5e99aa1ab (diff)
downloadsmokeping-eb8e024b7313b48bbc04ec0bff43e22720936232.tar.gz
add link to AS51044 looking glass
-rw-r--r--htdocs/css/smokeping-screen.css13
-rw-r--r--lib/Smokeping.pm21
2 files changed, 30 insertions, 4 deletions
diff --git a/htdocs/css/smokeping-screen.css b/htdocs/css/smokeping-screen.css
index 5ef0eb8..7caf7b5 100644
--- a/htdocs/css/smokeping-screen.css
+++ b/htdocs/css/smokeping-screen.css
@@ -203,6 +203,10 @@ a#menu-button:hover {
background: #fff;
}
+.main .panel-heading, .main .panel-heading-no-border {
+ display: flex;
+}
+
.main .panel-heading {
background: #f5f5f5;
border-bottom: 1px solid #d4d4d4;
@@ -218,6 +222,15 @@ a#menu-button:hover {
line-height: 30px;
font-size: 14px;
font-weight: 500;
+ flex-grow: 1;
+}
+
+.main .panel-heading nav, .main .panel-heading-no-border nav {
+ margin: 0;
+ padding-right: 10px;
+ line-height: 30px;
+ font-size: 14px;
+ font-weight: 500;
}
.main .panel-body {
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 39cf230..1cd07bf 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1016,8 +1016,13 @@ sub get_overview ($$$$){
"COMMENT:$date\\j");
my $ERROR = RRDs::error();
$page .= "<div class=\"".panel_class()."\">";
- $page .= "<div class=\"".panel_heading_class()."\"><h2>".$phys_tree->{title}."</h2></div>"
- if $cfg->{Presentation}{htmltitle} eq 'yes';
+ if ($cfg->{Presentation}{htmltitle} eq 'yes') {
+ $page .= "<div class=\"".panel_heading_class()."\">";
+ $page .= "<h2>".$phys_tree->{title}."</h2>";
+ $page .= "<nav><a target=\"_blank\" href=\"https://as51044.net/tools?type=route&target=".
+ $phys_tree->{host}."\">LG</a></nav>";
+ $page .= "</div>";
+ }
$page .= "<div class=\"panel-body\">";
if (defined $ERROR) {
$page .= "ERROR: $ERROR<br>".join("<br>", map {"'$_'"} @G);
@@ -1517,7 +1522,11 @@ sub get_detail ($$$$;$){
$page .= "<div class=\"".panel_class()."\">";
if ($cfg->{Presentation}{htmltitle} eq 'yes') {
# TODO we generate this above to, maybe share code or store variable ?
- $page .= "<div class=\"".panel_heading_class()."\"><h2>$desc</h2></div>";
+ $page .= "<div class=\"".panel_heading_class()."\">";
+ $page .= "<h2>$desc</h2>";
+ $page .= "<nav><a target=\"_blank\" href=\"https://as51044.net/tools?type=route&target=".
+ $phys_tree->{host}."\">LG</a></nav>";
+ $page .= "</div>";
}
$page .= "<div class=\"panel-body\">";
$page .= qq|<IMG alt="" id="zoom" width="$xs{''}" height="$ys{''}" SRC="${imghref}_${end}_${start}.svg">| ;
@@ -1548,7 +1557,11 @@ sub get_detail ($$$$;$){
if ($cfg->{Presentation}{htmltitle} eq 'yes') {
# TODO we generate this above to, maybe share code or store variable ?
my $title = "$desc from " . ($s ? $cfg->{Slaves}{$slave}{display_name}: $cfg->{General}{display_name} || hostname);
- $page .= "<div class=\"".panel_heading_class()."\"><h2>$title</h2></div>";
+ $page .= "<div class=\"".panel_heading_class()."\">";
+ $page .= "<h2>$title</h2>";
+ $page .= "<nav><a target=\"_blank\" href=\"https://as51044.net/tools?type=route&target=".
+ $phys_tree->{host}."\">LG</a></nav>";
+ $page .= "</div>";
}
$page .= "<div class=\"panel-body\">";
$page .= ( qq{<a href="}.cgiurl($q,$cfg)."?".hierarchy($q).qq{displaymode=n;start=$startstr;end=now;}."target=".$t.$s.'">'