Alerts on access_point.xxx things do not link to the access point (like ports do) #5878

Closed
towster opened this Issue Feb 13, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@towster
Contributor

towster commented Feb 13, 2017

DO NOT DELETE THIS INFORMATION.

Please read this information carefully.

GitHub issues is for bugs, please do not post issues asking for help or how to do X, Y or Z.
You can use our irc channel ##librenms on freenode to ask questions or our community site.
If you have a feature request please post this on our community site.

Please confirm each of the sections below by putting an x in the box like [x].

  • Is your install up to date? Updating your install
    Please do not submit an issue if your install is not up to date within the last 24 hours or on a stable monthly release.
  • Please include all of the information between the ==================================== section of ./validate.php which you can run from the cli.
  • Please provide ALL info asked for here.
  • Please provide as much detail as possible.
  • Please do NOT post more than 10 lines of debug information here, use a pastebin service or GitHub Gists.

Would it be possible to have the Access Point link to the access point page like ports link to the port page?

capture

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Feb 13, 2017

Member

This really belongs as a feature request!

However please try this patch:

diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php
index 681930f..2dfef49 100644
--- a/html/includes/functions.inc.php
+++ b/html/includes/functions.inc.php
@@ -1128,6 +1128,11 @@ function alert_details($details)
             $fallback      = false;
         }

+        if ($tmp_alerts['accesspoint_id']) {
+            $fault_detail .= generate_ap_url($tmp_alerts) . '; ';
+            $fallback      = false;
+        }
+
         if ($tmp_alerts['type'] && $tmp_alerts['label']) {
             if ($tmp_alerts['error'] == "") {
                 $fault_detail .= ' '.$tmp_alerts['type'].' - '.$tmp_alerts['label'].'; ';

Member

laf commented Feb 13, 2017

This really belongs as a feature request!

However please try this patch:

diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php
index 681930f..2dfef49 100644
--- a/html/includes/functions.inc.php
+++ b/html/includes/functions.inc.php
@@ -1128,6 +1128,11 @@ function alert_details($details)
             $fallback      = false;
         }

+        if ($tmp_alerts['accesspoint_id']) {
+            $fault_detail .= generate_ap_url($tmp_alerts) . '; ';
+            $fallback      = false;
+        }
+
         if ($tmp_alerts['type'] && $tmp_alerts['label']) {
             if ($tmp_alerts['error'] == "") {
                 $fault_detail .= ' '.$tmp_alerts['type'].' - '.$tmp_alerts['label'].'; ';

@laf laf added the WebUI label Feb 13, 2017

@towster

This comment has been minimized.

Show comment
Hide comment
@towster

towster Feb 14, 2017

Contributor

Thanks for making a patch. It is close. I tested the code. It generates the URL but it is not a link. Here is what it looks like:

alert

Contributor

towster commented Feb 14, 2017

Thanks for making a patch. It is close. I tested the code. It generates the URL but it is not a link. Here is what it looks like:

alert

@towster

This comment has been minimized.

Show comment
Hide comment
@towster

towster Feb 14, 2017

Contributor

I did a little playing with the code and got it to display nicely.

        if ($tmp_alerts['accesspoint_id']) {
            $fault_detail .= generate_ap_link($tmp_alerts,$tmp_alerts['name']) . '; ';
            $fallback      = false;
        }

capture

Contributor

towster commented Feb 14, 2017

I did a little playing with the code and got it to display nicely.

        if ($tmp_alerts['accesspoint_id']) {
            $fault_detail .= generate_ap_link($tmp_alerts,$tmp_alerts['name']) . '; ';
            $fallback      = false;
        }

capture

laf added a commit to laf/librenms that referenced this issue Feb 14, 2017

laf added a commit to laf/librenms that referenced this issue Feb 14, 2017

@laf laf referenced this issue Feb 14, 2017

Merged

webui: added link to APs for alert details #5878 #5898

2 of 2 tasks complete

@laf laf closed this in #5898 Feb 15, 2017

laf added a commit that referenced this issue Feb 15, 2017

webui: added link to APs for alert details #5878 (#5898)
* webui: Add links to accesspoints in alerts #5878

* webui: added link to APs for alert details #5878
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@librenms librenms locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.