Merge pull request #77 from wky0211/main

style: capitalization
This commit is contained in:
corbpie 2022-11-02 23:11:17 +11:00 committed by GitHub
commit 897044f7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 43 additions and 43 deletions

View File

@ -5,7 +5,7 @@ domains,
DNS and misc services. DNS and misc services.
Despite what the name infers this self hosted web app isn't just for storing idling server information. By using Despite what the name infers this self hosted web app isn't just for storing idling server information. By using
a [YABs](https://github.com/masonr/yet-another-bench-script) output you can get disk & network speed values along with a [YABS](https://github.com/masonr/yet-another-bench-script) output you can get disk & network speed values along with
GeekBench 5 scores to do easier comparing and sorting. GeekBench 5 scores to do easier comparing and sorting.
[![Generic badge](https://img.shields.io/badge/version-2.1.8-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/Laravel-9.0-red.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/PHP-8.1-purple.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/Bootstrap-5.1-pink.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/version-2.1.8-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/Laravel-9.0-red.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/PHP-8.1-purple.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/Bootstrap-5.1-pink.svg)](https://shields.io/)
@ -47,7 +47,7 @@ php artisan cache:clear
* Updated `updatePricing()` to not need `$as_usd` parameter * Updated `updatePricing()` to not need `$as_usd` parameter
* Updated labels assigned insert * Updated labels assigned insert
* Updated order/sort by methods for pricing related columns * Updated order/sort by methods for pricing related columns
* Removed add YABs button on servers index page * Removed add YABS button on servers index page
## Requires ## Requires
@ -60,10 +60,10 @@ php artisan cache:clear
* Add domains * Add domains
* [Auto get IP's from hostname](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ips-from-hostname.gif) * [Auto get IP's from hostname](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ips-from-hostname.gif)
* [Check up/down status](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ping-up-feature.gif) * [Check up/down status](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ping-up-feature.gif)
* Get YABs data from output * Get YABS data from output
* Compare 2 servers * Compare 2 servers
* Save & view YABs output * Save & view YABS output
* Update YABs disk & network results * Update YABS disk & network results
* Next due date system * Next due date system
* Multi currency compatibility * Multi currency compatibility
* Multi payment-term compatibility * Multi payment-term compatibility
@ -295,7 +295,7 @@ or
```curl -sL yabs.sh | bash -s -- -r``` ```curl -sL yabs.sh | bash -s -- -r```
**Make sure YABs output starts at the first line which is:** **Make sure YABS output starts at the first line which is:**
```# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #``` ```# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #```

View File

@ -483,7 +483,7 @@ class ApiController extends Controller
if ($insert) { if ($insert) {
Cache::forget('all_active_servers');//all servers cache Cache::forget('all_active_servers');//all servers cache
Cache::forget('non_active_servers');//all servers cache Cache::forget('non_active_servers');//all servers cache
Cache::forget('all_yabs');//Forget the all YABs cache Cache::forget('all_yabs');//Forget the all YABS cache
return response()->json(array('message' => 'Successfully added YABS'), 200); return response()->json(array('message' => 'Successfully added YABS'), 200);
} }

View File

@ -47,7 +47,7 @@ class YabsController extends Controller
Cache::forget("yabs.{$yab->id}"); Cache::forget("yabs.{$yab->id}");
return redirect()->route('yabs.index') return redirect()->route('yabs.index')
->with('success', 'YABs was deleted Successfully.'); ->with('success', 'YABS was deleted Successfully.');
} }
public function chooseYabsCompare() public function chooseYabsCompare()

View File

@ -193,7 +193,7 @@ class Server extends Model
} }
public static function serverYabsAmount(string $server_id): int public static function serverYabsAmount(string $server_id): int
{//Returns amount of YABs a server has {//Returns amount of YABS a server has
return DB::table('yabs') return DB::table('yabs')
->where('server_id', '=', $server_id) ->where('server_id', '=', $server_id)
->get()->count(); ->get()->count();

View File

@ -167,18 +167,18 @@ class Yabs extends Model
$version = $data['version']; $version = $data['version'];
$has_ipv4 = $data['net']['ipv4']; $has_ipv4 = $data['net']['ipv4'];
$has_ipv6 = $data['net']['ipv6']; $has_ipv6 = $data['net']['ipv6'];
//Os //OS
$arch = $data['os']['arch']; $arch = $data['os']['arch'];
$distro = $data['os']['distro']; $distro = $data['os']['distro'];
$kernel = $data['os']['kernel']; $kernel = $data['os']['kernel'];
$uptime = $data['os']['uptime']; $uptime = $data['os']['uptime'];
//Cpu //CPU
$model = $data['cpu']['model']; $model = $data['cpu']['model'];
$cores = $data['cpu']['cores']; $cores = $data['cpu']['cores'];
$freq = $data['cpu']['freq']; $freq = $data['cpu']['freq'];
$aes = $data['cpu']['aes']; $aes = $data['cpu']['aes'];
$virt = $data['cpu']['virt']; $virt = $data['cpu']['virt'];
//Ram Disk //RAM Disk
$ram = $data['mem']['ram']; $ram = $data['mem']['ram'];
$swap = $data['mem']['swap']; $swap = $data['mem']['swap'];
$disk = $data['mem']['disk']; $disk = $data['mem']['disk'];
@ -239,7 +239,7 @@ class Yabs extends Model
'gb5_id' => $gb5_id 'gb5_id' => $gb5_id
]); ]);
//Fio //fio
foreach ($data['fio'] as $ds) { foreach ($data['fio'] as $ds) {
if ($ds['bs'] === '4k') { if ($ds['bs'] === '4k') {
$d4k = ($ds['speed_rw'] > 999999) ? ($ds['speed_rw'] / 1000 / 1000) : $ds['speed_rw'] / 1000; $d4k = ($ds['speed_rw'] > 999999) ? ($ds['speed_rw'] / 1000 / 1000) : $ds['speed_rw'] / 1000;
@ -280,7 +280,7 @@ class Yabs extends Model
'd_1m_as_mbps' => $d1m_mbps 'd_1m_as_mbps' => $d1m_mbps
]); ]);
//Iperf //iperf
foreach ($data['iperf'] as $st) { foreach ($data['iperf'] as $st) {
($has_ipv4) ? $match = 'IPv4' : $match = 'IPv6'; ($has_ipv4) ? $match = 'IPv4' : $match = 'IPv6';
if ($st['mode'] === $match) { if ($st['mode'] === $match) {

View File

@ -159,7 +159,7 @@
<h4>{{number_format($information['servers_summary']['ram_mb_sum'] / 1024, 2)}} <h4>{{number_format($information['servers_summary']['ram_mb_sum'] / 1024, 2)}}
<small <small
class="text-muted">GB</small></h4> class="text-muted">GB</small></h4>
<p>Ram</p> <p>RAM</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -37,7 +37,7 @@
<li><a class="dropdown-item" href="{{route('os.index')}}">OS</a></li> <li><a class="dropdown-item" href="{{route('os.index')}}">OS</a></li>
<li><a class="dropdown-item" href="{{route('providers.index')}}">Providers</a></li> <li><a class="dropdown-item" href="{{route('providers.index')}}">Providers</a></li>
<li><a class="dropdown-item" href="{{route('seedboxes.index')}}">Seedboxes</a></li> <li><a class="dropdown-item" href="{{route('seedboxes.index')}}">Seedboxes</a></li>
<li><a class="dropdown-item" href="{{route('yabs.index')}}">YABs</a></li> <li><a class="dropdown-item" href="{{route('yabs.index')}}">YABS</a></li>
<li><a class="dropdown-item" href="{{route('settings.index')}}">Settings</a></li> <li><a class="dropdown-item" href="{{route('settings.index')}}">Settings</a></li>
<li><a class="dropdown-item" href="{{route('account.index')}}">Account</a></li> <li><a class="dropdown-item" href="{{route('account.index')}}">Account</a></li>
</ul> </ul>

View File

@ -39,7 +39,7 @@
</div> </div>
<a v-bind:href="full_url" class="btn btn-success mt-4">View comparison table</a> <a v-bind:href="full_url" class="btn btn-success mt-4">View comparison table</a>
@else @else
<p class="text-danger">You need to have added a YABs to at least 2 servers to use this feature</p> <p class="text-danger">You need to have added a YABS to at least 2 servers to use this feature</p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -62,7 +62,7 @@
class="data-type">Mhz</span></td> class="data-type">Mhz</span></td>
</tr> </tr>
<tr> <tr>
<td class="td-nowrap">Ram</td> <td class="td-nowrap">RAM</td>
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->ram_mb}}<span class="data-type">MB</span> <td class="td-nowrap">{{$server1_data[0]->yabs[0]->ram_mb}}<span class="data-type">MB</span>
</td> </td>
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->ram_mb, $server2_data[0]->yabs[0]->ram_mb, 'MB') !!} {!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->ram_mb, $server2_data[0]->yabs[0]->ram_mb, 'MB') !!}
@ -286,7 +286,7 @@
<td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->disk_gb / $server2_data[0]->price->usd_per_month,2)}}</td> <td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->disk_gb / $server2_data[0]->price->usd_per_month,2)}}</td>
</tr> </tr>
<tr> <tr>
<td class="td-nowrap">Ram MB per USD</td> <td class="td-nowrap">RAM MB per USD</td>
<td class="td-nowrap">{{number_format($server1_data[0]->yabs[0]->ram_mb / $server1_data[0]->price->usd_per_month,2)}}</td> <td class="td-nowrap">{{number_format($server1_data[0]->yabs[0]->ram_mb / $server1_data[0]->price->usd_per_month,2)}}</td>
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->ram_mb / $server1_data[0]->price->usd_per_month, $server2_data[0]->yabs[0]->ram_mb / $server2_data[0]->price->usd_per_month, '') !!} {!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->ram_mb / $server1_data[0]->price->usd_per_month, $server2_data[0]->yabs[0]->ram_mb / $server2_data[0]->price->usd_per_month, '') !!}
<td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->ram_mb / $server2_data[0]->price->usd_per_month,2)}}</td> <td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->ram_mb / $server2_data[0]->price->usd_per_month,2)}}</td>

