Jump to content

Need help adding Network Status to client sidebar


StrataByte

Recommended Posts

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
 

Screen Shot 2019-10-14 at 12.57.39 PM.png

Link to comment
Share on other sites

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...

xnhXzlk.png

is that what you had in mind ? shown to all users or only logged in clients ??

Link to comment
Share on other sites

@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

Screen Shot 2019-10-15 at 11.54.15 AM.png

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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>';
			}

eIl1riZ.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated