mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
version and git helper improvements (#14412)
* Fix up version and git helpers Improve method names Move all git calls into the git helper Allow runtime and external cache of results where appropriate Consolidate version headers for discovery, poller, and validate * Style fixes * improve consistency in git calls * fix style * don't send name inconsistently * Improve database versions * No need to cache Version it is not used more than once currently.
This commit is contained in:
@@ -25,6 +25,7 @@ use LibreNMS\DB\Eloquent;
|
||||
use LibreNMS\Enum\AlertState;
|
||||
use LibreNMS\Util\Number;
|
||||
use LibreNMS\Util\Time;
|
||||
use LibreNMS\Util\Version;
|
||||
use Permissions;
|
||||
|
||||
class IRCBot
|
||||
@@ -781,11 +782,9 @@ class IRCBot
|
||||
|
||||
private function _version($params)
|
||||
{
|
||||
$versions = version_info();
|
||||
$schema_version = $versions['db_schema'];
|
||||
$version = $versions['local_ver'];
|
||||
$version = Version::get();
|
||||
|
||||
$msg = $this->config['project_name'] . ', Version: ' . $version . ', DB schema: ' . $schema_version . ', PHP: ' . PHP_VERSION;
|
||||
$msg = $this->config['project_name'] . ', Version: ' . $version->name() . ', DB schema: ' . $version->databaseMigrationCount() . ', PHP: ' . PHP_VERSION;
|
||||
|
||||
return $this->respond($msg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user