mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-25 07:47:05 +00:00
Fix status check colors, add SMTP relay stub
This commit is contained in:
parent
0d17caccfe
commit
974c9bba61
@ -12,6 +12,9 @@ charset = utf-8
|
|||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.html]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
[Makefile]
|
[Makefile]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@ -20,7 +21,10 @@
|
|||||||
margin-bottom: 1.25em;
|
margin-bottom: 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4 {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -36,6 +40,7 @@
|
|||||||
margin-bottom: 13px;
|
margin-bottom: 13px;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-heading h3 {
|
.panel-heading h3 {
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -47,6 +52,7 @@
|
|||||||
margin-bottom: 13px;
|
margin-bottom: 13px;
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4:first-child {
|
h4:first-child {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
@ -64,8 +70,9 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" href="/admin/assets/bootstrap/css/bootstrap-theme.min.css">
|
<link rel="stylesheet" href="/admin/assets/bootstrap/css/bootstrap-theme.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
|
<body>
|
||||||
|
|
||||||
<!--[if lt IE 8]><p>Internet Explorer version 8 or any modern web browser is required to use this website, sorry.<![endif]-->
|
<!--[if lt IE 8]><p>Internet Explorer version 8 or any modern web browser is required to use this website, sorry.<![endif]-->
|
||||||
<!--[if gt IE 7]><!-->
|
<!--[if gt IE 7]><!-->
|
||||||
@ -73,7 +80,8 @@
|
|||||||
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
|
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
|
||||||
|
data-target=".navbar-collapse">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
@ -89,6 +97,7 @@
|
|||||||
<li><a href="#system_status" onclick="return show_panel(this);">Status Checks</a></li>
|
<li><a href="#system_status" onclick="return show_panel(this);">Status Checks</a></li>
|
||||||
<li><a href="#tls" onclick="return show_panel(this);">TLS (SSL) Certificates</a></li>
|
<li><a href="#tls" onclick="return show_panel(this);">TLS (SSL) Certificates</a></li>
|
||||||
<li><a href="#system_backup" onclick="return show_panel(this);">Backup Status</a></li>
|
<li><a href="#system_backup" onclick="return show_panel(this);">Backup Status</a></li>
|
||||||
|
<li><a href="#smtp_relays" onclick="return show_panel(this);">SMTP Relays</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li class="dropdown-header">Advanced Pages</li>
|
<li class="dropdown-header">Advanced Pages</li>
|
||||||
<li><a href="#custom_dns" onclick="return show_panel(this);">Custom DNS</a></li>
|
<li><a href="#custom_dns" onclick="return show_panel(this);">Custom DNS</a></li>
|
||||||
@ -110,7 +119,8 @@
|
|||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="#" onclick="do_logout(); return false;" style="color: white">Log out</a></li>
|
<li><a href="#" onclick="do_logout(); return false;" style="color: white">Log out</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--/.navbar-collapse -->
|
</div>
|
||||||
|
<!--/.navbar-collapse -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -166,14 +176,16 @@
|
|||||||
</footer>
|
</footer>
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
|
|
||||||
<div id="ajax_loading_indicator" style="display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 100000; text-align: center; background-color: rgba(255,255,255,.75)">
|
<div id="ajax_loading_indicator"
|
||||||
|
style="display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 100000; text-align: center; background-color: rgba(255,255,255,.75)">
|
||||||
<div style="margin: 20% auto">
|
<div style="margin: 20% auto">
|
||||||
<div><span class="fa fa-spinner fa-pulse"></span></div>
|
<div><span class="fa fa-spinner fa-pulse"></span></div>
|
||||||
<div>Loading...</div>
|
<div>Loading...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="global_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="errorModalTitle" aria-hidden="true">
|
<div id="global_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="errorModalTitle"
|
||||||
|
aria-hidden="true">
|
||||||
<div class="modal-dialog modal-sm">
|
<div class="modal-dialog modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -195,22 +207,22 @@
|
|||||||
<script src="/admin/assets/bootstrap/js/bootstrap.min.js"></script>
|
<script src="/admin/assets/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var global_modal_state = null;
|
var global_modal_state = null;
|
||||||
var global_modal_funcs = null;
|
var global_modal_funcs = null;
|
||||||
|
|
||||||
$(function() {
|
$(function () {
|
||||||
$('#global_modal').on('shown.bs.modal', function (e) {
|
$('#global_modal').on('shown.bs.modal', function (e) {
|
||||||
// set focus to first input in the global modal's body
|
// set focus to first input in the global modal's body
|
||||||
var input = $('#global_modal .modal-body input');
|
var input = $('#global_modal .modal-body input');
|
||||||
if (input.length > 0) $(input[0]).focus();
|
if (input.length > 0) $(input[0]).focus();
|
||||||
})
|
})
|
||||||
$('#global_modal .btn-danger').click(function() {
|
$('#global_modal .btn-danger').click(function () {
|
||||||
// Don't take action now. Wait for the modal to be totally hidden
|
// Don't take action now. Wait for the modal to be totally hidden
|
||||||
// so that we don't attempt to show another modal while this one
|
// so that we don't attempt to show another modal while this one
|
||||||
// is closing.
|
// is closing.
|
||||||
global_modal_state = 0; // OK
|
global_modal_state = 0; // OK
|
||||||
})
|
})
|
||||||
$('#global_modal .btn-default').click(function() {
|
$('#global_modal .btn-default').click(function () {
|
||||||
global_modal_state = 1; // Cancel
|
global_modal_state = 1; // Cancel
|
||||||
})
|
})
|
||||||
$('#global_modal').on('hidden.bs.modal', function (e) {
|
$('#global_modal').on('hidden.bs.modal', function (e) {
|
||||||
@ -219,9 +231,9 @@ $(function() {
|
|||||||
if (global_modal_funcs && global_modal_funcs[global_modal_state])
|
if (global_modal_funcs && global_modal_funcs[global_modal_state])
|
||||||
global_modal_funcs[global_modal_state]();
|
global_modal_funcs[global_modal_state]();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
function show_modal_error(title, message, callback) {
|
function show_modal_error(title, message, callback) {
|
||||||
$('#global_modal h4').text(title);
|
$('#global_modal h4').text(title);
|
||||||
$('#global_modal .modal-body').html("<p/>");
|
$('#global_modal .modal-body').html("<p/>");
|
||||||
if (typeof question == 'string') {
|
if (typeof question == 'string') {
|
||||||
@ -237,9 +249,9 @@ function show_modal_error(title, message, callback) {
|
|||||||
global_modal_state = null;
|
global_modal_state = null;
|
||||||
$('#global_modal').modal({});
|
$('#global_modal').modal({});
|
||||||
return false; // handy when called from onclick
|
return false; // handy when called from onclick
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_modal_confirm(title, question, verb, yes_callback, cancel_callback) {
|
function show_modal_confirm(title, question, verb, yes_callback, cancel_callback) {
|
||||||
$('#global_modal h4').text(title);
|
$('#global_modal h4').text(title);
|
||||||
if (typeof question == 'string') {
|
if (typeof question == 'string') {
|
||||||
$('#global_modal .modal-dialog').addClass("modal-sm");
|
$('#global_modal .modal-dialog').addClass("modal-sm");
|
||||||
@ -260,10 +272,10 @@ function show_modal_confirm(title, question, verb, yes_callback, cancel_callback
|
|||||||
global_modal_state = null;
|
global_modal_state = null;
|
||||||
$('#global_modal').modal({});
|
$('#global_modal').modal({});
|
||||||
return false; // handy when called from onclick
|
return false; // handy when called from onclick
|
||||||
}
|
}
|
||||||
|
|
||||||
var ajax_num_executing_requests = 0;
|
var ajax_num_executing_requests = 0;
|
||||||
function ajax_with_indicator(options) {
|
function ajax_with_indicator(options) {
|
||||||
setTimeout("if (ajax_num_executing_requests > 0) $('#ajax_loading_indicator').fadeIn()", 100);
|
setTimeout("if (ajax_num_executing_requests > 0) $('#ajax_loading_indicator').fadeIn()", 100);
|
||||||
function hide_loading_indicator() {
|
function hide_loading_indicator() {
|
||||||
ajax_num_executing_requests--;
|
ajax_num_executing_requests--;
|
||||||
@ -272,14 +284,14 @@ function ajax_with_indicator(options) {
|
|||||||
}
|
}
|
||||||
var old_success = options.success;
|
var old_success = options.success;
|
||||||
var old_error = options.error;
|
var old_error = options.error;
|
||||||
options.success = function(data) {
|
options.success = function (data) {
|
||||||
hide_loading_indicator();
|
hide_loading_indicator();
|
||||||
if (data.status == "error")
|
if (data.status == "error")
|
||||||
show_modal_error("Error", data.message);
|
show_modal_error("Error", data.message);
|
||||||
else if (old_success)
|
else if (old_success)
|
||||||
old_success(data);
|
old_success(data);
|
||||||
};
|
};
|
||||||
options.error = function(jqxhr) {
|
options.error = function (jqxhr) {
|
||||||
hide_loading_indicator();
|
hide_loading_indicator();
|
||||||
if (!old_error)
|
if (!old_error)
|
||||||
show_modal_error("Error", "Something went wrong, sorry.")
|
show_modal_error("Error", "Something went wrong, sorry.")
|
||||||
@ -289,10 +301,10 @@ function ajax_with_indicator(options) {
|
|||||||
ajax_num_executing_requests++;
|
ajax_num_executing_requests++;
|
||||||
$.ajax(options);
|
$.ajax(options);
|
||||||
return false; // handy when called from onclick
|
return false; // handy when called from onclick
|
||||||
}
|
}
|
||||||
|
|
||||||
var api_credentials = ["", ""];
|
var api_credentials = ["", ""];
|
||||||
function api(url, method, data, callback, callback_error) {
|
function api(url, method, data, callback, callback_error) {
|
||||||
// from http://www.webtoolkit.info/javascript-base64.html
|
// from http://www.webtoolkit.info/javascript-base64.html
|
||||||
function base64encode(input) {
|
function base64encode(input) {
|
||||||
_keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
_keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||||
@ -335,7 +347,7 @@ function api(url, method, data, callback, callback_error) {
|
|||||||
processData: typeof data != "string",
|
processData: typeof data != "string",
|
||||||
mimeType: typeof data == "string" ? "text/plain; charset=ascii" : null,
|
mimeType: typeof data == "string" ? "text/plain; charset=ascii" : null,
|
||||||
|
|
||||||
beforeSend: function(xhr) {
|
beforeSend: function (xhr) {
|
||||||
// We don't store user credentials in a cookie to avoid the hassle of CSRF
|
// We don't store user credentials in a cookie to avoid the hassle of CSRF
|
||||||
// attacks. The Authorization header only gets set in our AJAX calls triggered
|
// attacks. The Authorization header only gets set in our AJAX calls triggered
|
||||||
// by user actions.
|
// by user actions.
|
||||||
@ -346,7 +358,7 @@ function api(url, method, data, callback, callback_error) {
|
|||||||
success: callback,
|
success: callback,
|
||||||
error: callback_error || default_error,
|
error: callback_error || default_error,
|
||||||
statusCode: {
|
statusCode: {
|
||||||
403: function(xhr) {
|
403: function (xhr) {
|
||||||
// Credentials are no longer valid. Try to login again.
|
// Credentials are no longer valid. Try to login again.
|
||||||
var p = current_panel;
|
var p = current_panel;
|
||||||
show_panel('login');
|
show_panel('login');
|
||||||
@ -354,11 +366,11 @@ function api(url, method, data, callback, callback_error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var current_panel = null;
|
var current_panel = null;
|
||||||
var switch_back_to_panel = null;
|
var switch_back_to_panel = null;
|
||||||
function show_panel(panelid) {
|
function show_panel(panelid) {
|
||||||
if (panelid.getAttribute)
|
if (panelid.getAttribute)
|
||||||
// we might be passed an HTMLElement <a>.
|
// we might be passed an HTMLElement <a>.
|
||||||
panelid = panelid.getAttribute('href').substring(1);
|
panelid = panelid.getAttribute('href').substring(1);
|
||||||
@ -374,9 +386,9 @@ function show_panel(panelid) {
|
|||||||
switch_back_to_panel = null;
|
switch_back_to_panel = null;
|
||||||
|
|
||||||
return false; // when called from onclick, cancel navigation
|
return false; // when called from onclick, cancel navigation
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function () {
|
||||||
// Recall saved user credentials.
|
// Recall saved user credentials.
|
||||||
if (typeof sessionStorage != 'undefined' && sessionStorage.getItem("miab-cp-credentials"))
|
if (typeof sessionStorage != 'undefined' && sessionStorage.getItem("miab-cp-credentials"))
|
||||||
api_credentials = sessionStorage.getItem("miab-cp-credentials").split(":");
|
api_credentials = sessionStorage.getItem("miab-cp-credentials").split(":");
|
||||||
@ -389,8 +401,9 @@ $(function() {
|
|||||||
} else {
|
} else {
|
||||||
show_panel('login');
|
show_panel('login');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
6
management/templates/smtp-relays.html
Normal file
6
management/templates/smtp-relays.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<h2>SMTP Relays</h2>
|
||||||
|
|
||||||
|
<p>Coming Soon™</p>
|
@ -13,15 +13,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#system-checks .status-error td {
|
#system-checks .status-error td {
|
||||||
color: rgb(180, 0, 0);
|
color: rgb(140, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#system-checks .status-warning td {
|
#system-checks .status-warning td {
|
||||||
color: rgb(180, 180, 0);
|
color: rgb(170, 120, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#system-checks .status-ok td {
|
#system-checks .status-ok td {
|
||||||
color: rgb(0, 180, 0);
|
color: rgb(0, 140, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#system-checks div.extra {
|
#system-checks div.extra {
|
||||||
|
Loading…
Reference in New Issue
Block a user