LoxiLB: lb config requires lb name

since now we delete lb by name, so lb name
is required field.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2024-06-15 00:39:22 +00:00
parent e928445c91
commit 4bbf33e119
3 changed files with 6 additions and 1 deletions

View File

@@ -133,6 +133,9 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
if ($settings{'EXTIP'} =~ /^0\.0\.0\.0/){
$errormessage = $Lang::tr{'invalid ip'}." - 0.0.0.0";
}
if ($settings{'NAME'} eq ''){
$errormessage = "LB Name: ".$Lang::tr{'loxilb empty'};
}
# Escape input in REMARK field
$settings{'NAME'} = &Header::escape($settings{'NAME'});
@@ -265,7 +268,7 @@ my %checked=(); # Checkbox manipulations
if ($errormessage) {
&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
print "<font class='base'>$errormessage&nbsp;</font>";
print "<font class='base' color=red>$errormessage&nbsp;</font>";
&Header::closebox();
}

View File

@@ -2455,6 +2455,7 @@
'static routes' => 'Static Routes',
'loxilb' => 'eBPF LoxiLB Load Balancer',
'loxilb status' => 'Status',
'loxilb empty' => 'Field can not be empty',
'loxilb enable' => 'Enable Load Balancer',
'loxilb config' => 'LoxiLB Load Balancer Configuration',
'loxilb lb config changed' => 'LoxiLB LB configuration is changed',

View File

@@ -2422,6 +2422,7 @@
'static routes' => '静态路由',
'loxilb' => 'eBPF LoxiLB 负载均衡',
'loxilb status' => '负载均衡启用状态',
'loxilb empty' => '不能空',
'loxilb enable' => '启用 eBPF LoxiLB 负载均衡',
'loxilb config' => 'eBPF LoxiLB 负载均衡配置',
'loxilb lb config changed' => 'LoxiLB 负载均衡 配置修改',