redash/client/app/index.js
2017-11-20 17:46:37 +02:00

25 lines
843 B
JavaScript

import ngModule from '@/config';
ngModule.config(($locationProvider, $compileProvider, uiSelectConfig, toastrConfig) => {
$compileProvider.debugInfoEnabled(false);
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|http|data):/);
$locationProvider.html5Mode(true);
uiSelectConfig.theme = 'bootstrap';
Object.assign(toastrConfig, {
positionClass: 'toast-bottom-right',
timeOut: 2000,
});
});
// Update ui-select's template to use Font-Awesome instead of glyphicon.
// eslint-disable-next-line no-unused-vars
ngModule.run(($templateCache, OfflineListener) => {
const templateName = 'bootstrap/match.tpl.html';
let template = $templateCache.get(templateName);
template = template.replace('glyphicon glyphicon-remove', 'fa fa-remove');
$templateCache.put(templateName, template);
});
export default ngModule;