Basic admin panel.
This commit is contained in:
parent
fd22eb092c
commit
8a245e94e0
|
|
@ -10,12 +10,11 @@
|
|||
|
||||
# Defaults for the proceding virtualhosts on *.gtoria.net
|
||||
<VirtualHost *:80 *:443>
|
||||
ServerAdmin xlxi@gtoria.net
|
||||
ServerName gtoria.local
|
||||
ServerAdmin admin@gtoria.net
|
||||
ServerName gtoria.net
|
||||
|
||||
ServerAlias www.gtoria.local
|
||||
ServerAlias impulse.gtoria.local
|
||||
ServerAlias wiki.gtoria.local
|
||||
ServerAlias www.gtoria.net
|
||||
ServerAlias wiki.gtoria.net
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile "C:/graphictoria/COMMIT_HASH/etc/cert/localhost.crt"
|
||||
|
|
@ -37,17 +36,25 @@
|
|||
|
||||
# Api endpoints.
|
||||
<VirtualHost *:80 *:443>
|
||||
ServerAlias api.gtoria.local
|
||||
ServerAlias apis.gtoria.local
|
||||
ServerAlias assetgame.gtoria.local
|
||||
ServerAlias data.gtoria.local
|
||||
ServerAlias gamepersistence.gtoria.local
|
||||
ServerAlias clientsettings.api.gtoria.local
|
||||
ServerAlias ephemeralcounters.api.gtoria.local
|
||||
ServerAlias versioncompatibility.api.gtoria.local
|
||||
ServerAlias logging.service.gtoria.local
|
||||
ServerAlias ecsv2.gtoria.local
|
||||
ServerAlias test.public.ecs.gtoria.local
|
||||
ServerAlias api.gtoria.net
|
||||
ServerAlias apis.gtoria.net
|
||||
ServerAlias assetgame.gtoria.net
|
||||
ServerAlias data.gtoria.net
|
||||
ServerAlias gamepersistence.gtoria.net
|
||||
ServerAlias clientsettings.api.gtoria.net
|
||||
ServerAlias ephemeralcounters.api.gtoria.net
|
||||
ServerAlias versioncompatibility.api.gtoria.net
|
||||
ServerAlias logging.service.gtoria.net
|
||||
ServerAlias ecsv2.gtoria.net
|
||||
ServerAlias test.public.ecs.gtoria.net
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile "C:/graphictoria/COMMIT_HASH/etc/cert/localhost.crt"
|
||||
SSLCertificateKeyFile "C:/graphictoria/COMMIT_HASH/etc/cert/localhost.key"
|
||||
|
||||
ErrorLog "C:/graphictoria/logs/gt-test-error.log"
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Host}i\" \"%{Referer}i\" \"%{User-agent}i\"" gtoria
|
||||
CustomLog "C:/graphictoria/logs/gt-test-access.log" gtoria
|
||||
|
||||
DocumentRoot "D:/wamp320/graphictoria/sitetest3/web/public_api"
|
||||
</VirtualHost>
|
||||
|
|
@ -10,18 +10,24 @@ class AdminController extends Controller
|
|||
// Moderator+
|
||||
function dashboard()
|
||||
{
|
||||
//
|
||||
return view('web.admin.dashboard');
|
||||
}
|
||||
|
||||
// Admin+
|
||||
function arbiterDiag(Request $request, string $arbiterType = null)
|
||||
{
|
||||
if($arbiterType == null)
|
||||
return view('web.admin.diag.picker');
|
||||
|
||||
return view('web.admin.diag')->with([
|
||||
return view('web.admin.arbiter.diag')->with([
|
||||
'title' => sprintf('%s Arbiter Diag', $arbiterType),
|
||||
'arbiter' => $arbiterType
|
||||
]);
|
||||
}
|
||||
|
||||
// Owner+
|
||||
function arbiterManagement(Request $request, string $arbiterType = null, string $jobId = null)
|
||||
{
|
||||
return view('web.admin.arbiter.management')->with([
|
||||
'title' => sprintf('%s Arbiter Management', $arbiterType),
|
||||
'arbiter' => $arbiterType
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Components\Admin;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class NavListCard extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('components.admin.nav-list-card');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Components\Admin;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class NavListLink extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('components.admin.nav-list-link');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Components\Admin;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class NavListTitle extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('components.admin.nav-list-title');
|
||||
}
|
||||
}
|
||||
|
|
@ -772,14 +772,6 @@ input {
|
|||
border-top-width: 1px;
|
||||
@include box-shadow(none);
|
||||
|
||||
animation-duration: 0.2s;
|
||||
animation-fill-mode: both;
|
||||
animation-name: dropdownEase;
|
||||
|
||||
-webkit-animation-duration: 0.2s;
|
||||
-webkit-animation-fill-mode: both;
|
||||
-webkit-animation-name: dropdownEase;
|
||||
|
||||
html.gtoria-dark & {
|
||||
color: $gray-100;
|
||||
background-color: $gray-800;
|
||||
|
|
@ -807,6 +799,14 @@ input {
|
|||
margin-top: 11px !important;
|
||||
border-top: 0;
|
||||
border-radius: 0 0 0.25rem 0.25rem;
|
||||
|
||||
animation-duration: 0.2s;
|
||||
animation-fill-mode: both;
|
||||
animation-name: dropdownEase;
|
||||
|
||||
-webkit-animation-duration: 0.2s;
|
||||
-webkit-animation-fill-mode: both;
|
||||
-webkit-animation-name: dropdownEase;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
@props([
|
||||
'name',
|
||||
'color',
|
||||
'roleset'
|
||||
])
|
||||
|
||||
@if(Auth::check() && Auth::user()->hasRoleset($roleset))
|
||||
<div class="card gt-admin-card">
|
||||
<div class="card-header bg-{{ $color }} text-light">
|
||||
{{ $name }}
|
||||
</div>
|
||||
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@props([
|
||||
'name',
|
||||
'route',
|
||||
'parameters' => ''
|
||||
])
|
||||
|
||||
<li><a class="nav-link" href="{{ route($route, explode(';', $parameters)) }}">{{ html_entity_decode($name) }}</a></li>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
@props([
|
||||
'name'
|
||||
])
|
||||
|
||||
<span class="gt-admin-navtitle">{{ $name }}</span>
|
||||
<ul class="gt-admin-nav nav flex-column">
|
||||
{{ $slot }}
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('extra-headers')
|
||||
<style>
|
||||
.gt-admin-navtitle {
|
||||
font-weight: 700!important; /* fw-bold class */
|
||||
|
||||
padding-bottom: 0.5rem!important; /* py-2 class */
|
||||
padding-top: 0.5rem!important; /* py-2 class */
|
||||
|
||||
padding-left: 1rem!important; /* ps-3 class */
|
||||
}
|
||||
|
||||
.gt-admin-card:not(:last-child) {
|
||||
margin-bottom: 1rem!important;
|
||||
}
|
||||
|
||||
/* Light Mode Specific */
|
||||
html.gtoria-light .gt-admin-navtitle {
|
||||
background: #00000005;
|
||||
}
|
||||
|
||||
html.gtoria-light .gt-admin-navtitle {
|
||||
border-bottom: 1px solid #00000020;
|
||||
}
|
||||
|
||||
html.gtoria-light .gt-admin-navtitle:not(:first-of-type) {
|
||||
border-top: 1px solid #00000020;
|
||||
}
|
||||
|
||||
html.gtoria-light .gt-admin-nav > li > .nav-link:hover {
|
||||
background: #00000010;
|
||||
}
|
||||
|
||||
/* Dark Mode Specific */
|
||||
html.gtoria-dark .gt-admin-navtitle {
|
||||
background: #ffffff05;
|
||||
}
|
||||
|
||||
html.gtoria-dark .gt-admin-navtitle {
|
||||
border-bottom: 1px solid #ffffff20;
|
||||
}
|
||||
|
||||
html.gtoria-dark .gt-admin-navtitle:not(:first-of-type) {
|
||||
border-top: 1px solid #ffffff20;
|
||||
}
|
||||
|
||||
html.gtoria-dark .gt-admin-nav > li > .nav-link:hover {
|
||||
background: #ffffff10;
|
||||
}
|
||||
</style>
|
||||
|
||||
@stack('extra-headers')
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row mx-1 my-2">
|
||||
<div class="col-md-4 col-lg-3 col-xxl-2">
|
||||
@php
|
||||
$adminLayout = simplexml_load_string(Storage::get('layouts/Admin.xml'));
|
||||
@endphp
|
||||
|
||||
@foreach($adminLayout->list as $list)
|
||||
<x-admin.nav-list-card name="{{ $list['name'] }}" color="{{ $list['color'] }}" roleset="{{ $list['roleset'] }}">
|
||||
@foreach($list->category as $category)
|
||||
<x-admin.nav-list-title name="{{ $category['name'] }}">
|
||||
@foreach($category->link as $link)
|
||||
<x-admin.nav-list-link name="{{ $link['name'] }}" route="{{ $link['route'] }}" parameters="{{ $link['parameters'] }}" />
|
||||
@endforeach
|
||||
</x-admin.nav-list-title>
|
||||
@endforeach
|
||||
</x-admin.nav-list-card>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="col-md-8 col-lg-9 col-xxl-10 mt-2 mt-md-0">
|
||||
@stack('content')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -67,9 +67,13 @@
|
|||
<a href="{{ route('admin.diag') }}" class="nav-link py-0">Arbiter Diag</a>
|
||||
</li>
|
||||
@endadmin
|
||||
@owner
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('admin.arbitermanagement') }}" class="nav-link py-0">Arbiter Management</a>
|
||||
</li>
|
||||
@endowner
|
||||
<li class="nav-item">
|
||||
{{-- TODO: XlXi: Make this use route() --}}
|
||||
<a href="{{ url('/admin') }}" class="nav-link py-0"><i class="fa-solid fa-gavel"></i></a>
|
||||
<a href="{{ route('admin.dashboard') }}" class="nav-link py-0"><i class="fa-solid fa-gavel"></i></a>
|
||||
</li>
|
||||
@admin
|
||||
<li class="nav-item" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true" title="<strong>Only accurate at page load</strong><br/>{{ \App\Helpers\QAaMBHelper::getMemoryUsage() }}">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@push('extra-headers')
|
||||
<style>
|
||||
.graphictoria-graph-card {
|
||||
width: 300px!important;
|
||||
height: 200px!important;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@push('content')
|
||||
<div class="container">
|
||||
<div class="d-flex">
|
||||
<h4 class="mt-1">Arbiter Diag <span class="text-muted">(RccServiceMonitor)</span></h4>
|
||||
<div class="ms-auto d-flex">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Games
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a class="dropdown-item" href="#">Games</a></li>
|
||||
<li><a class="dropdown-item" href="#">Thumbnail</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap">
|
||||
<x-minicard class="graphictoria-graph-card">
|
||||
<x-slot name="title">
|
||||
Active Jobs
|
||||
</x-slot>
|
||||
<x-slot name="body">
|
||||
<div class="graphictoria-shop-overlay">
|
||||
<x-loader />
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-minicard>
|
||||
</div>
|
||||
<h4 class="mt-2">Soap Exceptions</h4>
|
||||
<div class="card p-3" id="gt-soap-exceptions" style="min-height:80px;">
|
||||
<div class="graphictoria-shop-overlay">
|
||||
<x-loader />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@push('content')
|
||||
<div class="container">
|
||||
<div class="d-flex">
|
||||
<h4 class="mt-1">Arbiter Management</h4>
|
||||
<div class="ms-auto d-flex">
|
||||
<a class="ms-auto btn btn-primary me-1" href="#"><i class="fa-solid fa-rotate"></i></a>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Games
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a class="dropdown-item" href="#">Games</a></li>
|
||||
<li><a class="dropdown-item" href="#">Thumbnail</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card p-3 mt-1" id="gt-arbiter-jobs" style="min-height:80px;">
|
||||
<div class="graphictoria-shop-overlay">
|
||||
<x-loader />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('title', 'Site Admin')
|
||||
|
||||
@push('content')
|
||||
<div class="container-md">
|
||||
<h4>Site Admin</h4>
|
||||
</div>
|
||||
@endpush
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('extra-headers')
|
||||
<style>
|
||||
.graphictoria-graph-card {
|
||||
width: 300px!important;
|
||||
height: 200px!important;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container my-2">
|
||||
<h4>Arbiter Diag <span class="text-muted">(RccServiceMonitor)</span></h4>
|
||||
<div class="d-flex flex-wrap">
|
||||
<x-minicard class="graphictoria-graph-card">
|
||||
<x-slot name="title">
|
||||
Active Jobs
|
||||
</x-slot>
|
||||
<x-slot name="body">
|
||||
<div class="graphictoria-shop-overlay">
|
||||
<x-loader />
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-minicard>
|
||||
</div>
|
||||
<h4 class="mt-2">Soap Exceptions</h4>
|
||||
<div class="card p-3" id="gt-soap-exceptions" style="min-height:80px;">
|
||||
<div class="graphictoria-shop-overlay">
|
||||
<x-loader />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Arbiter Diag')
|
||||
|
||||
@section('content')
|
||||
<div class="container my-2">
|
||||
<h4>Arbiter Diag <span class="text-muted">(RccServiceMonitor)</span></h4>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -33,7 +33,7 @@ Route::group(['as' => 'admin.', 'prefix' => 'admin'], function() {
|
|||
});
|
||||
|
||||
Route::middleware('roleset:owner')->group(function () {
|
||||
|
||||
Route::get('/arbiter-management/{arbiterType?}/{jobId?}', 'AdminController@arbiterManagement')->name('arbitermanagement');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
*
|
||||
!public/
|
||||
!grid/
|
||||
!layouts/
|
||||
!.gitignore
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
!*
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<list name="Moderation" color="success" roleset="Moderator">
|
||||
<category name="User Admin">
|
||||
<link name="Find User" route="admin.dashboard" />
|
||||
<link name="Find Payment" route="admin.dashboard" />
|
||||
<link name="User Asset Transfer" route="admin.dashboard" />
|
||||
<link name="Asset Transfer" route="admin.dashboard" />
|
||||
<link name="User Assets" route="admin.dashboard" />
|
||||
<link name="User/Group Transactions" route="admin.dashboard" />
|
||||
<link name="User Trades" route="admin.dashboard" />
|
||||
<link name="Send Personal Message" route="admin.dashboard" />
|
||||
<link name="User Message" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Groups">
|
||||
<link name="Group Admin" route="admin.dashboard" />
|
||||
<link name="Group Mass Reward" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Private Servers">
|
||||
<link name="Private Server Transactions" route="admin.dashboard" />
|
||||
</category>
|
||||
</list>
|
||||
|
||||
<list name="Administration" color="primary" roleset="Administrator">
|
||||
<category name="Service">
|
||||
<link name="Arbiter Diag" route="admin.diag" parameters="games" />
|
||||
<link name="Banner Editor" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Review">
|
||||
<link name="Moderator review" route="admin.dashboard" />
|
||||
<link name="Performance" route="admin.dashboard" />
|
||||
<link name="Image Moderation Review" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Moderation">
|
||||
<link name="Audit trail" route="admin.dashboard" />
|
||||
<link name="Blacklist email" route="admin.dashboard" />
|
||||
<link name="IP" route="admin.dashboard" />
|
||||
<link name="MAC Address" route="admin.dashboard" />
|
||||
<link name="Delete previous Username" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="User Admin">
|
||||
<link name="Grant Membership" route="admin.dashboard" />
|
||||
<link name="Adjust Assets, Credit & Currency" route="admin.dashboard" />
|
||||
<link name="Imbursements" route="admin.dashboard" />
|
||||
<link name="Imbursements Blacklist" route="admin.dashboard" />
|
||||
<link name="Mass Reward" route="admin.dashboard" />
|
||||
<link name="Reward Using CSV" route="admin.dashboard" />
|
||||
<link name="Mass Password Reset" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Inventory Management">
|
||||
<link name="Asset Scrub" route="admin.dashboard" />
|
||||
<link name="Game Pass Scrub" route="admin.dashboard" />
|
||||
<link name="Badge Scrub" route="admin.dashboard" />
|
||||
<link name="Collectibles Audit" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Universe Status">
|
||||
<link name="Universe Status" route="admin.dashboard" />
|
||||
</category>
|
||||
</list>
|
||||
|
||||
<list name="Owner" color="danger" roleset="Owner">
|
||||
<category name="Service">
|
||||
<link name="Arbiter Management" route="admin.arbitermanagement" />
|
||||
<link name="Arbiter Diag" route="admin.diag" />
|
||||
<link name="Configuration Editor" route="admin.dashboard" />
|
||||
<link name="Banner Editor" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Manage">
|
||||
<link name="Watchdog Creator Whitelist" route="admin.dashboard" />
|
||||
<link name="ContentFilter Whitelist" route="admin.dashboard" />
|
||||
<link name="Manage Staff" route="admin.dashboard" />
|
||||
<link name="Manage Protected Users" route="admin.dashboard" />
|
||||
<link name="Manage Beta Testers" route="admin.dashboard" />
|
||||
</category>
|
||||
|
||||
<category name="Emergency Use">
|
||||
<link name="Website Killswitch" route="admin.dashboard" />
|
||||
<link name="Gameserver Killswitch" route="admin.dashboard" />
|
||||
<link name="Master Server Killswitch" route="admin.dashboard" />
|
||||
</category>
|
||||
</list>
|
||||
</root>
|
||||
Loading…
Reference in New Issue