Add button in manager to send a test mail (#2293)
This commit is contained in:
parent
99dc799534
commit
022ecdf6f7
|
@ -155,6 +155,7 @@ site/htdocs/static/forms/select.html
|
||||||
site/htdocs/static/forms/sfExtra.html
|
site/htdocs/static/forms/sfExtra.html
|
||||||
site/htdocs/static/forms/sfExtraContainer.html
|
site/htdocs/static/forms/sfExtraContainer.html
|
||||||
site/htdocs/static/forms/simpleInputContainer.html
|
site/htdocs/static/forms/simpleInputContainer.html
|
||||||
|
site/htdocs/static/forms/SMTP.html
|
||||||
site/htdocs/static/forms/text.html
|
site/htdocs/static/forms/text.html
|
||||||
site/htdocs/static/forms/trool.html
|
site/htdocs/static/forms/trool.html
|
||||||
site/htdocs/static/forms/virtualHost.html
|
site/htdocs/static/forms/virtualHost.html
|
||||||
|
|
|
@ -976,6 +976,7 @@ sub tree {
|
||||||
{
|
{
|
||||||
title => 'SMTP',
|
title => 'SMTP',
|
||||||
help => 'smtp.html',
|
help => 'smtp.html',
|
||||||
|
form => 'SMTP',
|
||||||
nodes => [
|
nodes => [
|
||||||
'mailSessionKey',
|
'mailSessionKey',
|
||||||
'SMTPServer',
|
'SMTPServer',
|
||||||
|
|
|
@ -661,6 +661,35 @@ llapp.controller 'TreeCtrl', [
|
||||||
# virtualHost
|
# virtualHost
|
||||||
return if node.type and node.type.match /^(?:s(?:aml(?:(?:ID|S)PMetaDataNod|Attribut)e|fExtra)|(?:(?:cmbMod|r)ul|authChoic)e|(?:virtualHos|keyTex)t|menu(?:App|Cat))$/ then true else false
|
return if node.type and node.type.match /^(?:s(?:aml(?:(?:ID|S)PMetaDataNod|Attribut)e|fExtra)|(?:(?:cmbMod|r)ul|authChoic)e|(?:virtualHos|keyTex)t|menu(?:App|Cat))$/ then true else false
|
||||||
|
|
||||||
|
# Send test Email
|
||||||
|
$scope.sendTestMail = ->
|
||||||
|
$scope.message =
|
||||||
|
title: 'sendTestMail'
|
||||||
|
field: 'dest'
|
||||||
|
$scope.showModal('prompt.html').then ->
|
||||||
|
n= $scope.result
|
||||||
|
$scope.waiting = true
|
||||||
|
dest = $scope.result
|
||||||
|
$http.post("#{window.confPrefix}/sendTestMail", {"dest": dest}).then (response) ->
|
||||||
|
success = response.data.success
|
||||||
|
error = response.data.error
|
||||||
|
$scope.waiting = false
|
||||||
|
if success
|
||||||
|
$scope.message =
|
||||||
|
title: 'ok'
|
||||||
|
message: '__sendTestMailSuccess__'
|
||||||
|
items: []
|
||||||
|
else
|
||||||
|
$scope.message =
|
||||||
|
title: 'error'
|
||||||
|
message: error
|
||||||
|
items: []
|
||||||
|
|
||||||
|
$scope.showModal 'message.html'
|
||||||
|
, readError
|
||||||
|
, ->
|
||||||
|
console.log('Error sending test email')
|
||||||
|
|
||||||
# RSA keys generation
|
# RSA keys generation
|
||||||
$scope.newRSAKey = ->
|
$scope.newRSAKey = ->
|
||||||
$scope.showModal('password.html').then ->
|
$scope.showModal('password.html').then ->
|
||||||
|
|
12
lemonldap-ng-manager/site/htdocs/static/forms/SMTP.html
Normal file
12
lemonldap-ng-manager/site/htdocs/static/forms/SMTP.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">{{translateTitle(currentNode)}}</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/menu">
|
||||||
|
[{
|
||||||
|
"title": "sendTestMail",
|
||||||
|
"action": "sendTestMail",
|
||||||
|
"icon": "envelope"
|
||||||
|
}]
|
||||||
|
</script>
|
|
@ -805,6 +805,42 @@ This file contains:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
$scope.sendTestMail = function() {
|
||||||
|
$scope.message = {
|
||||||
|
title: 'sendTestMail',
|
||||||
|
field: 'dest'
|
||||||
|
};
|
||||||
|
return $scope.showModal('prompt.html').then(function() {
|
||||||
|
var dest, n;
|
||||||
|
n = $scope.result;
|
||||||
|
$scope.waiting = true;
|
||||||
|
dest = $scope.result;
|
||||||
|
return $http.post(window.confPrefix + "/sendTestMail", {
|
||||||
|
"dest": dest
|
||||||
|
}).then(function(response) {
|
||||||
|
var error, success;
|
||||||
|
success = response.data.success;
|
||||||
|
error = response.data.error;
|
||||||
|
$scope.waiting = false;
|
||||||
|
if (success) {
|
||||||
|
$scope.message = {
|
||||||
|
title: 'ok',
|
||||||
|
message: '__sendTestMailSuccess__',
|
||||||
|
items: []
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
$scope.message = {
|
||||||
|
title: 'error',
|
||||||
|
message: error,
|
||||||
|
items: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return $scope.showModal('message.html');
|
||||||
|
}, readError);
|
||||||
|
}, function() {
|
||||||
|
return console.log('Error sending test email');
|
||||||
|
});
|
||||||
|
};
|
||||||
$scope.newRSAKey = function() {
|
$scope.newRSAKey = function() {
|
||||||
return $scope.showModal('password.html').then(function() {
|
return $scope.showModal('password.html').then(function() {
|
||||||
var currentNode, password;
|
var currentNode, password;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"المتغيرات المصدرة",
|
"demoExportedVars":"المتغيرات المصدرة",
|
||||||
"demoParams":"إثبات المعايير",
|
"demoParams":"إثبات المعايير",
|
||||||
"description":"التفاصيل",
|
"description":"التفاصيل",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"المشاهد المختلف",
|
"diffViewer":"المشاهد المختلف",
|
||||||
"diffWithPrevious":"الفرق مع السابق",
|
"diffWithPrevious":"الفرق مع السابق",
|
||||||
"disabled":"معطلة",
|
"disabled":"معطلة",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Second factors",
|
"secondFactors":"Second factors",
|
||||||
"securedCookie":"ملفات تعريف الارتباط المضمونة (سسل)",
|
"securedCookie":"ملفات تعريف الارتباط المضمونة (سسل)",
|
||||||
"security":"الحماية",
|
"security":"الحماية",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"خطأ في جهاز الخادم",
|
"serverError":"خطأ في جهاز الخادم",
|
||||||
"session":"جلسة",
|
"session":"جلسة",
|
||||||
"sessions":"الجلسات",
|
"sessions":"الجلسات",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Exported variables",
|
"demoExportedVars":"Exported variables",
|
||||||
"demoParams":"Demonstration parameters",
|
"demoParams":"Demonstration parameters",
|
||||||
"description":"Beschreibung",
|
"description":"Beschreibung",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Difference viewer",
|
"diffViewer":"Difference viewer",
|
||||||
"diffWithPrevious":"difference with previous",
|
"diffWithPrevious":"difference with previous",
|
||||||
"disabled":"Disabled",
|
"disabled":"Disabled",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Second factors",
|
"secondFactors":"Second factors",
|
||||||
"securedCookie":"Secured Cookie (SSL)",
|
"securedCookie":"Secured Cookie (SSL)",
|
||||||
"security":"Security",
|
"security":"Security",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Server error",
|
"serverError":"Server error",
|
||||||
"session":"session",
|
"session":"session",
|
||||||
"sessions":"Sessions",
|
"sessions":"Sessions",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Exported variables",
|
"demoExportedVars":"Exported variables",
|
||||||
"demoParams":"Demonstration parameters",
|
"demoParams":"Demonstration parameters",
|
||||||
"description":"Description",
|
"description":"Description",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Difference viewer",
|
"diffViewer":"Difference viewer",
|
||||||
"diffWithPrevious":"difference with previous",
|
"diffWithPrevious":"difference with previous",
|
||||||
"disabled":"Disabled",
|
"disabled":"Disabled",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Second factors",
|
"secondFactors":"Second factors",
|
||||||
"securedCookie":"Secured Cookie (SSL)",
|
"securedCookie":"Secured Cookie (SSL)",
|
||||||
"security":"Security",
|
"security":"Security",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Server error",
|
"serverError":"Server error",
|
||||||
"session":"session",
|
"session":"session",
|
||||||
"sessions":"Sessions",
|
"sessions":"Sessions",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Variables exportées",
|
"demoExportedVars":"Variables exportées",
|
||||||
"demoParams":"Paramètres démonstration",
|
"demoParams":"Paramètres démonstration",
|
||||||
"description":"Description",
|
"description":"Description",
|
||||||
|
"dest":"Destinataire",
|
||||||
"diffViewer":"Visualisateur de différence",
|
"diffViewer":"Visualisateur de différence",
|
||||||
"diffWithPrevious":"différence avec la précédente",
|
"diffWithPrevious":"différence avec la précédente",
|
||||||
"disabled":"Désactivé",
|
"disabled":"Désactivé",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Seconds facteurs",
|
"secondFactors":"Seconds facteurs",
|
||||||
"securedCookie":"Cookie sécurisé (HTTPS)",
|
"securedCookie":"Cookie sécurisé (HTTPS)",
|
||||||
"security":"Sécurité",
|
"security":"Sécurité",
|
||||||
|
"sendTestMail":"Test envoi de mail",
|
||||||
|
"sendTestMailSuccess":"Envoi du mail de test réussi",
|
||||||
"serverError":"Erreur du serveur",
|
"serverError":"Erreur du serveur",
|
||||||
"session":"session",
|
"session":"session",
|
||||||
"sessions":"Sessions",
|
"sessions":"Sessions",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Variabili esportate",
|
"demoExportedVars":"Variabili esportate",
|
||||||
"demoParams":"Parametri di dimostrazione",
|
"demoParams":"Parametri di dimostrazione",
|
||||||
"description":"Descrizione",
|
"description":"Descrizione",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Visualizzatore di differenza",
|
"diffViewer":"Visualizzatore di differenza",
|
||||||
"diffWithPrevious":"differenza con il precedente",
|
"diffWithPrevious":"differenza con il precedente",
|
||||||
"disabled":"Disabilitato",
|
"disabled":"Disabilitato",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Secondi fattori",
|
"secondFactors":"Secondi fattori",
|
||||||
"securedCookie":"Cookie protetti (SSL)",
|
"securedCookie":"Cookie protetti (SSL)",
|
||||||
"security":"Sicurezza",
|
"security":"Sicurezza",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Errore del server",
|
"serverError":"Errore del server",
|
||||||
"session":"sessione",
|
"session":"sessione",
|
||||||
"sessions":"Sessioni",
|
"sessions":"Sessioni",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Wyeksportowane zmienne",
|
"demoExportedVars":"Wyeksportowane zmienne",
|
||||||
"demoParams":"Parametry demonstracyjne",
|
"demoParams":"Parametry demonstracyjne",
|
||||||
"description":"Opis",
|
"description":"Opis",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Przeglądarka różnic",
|
"diffViewer":"Przeglądarka różnic",
|
||||||
"diffWithPrevious":"różnica w stosunku do poprzednich",
|
"diffWithPrevious":"różnica w stosunku do poprzednich",
|
||||||
"disabled":"Wyłączone",
|
"disabled":"Wyłączone",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Drugi czynnik",
|
"secondFactors":"Drugi czynnik",
|
||||||
"securedCookie":"Bezpieczne pliki cookie (SSL)",
|
"securedCookie":"Bezpieczne pliki cookie (SSL)",
|
||||||
"security":"Bezpieczeństwo",
|
"security":"Bezpieczeństwo",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Błąd serwera",
|
"serverError":"Błąd serwera",
|
||||||
"session":"sesja",
|
"session":"sesja",
|
||||||
"sessions":"Sesje",
|
"sessions":"Sesje",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Dışa aktarılan değişkenler",
|
"demoExportedVars":"Dışa aktarılan değişkenler",
|
||||||
"demoParams":"Gösterim parametreleri",
|
"demoParams":"Gösterim parametreleri",
|
||||||
"description":"Açıklama",
|
"description":"Açıklama",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Fark görüntüleyici",
|
"diffViewer":"Fark görüntüleyici",
|
||||||
"diffWithPrevious":"önceki ile farkı",
|
"diffWithPrevious":"önceki ile farkı",
|
||||||
"disabled":"Devre dışı",
|
"disabled":"Devre dışı",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"İki faktörlü kimlik doğrulama",
|
"secondFactors":"İki faktörlü kimlik doğrulama",
|
||||||
"securedCookie":"Güvenli Çerez (SSL)",
|
"securedCookie":"Güvenli Çerez (SSL)",
|
||||||
"security":"Güvenlik",
|
"security":"Güvenlik",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Sunucu hatası",
|
"serverError":"Sunucu hatası",
|
||||||
"session":"oturum",
|
"session":"oturum",
|
||||||
"sessions":"Oturumlar",
|
"sessions":"Oturumlar",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Xuất khẩu biến",
|
"demoExportedVars":"Xuất khẩu biến",
|
||||||
"demoParams":"Tham số trình diễn",
|
"demoParams":"Tham số trình diễn",
|
||||||
"description":"Mô tả",
|
"description":"Mô tả",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Người xem khác ",
|
"diffViewer":"Người xem khác ",
|
||||||
"diffWithPrevious":"khác biệt với cái trước",
|
"diffWithPrevious":"khác biệt với cái trước",
|
||||||
"disabled":"Tắt",
|
"disabled":"Tắt",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Second factors",
|
"secondFactors":"Second factors",
|
||||||
"securedCookie":"Cookie bảo mật (SSL)",
|
"securedCookie":"Cookie bảo mật (SSL)",
|
||||||
"security":"An ninh",
|
"security":"An ninh",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Lỗi máy chủ",
|
"serverError":"Lỗi máy chủ",
|
||||||
"session":"phiên",
|
"session":"phiên",
|
||||||
"sessions":"Phiên",
|
"sessions":"Phiên",
|
||||||
|
|
|
@ -272,6 +272,7 @@
|
||||||
"demoExportedVars":"Exported variables",
|
"demoExportedVars":"Exported variables",
|
||||||
"demoParams":"Demonstration parameters",
|
"demoParams":"Demonstration parameters",
|
||||||
"description":"Description",
|
"description":"Description",
|
||||||
|
"dest":"Recipient",
|
||||||
"diffViewer":"Difference viewer",
|
"diffViewer":"Difference viewer",
|
||||||
"diffWithPrevious":"difference with previous",
|
"diffWithPrevious":"difference with previous",
|
||||||
"disabled":"Disabled",
|
"disabled":"Disabled",
|
||||||
|
@ -841,6 +842,8 @@
|
||||||
"secondFactors":"Second factors",
|
"secondFactors":"Second factors",
|
||||||
"securedCookie":"Secured Cookie (SSL)",
|
"securedCookie":"Secured Cookie (SSL)",
|
||||||
"security":"Security",
|
"security":"Security",
|
||||||
|
"sendTestMail":"Send test email",
|
||||||
|
"sendTestMailSuccess":"Test email successfully sent",
|
||||||
"serverError":"Server error",
|
"serverError":"Server error",
|
||||||
"session":"session",
|
"session":"session",
|
||||||
"sessions":"Sessions",
|
"sessions":"Sessions",
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user