diff --git a/app/Console/Commands/Eve/GetEveRegionsCommand.php b/app/Console/Commands/Eve/GetEveRegionsCommand.php deleted file mode 100644 index dd6c50cfb..000000000 --- a/app/Console/Commands/Eve/GetEveRegionsCommand.php +++ /dev/null @@ -1,49 +0,0 @@ -SetStartStatus(); - - $regions = [ - 'Immensea' => 10000025, - 'Catch' => 10000014, - 'Tenerifis' => 10000061, - 'The Forge' => 10000002, - 'Impass' => 10000031, - 'Esoteria' => 10000039, - 'Detorid' => 10000005, - 'Omist' => 10000062, - 'Feythabolis' => 10000056, - 'Insmother' => 10000009, - ]; - - foreach($regions as $key => $value) { - GetMarketRegionOrderJob::dispatch($value); - } - - $task->SetStopStatus(); - } -} diff --git a/app/Console/Commands/Market/PurgeMarketDataCommand.php b/app/Console/Commands/Market/PurgeMarketDataCommand.php deleted file mode 100644 index 45628f655..000000000 --- a/app/Console/Commands/Market/PurgeMarketDataCommand.php +++ /dev/null @@ -1,50 +0,0 @@ -subHours(48))->delete(); - } -} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 7dd5c9aa3..a7efabc3a 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -24,7 +24,6 @@ class Kernel extends ConsoleKernel Commands\Users\PurgeUsers::class, Commands\Flex\FlexStructureCommand::class, Commands\Data\EmptyJumpBridges::class, - Commands\Wormholes\PurgeWormholes::class, Commands\Finances\SovBillsCommand::class, Commands\Data\CleanStaleDataCommand::class, Commands\Moons\MoonsUpdateCommand::class, @@ -79,8 +78,6 @@ class Kernel extends ConsoleKernel /** * Purge Data Schedule */ - $schedule->command('services:PurgeWormholeData') - ->hourlyAt(20); $schedule->command('services:CleanData') ->weekly(7, '11:00'); $schedule->command('data:PurgeCorpLedgers') diff --git a/app/Http/Controllers/Wormholes/WormholeController.php b/app/Http/Controllers/Wormholes/WormholeController.php deleted file mode 100644 index a2d938a93..000000000 --- a/app/Http/Controllers/Wormholes/WormholeController.php +++ /dev/null @@ -1,148 +0,0 @@ -middleware('auth'); - $this->middleware('role:User'); - } - - public function displayWormholeForm() { - //Declare a few array variables - $duration = array(); - $class = array(); - $stability = array(); - $size = array(); - - //Get the duration from the table - $duration = [ - 'This wormhole has not yet begun its natural cycle of decay and should last at least another day.', - 'This wormhole is beginning to decay, but will not last another day.', - 'This wormhole is reaching the end of its natural lifetime', - ]; - - //Get the wh classes from the table - $class = [ - 'C1', - 'C2', - 'C3', - 'C4', - 'C5', - 'C6', - 'C7', - 'C8', - 'C9', - 'C13', - 'Drifter', - 'Thera', - 'Exit WH', - ]; - - //Get the wh types from the table - $type = WormholeType::groupBy('type')->pluck('type'); - - //Get the wh sizes from the table - $size = [ - 'XS', - 'S', - 'M', - 'L', - 'XL', - ]; - - //Get the wh stabilities from the table - $stability = [ - 'Stable', - 'Non-Critical', - 'Critical', - ]; - - //Return all the variables to the view - return view('wormholes.form')->with('class', $class) - ->with('type', $type) - ->with('size', $size) - ->with('stability', $stability) - ->with('duration', $duration); - } - - public function storeWormhole() { - $this->validate($request, [ - 'sig' => 'required', - 'duration' => 'required', - 'dateTiume' => 'required', - 'class' => 'required', - 'size' => 'required', - 'stability' => 'required', - 'system' => 'required', - ]); - - //Declare some variables - $duration = null; - - //Create the stable time for the database - if($request->duration == 'This wormhole has not yet begun its natural cycle of decay and should last at least another day.') { - $duration = '>24 hours'; - } else if ($request->duration == 'This wormhole is beginning to decay, but will not last another day.') { - $duration = '>4 hours <24 hours'; - } else if($request->duration == 'This wormhole is reaching the end of its natural lifetime') { - '<4 hours'; - } - - //Get the wormhole type from the database so we can enter other details - $wormholeType = WormholeType::where([ - 'type' => $request->type, - ])->first(); - - $found = AllianceWormhole::where([ - 'system' => $request->system, - 'sig_ig' => $request->sig, - ])->count(); - - if($found == 0) { - AllianceWormhole::insert([ - 'system' => $request->system, - 'sig_id' => $request->sig_id, - 'duration_left' => $duration, - 'dateTime' => $request->dateTime, - 'class' => $request->class, - 'type' => $request->class, - 'hole_size' => $request->size, - 'stability' => $request->stability, - 'details' => $request->details, - 'link' => $request->link, - 'mass_allowed' => $wormholeType->mass_allowed, - 'individual_mass' => $wormholeType->individual_mass, - 'regeneration' => $wormholeType->regeneration, - 'max_stable_time' => $wormholeType->max_stable_time, - ]); - - return redirect('/wormholes/display')->with('success', 'Wormhole Info Added.'); - } else { - return redirect('/wormholes/display')->with('error', 'Wormhole already in database.'); - } - } - - public function displayWormholes() { - //Create the date and time - $dateTime = Carbon::now()->subDays(2); - - //Get all of the wormholes from the last 48 hours from the database to display - $wormholes = AllianceWormhole::where('created_at', '>=', $dateTime)->get(); - - return view('wormholes.display')->with('wormholes', $wormholes); - } -} diff --git a/app/Jobs/Commands/Eve/GetEveRegionsJob.php b/app/Jobs/Commands/Eve/GetEveRegionsJob.php deleted file mode 100644 index 417d6b736..000000000 --- a/app/Jobs/Commands/Eve/GetEveRegionsJob.php +++ /dev/null @@ -1,56 +0,0 @@ -invoke('get', '/universe/regions/'); - $responses = $esi->setBody($regions)->invoke('post', '/universe/names/'); - - foreach($responses as $resp) { - if($resp->category == 'region') { - EveRegion::insertOrIgnore([ - 'region_id' => $resp->id, - 'region_name' => $resp->name, - ]); - } - } - - } -} diff --git a/app/Jobs/Commands/Market/GetMarketRegionOrderJob.php b/app/Jobs/Commands/Market/GetMarketRegionOrderJob.php deleted file mode 100644 index b10c2f195..000000000 --- a/app/Jobs/Commands/Market/GetMarketRegionOrderJob.php +++ /dev/null @@ -1,104 +0,0 @@ -region = $region; - //Setup the esi variable - if($esi == null) { - $this->esi = new Esi(); - } else { - $this->esi = $esi; - } - } - - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - //Get the market orders for a region - $orders = $this->esi->invoke('get', '/markets/{region_id}/orders/', [ - 'region_id' => $this->region, - ]); - - foreach($orders as $order) { - $count = MarketRegionOrder::where([ - 'order_id', - ])->count(); - - if($count == 0) { - $newOrder = new MarketRegionOrder; - $newOrder->region_id = $this->region; - $newOrder->duration = $order->duration; - $newOrder->is_buy_order = $order->is_buy_order; - $newOrder->issued = $order->issued; - $newOrder->location_id = $order->location_id; - $newOrder->min_volume = $order->min_volume; - $newOrder->order_id = $order->order_id; - $newOrder->price = $order->price; - $newOrder->range = $order->range; - $newOrder->system_id = $order->system_id; - $newOrder->type_id = $order->type_id; - $newOrder->volume_remain = $order->volume_remain; - $newOrder->volume_total = $order->volume_total; - $newOrder->save(); - } else if ($order->volume_remain == 0) { - MarketRegionOrder::where([ - 'order_id' => $order->order_id, - ])->delete(); - } else { - MarketRegionOrder::where([ - 'order_id' => $order->order_id, - ])->update([ - 'region_id' => $this->region, - 'duration' => $order->duration, - 'is_buy_order' => $order->is_buy_order, - 'issued' => $order->issued, - 'location_id' => $order->location_id, - 'min_volume' => $order->min_volume, - 'order_id' => $order->order_id, - 'price' => $order->price, - 'range' => $order->range, - 'system_id' => $order->system_id, - 'type_id' => $order->type_id, - 'volume_remain' => $order->volume_remain, - 'volume_total' => $order->volume_total, - ]); - } - } - } -} diff --git a/app/Jobs/Commands/Market/PurgeMarketRegionOrderJob.php b/app/Jobs/Commands/Market/PurgeMarketRegionOrderJob.php deleted file mode 100644 index f039dda13..000000000 --- a/app/Jobs/Commands/Market/PurgeMarketRegionOrderJob.php +++ /dev/null @@ -1,34 +0,0 @@ -Buyback Program
-Wormholes
- -Wormhole Form
- -| System | -Sig ID | -Duration Left | -Scan Time | -WH Class | -Hole Size | -Stability | -Mass Allowed | -Individual Mass | -Regeneration | -Max Stable Time | -Details | -Link | - - - @foreach($wormholes as $wormhole) -
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $wormhole->system }} | -{{ $wormhole->sig_id }} | -{{ $wormhole->duration_left }} | -{{ $wormhole->dateTime }} | -{{ $wormhole->class }} | -{{ $wormhole->hole_size }} | -{{ $wormhole->stability }} | -{{ $wormhole->mass_allowed }} | -{{ $wormhole->individual_mass }} | -{{ $wormhole->regeneration }} | -{{ $wormhole->max_stable_time }} | -{{ $wormhole->details }} | -{{ $wormhole->link }} | -