Add Backend to z-push-top.php
liverpoolfcfan last edited by liverpoolfcfan
A suggestion for an improvement in z-push-top.php
I think it would provide a useful visual check for people to make sure that they are loading the correct Backend. The simple changes below are using the zpush function GetBackend() to identify the loaded backend - just as z-push will when it starts…
Add a call to get the class name of the loaded backend to the z-top-php.php constructor…
// Identify the backend that will be loaded by z-push $this->ourBackendName = get_class(ZPush::GetBackend()); // get a TopCollector $this->topCollector = new TopCollector();
and in funtion srcOverview() add code to display it. Replace
$this->scrPrintAt($lc,0, sprintf(" Hosts:\t %d", count($this->activeHosts))); $lc++;
$this->scrPrintAt($lc,0, sprintf(" Hosts:\t %d\tBackend: %s", count($this->activeHosts),$this->ourBackendName)); $lc++;
Here is an example of what it looks like
Open connections: 6 Users: 5 Z-Push: 2.6.2.beta1+0 Push connections: 6 Devices: 6 PHP-MAPI: Action: q Hosts: 4 Backend: BackendZimbra PID IP USER COMMAND TIME AGENT DEVID Additional Information
and of course, if you had forgotten to set your BACKEND_PROVIDER and had no auto-loadable Backend Modules installed
[root@apps8 ~]# /usr/share/z-push/z-push-top.php FatalMisconfigurationException: No Backend provider can be found. Check your installation and/or configuration!
Realised it is now possible to edit code/etc. in the browser (how long has that been there :-)) so I created a ticket for it myself - ZP-1627
just a heads-up that I saw that you’ve created the issue and the pull request and will add notes there in case Sebastian or I have anything.
I added a new ticket - https://jira.kopano.io/browse/ZP-1630 - however, my logon does not have access to Bitbucket/Stash so I cannot recreate the committ/pull request
I gave your account acces to stash.kopano.io so you should be able to create pr’s again
I still get a message that I have no write access. - I need write access on z-push
No write access
You don’t have write access to any repository. Contact your administrator for help.
All good now. Thanks.
Changes committed and pull requests done.