Fixes for nodelist importing

This commit is contained in:
Deon George
2021-06-26 10:34:49 +10:00
parent 17a44a0945
commit aa06296963
8 changed files with 115 additions and 43 deletions

View File

@@ -9,12 +9,14 @@ use App\Models\{Address,Domain,Zone};
class DomainController extends Controller
{
public const NODE_ZC = 1<<1; // Zone
public const NODE_RC = 1<<2; // Region
public const NODE_NC = 1<<3; // Host
public const NODE_HC = 1<<4; // Hub
public const NODE_PVT = 1<<5; // Pvt
public const NODE_DOWN = 1<<6; // Down
public const NODE_ACTIVE = 0; // Active
public const NODE_ZC = 1<<0; // Zone
public const NODE_RC = 1<<1; // Region
public const NODE_NC = 1<<2; // Host
public const NODE_HC = 1<<3; // Hub
public const NODE_PVT = 1<<4; // Pvt
public const NODE_HOLD = 1<<5; // Hold
public const NODE_DOWN = 1<<6; // Down
// http://ftsc.org/docs/frl-1002.001
public const NUMBER_MAX = 0x7fff;

View File

@@ -190,7 +190,7 @@ class SystemController extends Controller
$this->authorize('admin',$o);
$request->validate([
'name' => 'required|min:3|unique:systems,name,'.($o->exists ? $o->id : 0),
'name' => 'required|min:3',
'location' => 'required|min:3',
'sysop' => 'required|min:3',
'address' => 'nullable|regex:/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/i',