StrataByte Posted October 14, 2019 Share Posted October 14, 2019 Hello, I am wanting to add a "Network Status" box to the client sidebar that looks like the attached SS and the example in this thread that @brian! had created before. I have tried the examples he had listed but could not get the box to display for any clients. I am using WHMCS for billing only as well so I don't have servers assigned to clients, so I just want to display the info to all users. I would like it so show the latest issues, whether open, scheduled or closed so they have fast access to them. Thank You 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 15, 2019 Share Posted October 15, 2019 19 hours ago, StrataByte said: Hello, I am wanting to add a "Network Status" box to the client sidebar that looks like the attached SS and the example in this thread that @brian! had created before. I have tried the examples he had listed but could not get the box to display for any clients. I am using WHMCS for billing only as well so I don't have servers assigned to clients, so I just want to display the info to all users. I would like it so show the latest issues, whether open, scheduled or closed so they have fast access to them. as a sidebar? it wouldn't look like the screenshot as that's a homepage panel... is that what you had in mind ? shown to all users or only logged in clients ?? 0 Quote Link to comment Share on other sites More sharing options...
StrataByte Posted October 15, 2019 Author Share Posted October 15, 2019 @brian! I would just like it to show somewhere on the home screen for logged in users. Whether it's the sidebar on the left or the main body area makes no difference. I just want logged in users to see if there is an issue that they need to watch for and the status of the issue. Hope that helps Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 16, 2019 Share Posted October 16, 2019 17 hours ago, StrataByte said: I would just like it to show somewhere on the home screen for logged in users. Whether it's the sidebar on the left or the main body area makes no difference. I just want logged in users to see if there is an issue that they need to watch for and the status of the issue. then for the sake of simplicity, and flexibility, we'll keep it as a homepage panel - that way, we don't have to create a sidebar and then decide which pages it's shown on, when it's shown, how it's shown etc... and using a panel gives you more options with output and colours. the attached hook has been simplified, with the query required links to clients servers, and limit in returns, both removed... basically, it returns all issues now. network_issues_panel.php 1 Quote Link to comment Share on other sites More sharing options...
StrataByte Posted October 18, 2019 Author Share Posted October 18, 2019 @brian! Thank You so much! That worked perfectly! I know this wasn't specified in the original post, but is there a way to not display the actual ticket content and have it more minimized like the ticket box below? Again, Thank You for the help so far. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 21, 2019 Share Posted October 21, 2019 On 18/10/2019 at 17:24, StrataByte said: I know this wasn't specified in the original post, but is there a way to not display the actual ticket content and have it more minimized like the ticket box below? sure, it's just a case of changing the output below to suit your needs... if ($issue->enddate) { $bodyhtml .= '<a href="serverstatus.php" class="list-group-item"><small><b>'.$issue->title.'</b> <label class="label" style="background-color: lightgrey; color: black">'.$issue->status.'</label> <label class="label" style="background-color: '.$prioritycolor.'">'.$issue->priority.'</label><br><span style="color: black">'.$issue->description.'</span><br>'.Lang::trans('networkissuesstatusscheduled').': '.fromMySQLDate($issue->startdate, true, true).' - '.fromMySQLDate($issue->enddate, true, true).'</small></a>'; } elseif ($issue->lastupdate) { $bodyhtml .= '<a href="serverstatus.php" class="list-group-item"><small><b>'.$issue->title.'</b> <label class="label" style="background-color: lightgrey; color: black">'.$issue->status.'</label> <label class="label" style="background-color: '.$prioritycolor.'">'.$issue->priority.'</label><br><span style="color: black">'.$issue->description.'</span><br>'.Lang::trans('networkissueslastupdated').' - '.fromMySQLDate($issue->lastupdate, true, true).'</small></a>'; } so if we remove the description from the output... if ($issue->enddate) { $bodyhtml .= '<a href="serverstatus.php" class="list-group-item"><small><b>'.$issue->title.'</b> <label class="label" style="background-color: lightgrey; color: black">'.$issue->status.'</label> <label class="label" style="background-color: '.$prioritycolor.'">'.$issue->priority.'</label><br>'.Lang::trans('networkissuesstatusscheduled').': '.fromMySQLDate($issue->startdate, true, true).' - '.fromMySQLDate($issue->enddate, true, true).'</small></a>'; } elseif ($issue->lastupdate) { $bodyhtml .= '<a href="serverstatus.php" class="list-group-item"><small><b>'.$issue->title.'</b> <label class="label" style="background-color: lightgrey; color: black">'.$issue->status.'</label> <label class="label" style="background-color: '.$prioritycolor.'">'.$issue->priority.'</label><br>'.Lang::trans('networkissueslastupdated').' - '.fromMySQLDate($issue->lastupdate, true, true).'</small></a>'; } 1 Quote Link to comment Share on other sites More sharing options...
StrataByte Posted October 24, 2019 Author Share Posted October 24, 2019 @brian! Awesome! This also helps me to understand how to do this a bit more as well. Thank You very much! 0 Quote Link to comment Share on other sites More sharing options...
Romain F. Posted October 25, 2019 Share Posted October 25, 2019 Hi @StrataByte , This is a very nice idea 🙂 Will you share the code in the future? Thanks, 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.