mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
17 lines
508 B
JavaScript
17 lines
508 B
JavaScript
function controller(clientConfig, currentUser) {
|
|
this.showMailWarning = clientConfig.mailSettingsMissing && currentUser.isAdmin;
|
|
}
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.component('emailSettingsWarning', {
|
|
bindings: {
|
|
function: '<',
|
|
},
|
|
template:
|
|
'<p class="alert alert-danger" ng-if="$ctrl.showMailWarning">It looks like your mail server isn\'t configured. Make sure to configure it for the {{$ctrl.function}} to work.</p>',
|
|
controller,
|
|
});
|
|
}
|
|
|
|
init.init = true;
|