feat(ConfigurationModal): add Container ID (CTID) and DNS Search Domain to advanced install
- Add optional Container ID (CTID) field at top of advanced form (var_ctid) - Add DNS Search Domain field in Network section (var_searchdomain) - Validate CTID when set: integer >= 100; empty = use next available ID - Both fields optional; empty values omitted from env so script uses defaults
This commit is contained in:
@@ -88,6 +88,7 @@ export function ConfigurationModal({
|
|||||||
var_mtu: 1500,
|
var_mtu: 1500,
|
||||||
var_mac: '',
|
var_mac: '',
|
||||||
var_ns: '',
|
var_ns: '',
|
||||||
|
var_searchdomain: '',
|
||||||
|
|
||||||
// Identity
|
// Identity
|
||||||
var_hostname: slug,
|
var_hostname: slug,
|
||||||
@@ -214,7 +215,7 @@ export function ConfigurationModal({
|
|||||||
}
|
}
|
||||||
// Container ID (CTID): if set, must be integer >= 100
|
// Container ID (CTID): if set, must be integer >= 100
|
||||||
const ctidVal = advancedVars.var_ctid;
|
const ctidVal = advancedVars.var_ctid;
|
||||||
if (ctidVal !== '' && ctidVal !== undefined) {
|
if (ctidVal !== '' && ctidVal !== undefined && typeof ctidVal !== 'boolean') {
|
||||||
const ctidNum = typeof ctidVal === 'string' ? parseInt(ctidVal, 10) : ctidVal;
|
const ctidNum = typeof ctidVal === 'string' ? parseInt(ctidVal, 10) : ctidVal;
|
||||||
if (isNaN(ctidNum) || ctidNum < 100) {
|
if (isNaN(ctidNum) || ctidNum < 100) {
|
||||||
newErrors.var_ctid = 'Must be 100 or greater';
|
newErrors.var_ctid = 'Must be 100 or greater';
|
||||||
@@ -656,6 +657,17 @@ export function ConfigurationModal({
|
|||||||
<p className="mt-1 text-xs text-destructive">{errors.var_ns}</p>
|
<p className="mt-1 text-xs text-destructive">{errors.var_ns}</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label className="block text-sm font-medium text-foreground mb-2">
|
||||||
|
DNS Search Domain
|
||||||
|
</label>
|
||||||
|
<Input
|
||||||
|
type="text"
|
||||||
|
value={typeof advancedVars.var_searchdomain === 'boolean' ? '' : String(advancedVars.var_searchdomain ?? '')}
|
||||||
|
onChange={(e) => updateAdvancedVar('var_searchdomain', e.target.value)}
|
||||||
|
placeholder="e.g. local, home.lan"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user