Merge pull request #2629 from Thijmen/instance-name

Ability to give a name to an instance
This commit is contained in:
Andras Bacsai
2024-06-24 11:23:41 +02:00
committed by GitHub
5 changed files with 55 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ class Configuration extends Component
'settings.public_port_min' => 'required',
'settings.public_port_max' => 'required',
'settings.custom_dns_servers' => 'nullable',
'settings.instance_name' => 'nullable',
];
protected $validationAttributes = [

View File

@@ -47,4 +47,14 @@ class InstanceSettings extends Model implements SendsEmail
return explode(',', $recipients);
}
public function getTitleDisplayName(): string
{
$instanceName = $this->instance_name;
if (! $instanceName) {
return '';
}
return "[{$instanceName}]";
}
}