View File

@ -137,10 +137,10 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<p class="text-muted">Note adding a YABs output will overwrite Ram, disk and CPU values.</p> <p class="text-muted">Note adding a YABS output will overwrite RAM, disk and CPU values.</p>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<x-number-input> <x-number-input>
<x-slot name="title">Ram</x-slot> <x-slot name="title">RAM</x-slot>
<x-slot name="name">ram</x-slot> <x-slot name="name">ram</x-slot>
<x-slot name="value">2024</x-slot> <x-slot name="value">2024</x-slot>
<x-slot name="max">100000</x-slot> <x-slot name="max">100000</x-slot>
@ -148,7 +148,7 @@
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<x-ram-type-select> <x-ram-type-select>
<x-slot name="title">Ram type</x-slot> <x-slot name="title">RAM type</x-slot>
<x-slot name="name">ram_type</x-slot> <x-slot name="name">ram_type</x-slot>
</x-ram-type-select> </x-ram-type-select>
</div> </div>

View File

@ -120,7 +120,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<p class="text-muted">Note adding a YABs output will overwrite Ram, disk and CPU.</p> <p class="text-muted">Note adding a YABS output will overwrite RAM, disk and CPU.</p>
<div class="col-12 col-md-2 mb-3"> <div class="col-12 col-md-2 mb-3">
<x-number-input> <x-number-input>
<x-slot name="title">CPU</x-slot> <x-slot name="title">CPU</x-slot>
@ -132,7 +132,7 @@
</div> </div>
<div class="col-md-2 mb-3"> <div class="col-md-2 mb-3">
<x-number-input> <x-number-input>
<x-slot name="title">Ram</x-slot> <x-slot name="title">RAM</x-slot>
<x-slot name="name">ram</x-slot> <x-slot name="name">ram</x-slot>
<x-slot name="value">{{$server_data->ram}}</x-slot> <x-slot name="value">{{$server_data->ram}}</x-slot>
<x-slot name="max">100000</x-slot> <x-slot name="max">100000</x-slot>
@ -140,7 +140,7 @@
</div> </div>
<div class="col-md-2 mb-3"> <div class="col-md-2 mb-3">
<x-ram-type-select> <x-ram-type-select>
<x-slot name="title">Ram type</x-slot> <x-slot name="title">RAM type</x-slot>
<x-slot name="name">ram_type</x-slot> <x-slot name="name">ram_type</x-slot>
<x-slot name="value">{{$server_data->ram_type}}</x-slot> <x-slot name="value">{{$server_data->ram_type}}</x-slot>
</x-ram-type-select> </x-ram-type-select>

