diff --git a/app/Http/Controllers/ZoneController.php b/app/Http/Controllers/ZoneController.php index 3fcdd5c..c96bf5a 100644 --- a/app/Http/Controllers/ZoneController.php +++ b/app/Http/Controllers/ZoneController.php @@ -126,9 +126,4 @@ class ZoneController extends Controller 'default' => (bool)$request->set, ]); } - - public function home() - { - return view('zone.home'); - } } diff --git a/resources/views/layouts/partials/sidebar.blade.php b/resources/views/layouts/partials/sidebar.blade.php index 1033809..3d36713 100644 --- a/resources/views/layouts/partials/sidebar.blade.php +++ b/resources/views/layouts/partials/sidebar.blade.php @@ -27,7 +27,7 @@
Network Admin
Domains
Systems
-
Zones
+
Zones
Echoareas
Fileareas
diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php index cb195d4..d5455f7 100644 --- a/resources/views/system/addedit.blade.php +++ b/resources/views/system/addedit.blade.php @@ -669,7 +669,7 @@ if (e.status != 412) alert('That didnt work? Please try again....'); }, - url: '{{ url('default') }}/'+item.attributes.itemid.nodeValue, + url: '{{ url('zone/api/default') }}/'+item.attributes.itemid.nodeValue, cache: false }) }); diff --git a/resources/views/zone/addedit.blade.php b/resources/views/zone/addedit.blade.php index d839887..aa70a34 100644 --- a/resources/views/zone/addedit.blade.php +++ b/resources/views/zone/addedit.blade.php @@ -165,7 +165,7 @@
- Cancel + Cancel @can('admin',$o) @endcan diff --git a/resources/views/zone/home.blade.php b/resources/views/zone/home.blade.php index 4fede87..207f8d0 100644 --- a/resources/views/zone/home.blade.php +++ b/resources/views/zone/home.blade.php @@ -10,7 +10,7 @@

In FTN network addresses, a zone is the 3rd dimension and used when a system supports 3D (or better) addressing, ie: zone:net/node.point@domain.

Zones are used with domains to uniquely identify a FTN network. Within an FTN network there can be multiple zones with the same domain.

It is rare that a domain has multiple zones - unless it grows quite large. Zones can also be used to group systems into a common boundary.

-

This system is aware of the following zones in each domain @can('admin',(new \App\Models\Zone))(you can add more)@endcan:

+

This system is aware of the following zones in each domain @can('admin',(new \App\Models\Zone))(you can add more)@endcan:

@@ -18,7 +18,7 @@
@if (\App\Models\Zone::count() === 0) @can('admin',(new \App\Models\Zone)) -

There are no zones setup, to set up your first.

+

There are no zones setup, to set up your first.

@else

There are no zones - you need to ask an admin to create one for you.

@endcan @@ -38,7 +38,7 @@ @foreach (\App\Models\Zone::orderBy('zone_id')->with(['domain','addresses'])->get() as $oo) {{ $oo->domain->name }} - {{ $oo->zone_id }} + {{ $oo->zone_id }} {{ $oo->active ? 'YES' : 'NO' }} {{ $oo->default ? 'YES' : 'NO' }} {{ $oo->addresses->count() }} diff --git a/routes/web.php b/routes/web.php index 024f616..07dadf7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -52,8 +52,7 @@ Route::get('search',[HomeController::class,'search']); Route::middleware(['auth','verified','activeuser'])->group(function () { Route::get('dashboard',[UserController::class,'dashboard']); - Route::post('default/{o}',[ZoneController::class,'api_default']) - ->where('o','[0-9]+'); + Route::get('ftn/domain',[DomainController::class,'home']); Route::match(['get','post'],'ftn/domain/addedit/{o?}',[DomainController::class,'add_edit']) @@ -108,9 +107,6 @@ Route::middleware(['auth','verified','activeuser'])->group(function () { Route::post('file/contents/{o}/{date}',[HomeController::class,'file_contents']) ->where('o','[0-9]+') ->where('date','[0-9:\-@]+'); - Route::get('ftn/zone',[ZoneController::class,'home']); - Route::match(['get','post'],'ftn/zone/addedit/{o?}',[ZoneController::class,'add_edit']) - ->where('o','[0-9]+'); Route::get('hosts/{o}/{region}',[DomainController::class,'api_hosts']) ->where('o','[0-9]+') @@ -127,6 +123,13 @@ Route::middleware(['auth','verified','activeuser'])->group(function () { Route::match(['get','post'],'user/system/register',[SystemController::class,'register']); Route::match(['post'],'user/system/link',[SystemController::class,'system_link']); + + /* ZONE PATHS */ + Route::view('zone','zone.home'); + Route::post('zone/api/default/{o}',[ZoneController::class,'api_default']) + ->where('o','[0-9]+'); + Route::match(['get','post'],'zone/addedit/{o?}',[ZoneController::class,'add_edit']) + ->where('o','[0-9]+'); }); Route::middleware(['auth','can:admin'])->group(function () { diff --git a/tests/Feature/SiteAdminTest.php b/tests/Feature/SiteAdminTest.php index 9cfa2a8..8702bb1 100644 --- a/tests/Feature/SiteAdminTest.php +++ b/tests/Feature/SiteAdminTest.php @@ -23,7 +23,7 @@ class SiteAdminTest extends TestCase $this->get('ftn/domain') ->assertRedirect('login'); - $this->get('ftn/zone') + $this->get('zone') ->assertRedirect('login'); $this->get('network/999') @@ -54,7 +54,7 @@ class SiteAdminTest extends TestCase $this->get('ftn/domain') ->assertRedirect('email/verify'); - $this->get('ftn/zone') + $this->get('zone') ->assertRedirect('email/verify'); Auth::logout();