commit
dbc54c44d1
17
README.md
17
README.md
|
@ -7,7 +7,7 @@ Despite what the name infers this self hosted web app isn't just for storing idl
|
||||||
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.1-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.2-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/)
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/cp6/my-idlers/main/public/My%20Idlers%20logo.jpg" width="128" height="128" />
|
<img src="https://raw.githubusercontent.com/cp6/my-idlers/main/public/My%20Idlers%20logo.jpg" width="128" height="128" />
|
||||||
|
|
||||||
|
@ -19,12 +19,17 @@ GeekBench 5 scores to do easier comparing and sorting.
|
||||||
|
|
||||||
[Cloud Five Limited](https://cloud-v.net/) for providing the hosting for demo installation.
|
[Cloud Five Limited](https://cloud-v.net/) for providing the hosting for demo installation.
|
||||||
|
|
||||||
## 2.1.1 changes (19th June 2022):
|
## 2.1.2 changes (19th July 2022):
|
||||||
|
|
||||||
* Added compatability for YABs version v2022-06-11
|
* Added YABs compare page
|
||||||
* Added Create, Update and Delete servers with API
|
* Added caching for YABs
|
||||||
* Added Update pricing with API
|
* Added LabelsAssigned model
|
||||||
* Updated YABs compatible versions check
|
* Updated Server model to use relationships
|
||||||
|
* Updated Shared model to use relationships
|
||||||
|
* Updated Shared model to use caching
|
||||||
|
* Updated Table model to have table name defined
|
||||||
|
* Fixed server compare initial selection
|
||||||
|
* Fixed switch in getIpForDomain()
|
||||||
|
|
||||||
## Requires
|
## Requires
|
||||||
|
|
||||||
|
|
|
@ -309,6 +309,7 @@ class ApiController extends Controller
|
||||||
if (isset($data['0']['ip'])) {
|
if (isset($data['0']['ip'])) {
|
||||||
return response(array('ip' => $data['0']['ip']), 200);
|
return response(array('ip' => $data['0']['ip']), 200);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "AAAA":
|
case "AAAA":
|
||||||
$data = dns_get_record($domainname, DNS_AAAA);
|
$data = dns_get_record($domainname, DNS_AAAA);
|
||||||
if (isset($data['0']['ipv6'])) {
|
if (isset($data['0']['ipv6'])) {
|
||||||
|
|
|
@ -19,9 +19,9 @@ class ServerController extends Controller
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$servers = Server::activeServersDataIndexPage();
|
$servers = Server::allActiveServers();
|
||||||
|
|
||||||
$non_active_servers = Server::nonActiveServersDataIndexPage();
|
$non_active_servers = Server::allNonActiveServers();
|
||||||
|
|
||||||
return view('servers.index', compact(['servers', 'non_active_servers']));
|
return view('servers.index', compact(['servers', 'non_active_servers']));
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ class ServerController extends Controller
|
||||||
Session::save();
|
Session::save();
|
||||||
|
|
||||||
if ((Session::get('show_servers_public') === 1)) {
|
if ((Session::get('show_servers_public') === 1)) {
|
||||||
$servers = Server::publicServerData();
|
$servers = Server::allPublicServers();
|
||||||
return view('servers.public-index', compact('servers'));
|
return view('servers.public-index', compact('servers'));
|
||||||
}
|
}
|
||||||
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => ""), 404);
|
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => ""), 404);
|
||||||
|
@ -121,24 +121,16 @@ class ServerController extends Controller
|
||||||
|
|
||||||
public function show(Server $server)
|
public function show(Server $server)
|
||||||
{
|
{
|
||||||
$server_extras = Server::serverDataShowPage($server->id);
|
$server_data = Server::server($server->id)[0];
|
||||||
|
|
||||||
$network_speeds = Yabs::networkSpeedsForServer($server->id);
|
return view('servers.show', compact(['server_data']));
|
||||||
|
|
||||||
$ip_addresses = IPs::ipsForServer($server->id);
|
|
||||||
|
|
||||||
$labels = Labels::labelsForService($server->id);
|
|
||||||
|
|
||||||
return view('servers.show', compact(['server', 'server_extras', 'network_speeds', 'labels', 'ip_addresses']));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit(Server $server)
|
public function edit(Server $server)
|
||||||
{
|
{
|
||||||
$ip_addresses = IPs::ipsForServer($server->id);
|
$server_data = Server::server($server->id)[0];
|
||||||
|
|
||||||
$server = Pricing::pricingForService($server->id);
|
return view('servers.edit', compact(['server_data']));
|
||||||
|
|
||||||
return view('servers.edit', compact(['server', 'ip_addresses']));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request, Server $server)
|
public function update(Request $request, Server $server)
|
||||||
|
@ -229,28 +221,24 @@ class ServerController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
public function chooseCompare()
|
public function chooseCompare()
|
||||||
{
|
{//NOTICE: Selecting servers is not cached yet
|
||||||
$all_servers = Server::where('has_yabs', 1)->get();
|
$all_servers = Server::where('has_yabs', 1)->get();
|
||||||
return view('servers.choose-compare', compact('all_servers'));
|
return view('servers.choose-compare', compact('all_servers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function compareServers($server1, $server2)
|
public function compareServers($server1, $server2)
|
||||||
{
|
{
|
||||||
$server1_data = Server::serverCompareData($server1);
|
$server1_data = Server::server($server1);
|
||||||
|
|
||||||
if (count($server1_data) === 0) {
|
if (!isset($server1_data[0]->yabs[0])) {
|
||||||
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => "No server with YABs data was found for id '$server1'"), 404);
|
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => "No server with YABs data was found for id '$server1'"), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$server1_network = Yabs::serverCompareNetwork($server1_data[0]->yabs_id);
|
$server2_data = Server::server($server2);
|
||||||
|
|
||||||
$server2_data = Server::serverCompareData($server2);
|
if (!isset($server2_data[0]->yabs[0])) {
|
||||||
|
|
||||||
if (count($server2_data) === 0) {
|
|
||||||
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => "No server with YABs data was found for id '$server2'"), 404);
|
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => "No server with YABs data was found for id '$server2'"), 404);
|
||||||
}
|
}
|
||||||
|
return view('servers.compare', compact('server1_data', 'server2_data'));
|
||||||
$server2_network = Yabs::serverCompareNetwork($server2_data[0]->yabs_id);
|
|
||||||
return view('servers.compare', compact('server1_data', 'server2_data', 'server1_network', 'server2_network'));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,7 @@ class SharedController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$shared = Shared::sharedDataIndexPage();
|
$shared = Shared::allSharedHosting();
|
||||||
|
|
||||||
return view('shared.index', compact(['shared']));
|
return view('shared.index', compact(['shared']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ class SharedController extends Controller
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'domain' => 'required|min:4',
|
'domain' => 'required|min:4',
|
||||||
'shared_type' => 'required',
|
'shared_type' => 'required',
|
||||||
|
@ -54,17 +52,13 @@ class SharedController extends Controller
|
||||||
$shared_id = Str::random(8);
|
$shared_id = Str::random(8);
|
||||||
|
|
||||||
$pricing = new Pricing();
|
$pricing = new Pricing();
|
||||||
|
|
||||||
$as_usd = $pricing->convertToUSD($request->price, $request->currency);
|
$as_usd = $pricing->convertToUSD($request->price, $request->currency);
|
||||||
|
|
||||||
$pricing->insertPricing(2, $shared_id, $request->currency, $request->price, $request->payment_term, $as_usd, $request->next_due_date);
|
$pricing->insertPricing(2, $shared_id, $request->currency, $request->price, $request->payment_term, $as_usd, $request->next_due_date);
|
||||||
|
|
||||||
Labels::deleteLabelsAssignedTo($shared_id);
|
Labels::deleteLabelsAssignedTo($shared_id);
|
||||||
|
|
||||||
Labels::insertLabelsAssigned([$request->label1, $request->label2, $request->label3, $request->label4], $shared_id);
|
Labels::insertLabelsAssigned([$request->label1, $request->label2, $request->label3, $request->label4], $shared_id);
|
||||||
|
|
||||||
IPs::deleteIPsAssignedTo($shared_id);
|
IPs::deleteIPsAssignedTo($shared_id);
|
||||||
|
|
||||||
if (!is_null($request->dedicated_ip)) {
|
if (!is_null($request->dedicated_ip)) {
|
||||||
IPs::insertIP($shared_id, $request->dedicated_ip);
|
IPs::insertIP($shared_id, $request->dedicated_ip);
|
||||||
}
|
}
|
||||||
|
@ -88,6 +82,7 @@ class SharedController extends Controller
|
||||||
'db__limit' => $request->db
|
'db__limit' => $request->db
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Cache::forget('all_shared');
|
||||||
Home::homePageCacheForget();
|
Home::homePageCacheForget();
|
||||||
|
|
||||||
return redirect()->route('shared.index')
|
return redirect()->route('shared.index')
|
||||||
|
@ -96,24 +91,14 @@ class SharedController extends Controller
|
||||||
|
|
||||||
public function show(Shared $shared)
|
public function show(Shared $shared)
|
||||||
{
|
{
|
||||||
$shared_extras = Shared::sharedDataShowPage($shared->id);
|
$shared = Shared::sharedHosting($shared->id)[0];
|
||||||
|
return view('shared.show', compact(['shared']));
|
||||||
$labels = Labels::labelsForService($shared->id);
|
|
||||||
|
|
||||||
$ip_address = IPs::ipsForServer($shared->id);
|
|
||||||
|
|
||||||
return view('shared.show', compact(['shared', 'shared_extras', 'labels', 'ip_address']));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit(Shared $shared)
|
public function edit(Shared $shared)
|
||||||
{
|
{
|
||||||
$labels = Labels::labelsForService($shared->id);
|
$shared = Shared::sharedHosting($shared->id);
|
||||||
|
return view('shared.edit', compact(['shared']));
|
||||||
$ip_address = IPs::ipsForServer($shared->id);
|
|
||||||
|
|
||||||
$shared = Shared::sharedEditDataPage($shared->id);
|
|
||||||
|
|
||||||
return view('shared.edit', compact(['shared', 'labels', 'ip_address']));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request, Shared $shared)
|
public function update(Request $request, Shared $shared)
|
||||||
|
@ -161,23 +146,20 @@ class SharedController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$pricing = new Pricing();
|
$pricing = new Pricing();
|
||||||
|
|
||||||
$as_usd = $pricing->convertToUSD($request->price, $request->currency);
|
$as_usd = $pricing->convertToUSD($request->price, $request->currency);
|
||||||
|
|
||||||
$pricing->updatePricing($request->id, $request->currency, $request->price, $request->payment_term, $as_usd, $request->next_due_date);
|
$pricing->updatePricing($request->id, $request->currency, $request->price, $request->payment_term, $as_usd, $request->next_due_date);
|
||||||
|
|
||||||
Labels::deleteLabelsAssignedTo($request->id);
|
Labels::deleteLabelsAssignedTo($request->id);
|
||||||
|
|
||||||
Labels::insertLabelsAssigned([$request->label1, $request->label2, $request->label3, $request->label4], $request->id);
|
Labels::insertLabelsAssigned([$request->label1, $request->label2, $request->label3, $request->label4], $request->id);
|
||||||
|
|
||||||
Cache::forget("labels_for_service.{$request->id}");
|
Cache::forget("labels_for_service.{$request->id}");
|
||||||
|
|
||||||
IPs::deleteIPsAssignedTo($request->id);
|
IPs::deleteIPsAssignedTo($request->id);
|
||||||
|
|
||||||
if (isset($request->dedicated_ip)) {
|
if (isset($request->dedicated_ip)) {
|
||||||
IPs::insertIP($request->id, $request->dedicated_ip);
|
IPs::insertIP($request->id, $request->dedicated_ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cache::forget("shared_hosting.{$request->id}");
|
||||||
|
Cache::forget('all_shared');
|
||||||
Home::homePageCacheForget();
|
Home::homePageCacheForget();
|
||||||
|
|
||||||
return redirect()->route('shared.index')
|
return redirect()->route('shared.index')
|
||||||
|
@ -188,7 +170,6 @@ class SharedController extends Controller
|
||||||
{
|
{
|
||||||
$shared_id = $shared->id;
|
$shared_id = $shared->id;
|
||||||
$items = Shared::find($shared_id);
|
$items = Shared::find($shared_id);
|
||||||
|
|
||||||
$items->delete();
|
$items->delete();
|
||||||
|
|
||||||
$p = new Pricing();
|
$p = new Pricing();
|
||||||
|
@ -198,6 +179,8 @@ class SharedController extends Controller
|
||||||
|
|
||||||
IPs::deleteIPsAssignedTo($shared_id);
|
IPs::deleteIPsAssignedTo($shared_id);
|
||||||
|
|
||||||
|
Cache::forget("shared_hosting.$shared_id");
|
||||||
|
Cache::forget('all_shared');
|
||||||
Home::homePageCacheForget();
|
Home::homePageCacheForget();
|
||||||
|
|
||||||
return redirect()->route('shared.index')
|
return redirect()->route('shared.index')
|
||||||
|
|
|
@ -16,11 +16,7 @@ class YabsController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$yabs = DB::table('yabs as y')
|
$yabs = Yabs::allYabs();
|
||||||
->join('servers as s', 'y.server_id', '=', 's.id')
|
|
||||||
->Join('disk_speed as ds', 'y.id', '=', 'ds.id')
|
|
||||||
->get(['y.*', 's.hostname', 'ds.*']);
|
|
||||||
|
|
||||||
return view('yabs.index', compact(['yabs']));
|
return view('yabs.index', compact(['yabs']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +34,6 @@ class YabsController extends Controller
|
||||||
|
|
||||||
if (isset($yabs['error_id'])) {
|
if (isset($yabs['error_id'])) {
|
||||||
return back()->withErrors(["yabs" => 'Problem inserting YABs. Error id ' . $yabs['error_id']])->withInput();
|
return back()->withErrors(["yabs" => 'Problem inserting YABs. Error id ' . $yabs['error_id']])->withInput();
|
||||||
//return redirect()->route('yabs.index')->with('error', 'Problem inserting YABs. Error id ' . $yabs['error_id']);
|
|
||||||
}
|
}
|
||||||
//No errors, do insert
|
//No errors, do insert
|
||||||
|
|
||||||
|
@ -111,6 +106,7 @@ class YabsController extends Controller
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
return redirect()->route('yabs.index')
|
return redirect()->route('yabs.index')
|
||||||
->with('success', 'Success inserting YABs');
|
->with('success', 'Success inserting YABs');
|
||||||
|
@ -118,17 +114,8 @@ class YabsController extends Controller
|
||||||
|
|
||||||
public function show(Yabs $yab)
|
public function show(Yabs $yab)
|
||||||
{
|
{
|
||||||
$yab = DB::table('yabs as y')
|
$yab = Yabs::yabs($yab->id);
|
||||||
->join('servers as s', 'y.server_id', '=', 's.id')
|
return view('yabs.show', compact(['yab']));
|
||||||
->join('disk_speed as ds', 'y.id', '=', 'ds.id')
|
|
||||||
->where('y.id', '=', $yab->id)
|
|
||||||
->get(['y.*', 's.hostname', 'ds.*']);
|
|
||||||
|
|
||||||
$network = DB::table('network_speed')
|
|
||||||
->where('id', '=', $yab[0]->id)
|
|
||||||
->get();
|
|
||||||
|
|
||||||
return view('yabs.show', compact(['yab', 'network']));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroy(Yabs $yab)
|
public function destroy(Yabs $yab)
|
||||||
|
@ -136,11 +123,40 @@ class YabsController extends Controller
|
||||||
$yabs = Yabs::find($yab->id);
|
$yabs = Yabs::find($yab->id);
|
||||||
$yabs->delete();
|
$yabs->delete();
|
||||||
|
|
||||||
$update_server = DB::table('servers')
|
if (Server::serverYabsAmount($yab->server_id) === 0) {
|
||||||
|
DB::table('servers')
|
||||||
->where('id', $yab->server_id)
|
->where('id', $yab->server_id)
|
||||||
->update(['has_yabs' => 0]);
|
->update(['has_yabs' => 0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Cache::forget('all_yabs');
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
$all_yabs = Yabs::allYabs();
|
||||||
|
return view('yabs.choose-compare', compact('all_yabs'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function compareYabs($yabs1, $yabs2)
|
||||||
|
{
|
||||||
|
$yabs1_data = Yabs::yabs($yabs1);
|
||||||
|
|
||||||
|
if (count($yabs1_data) === 0) {
|
||||||
|
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => "No YABs data was found for id '$yabs1'"), 404);
|
||||||
|
}
|
||||||
|
|
||||||
|
$yabs2_data = Yabs::yabs($yabs2);
|
||||||
|
|
||||||
|
if (count($yabs2_data) === 0) {
|
||||||
|
return response()->view('errors.404', array("status" => 404, "title" => "Page not found", "message" => "No YABs data was found for id '$server2'"), 404);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('yabs.compare', compact('yabs1_data', 'yabs2_data'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,14 @@ class DiskSpeed extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
protected $table = 'disk_speed';
|
protected $table = 'disk_speed';
|
||||||
|
|
||||||
protected $fillable = ['id', 'server_id', 'd_4k', 'd_4k_type', 'd_4k_as_mbps', 'd_64k', 'd_64k_type', 'd_64k_as_mbps', 'd_512k', 'd_512k_type', 'd_512k_as_mbps', 'd_1m', 'd_1m_type', 'd_1m_as_mbps'];
|
protected $fillable = ['id', 'server_id', 'd_4k', 'd_4k_type', 'd_4k_as_mbps', 'd_64k', 'd_64k_type', 'd_64k_as_mbps', 'd_512k', 'd_512k_type', 'd_512k_as_mbps', 'd_1m', 'd_1m_type', 'd_1m_as_mbps'];
|
||||||
|
|
||||||
|
public function yabs()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Yabs::class, 'id', 'id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ class Labels extends Model
|
||||||
|
|
||||||
public $incrementing = false;
|
public $incrementing = false;
|
||||||
|
|
||||||
|
protected $table = 'labels';
|
||||||
|
|
||||||
protected $fillable = ['id', 'label', 'server_id', 'server_id_2', 'domain_id', 'domain_id_2', 'shared_id', 'shared_id_2'];
|
protected $fillable = ['id', 'label', 'server_id', 'server_id_2', 'domain_id', 'domain_id_2', 'shared_id', 'shared_id_2'];
|
||||||
|
|
||||||
public static function deleteLabelsAssignedTo($service_id)
|
public static function deleteLabelsAssignedTo($service_id)
|
||||||
|
|
23
app/Models/LabelsAssigned.php
Normal file
23
app/Models/LabelsAssigned.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class LabelsAssigned extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
|
public $table = 'labels_assigned';
|
||||||
|
|
||||||
|
protected $fillable = ['label_id', 'service_id'];
|
||||||
|
|
||||||
|
public function label()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Labels::class, 'id', 'label_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,7 +9,14 @@ class NetworkSpeed extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
protected $table = 'network_speed';
|
protected $table = 'network_speed';
|
||||||
|
|
||||||
protected $fillable = ['id', 'server_id', 'location', 'send', 'send_type', 'send_as_mbps', 'receive', 'receive_type', 'receive_as_mbps', 'created_at', 'updated_at'];
|
protected $fillable = ['id', 'server_id', 'location', 'send', 'send_type', 'send_as_mbps', 'receive', 'receive_type', 'receive_as_mbps', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
public function yabs()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Yabs::class, 'id', 'id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,13 +141,4 @@ class Pricing extends Model
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function pricingForService(string $service_id)
|
|
||||||
{
|
|
||||||
return Cache::remember("service_pricing.$service_id", now()->addWeek(1), function () use ($service_id) {
|
|
||||||
return DB::table('servers as s')
|
|
||||||
->join('pricings as p', 's.id', '=', 'p.service_id')
|
|
||||||
->where('s.id', '=', $service_id)
|
|
||||||
->get(['s.*', 'p.*']);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Process;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
@ -21,6 +22,48 @@ class Server extends Model
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
|
public static function allServers()
|
||||||
|
{//All servers and relationships (no using joins)
|
||||||
|
return Cache::remember("all_servers", now()->addMonth(1), function () {
|
||||||
|
return Server::with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function server(string $server_id)
|
||||||
|
{//Single server and relationships (no using joins)
|
||||||
|
return Cache::remember("server.$server_id", now()->addMonth(1), function () use ($server_id) {
|
||||||
|
return Server::where('id', $server_id)
|
||||||
|
->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function allActiveServers()
|
||||||
|
{//All ACTIVE servers and relationships replaces activeServersDataIndexPage()
|
||||||
|
return Cache::remember("all_active_servers", now()->addMonth(1), function () {
|
||||||
|
return Server::where('active', '=', 1)
|
||||||
|
->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])
|
||||||
|
->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function allNonActiveServers()
|
||||||
|
{//All NON ACTIVE servers and relationships replaces nonActiveServersDataIndexPage()
|
||||||
|
return Cache::remember("non_active_servers", now()->addMonth(1), function () {
|
||||||
|
return Server::where('active', '=', 0)
|
||||||
|
->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])
|
||||||
|
->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function allPublicServers()
|
||||||
|
{//server data that will be publicly viewable (values in settings)
|
||||||
|
return Cache::remember("public_server_data", now()->addMonth(1), function () {
|
||||||
|
return Server::where('show_public', '=', 1)
|
||||||
|
->with(['location', 'provider', 'os', 'price', 'ips', 'yabs', 'yabs.disk_speed', 'yabs.network_speed', 'labels', 'labels.label'])
|
||||||
|
->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static function serviceServerType($type)
|
public static function serviceServerType($type)
|
||||||
{
|
{
|
||||||
if ($type === 1) {
|
if ($type === 1) {
|
||||||
|
@ -158,11 +201,12 @@ class Server extends Model
|
||||||
|
|
||||||
public static function serverRelatedCacheForget(): void
|
public static function serverRelatedCacheForget(): void
|
||||||
{
|
{
|
||||||
|
Cache::forget('all_servers');//All servers
|
||||||
Cache::forget('services_count');//Main page services_count cache
|
Cache::forget('services_count');//Main page services_count cache
|
||||||
Cache::forget('due_soon');//Main page due_soon cache
|
Cache::forget('due_soon');//Main page due_soon cache
|
||||||
Cache::forget('recently_added');//Main page recently_added cache
|
Cache::forget('recently_added');//Main page recently_added cache
|
||||||
Cache::forget('all_active_servers');//all servers cache
|
Cache::forget('all_active_servers');//all active servers cache
|
||||||
Cache::forget('non_active_servers');//all servers cache
|
Cache::forget('non_active_servers');//all non active servers cache
|
||||||
Cache::forget('servers_summary');//servers summary cache
|
Cache::forget('servers_summary');//servers summary cache
|
||||||
Cache::forget('public_server_data');//public servers
|
Cache::forget('public_server_data');//public servers
|
||||||
Cache::forget('all_pricing');//All pricing
|
Cache::forget('all_pricing');//All pricing
|
||||||
|
@ -172,81 +216,50 @@ class Server extends Model
|
||||||
|
|
||||||
public static function serverSpecificCacheForget(string $server_id): void
|
public static function serverSpecificCacheForget(string $server_id): void
|
||||||
{
|
{
|
||||||
Cache::forget("server_show_data.$server_id");//data for show
|
Cache::forget("server.$server_id");//Will replace one below
|
||||||
Cache::forget("ip_addresses.$server_id");//ips for server
|
|
||||||
Cache::forget("labels_for_service.$server_id");//labels for server
|
|
||||||
Cache::forget("service_pricing.$server_id");//Pricing
|
Cache::forget("service_pricing.$server_id");//Pricing
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function activeServersDataIndexPage()
|
public static function serverYabsAmount(string $server_id): int
|
||||||
{
|
{//Returns amount of YABs a server has
|
||||||
return Cache::remember('all_active_servers', now()->addMonth(1), function () {
|
return DB::table('yabs')
|
||||||
return DB::table('servers as s')
|
->where('server_id', '=', $server_id)
|
||||||
->join('pricings as pr', 's.id', '=', 'pr.service_id')
|
->get()->count();
|
||||||
->join('providers as p', 's.provider_id', '=', 'p.id')
|
|
||||||
->join('locations as l', 's.location_id', '=', 'l.id')
|
|
||||||
->join('os as o', 's.os_id', '=', 'o.id')
|
|
||||||
->where('s.active', '=', 1)
|
|
||||||
->get(['s.*', 'pr.currency', 'pr.price', 'pr.term', 'pr.as_usd', 'pr.next_due_date', 'p.name as provider_name', 'l.name as location', 'o.name as os_name']);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function nonActiveServersDataIndexPage()
|
public function yabs()
|
||||||
{
|
{
|
||||||
return Cache::remember('non_active_servers', now()->addMonth(1), function () {
|
return $this->hasMany(Yabs::class, 'server_id', 'id');
|
||||||
return DB::table('servers as s')
|
|
||||||
->join('pricings as pr', 's.id', '=', 'pr.service_id')
|
|
||||||
->join('providers as p', 's.provider_id', '=', 'p.id')
|
|
||||||
->join('locations as l', 's.location_id', '=', 'l.id')
|
|
||||||
->join('os as o', 's.os_id', '=', 'o.id')
|
|
||||||
->where('s.active', '=', 0)
|
|
||||||
->get(['s.*', 'pr.currency', 'pr.price', 'pr.term', 'pr.as_usd', 'p.name as provider_name', 'l.name as location', 'o.name as os_name']);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function serverDataShowPage(string $server_id)
|
public function ips()
|
||||||
{
|
{
|
||||||
return Cache::remember("server_show_data.$server_id", now()->addDay(1), function () use ($server_id) {
|
return $this->hasMany(IPs::class, 'service_id', 'id');
|
||||||
return DB::table('servers as s')
|
|
||||||
->join('pricings as pr', 's.id', '=', 'pr.service_id')
|
|
||||||
->join('providers as p', 's.provider_id', '=', 'p.id')
|
|
||||||
->join('locations as l', 's.location_id', '=', 'l.id')
|
|
||||||
->join('os as o', 's.os_id', '=', 'o.id')
|
|
||||||
->Leftjoin('yabs as y', 's.id', '=', 'y.server_id')
|
|
||||||
->Leftjoin('disk_speed as ds', 'y.id', '=', 'ds.id')
|
|
||||||
->where('s.id', '=', $server_id)
|
|
||||||
->get(['s.*', 'p.name as provider', 'l.name as location', 'o.name as os_name', 'pr.*', 'y.*', 'ds.*']);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function publicServerData()
|
public function location()
|
||||||
{
|
{
|
||||||
return Cache::remember('public_server_data', now()->addMonth(1), function () {
|
return $this->hasOne(Locations::class, 'id', 'location_id');
|
||||||
return DB::table('servers as s')
|
|
||||||
->Join('pricings as pr', 's.id', '=', 'pr.service_id')
|
|
||||||
->Join('providers as p', 's.provider_id', '=', 'p.id')
|
|
||||||
->Join('locations as l', 's.location_id', '=', 'l.id')
|
|
||||||
->Join('os as o', 's.os_id', '=', 'o.id')
|
|
||||||
->LeftJoin('ips as i', 's.id', '=', 'i.service_id')
|
|
||||||
->LeftJoin('yabs as y', 's.id', '=', 'y.server_id')
|
|
||||||
->LeftJoin('disk_speed as ds', 'y.id', '=', 'ds.id')
|
|
||||||
->where('s.show_public', '=', 1)
|
|
||||||
->get(['pr.currency', 'pr.price', 'pr.term', 'pr.as_usd', 'pr.next_due_date', 'pr.service_id', 'p.name as provider_name', 'l.name as location', 'o.name as os_name', 'y.*', 'y.id as yabs_id', 'ds.*', 's.*', 'i.address as ip', 'i.is_ipv4']);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function serverCompareData(string $server_id)
|
public function provider()
|
||||||
{
|
{
|
||||||
return Cache::remember("server_compare.$server_id", now()->addMonth(1), function () use ($server_id) {
|
return $this->hasOne(Providers::class, 'id', 'provider_id');
|
||||||
return DB::table('servers as s')
|
}
|
||||||
->join('pricings as pr', 's.id', '=', 'pr.service_id')
|
|
||||||
->join('providers as p', 's.provider_id', '=', 'p.id')
|
public function os()
|
||||||
->join('locations as l', 's.location_id', '=', 'l.id')
|
{
|
||||||
->Join('yabs as y', 's.id', '=', 'y.server_id')
|
return $this->hasOne(OS::class, 'id', 'os_id');
|
||||||
->Join('disk_speed as ds', 'y.id', '=', 'ds.id')
|
}
|
||||||
->where('s.id', '=', $server_id)
|
|
||||||
->get(['s.*', 'p.name as provider_name', 'l.name as location', 'pr.*', 'y.*', 'y.id as yabs_id', 'ds.*']);
|
public function price()
|
||||||
});
|
{
|
||||||
|
return $this->hasOne(Pricing::class, 'service_id', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labels()
|
||||||
|
{
|
||||||
|
return $this->hasMany(LabelsAssigned::class, 'service_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,30 +17,44 @@ class Shared extends Model
|
||||||
|
|
||||||
public $incrementing = false;
|
public $incrementing = false;
|
||||||
|
|
||||||
public static function sharedDataIndexPage()
|
public static function allSharedHosting()
|
||||||
{
|
{//All shared hosting and relationships (no using joins)
|
||||||
return DB::table('shared_hosting as s')
|
return Cache::remember("all_shared", now()->addMonth(1), function () {
|
||||||
->join('providers as p', 's.provider_id', '=', 'p.id')
|
return Shared::with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->get();
|
||||||
->join('locations as l', 's.location_id', '=', 'l.id')
|
});
|
||||||
->join('pricings as pr', 's.id', '=', 'pr.service_id')
|
|
||||||
->get(['s.*', 'p.name as provider_name', 'pr.*', 'l.name as location']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sharedDataShowPage(string $shared_id)
|
public static function sharedHosting(string $shared_id)
|
||||||
{
|
{//Single shared hosting and relationships (no using joins)
|
||||||
return DB::table('shared_hosting as s')
|
return Cache::remember("shared_hosting.$shared_id", now()->addMonth(1), function () use ($shared_id) {
|
||||||
->join('pricings as pr', 's.id', '=', 'pr.service_id')
|
return Shared::where('id', $shared_id)
|
||||||
->join('providers as p', 's.provider_id', '=', 'p.id')
|
->with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->get();
|
||||||
->join('locations as l', 's.location_id', '=', 'l.id')
|
});
|
||||||
->where('s.id', '=', $shared_id)
|
|
||||||
->get(['s.*', 'p.name as provider_name', 'l.name as location', 'pr.*']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sharedEditDataPage(string $shared_id)
|
public function ips()
|
||||||
{
|
{
|
||||||
return DB::table('shared_hosting as s')
|
return $this->hasMany(IPs::class, 'service_id', 'id');
|
||||||
->join('pricings as p', 's.id', '=', 'p.service_id')
|
|
||||||
->where('s.id', '=', $shared_id)
|
|
||||||
->get(['s.*', 'p.*']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function location()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Locations::class, 'id', 'location_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function provider()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Providers::class, 'id', 'provider_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function price()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Pricing::class, 'service_id', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function labels()
|
||||||
|
{
|
||||||
|
return $this->hasMany(LabelsAssigned::class, 'service_id', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,4 +35,35 @@ class Yabs extends Model
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function yabs(string $yabs_id)
|
||||||
|
{
|
||||||
|
return Cache::remember("yabs.$yabs_id", now()->addMonth(1), function () use ($yabs_id) {
|
||||||
|
return self::where('id', $yabs_id)->with(['server', 'disk_speed', 'network_speed'])
|
||||||
|
->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function allYabs()
|
||||||
|
{
|
||||||
|
return Cache::remember("all_yabs", now()->addMonth(1), function () {
|
||||||
|
return self::with(['server', 'disk_speed', 'network_speed'])
|
||||||
|
->get();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function server()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Server::class, 'id', 'server_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function disk_speed()
|
||||||
|
{
|
||||||
|
return $this->hasOne(DiskSpeed::class, 'id', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function network_speed()
|
||||||
|
{
|
||||||
|
return $this->hasMany(NetworkSpeed::class, 'id', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<div class="card shadow mt-3">
|
<div class="card shadow mt-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<a href="{{ route('servers.index') }}" class="btn btn-primary mb-3">Servers home</a>
|
<a href="{{ route('servers.index') }}" class="btn btn-primary mb-3">Servers home</a>
|
||||||
|
@if(count($all_servers) >= 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">
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
<div class="input-group-prepend"><span class="input-group-text">Server2</span></div>
|
<div class="input-group-prepend"><span class="input-group-text">Server2</span></div>
|
||||||
<select class="form-control" name="server2" @change="changeServer2($event)">
|
<select class="form-control" name="server2" @change="changeServer2($event)">
|
||||||
@foreach ($all_servers as $server)
|
@foreach ($all_servers as $server)
|
||||||
<option value="{{ $server['id'] }}">
|
<option value="{{ $server['id'] }}" {{($loop->index === 1)?'selected':''}}>
|
||||||
{{ $server['hostname'] }}
|
{{ $server['hostname'] }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -36,13 +37,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
|
||||||
<div class="input-group mt-4">
|
|
||||||
<div class="input-group-prepend"><span class="input-group-text">URL</span></div>
|
|
||||||
<input type="text" class="form-control" id="url" v-model="url_input" disabled>
|
|
||||||
</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
|
||||||
|
<p class="text-danger">You need to have added a YABs to at least 2 servers to use this feature</p>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1)
|
@if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1)
|
||||||
|
@ -55,10 +53,10 @@
|
||||||
el: "#app",
|
el: "#app",
|
||||||
data: {
|
data: {
|
||||||
"base_url": "servers-compare/",
|
"base_url": "servers-compare/",
|
||||||
"full_url": "",
|
"full_url": "{{route('servers.compare', ['server1' => $all_servers[0]->id, 'server2' => $all_servers[1]->id])}}",
|
||||||
"url_input": "",
|
"url_input": "",
|
||||||
"server1": "",
|
"server1": "{{$all_servers[0]->id ?? ''}}",
|
||||||
"server2": "",
|
"server2": "{{$all_servers[1]->id ?? ''}}",
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeServer1: function changeServer1(event) {
|
changeServer1: function changeServer1(event) {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
@section('title') {{'Compare servers'}} @endsection
|
@section('title')
|
||||||
|
{{'Compare servers'}}
|
||||||
|
@endsection
|
||||||
@section('style')
|
@section('style')
|
||||||
<style>
|
<style>
|
||||||
.td-nowrap {
|
.td-nowrap {
|
||||||
|
@ -49,185 +51,271 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">CPU count</td>
|
<td class="td-nowrap">CPU count</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->cpu_cores}}</td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->cpu_cores}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->cpu_cores, $server2_data[0]->cpu_cores, ' cores') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->cpu_cores, $server2_data[0]->yabs[0]->cpu_cores, ' cores') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->cpu_cores}}</td>
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->cpu_cores}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">CPU freq</td>
|
<td class="td-nowrap">CPU freq</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->cpu_freq}}<span class="data-type">Mhz</span></td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->cpu_freq}}<span
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->cpu_freq, $server2_data[0]->cpu_freq, 'Mhz') !!}
|
class="data-type">Mhz</span></td>
|
||||||
<td class="td-nowrap">{{$server2_data[0]->cpu_freq}}<span class="data-type">Mhz</span></td>
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->cpu_freq, $server2_data[0]->yabs[0]->cpu_freq, 'Mhz') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[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">{{$server1_data[0]->ram_mb}}<span class="data-type">MB</span></td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->ram_mb}}<span class="data-type">MB</span>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->ram_mb, $server2_data[0]->ram_mb, 'MB') !!}
|
</td>
|
||||||
<td class="td-nowrap">{{$server2_data[0]->ram_mb}}<span class="data-type">MB</span></td>
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->ram_mb, $server2_data[0]->yabs[0]->ram_mb, 'MB') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->ram_mb}}<span class="data-type">MB</span>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">Disk</td>
|
<td class="td-nowrap">Disk</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->disk_gb}}<span class="data-type">GB</span></td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->disk_gb}}<span
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->disk_gb, $server2_data[0]->disk_gb, 'GB') !!}
|
class="data-type">GB</span></td>
|
||||||
<td class="td-nowrap">{{$server2_data[0]->disk_gb}}<span class="data-type">GB</span></td>
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->disk_gb, $server2_data[0]->yabs[0]->disk_gb, 'GB') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->disk_gb}}<span
|
||||||
|
class="data-type">GB</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">GB5 single</td>
|
<td class="td-nowrap">GB5 single</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->gb5_single}}</td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->gb5_single}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->gb5_single, $server2_data[0]->gb5_single, '') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->gb5_single, $server2_data[0]->yabs[0]->gb5_single, '') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->gb5_single}}</td>
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->gb5_single}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">GB5 multi</td>
|
<td class="td-nowrap">GB5 multi</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->gb5_multi}}</td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->gb5_multi}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->gb5_multi, $server2_data[0]->gb5_multi, '') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->gb5_multi, $server2_data[0]->yabs[0]->gb5_multi, '') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->gb5_multi}}</td>
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->gb5_multi}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">4k disk</td>
|
<td class="td-nowrap">4k disk</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->d_4k_as_mbps}}<span class="data-type">MB/s</span>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->disk_speed->d_4k_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span>
|
||||||
</td>
|
</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->d_4k_as_mbps, $server2_data[0]->d_4k_as_mbps, 'MB/s') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->disk_speed->d_4k_as_mbps, $server2_data[0]->yabs[0]->disk_speed->d_4k_as_mbps, 'MB/s') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->d_4k_as_mbps}}<span class="data-type">MB/s</span>
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->disk_speed->d_4k_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">64k disk</td>
|
<td class="td-nowrap">64k disk</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->d_64k_as_mbps}}<span class="data-type">MB/s</span>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->disk_speed->d_64k_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span>
|
||||||
</td>
|
</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->d_64k_as_mbps, $server2_data[0]->d_64k_as_mbps, 'MB/s') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->disk_speed->d_64k_as_mbps, $server2_data[0]->yabs[0]->disk_speed->d_64k_as_mbps, 'MB/s') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->d_64k_as_mbps}}<span class="data-type">MB/s</span>
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->disk_speed->d_64k_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">512k disk</td>
|
<td class="td-nowrap">512k disk</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->d_512k_as_mbps}}<span
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->disk_speed->d_512k_as_mbps}}<span
|
||||||
class="data-type">MB/s</span></td>
|
class="data-type">MB/s</span></td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->d_512k_as_mbps, $server2_data[0]->d_512k_as_mbps, 'MB/s') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->disk_speed->d_512k_as_mbps, $server2_data[0]->yabs[0]->disk_speed->d_512k_as_mbps, 'MB/s') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->d_512k_as_mbps}}<span
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->disk_speed->d_512k_as_mbps}}<span
|
||||||
class="data-type">MB/s</span></td>
|
class="data-type">MB/s</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">1m disk</td>
|
<td class="td-nowrap">1m disk</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->d_1m_as_mbps}}<span class="data-type">MB/s</span>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->disk_speed->d_1m_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span>
|
||||||
</td>
|
</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->d_1m_as_mbps, $server2_data[0]->d_1m_as_mbps, 'MB/s') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->disk_speed->d_1m_as_mbps, $server2_data[0]->yabs[0]->disk_speed->d_1m_as_mbps, 'MB/s') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->d_1m_as_mbps}}<span class="data-type">MB/s</span>
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->disk_speed->d_1m_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[0]->location === $server2_data[0]->yabs[0]->network_speed[0]->location)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">{{$server1_network[0]->location}} send</td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[0]->location}} send
|
||||||
<td class="td-nowrap">{{$server1_network[0]->send_as_mbps}}<span
|
|
||||||
class="data-type">MBps</span></td>
|
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_network[0]->send_as_mbps, $server2_network[0]->send_as_mbps, 'MBps') !!}
|
|
||||||
<td class="td-nowrap">{{$server2_network[0]->send_as_mbps}}<span
|
|
||||||
class="data-type">MBps</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="td-nowrap">{{$server1_network[0]->location}} receive</td>
|
|
||||||
<td class="td-nowrap">{{$server1_network[0]->receive_as_mbps}}<span
|
|
||||||
class="data-type">MBps</span></td>
|
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_network[0]->receive_as_mbps, $server2_network[0]->receive_as_mbps, 'MBps') !!}
|
|
||||||
<td class="td-nowrap">{{$server2_network[0]->receive_as_mbps}}<span
|
|
||||||
class="data-type">MBps</span></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="td-nowrap">{{$server1_network[1]->location}} send</td>
|
|
||||||
<td class="td-nowrap">{{$server1_network[1]->send_as_mbps}}<span
|
|
||||||
class="data-type">MBps</span></td>
|
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_network[1]->send_as_mbps, $server2_network[1]->send_as_mbps, 'MBps') !!}
|
|
||||||
<td class="td-nowrap">{{$server2_network[1]->send_as_mbps}}<span
|
|
||||||
class="data-type">MBps</span></td>
|
|
||||||
</tr>
|
|
||||||
@if($server1_network[0]->location === $server2_network[0]->location)
|
|
||||||
<tr>
|
|
||||||
<td class="td-nowrap">{{$server1_network[1]->location}} receive</td>
|
|
||||||
<td class="td-nowrap">{{$server1_network[1]->receive_as_mbps}}<span class="data-type">MBps</span>
|
|
||||||
</td>
|
</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_network[1]->receive_as_mbps, $server2_network[1]->receive_as_mbps, 'MBps') !!}
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[0]->send_as_mbps}}
|
||||||
<td class="td-nowrap">{{$server2_network[1]->receive_as_mbps}}<span class="data-type">MBps</span>
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[0]->send_as_mbps, $server2_data[0]->yabs[0]->network_speed[0]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[0]->send_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($server1_network[1]->location === $server2_network[1]->location)
|
@if($server1_data[0]->yabs[0]->network_speed[0]->location === $server2_data[0]->yabs[0]->network_speed[0]->location)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">{{$server1_network[2]->location}} send</td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[0]->location}} receive
|
||||||
<td class="td-nowrap">{{$server1_network[2]->send_as_mbps}}<span
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[0]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[0]->receive_as_mbps, $server2_data[0]->yabs[0]->network_speed[0]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[0]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[1]->location === $server2_data[0]->yabs[0]->network_speed[1]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[1]->location}} send
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[1]->send_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[1]->send_as_mbps, $server2_data[0]->yabs[0]->network_speed[1]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[1]->send_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[1]->location === $server2_data[0]->yabs[0]->network_speed[1]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[1]->location}} receive
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[1]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[1]->receive_as_mbps, $server2_data[0]->yabs[0]->network_speed[1]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[1]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[2]->location === $server2_data[0]->yabs[0]->network_speed[2]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[2]->location}} send
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[2]->send_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[2]->send_as_mbps, $server2_data[0]->yabs[0]->network_speed[2]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[2]->send_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[2]->location === $server2_data[0]->yabs[0]->network_speed[2]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[2]->location}} receive
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[2]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[2]->receive_as_mbps, $server2_data[0]->yabs[0]->network_speed[2]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[2]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[3]->location === $server2_data[0]->yabs[0]->network_speed[3]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[3]->location}} send
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[3]->send_as_mbps}}<span
|
||||||
class="data-type">MBps</span></td>
|
class="data-type">MBps</span></td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_network[2]->send_as_mbps, $server2_network[2]->send_as_mbps, 'MBps') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[3]->send_as_mbps, $server2_data[0]->yabs[0]->network_speed[3]->send_as_mbps, 'MBps') !!}
|
||||||
<td class="td-nowrap">{{$server2_network[2]->send_as_mbps}}<span
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[3]->send_as_mbps}}<span
|
||||||
class="data-type">MBps</span></td>
|
class="data-type">MBps</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($server1_network[2]->location === $server2_network[2]->location)
|
@if($server1_data[0]->yabs[0]->network_speed[3]->location === $server2_data[0]->yabs[0]->network_speed[3]->location)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">{{$server1_network[2]->location}} receive</td>
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[3]->location}} receive
|
||||||
<td class="td-nowrap">{{$server1_network[2]->receive_as_mbps}}<span class="data-type">MBps</span>
|
|
||||||
</td>
|
</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_network[2]->receive_as_mbps, $server2_network[2]->receive_as_mbps, 'MBps') !!}
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[3]->receive_as_mbps}}
|
||||||
<td class="td-nowrap">{{$server2_network[2]->receive_as_mbps}}<span class="data-type">MBps</span>
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[3]->receive_as_mbps, $server2_data[0]->yabs[0]->network_speed[3]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[3]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[4]->location === $server2_data[0]->yabs[0]->network_speed[4]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[4]->location}} send
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[4]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[4]->send_as_mbps, $server2_data[0]->yabs[0]->network_speed[4]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[4]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($server1_data[0]->yabs[0]->network_speed[4]->location === $server2_data[0]->yabs[0]->network_speed[4]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[4]->location}} receive
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{$server1_data[0]->yabs[0]->network_speed[4]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->network_speed[4]->receive_as_mbps, $server2_data[0]->yabs[0]->network_speed[4]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$server2_data[0]->yabs[0]->network_speed[4]->receive_as_mbps}}
|
||||||
|
<span class="data-type">MBps</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">USD p/m</td>
|
<td class="td-nowrap">USD p/m</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->usd_per_month}}<span class="data-type">p/m</span>
|
<td class="td-nowrap">{{$server1_data[0]->price->usd_per_month}}<span
|
||||||
|
class="data-type">p/m</span>
|
||||||
</td>
|
</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->usd_per_month, $server2_data[0]->usd_per_month, 'p/m') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->price->usd_per_month, $server2_data[0]->price->usd_per_month, 'p/m') !!}
|
||||||
<td class="td-nowrap">{{$server2_data[0]->usd_per_month}}<span class="data-type">p/m</span>
|
<td class="td-nowrap">{{$server2_data[0]->price->usd_per_month}}<span
|
||||||
|
class="data-type">p/m</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">Actual price</td>
|
<td class="td-nowrap">Actual price</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->price}}<span
|
<td class="td-nowrap">{{$server1_data[0]->price->price}}<span
|
||||||
class="data-type">{{$server1_data[0]->currency}}</span> {{\App\Process::paymentTermIntToString($server1_data[0]->term)}}
|
class="data-type">{{$server1_data[0]->currency}}</span> {{\App\Process::paymentTermIntToString($server1_data[0]->price->term)}}
|
||||||
</td>
|
</td>
|
||||||
<td class="td-nowrap equal-td"></td>
|
<td class="td-nowrap equal-td"></td>
|
||||||
<td class="td-nowrap">{{$server2_data[0]->price}}<span
|
<td class="td-nowrap">{{$server2_data[0]->price->price}}<span
|
||||||
class="data-type">{{$server2_data[0]->currency}}</span> {{\App\Process::paymentTermIntToString($server2_data[0]->term)}}
|
class="data-type">{{$server2_data[0]->price->currency}}</span> {{\App\Process::paymentTermIntToString($server2_data[0]->price->term)}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">CPU per USD</td>
|
<td class="td-nowrap">CPU per USD</td>
|
||||||
<td class="td-nowrap">{{number_format($server1_data[0]->cpu_cores / $server1_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server1_data[0]->yabs[0]->cpu_cores / $server1_data[0]->price->usd_per_month,2)}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->cpu_cores / $server1_data[0]->usd_per_month, $server2_data[0]->cpu_cores / $server2_data[0]->usd_per_month, '') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->cpu_cores / $server1_data[0]->price->usd_per_month, $server2_data[0]->yabs[0]->cpu_cores / $server2_data[0]->price->usd_per_month, '') !!}
|
||||||
<td class="td-nowrap">{{number_format($server2_data[0]->cpu_cores / $server2_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->cpu_cores / $server2_data[0]->price->usd_per_month,2)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">Disk GB per USD</td>
|
<td class="td-nowrap">Disk GB per USD</td>
|
||||||
<td class="td-nowrap">{{number_format($server1_data[0]->disk_gb / $server1_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server1_data[0]->yabs[0]->disk_gb / $server1_data[0]->price->usd_per_month,2)}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->disk_gb / $server1_data[0]->usd_per_month, $server2_data[0]->disk_gb / $server2_data[0]->usd_per_month, '') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->disk_gb / $server1_data[0]->price->usd_per_month, $server2_data[0]->yabs[0]->disk_gb / $server2_data[0]->price->usd_per_month, '') !!}
|
||||||
<td class="td-nowrap">{{number_format($server2_data[0]->disk_gb / $server2_data[0]->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]->ram_mb / $server1_data[0]->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]->ram_mb / $server1_data[0]->usd_per_month, $server2_data[0]->ram_mb / $server2_data[0]->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]->ram_mb / $server2_data[0]->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>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">GB5 single per USD</td>
|
<td class="td-nowrap">GB5 single per USD</td>
|
||||||
<td class="td-nowrap">{{number_format($server1_data[0]->gb5_single / $server1_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server1_data[0]->yabs[0]->gb5_single / $server1_data[0]->price->usd_per_month,2)}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->gb5_single / $server1_data[0]->usd_per_month, $server2_data[0]->gb5_single / $server2_data[0]->usd_per_month, '') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->gb5_single / $server1_data[0]->price->usd_per_month, $server2_data[0]->yabs[0]->gb5_single / $server2_data[0]->price->usd_per_month, '') !!}
|
||||||
<td class="td-nowrap">{{number_format($server2_data[0]->gb5_single / $server2_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->gb5_single / $server2_data[0]->price->usd_per_month,2)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">GB5 multi per USD</td>
|
<td class="td-nowrap">GB5 multi per USD</td>
|
||||||
<td class="td-nowrap">{{number_format($server1_data[0]->gb5_multi / $server1_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server1_data[0]->yabs[0]->gb5_multi / $server1_data[0]->price->usd_per_month,2)}}</td>
|
||||||
{!! \App\Models\Server::tableRowCompare($server1_data[0]->gb5_multi / $server1_data[0]->usd_per_month, $server2_data[0]->gb5_multi / $server2_data[0]->usd_per_month, '') !!}
|
{!! \App\Models\Server::tableRowCompare($server1_data[0]->yabs[0]->gb5_multi / $server1_data[0]->price->usd_per_month, $server2_data[0]->yabs[0]->gb5_multi / $server2_data[0]->price->usd_per_month, '') !!}
|
||||||
<td class="td-nowrap">{{number_format($server2_data[0]->gb5_multi / $server2_data[0]->usd_per_month,2)}}</td>
|
<td class="td-nowrap">{{number_format($server2_data[0]->yabs[0]->gb5_multi / $server2_data[0]->price->usd_per_month,2)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">Location</td>
|
<td class="td-nowrap">Location</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->location}}</td>
|
<td class="td-nowrap">{{$server1_data[0]->location->name}}</td>
|
||||||
<td class="td-nowrap equal-td"></td>
|
<td class="td-nowrap equal-td"></td>
|
||||||
<td class="td-nowrap">{{$server2_data[0]->location}}</td>
|
<td class="td-nowrap">{{$server2_data[0]->location->name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">Provider</td>
|
<td class="td-nowrap">Provider</td>
|
||||||
<td class="td-nowrap">{{$server1_data[0]->provider_name}}</td>
|
<td class="td-nowrap">{{$server1_data[0]->provider->name}}</td>
|
||||||
<td class="td-nowrap equal-td"></td>
|
<td class="td-nowrap equal-td"></td>
|
||||||
<td class="td-nowrap">{{$server2_data[0]->provider_name}}</td>
|
<td class="td-nowrap">{{$server2_data[0]->provider->name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">Owned since</td>
|
<td class="td-nowrap">Owned since</td>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
@section('title') {{$server[0]->hostname}} {{'edit'}} @endsection
|
@section('title')
|
||||||
|
{{$server_data->hostname}} {{'edit'}}
|
||||||
|
@endsection
|
||||||
<x-app-layout>
|
<x-app-layout>
|
||||||
<x-slot name="header">
|
<x-slot name="header">
|
||||||
Edit {{ $server[0]->hostname }}
|
Edit {{ $server_data->hostname }}
|
||||||
</x-slot>
|
</x-slot>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<x-card class="shadow mt-3">
|
<x-card class="shadow mt-3">
|
||||||
|
@ -11,18 +13,18 @@
|
||||||
Back to servers
|
Back to servers
|
||||||
</x-back-button>
|
</x-back-button>
|
||||||
<x-errors-alert></x-errors-alert>
|
<x-errors-alert></x-errors-alert>
|
||||||
<form action="{{ route('servers.update', $server[0]->service_id) }}" method="POST">
|
<form action="{{ route('servers.update', $server_data->id) }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col-12 col-lg-6 mb-4">
|
<div class="col-12 col-lg-6 mb-4">
|
||||||
<input type="hidden" value="{{$server[0]->service_id}}" name="server_id">
|
<input type="hidden" value="{{$server_data->id}}" name="server_id">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend"><span class="input-group-text">Hostname</span></div>
|
<div class="input-group-prepend"><span class="input-group-text">Hostname</span></div>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
name="hostname"
|
name="hostname"
|
||||||
value="{{ $server[0]->hostname }}">
|
value="{{ $server_data->hostname }}">
|
||||||
@error('name') <span class="text-red-500">{{ $message }}
|
@error('name') <span class="text-red-500">{{ $message }}
|
||||||
</span>@enderror
|
</span>@enderror
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,7 +42,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-3 mb-4">
|
<div class="col-12 col-lg-3 mb-4">
|
||||||
<x-os-select>
|
<x-os-select>
|
||||||
<x-slot name="current">{{$server[0]->os_id}}</x-slot>
|
<x-slot name="current">{{$server_data->os_id}}</x-slot>
|
||||||
</x-os-select>
|
</x-os-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,7 +52,7 @@
|
||||||
<x-slot name="title">NS1</x-slot>
|
<x-slot name="title">NS1</x-slot>
|
||||||
<x-slot name="name">ns1</x-slot>
|
<x-slot name="name">ns1</x-slot>
|
||||||
<x-slot name="max">255</x-slot>
|
<x-slot name="max">255</x-slot>
|
||||||
<x-slot name="value">{{ $server[0]->ns1 }}</x-slot>
|
<x-slot name="value">{{ $server_data->ns1 }}</x-slot>
|
||||||
</x-text-input>
|
</x-text-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-3 mb-4">
|
<div class="col-12 col-lg-3 mb-4">
|
||||||
|
@ -58,7 +60,7 @@
|
||||||
<x-slot name="title">NS2</x-slot>
|
<x-slot name="title">NS2</x-slot>
|
||||||
<x-slot name="name">ns2</x-slot>
|
<x-slot name="name">ns2</x-slot>
|
||||||
<x-slot name="max">255</x-slot>
|
<x-slot name="max">255</x-slot>
|
||||||
<x-slot name="value">{{ $server[0]->ns2 }}</x-slot>
|
<x-slot name="value">{{ $server_data->ns2 }}</x-slot>
|
||||||
</x-text-input>
|
</x-text-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,18 +69,18 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend"><span class="input-group-text">Virt</span></div>
|
<div class="input-group-prepend"><span class="input-group-text">Virt</span></div>
|
||||||
<select class="form-control" name="server_type">
|
<select class="form-control" name="server_type">
|
||||||
<option value="1" {{ ($server[0]->server_type === 1) ? 'selected' : '' }}>KVM
|
<option value="1" {{ ($server_data->server_type === 1) ? 'selected' : '' }}>KVM
|
||||||
</option>
|
</option>
|
||||||
<option value="2" {{ ($server[0]->server_type === 2) ? 'selected' : '' }}>OVZ
|
<option value="2" {{ ($server_data->server_type === 2) ? 'selected' : '' }}>OVZ
|
||||||
</option>
|
</option>
|
||||||
<option value="3" {{ ($server[0]->server_type === 3) ? 'selected' : '' }}>DEDI
|
<option value="3" {{ ($server_data->server_type === 3) ? 'selected' : '' }}>DEDI
|
||||||
</option>
|
</option>
|
||||||
<option value="4" {{ ($server[0]->server_type === 4) ? 'selected' : '' }}>LXC
|
<option value="4" {{ ($server_data->server_type === 4) ? 'selected' : '' }}>LXC
|
||||||
</option>
|
</option>
|
||||||
<option value="5" {{ ($server[0]->server_type === 5) ? 'selected' : '' }}>
|
<option value="5" {{ ($server_data->server_type === 5) ? 'selected' : '' }}>
|
||||||
SEMI-DEDI
|
SEMI-DEDI
|
||||||
</option>
|
</option>
|
||||||
<option value="6" {{ ($server[0]->server_type === 6) ? 'selected' : '' }}>
|
<option value="6" {{ ($server_data->server_type === 6) ? 'selected' : '' }}>
|
||||||
VMware
|
VMware
|
||||||
</option>
|
</option>
|
||||||
</select></div>
|
</select></div>
|
||||||
|
@ -90,7 +92,7 @@
|
||||||
<x-slot name="value">22</x-slot>
|
<x-slot name="value">22</x-slot>
|
||||||
<x-slot name="max">999999</x-slot>
|
<x-slot name="max">999999</x-slot>
|
||||||
<x-slot name="step">1</x-slot>
|
<x-slot name="step">1</x-slot>
|
||||||
<x-slot name="value">{{ $server[0]->ssh }}</x-slot>
|
<x-slot name="value">{{ $server_data->ssh }}</x-slot>
|
||||||
</x-number-input>
|
</x-number-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-3 mb-4">
|
<div class="col-12 col-lg-3 mb-4">
|
||||||
|
@ -100,28 +102,28 @@
|
||||||
<x-slot name="value">1000</x-slot>
|
<x-slot name="value">1000</x-slot>
|
||||||
<x-slot name="max">99999</x-slot>
|
<x-slot name="max">99999</x-slot>
|
||||||
<x-slot name="step">1</x-slot>
|
<x-slot name="step">1</x-slot>
|
||||||
<x-slot name="value">{{ $server[0]->bandwidth }}</x-slot>
|
<x-slot name="value">{{ $server_data->bandwidth }}</x-slot>
|
||||||
</x-number-input>
|
</x-number-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-3 mb-4">
|
<div class="col-12 col-lg-3 mb-4">
|
||||||
<x-yes-no-select>
|
<x-yes-no-select>
|
||||||
<x-slot name="title">Promo price</x-slot>
|
<x-slot name="title">Promo price</x-slot>
|
||||||
<x-slot name="name">was_promo</x-slot>
|
<x-slot name="name">was_promo</x-slot>
|
||||||
<x-slot name="value">{{ $server[0]->was_promo }}</x-slot>
|
<x-slot name="value">{{ $server_data->was_promo }}</x-slot>
|
||||||
</x-yes-no-select>
|
</x-yes-no-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-providers-select>
|
<x-providers-select>
|
||||||
<x-slot name="current">{{$server[0]->provider_id}}</x-slot>
|
<x-slot name="current">{{$server_data->provider_id}}</x-slot>
|
||||||
</x-providers-select>
|
</x-providers-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-number-input>
|
<x-number-input>
|
||||||
<x-slot name="title">Price</x-slot>
|
<x-slot name="title">Price</x-slot>
|
||||||
<x-slot name="name">price</x-slot>
|
<x-slot name="name">price</x-slot>
|
||||||
<x-slot name="value">{{$server[0]->price}}</x-slot>
|
<x-slot name="value">{{$server_data->price->price}}</x-slot>
|
||||||
<x-slot name="max">9999</x-slot>
|
<x-slot name="max">9999</x-slot>
|
||||||
<x-slot name="step">0.01</x-slot>
|
<x-slot name="step">0.01</x-slot>
|
||||||
<x-slot name="required"></x-slot>
|
<x-slot name="required"></x-slot>
|
||||||
|
@ -129,12 +131,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-term-select>
|
<x-term-select>
|
||||||
<x-slot name="current">{{$server[0]->term}}</x-slot>
|
<x-slot name="current">{{$server_data->price->term}}</x-slot>
|
||||||
</x-term-select>
|
</x-term-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-currency-select>
|
<x-currency-select>
|
||||||
<x-slot name="current">{{$server[0]->currency}}</x-slot>
|
<x-slot name="current">{{$server_data->price->currency}}</x-slot>
|
||||||
</x-currency-select>
|
</x-currency-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,7 +146,7 @@
|
||||||
<x-number-input>
|
<x-number-input>
|
||||||
<x-slot name="title">CPU</x-slot>
|
<x-slot name="title">CPU</x-slot>
|
||||||
<x-slot name="name">cpu</x-slot>
|
<x-slot name="name">cpu</x-slot>
|
||||||
<x-slot name="value">{{$server[0]->cpu}}</x-slot>
|
<x-slot name="value">{{$server_data->cpu}}</x-slot>
|
||||||
<x-slot name="max">64</x-slot>
|
<x-slot name="max">64</x-slot>
|
||||||
<x-slot name="step">1</x-slot>
|
<x-slot name="step">1</x-slot>
|
||||||
</x-number-input>
|
</x-number-input>
|
||||||
|
@ -153,7 +155,7 @@
|
||||||
<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[0]->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>
|
||||||
</x-number-input>
|
</x-number-input>
|
||||||
</div>
|
</div>
|
||||||
|
@ -161,14 +163,14 @@
|
||||||
<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[0]->ram_type}}</x-slot>
|
<x-slot name="value">{{$server_data->ram_type}}</x-slot>
|
||||||
</x-ram-type-select>
|
</x-ram-type-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-number-input>
|
<x-number-input>
|
||||||
<x-slot name="title">Disk</x-slot>
|
<x-slot name="title">Disk</x-slot>
|
||||||
<x-slot name="name">disk</x-slot>
|
<x-slot name="name">disk</x-slot>
|
||||||
<x-slot name="value">{{$server[0]->disk}}</x-slot>
|
<x-slot name="value">{{$server_data->disk}}</x-slot>
|
||||||
<x-slot name="max">99999</x-slot>
|
<x-slot name="max">99999</x-slot>
|
||||||
<x-slot name="step">0.1</x-slot>
|
<x-slot name="step">0.1</x-slot>
|
||||||
</x-number-input>
|
</x-number-input>
|
||||||
|
@ -177,28 +179,34 @@
|
||||||
<x-disk-type-select>
|
<x-disk-type-select>
|
||||||
<x-slot name="title">Disk type</x-slot>
|
<x-slot name="title">Disk type</x-slot>
|
||||||
<x-slot name="name">disk_type</x-slot>
|
<x-slot name="name">disk_type</x-slot>
|
||||||
<x-slot name="value">{{$server[0]->disk_type}}</x-slot>
|
<x-slot name="value">{{$server_data->disk_type}}</x-slot>
|
||||||
</x-disk-type-select>
|
</x-disk-type-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-4 mb-3">
|
<div class="col-12 col-md-4 mb-3">
|
||||||
<x-locations-select>
|
<x-locations-select>
|
||||||
<x-slot name="current">{{$server[0]->location_id}}</x-slot>
|
<x-slot name="current">{{$server_data->location_id}}</x-slot>
|
||||||
</x-locations-select>
|
</x-locations-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-3 mb-3">
|
<div class="col-12 col-md-3 mb-3">
|
||||||
<x-date-input>
|
<x-date-input>
|
||||||
<x-slot name="title">Owned since</x-slot>
|
<x-slot name="title">Owned since</x-slot>
|
||||||
<x-slot name="name">owned_since</x-slot>
|
<x-slot name="name">owned_since</x-slot>
|
||||||
<x-slot name="value">{{$server[0]->owned_since }}</x-slot>
|
<x-slot name="value">{{$server_data->owned_since }}</x-slot>
|
||||||
</x-date-input>
|
</x-date-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-3 mb-3">
|
<div class="col-12 col-md-3 mb-3">
|
||||||
<x-date-input>
|
<x-date-input>
|
||||||
<x-slot name="title">Next due date</x-slot>
|
<x-slot name="title">Next due date</x-slot>
|
||||||
<x-slot name="name">next_due_date</x-slot>
|
<x-slot name="name">next_due_date</x-slot>
|
||||||
<x-slot name="value">{{$server[0]->next_due_date }}</x-slot>
|
<x-slot name="value">
|
||||||
|
@if(isset($server_data->price->next_due_date))
|
||||||
|
{{$server_data->price->next_due_date}}
|
||||||
|
@else
|
||||||
|
{{\Carbon\Carbon::now()->addMonth(1)->format('Y-m-d')}}
|
||||||
|
@endif
|
||||||
|
</x-slot>
|
||||||
</x-date-input>
|
</x-date-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -207,8 +215,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label1</x-slot>
|
<x-slot name="name">label1</x-slot>
|
||||||
@if(isset($labels[0]->id))
|
@if(isset($server_data->labels[0]->label->id))
|
||||||
<x-slot name="current">{{$labels[0]->id}}</x-slot>
|
<x-slot name="current">{{$server_data->labels[0]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -216,8 +224,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label2</x-slot>
|
<x-slot name="name">label2</x-slot>
|
||||||
@if(isset($labels[1]->id))
|
@if(isset($server_data->labels[1]->label->id))
|
||||||
<x-slot name="current">{{$labels[1]->id}}</x-slot>
|
<x-slot name="current">{{$server_data->labels[1]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -225,8 +233,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label3</x-slot>
|
<x-slot name="name">label3</x-slot>
|
||||||
@if(isset($labels[2]->id))
|
@if(isset($server_data->labels[2]->label->id))
|
||||||
<x-slot name="current">{{$labels[2]->id}}</x-slot>
|
<x-slot name="current">{{$server_data->labels[2]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -234,14 +242,14 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label4</x-slot>
|
<x-slot name="name">label4</x-slot>
|
||||||
@if(isset($labels[3]->id))
|
@if(isset($server_data->labels[3]->label->id))
|
||||||
<x-slot name="current">{{$labels[3]->id}}</x-slot>
|
<x-slot name="current">{{$server_data->labels[3]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@foreach($ip_addresses as $ip)
|
@foreach($server_data->ips as $ip)
|
||||||
<div class="col-12 col-lg-3 mb-4">
|
<div class="col-12 col-lg-3 mb-4">
|
||||||
<x-text-input>
|
<x-text-input>
|
||||||
<x-slot name="title">IP</x-slot>
|
<x-slot name="title">IP</x-slot>
|
||||||
|
@ -256,7 +264,7 @@
|
||||||
<div class="col-12 col-lg-6 mb-4">
|
<div class="col-12 col-lg-6 mb-4">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" name="is_active" type="checkbox"
|
<input class="form-check-input" name="is_active" type="checkbox"
|
||||||
value="1" {{ ($server[0]->active === 1) ? 'checked' : '' }}>
|
value="1" {{ ($server_data->active === 1) ? 'checked' : '' }}>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label">
|
||||||
I still have this server
|
I still have this server
|
||||||
</label>
|
</label>
|
||||||
|
@ -265,7 +273,7 @@
|
||||||
<div class="col-12 col-lg-6 mb-4">
|
<div class="col-12 col-lg-6 mb-4">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" name="show_public" type="checkbox"
|
<input class="form-check-input" name="show_public" type="checkbox"
|
||||||
value="1" {{ ($server[0]->show_public === 1) ? 'checked' : '' }}>
|
value="1" {{ ($server_data->show_public === 1) ? 'checked' : '' }}>
|
||||||
<label class="form-check-label">
|
<label class="form-check-label">
|
||||||
Allow this data to be public <a href="{{route('settings.index')}}">restrict values
|
Allow this data to be public <a href="{{route('settings.index')}}">restrict values
|
||||||
here</a>
|
here</a>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{{ App\Models\Server::serviceServerType($server->server_type) }}
|
{{ App\Models\Server::serviceServerType($server->server_type) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">{!!App\Models\Server::osIntToIcon($server->os_id, $server->os_name)!!}</td>
|
<td class="text-center">{!!App\Models\Server::osIntToIcon($server->os->id, $server->os->name)!!}</td>
|
||||||
<td class="text-center">{{$server->cpu}}</td>
|
<td class="text-center">{{$server->cpu}}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
@if(isset($server->ram))
|
@if(isset($server->ram))
|
||||||
|
@ -75,9 +75,9 @@
|
||||||
{{$server->disk}}<small>GB</small>
|
{{$server->disk}}<small>GB</small>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">{{ $server->location }}</td>
|
<td class="text-nowrap">{{ $server->location->name }}</td>
|
||||||
<td class="text-nowrap">{{ $server->provider_name }}</td>
|
<td class="text-nowrap">{{ $server->provider->name }}</td>
|
||||||
<td class="text-nowrap">{{ $server->price }} {{$server->currency}} {{\App\Process::paymentTermIntToString($server->term)}}</td>
|
<td class="text-nowrap">{{ $server->price->price }} {{$server->price->currency}} {{\App\Process::paymentTermIntToString($server->price->term)}}</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
{{now()->diffInDays(Carbon\Carbon::parse($server->next_due_date), false)}}
|
{{now()->diffInDays(Carbon\Carbon::parse($server->next_due_date), false)}}
|
||||||
<small>days</small></td>
|
<small>days</small></td>
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{{ App\Models\Server::serviceServerType($server->server_type) }}
|
{{ App\Models\Server::serviceServerType($server->server_type) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">{!!App\Models\Server::osIntToIcon($server->os_id, $server->os_name)!!}</td>
|
<td class="text-center">{!!App\Models\Server::osIntToIcon($server->os->id, $server->os->name)!!}</td>
|
||||||
<td class="text-center">{{$server->cpu}}</td>
|
<td class="text-center">{{$server->cpu}}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
@if($server->ram_as_mb > 1024)
|
@if($server->ram_as_mb > 1024)
|
||||||
|
@ -160,9 +160,9 @@
|
||||||
{{$server->disk}}<small>GB</small>
|
{{$server->disk}}<small>GB</small>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">{{ $server->location }}</td>
|
<td class="text-nowrap">{{ $server->location->name }}</td>
|
||||||
<td class="text-nowrap">{{ $server->provider_name }}</td>
|
<td class="text-nowrap">{{ $server->provider->name }}</td>
|
||||||
<td class="text-nowrap">{{ $server->price }} {{$server->currency}} {{\App\Process::paymentTermIntToString($server->term)}}</td>
|
<td class="text-nowrap">{{ $server->price->price }} {{$server->price->currency}} {{\App\Process::paymentTermIntToString($server->price->term)}}</td>
|
||||||
<td class="text-center"> {{ $server->owned_since }}</td>
|
<td class="text-center"> {{ $server->owned_since }}</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
<form action="{{ route('servers.destroy', $server->id) }}" method="POST">
|
<form action="{{ route('servers.destroy', $server->id) }}" method="POST">
|
||||||
|
|
|
@ -46,12 +46,12 @@
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{{ App\Models\Server::serviceServerType($s->server_type) }}
|
{{ App\Models\Server::serviceServerType($s->server_type) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">{!!App\Models\Server::osIntToIcon($s->os_id, $s->os_name)!!}</td>
|
<td class="text-center">{!!App\Models\Server::osIntToIcon($s->os->id, $s->os->name)!!}</td>
|
||||||
<td class="text-center">{{$s->cpu}}</td>
|
<td class="text-center">{{$s->cpu}}</td>
|
||||||
<td class="text-nowrap">{{$s->cpu_freq}}</td>
|
<td class="text-nowrap">{{$s->yabs[0]->cpu_freq}}</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(isset($s->ram))
|
@if(isset($s->yabs[0]->ram))
|
||||||
{{ $s->ram}}<small>{{ $s->ram_type}}</small>
|
{{ $s->yabs[0]->ram}}<small>{{ $s->yabs[0]->ram_type}}</small>
|
||||||
@else
|
@else
|
||||||
{{$s->ram_as_mb}}<small>MB</small>
|
{{$s->ram_as_mb}}<small>MB</small>
|
||||||
@endif
|
@endif
|
||||||
|
@ -65,52 +65,52 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_location') === 1)
|
@if(Session::get('show_server_value_location') === 1)
|
||||||
{{ $s->location }}
|
{{ $s->location->name }}
|
||||||
@endif</td>
|
@endif</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_provider') === 1)
|
@if(Session::get('show_server_value_provider') === 1)
|
||||||
{{ $s->provider_name }}
|
{{ $s->provider->name }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">{{ $s->price }} {{$s->currency}} {{\App\Process::paymentTermIntToString($s->term)}}</td>
|
<td class="text-nowrap">{{ $s->price->price }} {{$s->currency}} {{\App\Process::paymentTermIntToString($s->price->term)}}</td>
|
||||||
<td class="text-nowrap"> {{ $s->owned_since }}</td>
|
<td class="text-nowrap"> {{ $s->owned_since }}</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_yabs') === 1)
|
@if(Session::get('show_server_value_yabs') === 1)
|
||||||
{{$s->gb5_single}}
|
{{$s->yabs[0]->gb5_single}}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_yabs') === 1)
|
@if(Session::get('show_server_value_yabs') === 1)
|
||||||
{{$s->gb5_multi}}
|
{{$s->yabs[0]->gb5_multi}}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_yabs') === 1)
|
@if(Session::get('show_server_value_yabs') === 1)
|
||||||
{{$s->d_4k}}<small>{{$s->d_4k_type}}</small>
|
{{$s->yabs[0]->disk_speed->d_4k}}<small>{{$s->yabs[0]->disk_speed->d_4k_type}}</small>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_yabs') === 1)
|
@if(Session::get('show_server_value_yabs') === 1)
|
||||||
{{$s->d_64k}}<small>{{$s->d_64k_type}}</small>
|
{{$s->yabs[0]->disk_speed->d_64k}}<small>{{$s->yabs[0]->disk_speed->d_64k_type}}</small>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_yabs') === 1)
|
@if(Session::get('show_server_value_yabs') === 1)
|
||||||
{{$s->d_512k}}<small>{{$s->d_512k_type}}</small>
|
{{$s->yabs[0]->disk_speed->d_512k}}<small>{{$s->yabs[0]->disk_speed->d_512k_type}}</small>
|
||||||
@endif</td>
|
@endif</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if(Session::get('show_server_value_yabs') === 1)
|
@if(Session::get('show_server_value_yabs') === 1)
|
||||||
{{$s->d_1m}}<small>{{$s->d_1m_type}}</small>
|
{{$s->yabs[0]->disk_speed->d_1m}}<small>{{$s->yabs[0]->disk_speed->d_1m_type}}</small>
|
||||||
@endif</td>
|
@endif</td>
|
||||||
@if(Session::get('show_server_value_ip') === 1)
|
@if(Session::get('show_server_value_ip') === 1)
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if($s->is_ipv4 === 1)
|
@if($s->ips[0]->is_ipv4 === 1)
|
||||||
{{ $s->ip }}
|
{{ $s->ips[0]->address }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
@if($s->is_ipv4 === 0)
|
@if($s->ips[0]->is_ipv6 === 1)
|
||||||
{{ $s->ip }}
|
{{ $s->ips[0]->address }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
@section('title') {{$server->hostname}} {{'server'}} @endsection
|
@section('title')
|
||||||
|
{{$server_data->hostname}} {{'server'}}
|
||||||
|
@endsection
|
||||||
<x-app-layout>
|
<x-app-layout>
|
||||||
<x-slot name="header">
|
<x-slot name="header">
|
||||||
{{ __('Server details') }}
|
{{ __('Server details') }}
|
||||||
|
@ -7,18 +9,14 @@
|
||||||
<x-card class="shadow mt-3">
|
<x-card class="shadow mt-3">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mb-2">
|
<div class="col-12 col-md-6 mb-2">
|
||||||
<h2>{{ $server->hostname }}</h2>
|
<h2>{{ $server_data->hostname }}</h2>
|
||||||
<code>@foreach($labels as $label)
|
@foreach($server_data->labels as $label)
|
||||||
@if($loop->last)
|
<span class="badge bg-primary mx-1">{{$label->label->label}}</span>
|
||||||
{{$label->label}}
|
@endforeach
|
||||||
@else
|
|
||||||
{{$label->label}},
|
|
||||||
@endif
|
|
||||||
@endforeach</code>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 text-md-end">
|
<div class="col-12 col-md-6 text-md-end">
|
||||||
<h6 class="text-muted pe-lg-4">{{ $server->id }}</h6>
|
<h6 class="text-muted pe-lg-4">{{ $server_data->id }}</h6>
|
||||||
@if($server->active !== 1)
|
@if($server_data->active !== 1)
|
||||||
<h6 class="text-danger pe-lg-4">not active</h6>
|
<h6 class="text-danger pe-lg-4">not active</h6>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,65 +29,65 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Type</td>
|
<td class="px-2 py-2 font-bold text-muted">Type</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $server->serviceServerType($server->server_type) }}
|
{{ $server_data->serviceServerType($server_data->server_type) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">OS</td>
|
<td class="px-2 py-2 font-bold text-muted">OS</td>
|
||||||
<td>{{ $server_extras[0]->os_name }}</td>
|
<td>{{ $server_data->os->name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Location</td>
|
<td class="px-2 py-2 font-bold text-muted">Location</td>
|
||||||
<td>{{$server_extras[0]->location}}</td>
|
<td>{{$server_data->location->name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Provider</td>
|
<td class="px-2 py-2 font-bold text-muted">Provider</td>
|
||||||
<td>{{$server_extras[0]->provider}}</td>
|
<td>{{$server_data->provider->name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Price</td>
|
<td class="px-2 py-2 font-bold text-muted">Price</td>
|
||||||
<td>{{ $server_extras[0]->price }} {{ $server_extras[0]->currency }}
|
<td>{{ $server_data->price->price }} {{ $server_data->price->currency }}
|
||||||
<small>{{\App\Process::paymentTermIntToString($server_extras[0]->term)}}</small>
|
<small>{{\App\Process::paymentTermIntToString($server_data->price->term)}}</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Next due date</td>
|
<td class="px-2 py-2 font-bold text-muted">Next due date</td>
|
||||||
<td>{{Carbon\Carbon::parse($server_extras[0]->next_due_date)->diffForHumans()}}
|
<td>{{Carbon\Carbon::parse($server_data->price->next_due_date)->diffForHumans()}}
|
||||||
({{Carbon\Carbon::parse($server_extras[0]->next_due_date)->format('d/m/Y')}})
|
({{Carbon\Carbon::parse($server_data->price->next_due_date)->format('d/m/Y')}})
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">CPU</td>
|
<td class="px-2 py-2 font-bold text-muted">CPU</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $server_extras[0]->cpu }} @if($server_extras[0]->has_yabs)
|
{{ $server_data->cpu }} @if($server_data->has_yabs)
|
||||||
<small>@</small> {{ $server_extras[0]->cpu_freq }} Mhz
|
<small>@</small> {{ $server_data->yabs[0]->cpu_freq }} Mhz
|
||||||
@endif</td>
|
@endif</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">RAM</td>
|
<td class="px-2 py-2 font-bold text-muted">RAM</td>
|
||||||
<td>
|
<td>
|
||||||
@if(isset($server_extras[0]->ram))
|
@if(isset($server_data->yabs[0]->ram))
|
||||||
{{ $server_extras[0]->ram }} {{ $server_extras[0]->ram_type }}
|
{{ $server_data->yabs[0]->ram }} {{ $server_data->yabs[0]->ram_type }}
|
||||||
@else
|
@else
|
||||||
{{ $server->ram }} {{ $server->ram_type }}
|
{{ $server_data->ram }} {{ $server_data->ram_type }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Disk</td>
|
<td class="px-2 py-2 font-bold text-muted">Disk</td>
|
||||||
<td>
|
<td>
|
||||||
@if(isset($server_extras[0]->disk))
|
@if(isset($server_data->yabs[0]->disk))
|
||||||
{{ $server_extras[0]->disk }} {{ $server_extras[0]->disk_type }}
|
{{ $server_data->yabs[0]->disk }} {{ $server_data->yabs[0]->disk_type }}
|
||||||
@else
|
@else
|
||||||
{{ $server->disk }} {{ $server->disk_type }}
|
{{ $server_data->disk }} {{ $server_data->disk_type }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Bandwidth</td>
|
<td class="px-2 py-2 font-bold text-muted">Bandwidth</td>
|
||||||
<td>{{ $server_extras[0]->bandwidth }} GB</td>
|
<td>{{ $server_data->bandwidth }} GB</td>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($ip_addresses as $ip)
|
@foreach($server_data->ips as $ip)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">@if($ip['is_ipv4'])
|
<td class="px-2 py-2 font-bold text-muted">@if($ip['is_ipv4'])
|
||||||
IPv4
|
IPv4
|
||||||
|
@ -102,29 +100,29 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Was promo</td>
|
<td class="px-2 py-2 font-bold text-muted">Was promo</td>
|
||||||
<td>{{ ($server_extras[0]->was_promo === 1) ? 'Yes' : 'No' }}</td>
|
<td>{{ ($server_data->was_promo === 1) ? 'Yes' : 'No' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Owned since</td>
|
<td class="px-2 py-2 font-bold text-muted">Owned since</td>
|
||||||
<td>
|
<td>
|
||||||
@if(!is_null($server->owned_since))
|
@if(!is_null($server_data->owned_since))
|
||||||
{{ date_format(new DateTime($server->owned_since), 'jS F Y') }}
|
{{ date_format(new DateTime($server_data->owned_since), 'jS F Y') }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Inserted</td>
|
<td class="px-2 py-2 font-bold text-muted">Inserted</td>
|
||||||
<td>
|
<td>
|
||||||
@if(!is_null($server->created_at))
|
@if(!is_null($server_data->created_at))
|
||||||
{{ date_format(new DateTime($server->created_at), 'jS M y g:i a') }}
|
{{ date_format(new DateTime($server_data->created_at), 'jS M y g:i a') }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Updated</td>
|
<td class="px-2 py-2 font-bold text-muted">Updated</td>
|
||||||
<td>
|
<td>
|
||||||
@if(!is_null($server->updated_at))
|
@if(!is_null($server_data->updated_at))
|
||||||
{{ date_format(new DateTime($server->updated_at), 'jS M y g:i a') }}
|
{{ date_format(new DateTime($server_data->updated_at), 'jS M y g:i a') }}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -135,60 +133,64 @@
|
||||||
class="btn btn-success btn-sm mx-2">
|
class="btn btn-success btn-sm mx-2">
|
||||||
Go back
|
Go back
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('servers.edit', $server->id) }}"
|
<a href="{{ route('servers.edit', $server_data->id) }}"
|
||||||
class="btn btn-primary btn-sm mx-2">
|
class="btn btn-primary btn-sm mx-2">
|
||||||
Edit
|
Edit
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
@if($server_extras[0]->has_yabs)
|
@if($server_data->has_yabs)
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-borderless text-nowrap">
|
<table class="table table-borderless text-nowrap">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">GB5 Single/Multi</td>
|
<td class="px-2 py-2 font-bold text-muted">GB5 Single/Multi</td>
|
||||||
<td>
|
<td>
|
||||||
{{$server_extras[0]->gb5_single}} / {{$server_extras[0]->gb5_multi}}
|
{{$server_data->yabs[0]->gb5_single}} / {{$server_data->yabs[0]->gb5_multi}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">CPU</td>
|
<td class="px-2 py-2 font-bold text-muted">CPU</td>
|
||||||
<td>{{$server_extras[0]->cpu_model}}</td>
|
<td>{{$server_data->yabs[0]->cpu_model}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">AES</td>
|
<td class="px-2 py-2 font-bold text-muted">AES</td>
|
||||||
<td>{{ ($server_extras[0]->aes === 1) ? 'Yes' : 'No' }}</td>
|
<td>{{ ($server_data->yabs[0]->aes === 1) ? 'Yes' : 'No' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">VM</td>
|
<td class="px-2 py-2 font-bold text-muted">VM</td>
|
||||||
<td>{{ ($server_extras[0]->vm === 1) ? 'Yes' : 'No' }}</td>
|
<td>{{ ($server_data->yabs[0]->vm === 1) ? 'Yes' : 'No' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Disk 4k</td>
|
<td class="px-2 py-2 font-bold text-muted">Disk 4k</td>
|
||||||
<td>{{$server_extras[0]->d_4k}} <small>{{$server_extras[0]->d_4k_type}}</small></td>
|
<td>{{$server_data->yabs[0]->disk_speed->d_4k}}
|
||||||
|
<small>{{$server_data->yabs[0]->disk_speed->d_4k_type}}</small></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Disk 64k</td>
|
<td class="px-2 py-2 font-bold text-muted">Disk 64k</td>
|
||||||
<td>{{$server_extras[0]->d_64k}} <small>{{$server_extras[0]->d_64k_type}}</small>
|
<td>{{$server_data->yabs[0]->disk_speed->d_64k}}
|
||||||
|
<small>{{$server_data->yabs[0]->disk_speed->d_64k_type}}</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Disk 512k</td>
|
<td class="px-2 py-2 font-bold text-muted">Disk 512k</td>
|
||||||
<td>{{$server_extras[0]->d_512k}} <small>{{$server_extras[0]->d_512k_type}}</small>
|
<td>{{$server_data->yabs[0]->disk_speed->d_512k}}
|
||||||
|
<small>{{$server_data->yabs[0]->disk_speed->d_512k_type}}</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Disk 1m</td>
|
<td class="px-2 py-2 font-bold text-muted">Disk 1m</td>
|
||||||
<td>{{$server_extras[0]->d_1m}} <small>{{$server_extras[0]->d_1m_type}}</small></td>
|
<td>{{$server_data->yabs[0]->disk_speed->d_1m}}
|
||||||
|
<small>{{$server_data->yabs[0]->disk_speed->d_1m_type}}</small></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold">Network speed (s/r)</td>
|
<td class="px-2 py-2 font-bold">Network speed (s/r)</td>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($network_speeds as $ns)
|
@foreach($server_data->yabs[0]->network_speed as $ns)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">{{$ns['location']}}</td>
|
<td class="px-2 py-2 font-bold text-muted">{{$ns->location}}</td>
|
||||||
<td>{{$ns['send']}} <small>{{$ns['send_type']}}</small> {{$ns['receive']}}
|
<td>{{$ns->send}} <small>{{$ns->send_type}}</small> {{$ns->receive}}
|
||||||
<small>{{$ns['receive_type']}}</small></td>
|
<small>{{$ns->receive_type}}</small></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
Back to shared hosting
|
Back to shared hosting
|
||||||
</a>
|
</a>
|
||||||
<x-auth-validation-errors></x-auth-validation-errors>
|
<x-auth-validation-errors></x-auth-validation-errors>
|
||||||
<form action="{{ route('shared.update', $shared[0]->service_id) }}" method="POST">
|
<form action="{{ route('shared.update', $shared[0]->id) }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-3 mb-4">
|
<div class="col-12 col-lg-3 mb-4">
|
||||||
<input type="hidden" name="id" value="{{$shared[0]->service_id}}">
|
<input type="hidden" name="id" value="{{$shared[0]->id}}">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-prepend"><span class="input-group-text">Type</span></div>
|
<div class="input-group-prepend"><span class="input-group-text">Type</span></div>
|
||||||
<select class="form-control" id="shared_type" name="shared_type">
|
<select class="form-control" id="shared_type" name="shared_type">
|
||||||
|
@ -80,21 +80,21 @@
|
||||||
<x-slot name="title">Dedicated IP</x-slot>
|
<x-slot name="title">Dedicated IP</x-slot>
|
||||||
<x-slot name="name">dedicated_ip</x-slot>
|
<x-slot name="name">dedicated_ip</x-slot>
|
||||||
<x-slot name="max">255</x-slot>
|
<x-slot name="max">255</x-slot>
|
||||||
<x-slot name="value">@if(isset($ip_address[0]['address'])) {{$ip_address[0]['address']}}@endif</x-slot>
|
<x-slot name="value">@if(isset($shared[0]->ips[0]->address)) {{$shared[0]->ips[0]->address}}@endif</x-slot>
|
||||||
</x-text-input>
|
</x-text-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-providers-select>
|
<x-providers-select>
|
||||||
<x-slot name="current">{{$shared[0]->provider_id}}</x-slot>
|
<x-slot name="current">{{$shared[0]->provider->id}}</x-slot>
|
||||||
</x-providers-select>
|
</x-providers-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-number-input>
|
<x-number-input>
|
||||||
<x-slot name="title">Price</x-slot>
|
<x-slot name="title">Price</x-slot>
|
||||||
<x-slot name="name">price</x-slot>
|
<x-slot name="name">price</x-slot>
|
||||||
<x-slot name="value">{{$shared[0]->price}}</x-slot>
|
<x-slot name="value">{{$shared[0]->price->price}}</x-slot>
|
||||||
<x-slot name="max">9999</x-slot>
|
<x-slot name="max">9999</x-slot>
|
||||||
<x-slot name="step">0.01</x-slot>
|
<x-slot name="step">0.01</x-slot>
|
||||||
<x-slot name="required"></x-slot>
|
<x-slot name="required"></x-slot>
|
||||||
|
@ -102,19 +102,19 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-term-select>
|
<x-term-select>
|
||||||
<x-slot name="current">{{$shared[0]->term}}</x-slot>
|
<x-slot name="current">{{$shared[0]->price->term}}</x-slot>
|
||||||
</x-term-select>
|
</x-term-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-3 mb-3">
|
||||||
<x-currency-select>
|
<x-currency-select>
|
||||||
<x-slot name="current">{{$shared[0]->currency}}</x-slot>
|
<x-slot name="current">{{$shared[0]->price->currency}}</x-slot>
|
||||||
</x-currency-select>
|
</x-currency-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-12 col-md-3 mb-3">
|
<div class="col-12 col-md-3 mb-3">
|
||||||
<x-locations-select>
|
<x-locations-select>
|
||||||
<x-slot name="current">{{$shared[0]->location_id}}</x-slot>
|
<x-slot name="current">{{$shared[0]->location->id}}</x-slot>
|
||||||
</x-locations-select>
|
</x-locations-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-3 mb-3">
|
<div class="col-12 col-md-3 mb-3">
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
<x-date-input>
|
<x-date-input>
|
||||||
<x-slot name="title">Next due date</x-slot>
|
<x-slot name="title">Next due date</x-slot>
|
||||||
<x-slot name="name">next_due_date</x-slot>
|
<x-slot name="name">next_due_date</x-slot>
|
||||||
<x-slot name="value">{{$shared[0]->next_due_date }}</x-slot>
|
<x-slot name="value">{{$shared[0]->price->next_due_date }}</x-slot>
|
||||||
</x-date-input>
|
</x-date-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -219,8 +219,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label1</x-slot>
|
<x-slot name="name">label1</x-slot>
|
||||||
@if(isset($labels[0]->id))
|
@if(isset($shared[0]->labels[0]->label->id))
|
||||||
<x-slot name="current">{{$labels[0]->id}}</x-slot>
|
<x-slot name="current">{{$shared[0]->labels[0]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -228,8 +228,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label2</x-slot>
|
<x-slot name="name">label2</x-slot>
|
||||||
@if(isset($labels[1]->id))
|
@if(isset($shared[0]->labels[1]->label->id))
|
||||||
<x-slot name="current">{{$labels[1]->id}}</x-slot>
|
<x-slot name="current">{{$shared[0]->labels[1]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -237,8 +237,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label3</x-slot>
|
<x-slot name="name">label3</x-slot>
|
||||||
@if(isset($labels[2]->id))
|
@if(isset($shared[0]->labels[2]->label->id))
|
||||||
<x-slot name="current">{{$labels[2]->id}}</x-slot>
|
<x-slot name="current">{{$shared[0]->labels[2]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -246,8 +246,8 @@
|
||||||
<x-labels-select>
|
<x-labels-select>
|
||||||
<x-slot name="title">label</x-slot>
|
<x-slot name="title">label</x-slot>
|
||||||
<x-slot name="name">label4</x-slot>
|
<x-slot name="name">label4</x-slot>
|
||||||
@if(isset($labels[3]->id))
|
@if(isset($shared[0]->labels[3]->label->id))
|
||||||
<x-slot name="current">{{$labels[3]->id}}</x-slot>
|
<x-slot name="current">{{$shared[0]->labels[3]->label->id}}</x-slot>
|
||||||
@endif
|
@endif
|
||||||
</x-labels-select>
|
</x-labels-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,25 +41,25 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $row->main_domain }}</td>
|
<td>{{ $row->main_domain }}</td>
|
||||||
<td>{{ $row->shared_type }}</td>
|
<td>{{ $row->shared_type }}</td>
|
||||||
<td class="text-nowrap">{{ $row->location }}</td>
|
<td class="text-nowrap">{{ $row->location->name }}</td>
|
||||||
<td class="text-nowrap">{{ $row->provider_name }}</td>
|
<td class="text-nowrap">{{ $row->provider->name }}</td>
|
||||||
<td>{{ $row->disk_as_gb }} <small>GB</small></td>
|
<td>{{ $row->disk_as_gb }} <small>GB</small></td>
|
||||||
<td>{{ $row->price }} {{$row->currency}} {{\App\Process::paymentTermIntToString($row->term)}}</td>
|
<td>{{ $row->price->price }} {{$row->price->currency}} {{\App\Process::paymentTermIntToString($row->price->term)}}</td>
|
||||||
<td>{{Carbon\Carbon::parse($row->next_due_date)->diffForHumans()}}</td>
|
<td>{{Carbon\Carbon::parse($row->price->next_due_date)->diffForHumans()}}</td>
|
||||||
<td class="text-nowrap">{{ $row->owned_since }}</td>
|
<td class="text-nowrap">{{ $row->owned_since }}</td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
<form action="{{ route('shared.destroy', $row->service_id) }}" method="POST">
|
<form action="{{ route('shared.destroy', $row->id) }}" method="POST">
|
||||||
<a href="{{ route('shared.show', $row->service_id) }}"
|
<a href="{{ route('shared.show', $row->id) }}"
|
||||||
class="text-body mx-1">
|
class="text-body mx-1">
|
||||||
<i class="fas fa-eye" title="view"></i>
|
<i class="fas fa-eye" title="view"></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('shared.edit', $row->service_id) }}"
|
<a href="{{ route('shared.edit', $row->id) }}"
|
||||||
class="text-body mx-1">
|
class="text-body mx-1">
|
||||||
<i class="fas fa-pen" title="edit"></i>
|
<i class="fas fa-pen" title="edit"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||||
id="btn-{{$row->main_domain}}" title="{{$row->service_id}}"></i>
|
id="btn-{{$row->main_domain}}" title="{{$row->id}}"></i>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -8,13 +8,9 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-6 mb-2">
|
<div class="col-12 col-md-6 mb-2">
|
||||||
<h2>{{ $shared->main_domain }}</h2>
|
<h2>{{ $shared->main_domain }}</h2>
|
||||||
<code>@foreach($labels as $label)
|
@foreach($shared->labels as $label)
|
||||||
@if($loop->last)
|
<span class="badge bg-primary mx-1">{{$label->label->label}}</span>
|
||||||
{{$label->label}}
|
@endforeach
|
||||||
@else
|
|
||||||
{{$label->label}},
|
|
||||||
@endif
|
|
||||||
@endforeach</code>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 text-md-end">
|
<div class="col-12 col-md-6 text-md-end">
|
||||||
<h6 class="text-muted pe-lg-4">{{ $shared->id }}</h6>
|
<h6 class="text-muted pe-lg-4">{{ $shared->id }}</h6>
|
||||||
|
@ -34,26 +30,26 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Location</td>
|
<td class="px-2 py-2 font-bold text-muted">Location</td>
|
||||||
<td>{{ $shared_extras[0]->location }}</td>
|
<td>{{ $shared->location->name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Provider</td>
|
<td class="px-2 py-2 font-bold text-muted">Provider</td>
|
||||||
<td>{{ $shared_extras[0]->provider_name }}</td>
|
<td>{{ $shared->provider->name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Price</td>
|
<td class="px-2 py-2 font-bold text-muted">Price</td>
|
||||||
<td>{{ $shared_extras[0]->price }} {{ $shared_extras[0]->currency }}
|
<td>{{ $shared->price->price }} {{ $shared->price->currency }}
|
||||||
<small>{{\App\Process::paymentTermIntToString($shared_extras[0]->term)}}</small>
|
<small>{{\App\Process::paymentTermIntToString($shared->price->term)}}</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Was promo</td>
|
<td class="px-2 py-2 font-bold text-muted">Was promo</td>
|
||||||
<td>{{ ($shared_extras[0]->was_promo === 1) ? 'Yes' : 'No' }}</td>
|
<td>{{ ($shared->was_promo === 1) ? 'Yes' : 'No' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Has dedicated IP?</td>
|
<td class="px-2 py-2 font-bold text-muted">Has dedicated IP?</td>
|
||||||
<td>
|
<td>
|
||||||
@if(isset($ip_address[0]->address))
|
@if(isset($shared->ips[0]->address))
|
||||||
Yes
|
Yes
|
||||||
@else
|
@else
|
||||||
No
|
No
|
||||||
|
@ -62,8 +58,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">IP</td>
|
<td class="px-2 py-2 font-bold text-muted">IP</td>
|
||||||
<td><code>@if(isset($ip_address[0]->address))
|
<td><code>@if(isset($shared->ips[0]->address))
|
||||||
{{$ip_address[0]->address}}
|
{{$shared->ips[0]->address}}
|
||||||
@endif
|
@endif
|
||||||
</code></td>
|
</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -77,8 +73,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 py-2 font-bold text-muted">Next due date</td>
|
<td class="px-2 py-2 font-bold text-muted">Next due date</td>
|
||||||
<td>{{Carbon\Carbon::parse($shared_extras[0]->next_due_date)->diffForHumans()}}
|
<td>{{Carbon\Carbon::parse($shared->price->next_due_date)->diffForHumans()}}
|
||||||
({{Carbon\Carbon::parse($shared_extras[0]->next_due_date)->format('d/m/Y')}})
|
({{Carbon\Carbon::parse($shared->price->next_due_date)->format('d/m/Y')}})
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
77
resources/views/yabs/choose-compare.blade.php
Normal file
77
resources/views/yabs/choose-compare.blade.php
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
@section('title')
|
||||||
|
{{'Choose YABs to compare'}}
|
||||||
|
@endsection
|
||||||
|
@section('scripts')
|
||||||
|
<script src="{{ asset('js/vue.min.js') }}"></script>
|
||||||
|
@endsection
|
||||||
|
<x-app-layout>
|
||||||
|
<x-slot name="header">
|
||||||
|
{{ __('Choose two YABs to compare') }}
|
||||||
|
</x-slot>
|
||||||
|
<div class="container" id="app">
|
||||||
|
<div class="card shadow mt-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<a href="{{ route('yabs.index') }}" class="btn btn-primary mb-3">YABs home</a>
|
||||||
|
@if(count($all_yabs) >= 2)
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-lg-6">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend"><span class="input-group-text">YABs 1</span></div>
|
||||||
|
<select class="form-control" name="server1" @change="changeServer1($event)">
|
||||||
|
@foreach ($all_yabs as $yabs)
|
||||||
|
<option value="{{ $yabs['id'] }}">
|
||||||
|
{{ $yabs->server->hostname }} ({{$yabs['output_date']}})
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-6">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend"><span class="input-group-text">YABs 2</span></div>
|
||||||
|
<select class="form-control" name="server2" @change="changeServer2($event)">
|
||||||
|
@foreach ($all_yabs as $yabs)
|
||||||
|
<option value="{{ $yabs['id'] }}" {{($loop->index === 1)?'selected':''}}>
|
||||||
|
{{ $yabs->server->hostname }} ({{$yabs['output_date']}})
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a v-bind:href="full_url" class="btn btn-success mt-4">View comparison table</a>
|
||||||
|
@else
|
||||||
|
<p class="text-danger">You need to have added at least 2 YABs to use this feature</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1)
|
||||||
|
<p class="text-muted mt-4 text-end"><small>Built on Laravel
|
||||||
|
v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }})</small></p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<script type="application/javascript">
|
||||||
|
let app = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
data: {
|
||||||
|
"base_url": "yabs-compare/",
|
||||||
|
"full_url": "{{route('yabs.compare', ['yabs1' => $all_yabs[0]->id, 'yabs2' => $all_yabs[1]->id])}}",
|
||||||
|
"url_input": "",
|
||||||
|
"server1": "{{$all_yabs[0]->id ?? ''}}",
|
||||||
|
"server2": "{{$all_yabs[1]->id ?? ''}}",
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeServer1: function changeServer1(event) {
|
||||||
|
this.server1 = event.target.value;
|
||||||
|
this.full_url = this.base_url + this.server1 + '/' + this.server2;
|
||||||
|
this.url_input = this.full_url;
|
||||||
|
},
|
||||||
|
changeServer2: function changeServer2(event) {
|
||||||
|
this.server2 = event.target.value;
|
||||||
|
this.full_url = this.base_url + this.server1 + '/' + this.server2;
|
||||||
|
this.url_input = this.full_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</x-app-layout>
|
244
resources/views/yabs/compare.blade.php
Normal file
244
resources/views/yabs/compare.blade.php
Normal file
|
@ -0,0 +1,244 @@
|
||||||
|
@section('title') {{'Compare YABs'}} @endsection
|
||||||
|
@section('style')
|
||||||
|
<style>
|
||||||
|
.td-nowrap {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plus-td {
|
||||||
|
background: #71ed7136 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.neg-td {
|
||||||
|
background: #ed827136 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.equal-td {
|
||||||
|
background: #6189ff26 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.objects-table th:first-child, .objects-table td:first-child, .compare-table th:first-child, .compare-table td:first-child {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-type {
|
||||||
|
color: #212529b3;
|
||||||
|
padding-left: .05rem;
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endsection
|
||||||
|
<x-app-layout>
|
||||||
|
<div class="container" id="app">
|
||||||
|
<div class="card shadow mt-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<a href="{{ route('yabs.compare-choose') }}" class="btn btn-primary mb-3">Choose others</a>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table compare-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>{{ $yabs1_data[0]->id }}</th>
|
||||||
|
<th>DIF</th>
|
||||||
|
<th>{{ $yabs2_data[0]->id}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">Date</td>
|
||||||
|
<td class="td-nowrap">{{ date_format(new DateTime($yabs1_data[0]->output_date), 'g:ia D jS F Y') }}</td>
|
||||||
|
<td class="td-nowrap equal-td">
|
||||||
|
{{\Carbon\Carbon::parse($yabs1_data[0]->output_date)->diffForHumans(\Carbon\Carbon::parse($yabs2_data[0]->output_date))}}
|
||||||
|
</td>
|
||||||
|
<td class="td-nowrap">{{ date_format(new DateTime($yabs2_data[0]->output_date), 'g:ia D jS F Y') }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">Server</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->server->hostname}}</td>
|
||||||
|
<td class="td-nowrap equal-td"></td>
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->server->hostname}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">CPU count</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->cpu_cores}}</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->cpu_cores, $yabs2_data[0]->cpu_cores, ' cores') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->cpu_cores}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">CPU freq</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->cpu_freq}}<span class="data-type">Mhz</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->cpu_freq, $yabs2_data[0]->cpu_freq, 'Mhz') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->cpu_freq}}<span class="data-type">Mhz</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">Ram</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') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->ram_mb}}<span class="data-type">MB</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">Disk</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->disk_gb}}<span class="data-type">GB</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->disk_gb, $yabs2_data[0]->disk_gb, 'GB') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->disk_gb}}<span class="data-type">GB</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">GB5 single</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->gb5_single}}</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->gb5_single, $yabs2_data[0]->gb5_single, '') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->gb5_single}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">GB5 multi</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->gb5_multi}}</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->gb5_multi, $yabs2_data[0]->gb5_multi, '') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->gb5_multi}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">4k disk</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->disk_speed->d_4k_as_mbps}}<span class="data-type">MB/s</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->disk_speed->d_4k_as_mbps, $yabs2_data[0]->disk_speed->d_4k_as_mbps, 'MB/s') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->disk_speed->d_4k_as_mbps}}<span class="data-type">MB/s</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">64k disk</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->disk_speed->d_64k_as_mbps}}<span class="data-type">MB/s</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->disk_speed->d_64k_as_mbps, $yabs2_data[0]->disk_speed->d_64k_as_mbps, 'MB/s') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->disk_speed->d_64k_as_mbps}}<span class="data-type">MB/s</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">512k disk</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->disk_speed->d_512k_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->disk_speed->d_512k_as_mbps, $yabs2_data[0]->disk_speed->d_512k_as_mbps, 'MB/s') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->disk_speed->d_512k_as_mbps}}<span
|
||||||
|
class="data-type">MB/s</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">1m disk</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->disk_speed->d_1m_as_mbps}}<span class="data-type">MB/s</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->disk_speed->d_1m_as_mbps, $yabs2_data[0]->disk_speed->d_1m_as_mbps, 'MB/s') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->disk_speed->d_1m_as_mbps}}<span class="data-type">MB/s</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[0]->location}} send</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[0]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[0]->send_as_mbps, $yabs2_data[0]->network_speed[0]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[0]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[0]->location}} receive</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[0]->receive_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[0]->receive_as_mbps, $yabs2_data[0]->network_speed[0]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[0]->receive_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
@if($yabs1_data[0]->network_speed[1]->location === $yabs2_data[0]->network_speed[1]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[1]->location}} send</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[1]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[1]->send_as_mbps, $yabs2_data[0]->network_speed[1]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[1]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[1]->location}} receive</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[1]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[1]->receive_as_mbps, $yabs2_data[0]->network_speed[1]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[1]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($yabs1_data[0]->network_speed[2]->location === $yabs2_data[0]->network_speed[2]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[2]->location}} send</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[2]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[2]->send_as_mbps, $yabs2_data[0]->network_speed[2]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[2]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[2]->location}} receive</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[2]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[2]->receive_as_mbps, $yabs2_data[0]->network_speed[2]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[2]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($yabs1_data[0]->network_speed[3]->location === $yabs2_data[0]->network_speed[3]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[3]->location}} send</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[3]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[3]->send_as_mbps, $yabs2_data[0]->network_speed[3]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[3]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[3]->location}} receive</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[3]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[3]->receive_as_mbps, $yabs2_data[0]->network_speed[3]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[3]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($yabs1_data[0]->network_speed[4]->location === $yabs2_data[0]->network_speed[4]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->location}} send</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[4]->send_as_mbps, $yabs2_data[0]->network_speed[4]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[4]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->location}} receive</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[4]->receive_as_mbps, $yabs2_data[0]->network_speed[4]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[4]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
@if($yabs1_data[0]->network_speed[4]->location === $yabs2_data[0]->network_speed[5]->location)
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->location}} send</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[4]->send_as_mbps, $yabs2_data[0]->network_speed[5]->send_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[5]->send_as_mbps}}<span
|
||||||
|
class="data-type">MBps</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->location}} receive</td>
|
||||||
|
<td class="td-nowrap">{{$yabs1_data[0]->network_speed[4]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
{!! \App\Models\Server::tableRowCompare($yabs1_data[0]->network_speed[4]->receive_as_mbps, $yabs2_data[0]->network_speed[5]->receive_as_mbps, 'MBps') !!}
|
||||||
|
<td class="td-nowrap">{{$yabs2_data[0]->network_speed[5]->receive_as_mbps}}<span class="data-type">MBps</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-app-layout>
|
|
@ -14,6 +14,7 @@
|
||||||
<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.create') }}" class="btn btn-primary mb-3">Add YABs</a>
|
<a href="{{ route('yabs.create') }}" class="btn btn-primary mb-3">Add YABs</a>
|
||||||
|
<a href="{{ route('yabs.compare-choose') }}" class="btn btn-success mb-3">Compare YABs</a>
|
||||||
<x-errors-alert></x-errors-alert>
|
<x-errors-alert></x-errors-alert>
|
||||||
<x-success-alert></x-success-alert>
|
<x-success-alert></x-success-alert>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
@ -40,7 +41,7 @@
|
||||||
@if(!empty($yabs))
|
@if(!empty($yabs))
|
||||||
@foreach($yabs as $yab)
|
@foreach($yabs as $yab)
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="servers/{{$yab->server_id}}" class="text-decoration-none">{{ $yab->hostname }}</a></td>
|
<td><a href="servers/{{$yab->server_id}}" class="text-decoration-none">{{ $yab->server->hostname }}</a></td>
|
||||||
<td><span title="{{$yab->cpu_model}}">{{ $yab->cpu_cores }}</span></td>
|
<td><span title="{{$yab->cpu_model}}">{{ $yab->cpu_cores }}</span></td>
|
||||||
<td><span title="{{$yab->cpu_model}}">{{ $yab->cpu_freq }}<small>Mhz</small></span></td>
|
<td><span title="{{$yab->cpu_model}}">{{ $yab->cpu_freq }}<small>Mhz</small></span></td>
|
||||||
<td>{{ $yab->ram }}<small>{{ $yab->ram_type }}</small></td>
|
<td>{{ $yab->ram }}<small>{{ $yab->ram_type }}</small></td>
|
||||||
|
@ -53,10 +54,10 @@
|
||||||
No
|
No
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $yab->d_4k }}<small>{{ $yab->d_4k_type }}</small></td>
|
<td>{{ $yab->disk_speed->d_4k }}<small>{{ $yab->disk_speed->d_4k_type }}</small></td>
|
||||||
<td>{{ $yab->d_64k }}<small>{{ $yab->d_64k_type }}</small></td>
|
<td>{{ $yab->disk_speed->d_64k }}<small>{{ $yab->disk_speed->d_64k_type }}</small></td>
|
||||||
<td>{{ $yab->d_512k }}<small>{{ $yab->d_512k_type }}</small></td>
|
<td>{{ $yab->disk_speed->d_512k }}<small>{{ $yab->disk_speed->d_512k_type }}</small></td>
|
||||||
<td>{{ $yab->d_1m }}<small>{{ $yab->d_1m_type }}</small></td>
|
<td>{{ $yab->disk_speed->d_1m }}<small>{{ $yab->disk_speed->d_1m_type }}</small></td>
|
||||||
<td>{{ date_format(new DateTime($yab->output_date), 'Y-m-d g:i a') }}</small></td>
|
<td>{{ date_format(new DateTime($yab->output_date), 'Y-m-d g:i a') }}</small></td>
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
<form action="{{ route('yabs.destroy', $yab->id) }}" method="POST">
|
<form action="{{ route('yabs.destroy', $yab->id) }}" method="POST">
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||||
id="btn-{{$yab->hostname}}" title="{{$yab->id}}"></i>
|
id="btn-{{$yab->server->hostname}}" title="{{$yab->id}}"></i>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2 font-bold">Server</td>
|
<td class="px-4 py-2 font-bold">Server</td>
|
||||||
<td><a href="{{route('servers.show', ['server' => $yab[0]->server_id])}}" class="text-decoration-none">{{ $yab[0]->hostname }}</a></td>
|
<td><a href="{{route('servers.show', ['server' => $yab[0]->server_id])}}" class="text-decoration-none">{{ $yab[0]->server->hostname }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2 font-bold">CPU</td>
|
<td class="px-4 py-2 font-bold">CPU</td>
|
||||||
|
@ -75,10 +75,10 @@
|
||||||
class="text-decoration-none">{{ $yab[0]->gb5_multi }}</a></td>
|
class="text-decoration-none">{{ $yab[0]->gb5_multi }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2 font-bold">Tested</td>
|
<td class="px-4 py-2 font-bold">Test ran</td>
|
||||||
<td>
|
<td>
|
||||||
@if(!is_null($yab[0]->output_date))
|
@if(!is_null($yab[0]->output_date))
|
||||||
{{date_format(new DateTime($yab[0]->output_date), 'jS F Y')}}
|
{{date_format(new DateTime($yab[0]->output_date), 'g:ia D jS F Y')}}
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -93,25 +93,25 @@
|
||||||
<td class="py-2">Disk speeds:</td>
|
<td class="py-2">Disk speeds:</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2"><b>4k</b> {{$yab[0]->d_4k}}
|
<td class="px-4 py-2"><b>4k</b> {{$yab[0]->disk_speed->d_4k}}
|
||||||
<small>{{$yab[0]->d_4k_type}}</small></td>
|
<small>{{$yab[0]->disk_speed->d_4k_type}}</small></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2"><b>64k</b> {{$yab[0]->d_64k}}
|
<td class="px-4 py-2"><b>64k</b> {{$yab[0]->disk_speed->d_64k}}
|
||||||
<small>{{$yab[0]->d_64k_type}}</small></td>
|
<small>{{$yab[0]->disk_speed->d_64k_type}}</small></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2"><b>512k</b> {{$yab[0]->d_512k}}
|
<td class="px-4 py-2"><b>512k</b> {{$yab[0]->disk_speed->d_512k}}
|
||||||
<small>{{$yab[0]->d_512k_type}}</small></td>
|
<small>{{$yab[0]->d_512k_type}}</small></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2"><b>1m</b> {{$yab[0]->d_1m}} <small>{{$yab[0]->d_1m_type}}</small>
|
<td class="px-4 py-2"><b>1m</b> {{$yab[0]->disk_speed->d_1m}} <small>{{$yab[0]->disk_speed->d_1m_type}}</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="py-2">Network speed (location|send|receive):</td>
|
<td class="py-2">Network speed (location|send|receive):</td>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($network as $speed_test)
|
@foreach($yab[0]->network_speed as $speed_test)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2 text-nowrap">
|
<td class="px-4 py-2 text-nowrap">
|
||||||
<b>{{$speed_test->location}}</b> {{$speed_test->send}}
|
<b>{{$speed_test->location}}</b> {{$speed_test->send}}
|
||||||
|
|
|
@ -70,6 +70,10 @@ Route::resource('shared', SharedController::class)->middleware(['auth']);
|
||||||
|
|
||||||
Route::resource('yabs', YabsController::class)->middleware(['auth']);
|
Route::resource('yabs', YabsController::class)->middleware(['auth']);
|
||||||
|
|
||||||
|
Route::get('yabs-compare-choose', 'App\Http\Controllers\YabsController@chooseYabsCompare')->middleware(['auth'])->name('yabs.compare-choose');
|
||||||
|
|
||||||
|
Route::get('yabs-compare/{yabs1}/{yabs2}', 'App\Http\Controllers\YabsController@compareYabs')->middleware(['auth'])->name('yabs.compare');
|
||||||
|
|
||||||
Route::get('servers-compare-choose', 'App\Http\Controllers\ServerController@chooseCompare')->middleware(['auth'])->name('servers-compare-choose');
|
Route::get('servers-compare-choose', 'App\Http\Controllers\ServerController@chooseCompare')->middleware(['auth'])->name('servers-compare-choose');
|
||||||
|
|
||||||
Route::get('servers-compare/{server1}/{server2}', 'App\Http\Controllers\ServerController@compareServers')->middleware(['auth']);
|
Route::get('servers-compare/{server1}/{server2}', 'App\Http\Controllers\ServerController@compareServers')->middleware(['auth'])->name('servers.compare');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user