View File

@ -79,9 +79,9 @@
</div> </div>
<div class="col-6 text-end"> <div class="col-6 text-end">
@if(isset($server->yabs[0]->cpu_cores)) @if(isset($server->yabs[0]->cpu_cores))
<i class="fas fa-check mx-1" style="color: #0000008c;"></i>YABs <i class="fas fa-check mx-1" style="color: #0000008c;"></i>YABS
@else @else
<i class="fas fa-times mx-1" style="color: #0000008c;"></i>YABs <i class="fas fa-times mx-1" style="color: #0000008c;"></i>YABS
@endif @endif
</div> </div>
</div> </div>

View File

@ -204,7 +204,7 @@
</table> </table>
</div> </div>
@else @else
<p>Please add a YABs to <p>Please add a YABS to
see Geekbench, disk and network speeds:</p> see Geekbench, disk and network speeds:</p>
<code>curl -sL yabs.sh | bash -s -- -s "{{route('api.store-yabs', [$server_data->id, \Illuminate\Support\Facades\Auth::user()->api_token])}}"</code> <code>curl -sL yabs.sh | bash -s -- -s "{{route('api.store-yabs', [$server_data->id, \Illuminate\Support\Facades\Auth::user()->api_token])}}"</code>
@endif @endif

View File

@ -72,7 +72,7 @@
</div> </div>
<div class="row mt-3"> <div class="row mt-3">
<div class="col-12 col-md-6 mb-3"> <div class="col-12 col-md-6 mb-3">
<x-yes-no-select title="Save YABs input to txt" name="save_yabs_as_txt" value="{{ $setting->save_yabs_as_txt }}"></x-yes-no-select> <x-yes-no-select title="Save YABS input to txt" name="save_yabs_as_txt" value="{{ $setting->save_yabs_as_txt }}"></x-yes-no-select>
</div> </div>
</div> </div>
<p>Only if <i>Show servers to public</i> is <b>YES</b> do these apply:</p> <p>Only if <i>Show servers to public</i> is <b>YES</b> do these apply:</p>

