mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PHP-Flasher for toast messages (#13401)
* PHP-Flasher for toast messages Allows customized template removes dependency on unmaintained package using dev stability no solution for javascript toasts yet Use DI in places it makes sense allow html in flashes Use "template.librenms" as a default notification style merge toast containers toastr needs to be second because it will find the containr made by flasher, but the inverse is not true upgrade php-flasher to add custom options and persistent notifications Add dark theme * update composer.lock
This commit is contained in:
@@ -14,7 +14,6 @@ use App\Models\Widget;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use LibreNMS\Config;
|
||||
use Toastr;
|
||||
|
||||
class OverviewController extends Controller
|
||||
{
|
||||
@@ -66,11 +65,11 @@ class OverviewController extends Controller
|
||||
|
||||
// specific dashboard was requested, but doesn't exist
|
||||
if (isset($dashboard) && ! empty($request->dashboard)) {
|
||||
Toastr::error(
|
||||
"Dashboard <code>#$request->dashboard</code> does not exist! Loaded <code>
|
||||
" . htmlentities($dashboard->dashboard_name) . '</code> instead.',
|
||||
'Requested Dashboard Not Found!'
|
||||
);
|
||||
flash()
|
||||
->using('template.librenms')
|
||||
->title('Requested Dashboard Not Found!')
|
||||
->addError("Dashboard <code>#$request->dashboard</code> does not exist! Loaded <code>
|
||||
" . htmlentities($dashboard->dashboard_name) . '</code> instead.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user