Refactor method names to use camel case
This commit is contained in:
@@ -71,7 +71,7 @@ class StartMariadb
|
||||
if (!is_null($this->database->limits_cpuset)) {
|
||||
data_set($docker_compose, "services.{$container_name}.cpuset", $this->database->limits_cpuset);
|
||||
}
|
||||
if ($this->database->destination->server->is_log_drain_enabled() && $this->database->is_log_drain_enabled()) {
|
||||
if ($this->database->destination->server->isLogDrainEnabled() && $this->database->isLogDrainEnabled()) {
|
||||
$docker_compose['services'][$container_name]['logging'] = [
|
||||
'driver' => 'fluentd',
|
||||
'options' => [
|
||||
|
@@ -78,7 +78,7 @@ class StartMongodb
|
||||
if (!is_null($this->database->limits_cpuset)) {
|
||||
data_set($docker_compose, "services.{$container_name}.cpuset", $this->database->limits_cpuset);
|
||||
}
|
||||
if ($this->database->destination->server->is_log_drain_enabled() && $this->database->is_log_drain_enabled()) {
|
||||
if ($this->database->destination->server->isLogDrainEnabled() && $this->database->isLogDrainEnabled()) {
|
||||
$docker_compose['services'][$container_name]['logging'] = [
|
||||
'driver' => 'fluentd',
|
||||
'options' => [
|
||||
|
@@ -71,7 +71,7 @@ class StartMysql
|
||||
if (!is_null($this->database->limits_cpuset)) {
|
||||
data_set($docker_compose, "services.{$container_name}.cpuset", $this->database->limits_cpuset);
|
||||
}
|
||||
if ($this->database->destination->server->is_log_drain_enabled() && $this->database->is_log_drain_enabled()) {
|
||||
if ($this->database->destination->server->isLogDrainEnabled() && $this->database->isLogDrainEnabled()) {
|
||||
$docker_compose['services'][$container_name]['logging'] = [
|
||||
'driver' => 'fluentd',
|
||||
'options' => [
|
||||
|
@@ -77,7 +77,7 @@ class StartPostgresql
|
||||
if (!is_null($this->database->limits_cpuset)) {
|
||||
data_set($docker_compose, "services.{$container_name}.cpuset", $this->database->limits_cpuset);
|
||||
}
|
||||
if ($this->database->destination->server->is_log_drain_enabled() && $this->database->is_log_drain_enabled()) {
|
||||
if ($this->database->destination->server->isLogDrainEnabled() && $this->database->isLogDrainEnabled()) {
|
||||
ray('Log Drain Enabled');
|
||||
$docker_compose['services'][$container_name]['logging'] = [
|
||||
'driver' => 'fluentd',
|
||||
|
@@ -81,7 +81,7 @@ class StartRedis
|
||||
if (!is_null($this->database->limits_cpuset)) {
|
||||
data_set($docker_compose, "services.{$container_name}.cpuset", $this->database->limits_cpuset);
|
||||
}
|
||||
if ($this->database->destination->server->is_log_drain_enabled() && $this->database->is_log_drain_enabled()) {
|
||||
if ($this->database->destination->server->isLogDrainEnabled() && $this->database->isLogDrainEnabled()) {
|
||||
$docker_compose['services'][$container_name]['logging'] = [
|
||||
'driver' => 'fluentd',
|
||||
'options' => [
|
||||
|
@@ -77,7 +77,7 @@ class Kernel extends ConsoleKernel
|
||||
// ray('dispatching container status job in ' . $randomSeconds . ' seconds');
|
||||
// dispatch($job);
|
||||
// })->name('container-status-' . $server->id)->everyMinute()->onOneServer();
|
||||
if ($server->is_log_drain_enabled()) {
|
||||
if ($server->isLogDrainEnabled()) {
|
||||
$schedule->job(new CheckLogDrainContainerJob($server))->everyMinute()->onOneServer();
|
||||
// $schedule
|
||||
// ->call(function () use ($server) {
|
||||
|
@@ -1185,7 +1185,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
} else {
|
||||
$docker_compose['services'][$this->container_name]['labels'] = $labels;
|
||||
}
|
||||
if ($this->server->is_log_drain_enabled() && $this->application->is_log_drain_enabled()) {
|
||||
if ($this->server->isLogDrainEnabled() && $this->application->isLogDrainEnabled()) {
|
||||
$docker_compose['services'][$this->container_name]['logging'] = [
|
||||
'driver' => 'fluentd',
|
||||
'options' => [
|
||||
|
@@ -29,14 +29,14 @@ class Advanced extends Component
|
||||
'application.settings.gpu_options' => 'string|required',
|
||||
];
|
||||
public function mount() {
|
||||
$this->is_force_https_enabled = $this->application->settings->is_force_https_enabled;
|
||||
$this->is_gzip_enabled = $this->application->settings->is_gzip_enabled;
|
||||
$this->is_stripprefix_enabled = $this->application->settings->is_stripprefix_enabled;
|
||||
$this->is_force_https_enabled = $this->application->isForceHttpsEnabled();
|
||||
$this->is_gzip_enabled = $this->application->isGzipEnabled();
|
||||
$this->is_stripprefix_enabled = $this->application->isStripprefixEnabled();
|
||||
}
|
||||
public function instantSave()
|
||||
{
|
||||
if ($this->application->is_log_drain_enabled()) {
|
||||
if (!$this->application->destination->server->is_log_drain_enabled()) {
|
||||
if ($this->application->isLogDrainEnabled()) {
|
||||
if (!$this->application->destination->server->isLogDrainEnabled()) {
|
||||
$this->application->settings->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on this server.');
|
||||
return;
|
||||
|
@@ -53,7 +53,7 @@ class General extends Component
|
||||
}
|
||||
public function instantSaveAdvanced() {
|
||||
try {
|
||||
if (!$this->database->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->database->destination->server->isLogDrainEnabled()) {
|
||||
$this->database->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -52,7 +52,7 @@ class General extends Component
|
||||
public function instantSaveAdvanced()
|
||||
{
|
||||
try {
|
||||
if (!$this->database->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->database->destination->server->isLogDrainEnabled()) {
|
||||
$this->database->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -54,7 +54,7 @@ class General extends Component
|
||||
public function instantSaveAdvanced()
|
||||
{
|
||||
try {
|
||||
if (!$this->database->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->database->destination->server->isLogDrainEnabled()) {
|
||||
$this->database->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -60,7 +60,7 @@ class General extends Component
|
||||
}
|
||||
public function instantSaveAdvanced() {
|
||||
try {
|
||||
if (!$this->database->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->database->destination->server->isLogDrainEnabled()) {
|
||||
$this->database->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -46,7 +46,7 @@ class General extends Component
|
||||
}
|
||||
public function instantSaveAdvanced() {
|
||||
try {
|
||||
if (!$this->database->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->database->destination->server->isLogDrainEnabled()) {
|
||||
$this->database->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -36,7 +36,7 @@ class Database extends Component
|
||||
}
|
||||
public function instantSaveAdvanced()
|
||||
{
|
||||
if (!$this->database->service->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->database->service->destination->server->isLogDrainEnabled()) {
|
||||
$this->database->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -30,7 +30,7 @@ class ServiceApplicationView extends Component
|
||||
}
|
||||
public function instantSaveAdvanced()
|
||||
{
|
||||
if (!$this->application->service->destination->server->is_log_drain_enabled()) {
|
||||
if (!$this->application->service->destination->server->isLogDrainEnabled()) {
|
||||
$this->application->is_log_drain_enabled = false;
|
||||
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
|
||||
return;
|
||||
|
@@ -54,7 +54,7 @@ class LogDrains extends Component
|
||||
{
|
||||
try {
|
||||
InstallLogDrain::run($this->server);
|
||||
if (!$this->server->is_log_drain_enabled()) {
|
||||
if (!$this->server->isLogDrainEnabled()) {
|
||||
$this->dispatch('serverRefresh');
|
||||
$this->dispatch('success', 'Log drain service stopped.');
|
||||
return;
|
||||
|
@@ -80,15 +80,15 @@ class Application extends BaseModel
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function is_force_https_enabled()
|
||||
public function isForceHttpsEnabled()
|
||||
{
|
||||
return data_get($this, 'settings.is_force_https_enabled', false);
|
||||
}
|
||||
public function is_stripprefix_enabled()
|
||||
public function isStripprefixEnabled()
|
||||
{
|
||||
return data_get($this, 'settings.is_stripprefix_enabled', true);
|
||||
}
|
||||
public function is_gzip_enabled()
|
||||
public function isGzipEnabled()
|
||||
{
|
||||
return data_get($this, 'settings.is_gzip_enabled', true);
|
||||
}
|
||||
@@ -493,7 +493,7 @@ class Application extends BaseModel
|
||||
{
|
||||
return application_configuration_dir() . "/{$this->uuid}";
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'settings.is_log_drain_enabled', false);
|
||||
}
|
||||
|
@@ -405,7 +405,7 @@ class Server extends BaseModel
|
||||
{
|
||||
return $this->settings->is_reachable && $this->settings->is_usable && !$this->settings->force_disabled;
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return $this->settings->is_logdrain_newrelic_enabled || $this->settings->is_logdrain_highlight_enabled || $this->settings->is_logdrain_axiom_enabled || $this->settings->is_logdrain_custom_enabled;
|
||||
}
|
||||
|
@@ -19,15 +19,15 @@ class ServiceApplication extends BaseModel
|
||||
$service->fileStorages()->delete();
|
||||
});
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
public function is_stripprefix_enabled()
|
||||
public function isStripprefixEnabled()
|
||||
{
|
||||
return data_get($this, 'is_stripprefix_enabled', true);
|
||||
}
|
||||
public function is_gzip_enabled()
|
||||
public function isGzipEnabled()
|
||||
{
|
||||
return data_get($this, 'is_gzip_enabled', true);
|
||||
}
|
||||
|
@@ -17,13 +17,17 @@ class ServiceDatabase extends BaseModel
|
||||
$service->fileStorages()->delete();
|
||||
});
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
public function is_gzip_enabled()
|
||||
public function isStripprefixEnabled()
|
||||
{
|
||||
return true;
|
||||
return data_get($this, 'is_stripprefix_enabled', true);
|
||||
}
|
||||
public function isGzipEnabled()
|
||||
{
|
||||
return data_get($this, 'is_gzip_enabled', true);
|
||||
}
|
||||
public function type()
|
||||
{
|
||||
|
@@ -100,7 +100,7 @@ class StandaloneMariadb extends BaseModel
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ class StandaloneMongodb extends BaseModel
|
||||
{
|
||||
return data_get($this, 'environment.project.team');
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ class StandaloneMysql extends BaseModel
|
||||
return 'standalone-mysql';
|
||||
}
|
||||
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
|
@@ -97,7 +97,7 @@ class StandalonePostgresql extends BaseModel
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
|
@@ -96,7 +96,7 @@ class StandaloneRedis extends BaseModel
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function is_log_drain_enabled()
|
||||
public function isLogDrainEnabled()
|
||||
{
|
||||
return data_get($this, 'is_log_drain_enabled', false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user