View File

@ -1,20 +1,20 @@
@section("title", "Choose YABs to compare") @section("title", "Choose YABS to compare")
@section('scripts') @section('scripts')
<script src="{{ asset('js/vue.min.js') }}"></script> <script src="{{ asset('js/vue.min.js') }}"></script>
@endsection @endsection
<x-app-layout> <x-app-layout>
<x-slot name="header"> <x-slot name="header">
{{ __('Choose two YABs to compare') }} {{ __('Choose two YABS to compare') }}
</x-slot> </x-slot>
<div class="container" id="app"> <div class="container" id="app">
<div class="card shadow mt-3"> <div class="card shadow mt-3">
<div class="card-body"> <div class="card-body">
<a href="{{ route('yabs.index') }}" class="btn btn-primary mb-3">YABs home</a> <a href="{{ route('yabs.index') }}" class="btn btn-primary mb-3">YABS home</a>
@if(count($all_yabs) >= 2) @if(count($all_yabs) >= 2)
<div class="row"> <div class="row">
<div class="col-12 col-lg-6"> <div class="col-12 col-lg-6">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"><span class="input-group-text">YABs 1</span></div> <div class="input-group-prepend"><span class="input-group-text">YABS 1</span></div>
<select class="form-control" name="server1" @change="changeServer1($event)"> <select class="form-control" name="server1" @change="changeServer1($event)">
@foreach ($all_yabs as $yabs) @foreach ($all_yabs as $yabs)
<option value="{{ $yabs['id'] }}"> <option value="{{ $yabs['id'] }}">
@ -26,7 +26,7 @@
</div> </div>
<div class="col-12 col-lg-6"> <div class="col-12 col-lg-6">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"><span class="input-group-text">YABs 2</span></div> <div class="input-group-prepend"><span class="input-group-text">YABS 2</span></div>
<select class="form-control" name="server2" @change="changeServer2($event)"> <select class="form-control" name="server2" @change="changeServer2($event)">
@foreach ($all_yabs as $yabs) @foreach ($all_yabs as $yabs)
<option value="{{ $yabs['id'] }}" {{($loop->index === 1)?'selected':''}}> <option value="{{ $yabs['id'] }}" {{($loop->index === 1)?'selected':''}}>
@ -39,7 +39,7 @@
</div> </div>
<a v-bind:href="full_url" class="btn btn-success mt-4">View comparison table</a> <a v-bind:href="full_url" class="btn btn-success mt-4">View comparison table</a>
@else @else
<p class="text-danger">You need to have added at least 2 YABs to use this feature</p> <p class="text-danger">You need to have added at least 2 YABS to use this feature</p>
@endif @endif
</div> </div>
</div> </div>

