From 59a150148aaf67291267a6c8efffb714df3d016c Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 20 May 2020 17:29:03 -0600 Subject: [PATCH] feature/server-mounts initial commit --- .../Admin/Mounts/MountController.php | 37 ++++++++ app/Models/Mount.php | 29 ++++++ resources/views/admin/mounts/index.blade.php | 93 +++++++++++++++++++ resources/views/layouts/admin.blade.php | 5 + routes/admin.php | 12 +++ 5 files changed, 176 insertions(+) create mode 100644 app/Http/Controllers/Admin/Mounts/MountController.php create mode 100644 app/Models/Mount.php create mode 100644 resources/views/admin/mounts/index.blade.php diff --git a/app/Http/Controllers/Admin/Mounts/MountController.php b/app/Http/Controllers/Admin/Mounts/MountController.php new file mode 100644 index 000000000..898293bbd --- /dev/null +++ b/app/Http/Controllers/Admin/Mounts/MountController.php @@ -0,0 +1,37 @@ +repository = $repository; + } + + /** + * Return the mount overview page. + * + * @return \Illuminate\View\View + */ + public function index() + { + return view('admin.mounts.index', [ + 'locations' => $this->repository->getAllWithDetails(), + ]); + } +} diff --git a/app/Models/Mount.php b/app/Models/Mount.php new file mode 100644 index 000000000..426c32bc4 --- /dev/null +++ b/app/Models/Mount.php @@ -0,0 +1,29 @@ + --}} + +{{-- This software is licensed under the terms of the MIT license. --}} +{{-- https://opensource.org/licenses/MIT --}} +@extends('layouts.admin') + +@section('title') + Mounts +@endsection + +@section('content-header') +

MountsSoonTM

+ +@endsection + +@section('content') +
+
+
+
+

Mount List

+ +
+ +
+
+ +
+ + + + + + + + + + + @foreach ($locations as $location) + + + + + + + + @endforeach + +
IDShort CodeDescriptionNodesServers
{{ $location->id }}{{ $location->short }}{{ $location->long }}{{ $location->nodes_count }}{{ $location->servers_count }}
+
+
+
+
+ + +@endsection diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 373515e84..42a2bc434 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -117,6 +117,11 @@
  • SERVICE MANAGEMENT
  • +
  • + + Mounts + +
  • Nests diff --git a/routes/admin.php b/routes/admin.php index 7a1c9fa75..4e5ac8bb2 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -165,6 +165,18 @@ Route::group(['prefix' => 'nodes'], function () { Route::delete('/view/{node}/allocations', 'NodesController@allocationRemoveMultiple')->name('admin.nodes.view.allocation.removeMultiple'); }); +/* +|-------------------------------------------------------------------------- +| Mount Controller Routes +|-------------------------------------------------------------------------- +| +| Endpoint: /admin/mounts +| +*/ +Route::group(['prefix' => 'mounts'], function () { + Route::get('/', 'Mounts\MountController@index')->name('admin.mounts'); +}); + /* |-------------------------------------------------------------------------- | Nest Controller Routes