mirror of
https://github.com/friendica/friendica
synced 2025-04-22 03:50:11 +00:00
Add admin info to stats Endpoint
This commit is contained in:
parent
e8ab8a84af
commit
7ca4e6e338
4 changed files with 80 additions and 14 deletions
|
@ -14,8 +14,11 @@ use Friendica\Core\Config\Capability\IManageConfigValues;
|
|||
use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Update;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\Model\Register;
|
||||
use Friendica\Moderation\Entity\Report;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -23,6 +26,10 @@ use Friendica\Util\Profiler;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
||||
/**
|
||||
* Returns statistics of the current node for administration use
|
||||
* Like for monitoring
|
||||
*/
|
||||
class Stats extends BaseModule
|
||||
{
|
||||
/** @var IManageConfigValues */
|
||||
|
@ -129,7 +136,25 @@ class Stats extends BaseModule
|
|||
],
|
||||
'open' => $this->dba->count('report', ['status' => Report::STATUS_OPEN]),
|
||||
'closed' => $this->dba->count('report', ['status' => Report::STATUS_CLOSED]),
|
||||
]
|
||||
],
|
||||
'update' => [
|
||||
'available' => Update::isAvailable(),
|
||||
'available_version' => Update::getAvailableVersion(),
|
||||
'status' => Update::getStatus(),
|
||||
'db_status' => DBStructure::getUpdateStatus(),
|
||||
],
|
||||
'server' => [
|
||||
'version' => App::VERSION,
|
||||
'php' => [
|
||||
'version' => phpversion(),
|
||||
'upload_max_filesize' => ini_get('upload_max_filesize'),
|
||||
'post_max_size' => ini_get('post_max_size'),
|
||||
'memory_limit' => ini_get('memory_limit'),
|
||||
],
|
||||
'database' => [
|
||||
'max_allowed_packet' => DBA::getVariable('max_allowed_packet'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
if (Addon::isEnabled('bluesky')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue