update helper and disable input if variable is shared
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Redis;
|
||||
|
||||
use App\Actions\Database\StartDatabaseProxy;
|
||||
use App\Actions\Database\StopDatabaseProxy;
|
||||
use App\Models\EnvironmentVariable;
|
||||
use App\Models\Server;
|
||||
use App\Models\StandaloneRedis;
|
||||
use Exception;
|
||||
@@ -144,6 +145,14 @@ class General extends Component
|
||||
return view('livewire.project.database.redis.general');
|
||||
}
|
||||
|
||||
public function isSharedVariable($name)
|
||||
{
|
||||
return EnvironmentVariable::where('key', $name)
|
||||
->where('standalone_redis_id', $this->database->id)
|
||||
->where('is_shared', true)
|
||||
->exists();
|
||||
}
|
||||
|
||||
private function updateEnvironmentVariable($key, $value)
|
||||
{
|
||||
$envVar = $this->database->runtime_environment_variables()
|
||||
|
||||
Reference in New Issue
Block a user