wazuh-kibana-app/public/app.js

84 lines
2.4 KiB
JavaScript
Raw Normal View History

/*
* Wazuh app - File for app requirements and set up
* Copyright (C) 2018 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Find more information about this on the LICENSE file.
*/
2016-06-29 01:43:18 +00:00
// Require CSS
2018-06-15 10:42:57 +00:00
import './less/loader';
import { uiModules } from 'ui/modules'
2016-06-29 01:43:18 +00:00
// Set up Wazuh app
2018-06-15 10:42:57 +00:00
const app = uiModules.get('app/wazuh', ['ngCookies', 'ngMaterial']);
2018-03-06 11:03:58 +00:00
app.config(['$compileProvider', function($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|data|blob):/);
2018-03-06 11:03:58 +00:00
}])
app.config(['$httpProvider', function($httpProvider) {
$httpProvider.useApplyAsync(true);
2018-03-06 11:03:58 +00:00
}]);
2016-06-29 01:43:18 +00:00
// Font Awesome, Kibana UI framework and others
2018-06-15 10:42:57 +00:00
import './utils/fontawesome/css/font-awesome.min.css';
import './utils/when-scrolled/when-scrolled.js';
2018-05-08 14:08:12 +00:00
// Dev tools
2018-06-15 10:42:57 +00:00
import './utils/codemirror/codemirror.css'
import './utils/codemirror/foldgutter.css'
import './utils/codemirror/ttcn.css'
import './utils/codemirror/javascript.js'
import './utils/codemirror/brace-fold.js'
import './utils/codemirror/foldcode.js'
import './utils/codemirror/foldgutter.js'
import './utils/codemirror/search-cursor.js'
import './utils/codemirror/mark-selection.js'
2018-05-08 14:08:12 +00:00
// Material
2018-06-15 10:42:57 +00:00
import './../node_modules/angular-material/angular-material.css';
import './../node_modules/angular-aria/angular-aria.js';
import './../node_modules/angular-animate/angular-animate.js';
import './../node_modules/angular-material/angular-material.js';
// Cookies
2018-06-15 10:42:57 +00:00
import './../node_modules/angular-cookies/angular-cookies.min.js';
import 'ui/autoload/all';
import 'ui/chrome';
2017-11-23 10:33:34 +00:00
2018-05-04 10:29:07 +00:00
// Wazuh
2018-06-15 10:42:57 +00:00
import './kibana-integrations'
import './services'
import './controllers'
import './factories'
import './directives'
2018-06-25 07:47:35 +00:00
// Added due to Kibana 6.3.0. Do not modify.
uiModules.get('kibana')
.provider('dashboardConfig', () => {
let hideWriteControls = false;
return {
/**
* Part of the exposed plugin API - do not remove without careful consideration.
* @type {boolean}
*/
turnHideWriteControlsOn() {
hideWriteControls = true;
},
$get() {
return {
getHideWriteControls() {
return hideWriteControls;
}
};
}
};
2018-07-02 07:28:08 +00:00
});