Skip to content

Commit

Permalink
Remove server common from MonitorController constructor
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Oct 27, 2019
1 parent ae05259 commit 5b1256b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions libraries/classes/Controllers/Server/Status/MonitorController.php
Expand Up @@ -39,15 +39,15 @@ public function __construct($response, $dbi, Template $template, $data, $monitor
{
parent::__construct($response, $dbi, $template, $data);
$this->monitor = $monitor;

require_once ROOT_PATH . 'libraries/server_common.inc.php';
}

/**
* @return string HTML
*/
public function index(): string
{
require_once ROOT_PATH . 'libraries/server_common.inc.php';

$header = $this->response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
Expand Down Expand Up @@ -91,6 +91,8 @@ public function index(): string
*/
public function chartingData(array $params): array
{
require_once ROOT_PATH . 'libraries/server_common.inc.php';

if (! $this->response->isAjax()) {
return [];
}
Expand All @@ -109,6 +111,8 @@ public function chartingData(array $params): array
*/
public function logDataTypeSlow(array $params): array
{
require_once ROOT_PATH . 'libraries/server_common.inc.php';

if (! $this->response->isAjax()) {
return [];
}
Expand All @@ -128,6 +132,8 @@ public function logDataTypeSlow(array $params): array
*/
public function logDataTypeGeneral(array $params): array
{
require_once ROOT_PATH . 'libraries/server_common.inc.php';

if (! $this->response->isAjax()) {
return [];
}
Expand All @@ -149,6 +155,8 @@ public function logDataTypeGeneral(array $params): array
*/
public function loggingVars(array $params): array
{
require_once ROOT_PATH . 'libraries/server_common.inc.php';

if (! $this->response->isAjax()) {
return [];
}
Expand All @@ -168,6 +176,8 @@ public function loggingVars(array $params): array
*/
public function queryAnalyzer(array $params): array
{
require_once ROOT_PATH . 'libraries/server_common.inc.php';

if (! $this->response->isAjax()) {
return [];
}
Expand Down

0 comments on commit 5b1256b

Please sign in to comment.