fix: only enable Sentinel for new servers
This commit is contained in:
@@ -55,6 +55,14 @@ class ServerSetting extends Model
|
|||||||
'docker_cleanup_threshold' => 'integer',
|
'docker_cleanup_threshold' => 'integer',
|
||||||
'sentinel_token' => 'encrypted',
|
'sentinel_token' => 'encrypted',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected static function booted()
|
||||||
|
{
|
||||||
|
static::creating(function ($setting) {
|
||||||
|
$setting->is_sentinel_enabled = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public function server()
|
public function server()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Server::class);
|
return $this->belongsTo(Server::class);
|
||||||
|
@@ -17,7 +17,7 @@ return new class extends Migration
|
|||||||
$table->dropColumn('metrics_history_days');
|
$table->dropColumn('metrics_history_days');
|
||||||
$table->dropColumn('is_server_api_enabled');
|
$table->dropColumn('is_server_api_enabled');
|
||||||
|
|
||||||
$table->boolean('is_sentinel_enabled')->default(true);
|
$table->boolean('is_sentinel_enabled')->default(false);
|
||||||
$table->text('sentinel_token')->nullable();
|
$table->text('sentinel_token')->nullable();
|
||||||
$table->integer('sentinel_metrics_refresh_rate_seconds')->default(10);
|
$table->integer('sentinel_metrics_refresh_rate_seconds')->default(10);
|
||||||
$table->integer('sentinel_metrics_history_days')->default(7);
|
$table->integer('sentinel_metrics_history_days')->default(7);
|
||||||
|
Reference in New Issue
Block a user