add server form fixes
This commit is contained in:
@@ -14,12 +14,15 @@ class ByIp extends Component
|
||||
public $new_private_key_description;
|
||||
public $new_private_key_value;
|
||||
|
||||
public string $name;
|
||||
public string $description;
|
||||
public string $ip;
|
||||
public string $user = 'root';
|
||||
public int $port = 22;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->name = generateRandomName();
|
||||
$this->private_keys = PrivateKey::where('team_id', session('currentTeam')->id)->get();
|
||||
}
|
||||
public function setPrivateKey($private_key_id)
|
||||
@@ -43,7 +46,8 @@ class ByIp extends Component
|
||||
public function submit()
|
||||
{
|
||||
$server = Server::create([
|
||||
'name' => generateRandomName(),
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
'ip' => $this->ip,
|
||||
'user' => $this->user,
|
||||
'port' => $this->port,
|
||||
|
||||
Reference in New Issue
Block a user