mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Move assets to 5.7 location * Add 5.7 SVGs * add cache data dir * update QUEUE_DRIVER -> QUEUE_CONNECTION * Update trusted proxy config * update composer.json * 5.5 command loading * @php and @endphp can't be inline * Laravel 5.6 logging, Nice! * Update blade directives * improved redirects * remove unneeded service providers * Improved debugbar loading * no need to emulate renderable exceptions anymore * merge updated 5.7 files (WIP) * Enable CSRF * database_path() call causes issue in init.php * fix old testcase name * generic phpunit 7 fixes * add missed file_get_contents Keep migrations table content * fix duplicate key * Drop old php versions from travis-ci * remove hhvm * fix code climate message * remove use of deprecated function assertInternalType * Disable CSRF, we'll enable it separately. All forms need to be updated to work. * Update document references
57 lines
1.7 KiB
JavaScript
57 lines
1.7 KiB
JavaScript
|
|
window._ = require('lodash');
|
|
|
|
/**
|
|
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
|
* for JavaScript based Bootstrap features such as modals and tabs. This
|
|
* code may be modified to fit the specific needs of your application.
|
|
*/
|
|
|
|
try {
|
|
window.Popper = require('popper.js').default;
|
|
window.$ = window.jQuery = require('jquery');
|
|
|
|
require('bootstrap');
|
|
} catch (e) {}
|
|
|
|
/**
|
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
|
* to our Laravel back-end. This library automatically handles sending the
|
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
|
*/
|
|
|
|
window.axios = require('axios');
|
|
|
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
|
|
/**
|
|
* Next we will register the CSRF Token as a common header with Axios so that
|
|
* all outgoing HTTP requests automatically have it attached. This is just
|
|
* a simple convenience so we don't have to attach every token manually.
|
|
*/
|
|
|
|
let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
|
|
if (token) {
|
|
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
} else {
|
|
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
|
}
|
|
|
|
/**
|
|
* Echo exposes an expressive API for subscribing to channels and listening
|
|
* for events that are broadcast by Laravel. Echo and event broadcasting
|
|
* allows your team to easily build robust real-time web applications.
|
|
*/
|
|
|
|
// import Echo from 'laravel-echo'
|
|
|
|
// window.Pusher = require('pusher-js');
|
|
|
|
// window.Echo = new Echo({
|
|
// broadcaster: 'pusher',
|
|
// key: process.env.MIX_PUSHER_APP_KEY,
|
|
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
|
// encrypted: true
|
|
// });
|