cleanup of fuel gauge for structures
This commit is contained in:
@@ -84,51 +84,4 @@ class FuelController extends Controller
|
||||
->with('lava', $lava);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the structure id passed to it and display fuel gauage for structure
|
||||
*/
|
||||
public function displayStructureFuel($id) {
|
||||
//Declare class variables
|
||||
$lava = new Lavacharts;
|
||||
$aHelper = new AssetHelper(null, null, null);
|
||||
|
||||
$structure = Structure::where(['structure_id' => $id])->first();
|
||||
$name = $structure['structure_name'];
|
||||
|
||||
//Get the quantity of liquid ozone in the structure
|
||||
$liquidOzone = $aHelper->GetAssetByType(16273, $id);
|
||||
|
||||
if($liquidOzone > 1000000) {
|
||||
$liquidOzone = 1000000;
|
||||
}
|
||||
|
||||
$gauge = $lava->DataTable();
|
||||
$gauge->addStringColumn('Fuel')
|
||||
->addNumberColumn('Units')
|
||||
->addRow(['Liquid Ozone', $liquidOzone]);
|
||||
|
||||
|
||||
$lava->GaugeChart('Liquid Ozone', $gauge, [
|
||||
'min' => 0,
|
||||
'max' => 1000000,
|
||||
'width' => 400,
|
||||
'greenFrom' => 0,
|
||||
'greenTo' => 150000,
|
||||
'greenColor' => '#DC3912',
|
||||
'yellowFrom' => 150000,
|
||||
'yellowTo' => 300000,
|
||||
'yellowColor' => '#FF9900',
|
||||
'redFrom' => 300000,
|
||||
'redTo' => 1000000,
|
||||
'redColor' => '#109618',
|
||||
'majorTicks' => [
|
||||
'Empty',
|
||||
'Full',
|
||||
],
|
||||
]);
|
||||
|
||||
//Return the view
|
||||
return view('logistics.display.fuelgauge')->with('lava', $lava)
|
||||
->with('name', $name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<th>System</th>
|
||||
<th>Fuel Expires</th>
|
||||
<th>Liquid Ozone Quantity</th>
|
||||
<th>Fuel Gauge</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($jumpGates as $jumpGate)
|
||||
@@ -27,7 +26,6 @@
|
||||
<td>{{ $jumpGate['system'] }}</td>
|
||||
<td>{{ $jumpGate{'fuel_expires'} }}</td>
|
||||
<td>{{ $jumpGate['liquid_ozone'] }}</td>
|
||||
<td><a href="{{ $jumpGate['link'] }}">Link</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
@extends('logistics.layouts.b4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>{{ $name }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="fuel-gauge-div"></div>
|
||||
{!! $lava->render('GaugeChart', 'Liquid Ozone', 'fuel-gauge-div') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
@endsection
|
||||
@@ -118,7 +118,6 @@ Route::group(['middleware' => ['auth']], function(){
|
||||
Route::post('/logistics/courier/form', 'Logistics\LogisticsController@displayContractDetails');
|
||||
Route::get('/logistics/contracts/display', 'Logistics\LogisticsController@displayLogisticsContracts');
|
||||
Route::get('/logistics/fuel/structures', 'Fuel\FuelController@displayStructures');
|
||||
Route::get('/logistics/fuel/display/{id}/', 'Fuel\FuelController@displayStructureFuel');
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user