View File

@ -74,7 +74,7 @@
<td class="td-nowrap">{{$yabs2_data[0]->cpu_freq}}<span class="data-type">Mhz</span></td> <td class="td-nowrap">{{$yabs2_data[0]->cpu_freq}}<span class="data-type">Mhz</span></td>
</tr> </tr>
<tr> <tr>
<td class="td-nowrap">Ram</td> <td class="td-nowrap">RAM</td>
<td class="td-nowrap">{{$yabs1_data[0]->ram_mb}}<span class="data-type">MB</span></td> <td class="td-nowrap">{{$yabs1_data[0]->ram_mb}}<span class="data-type">MB</span></td>
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->ram_mb, $yabs2_data[0]->ram_mb, 'MB') !!} {!! \App\Models\Server::tableRowCompare($yabs1_data[0]->ram_mb, $yabs2_data[0]->ram_mb, 'MB') !!}
<td class="td-nowrap">{{$yabs2_data[0]->ram_mb}}<span class="data-type">MB</span></td> <td class="td-nowrap">{{$yabs2_data[0]->ram_mb}}<span class="data-type">MB</span></td>

View File

@ -8,12 +8,12 @@
@endsection @endsection
<x-app-layout> <x-app-layout>
<x-slot name="header"> <x-slot name="header">
{{ __('YABs') }} {{ __('YABS') }}
</x-slot> </x-slot>
<div class="container" id="app"> <div class="container" id="app">
<x-delete-confirm-modal></x-delete-confirm-modal> <x-delete-confirm-modal></x-delete-confirm-modal>
<x-card class="shadow mt-3"> <x-card class="shadow mt-3">
<a href="{{ route('yabs.compare-choose') }}" class="btn btn-success mb-3">Compare YABs</a> <a href="{{ route('yabs.compare-choose') }}" class="btn btn-success mb-3">Compare YABS</a>
<x-response-alerts></x-response-alerts> <x-response-alerts></x-response-alerts>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">
@ -23,10 +23,10 @@
<th>CPU</th> <th>CPU</th>
<th>CPU FREQ</th> <th>CPU FREQ</th>
<th>RAM</th> <th>RAM</th>
<th>DISK</th> <th>Disk</th>
<th>GB5 S</th> <th>GB5 S</th>
<th>GB5 M</th> <th>GB5 M</th>
<th>Ipv6</th> <th>IPv6</th>
<th>4k</th> <th>4k</th>
<th>64k</th> <th>64k</th>
<th>512k</th> <th>512k</th>
@ -76,7 +76,7 @@
@endforeach @endforeach
@else @else
<tr> <tr>
<td class="px-4 py-2 border text-red-500" colspan="3">No YABs found.</td> <td class="px-4 py-2 border text-red-500" colspan="3">No YABS found.</td>
</tr> </tr>
@endif @endif
</tbody> </tbody>

View File

@ -1,7 +1,7 @@
@section("title", "{$yab[0]->hostname} {$yab[0]->id} YABS") @section("title", "{$yab[0]->hostname} {$yab[0]->id} YABS")
<x-app-layout> <x-app-layout>
<x-slot name="header"> <x-slot name="header">
{{ __('YABs details') }} {{ __('YABS details') }}
</x-slot> </x-slot>
<div class="container"> <div class="container">
<x-card class="shadow mt-3"> <x-card class="shadow mt-3">
@ -34,7 +34,7 @@
<td>{{ $yab[0]->cpu_model }}</td> <td>{{ $yab[0]->cpu_model }}</td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2 font-bold">Ram</td> <td class="px-4 py-2 font-bold">RAM</td>
<td>{{ $yab[0]->ram }} {{$yab[0]->ram_type}}</td> <td>{{ $yab[0]->ram }} {{$yab[0]->ram_type}}</td>
</tr> </tr>
<tr> <tr>