Skip to content
Snippets Groups Projects
Commit 155dacdc authored by Alex's avatar Alex
Browse files

Add drop Wowas button

parent 0ca48104
No related branches found
No related tags found
1 merge request!1Include Wowa Training
Pipeline #5554 passed
......@@ -129,4 +129,10 @@ class WowaController extends Controller
WowaJob::dispatch($wowa);
return redirect(action('WowaController@index'));
}
public function dropWowas()
{
Wowa::truncate();
return redirect(action("WowaController@index"));
}
}
......@@ -70,7 +70,6 @@ class WowaJob implements ShouldQueue
} catch (\Exception $e) {
$this->wowa->status = Wowa::STATE_FAILED;
$logger->error("Error during retrieving evidences");
$logger->error($e->getMessage());
$this->wowa->save();
}
......
......@@ -5,6 +5,14 @@
@section('content')
<div class="container">
<h1>Wowas</h1>
<p>
<a href="{{action('WowaController@create')}}" class="btn btn-outline-danger">
<i class="fas fa-calculator"></i> Compute Wowa Weights
</a>
<a href="{{action('WowaController@dropWowas')}}" class="btn btn-danger">
<i class="fas fa-trash-alt">Drop all Feedbacks</i>
</a>
</p>
<table class="table table-striped">
<tr>
......
......@@ -64,6 +64,7 @@ Route::prefix('admin')
Route::get('users/{user}/toggle', 'UserController@toggleAdmin');
Route::resource('feedback', 'FeedbackController');
Route::get('populate', 'FeedbackController@populate');
Route::get('drop', 'FeedbackController@dropFeedbacks');
Route::get('dropFeedback', 'FeedbackController@dropFeedbacks');
Route::get('dropWowa', 'WowaController@dropWowas');
Route::resource('wowas', 'WowaController');
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment