Merge a57e4212ee
into a1f033e4c1
This commit is contained in:
commit
42b4058b60
|
@ -2067,13 +2067,16 @@ jQuery(function($){
|
|||
'<a href="#" data-action="delete_selected" data-id="single-syncjob" data-api-url="delete/syncjob" data-item="' + item.id + '" class="btn btn-sm btn-xs-half btn-danger"><i class="bi bi-trash"></i> ' + lang.remove + '</a>' +
|
||||
'</div>';
|
||||
item.chkbox = '<input type="checkbox" data-id="syncjob" name="multi_select" value="' + item.id + '" />';
|
||||
if (item.is_running == 1) {
|
||||
|
||||
if (item.is_running == 1 && item.active == 1) {
|
||||
item.is_running = '<span id="active-script" class="badge fs-6 bg-success">' + lang.running + '</span>';
|
||||
} else {
|
||||
} else if (item.is_running == 0 && item.active == 1) {
|
||||
item.is_running = '<span id="inactive-script" class="badge fs-6 bg-warning">' + lang.waiting + '</span>';
|
||||
} else {
|
||||
item.is_running = '<span id="inactive-script" class="badge fs-6 bg-danger">' + lang.inactive + '</span>';
|
||||
}
|
||||
if (!item.last_run > 0) {
|
||||
item.last_run = lang.waiting;
|
||||
if (!item.last_run) {
|
||||
item.last_run = lang.never;
|
||||
}
|
||||
if (item.success == null) {
|
||||
item.success = '-';
|
||||
|
@ -2142,19 +2145,17 @@ jQuery(function($){
|
|||
data: 'log',
|
||||
defaultContent: ''
|
||||
},
|
||||
{
|
||||
title: lang.active,
|
||||
data: 'active',
|
||||
defaultContent: '',
|
||||
render: function (data, type) {
|
||||
return 1==data?'<i class="bi bi-check-lg"></i>':0==data&&'<i class="bi bi-x-lg"></i>';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: lang.status,
|
||||
data: 'is_running',
|
||||
defaultContent: ''
|
||||
},
|
||||
{
|
||||
title: lang.encryption,
|
||||
data: 'enc1',
|
||||
defaultContent: '',
|
||||
className: 'none'
|
||||
},
|
||||
{
|
||||
title: lang.excludes,
|
||||
data: 'exclude',
|
||||
|
|
|
@ -127,6 +127,13 @@ jQuery(function($){
|
|||
}
|
||||
}
|
||||
|
||||
$(".refresh_table").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var table_name = $(this).data('table');
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#' + table_name))
|
||||
$('#' + table_name).DataTable().ajax.reload();
|
||||
});
|
||||
function draw_tla_table() {
|
||||
// just recalc width if instance already exists
|
||||
if ($.fn.DataTable.isDataTable('#tla_table') ) {
|
||||
|
@ -233,7 +240,6 @@ jQuery(function($){
|
|||
type: "GET",
|
||||
url: '/api/v1/get/syncjobs/' + encodeURIComponent(mailcow_cc_username) + '/no_log',
|
||||
dataSrc: function(data){
|
||||
console.log(data);
|
||||
$.each(data, function (i, item) {
|
||||
item.user1 = escapeHtml(item.user1);
|
||||
item.log = '<a href="#syncjobLogModal" data-bs-toggle="modal" data-syncjob-id="' + item.id + '">' + lang.open_logs + '</a>'
|
||||
|
@ -254,13 +260,15 @@ jQuery(function($){
|
|||
item.action = '<span>-</span>';
|
||||
item.chkbox = '<input type="checkbox" disabled />';
|
||||
}
|
||||
if (item.is_running == 1) {
|
||||
if (item.is_running == 1 && item.active == 1) {
|
||||
item.is_running = '<span id="active-script" class="badge fs-6 bg-success">' + lang.running + '</span>';
|
||||
} else {
|
||||
} else if (item.is_running == 0 && item.active == 1) {
|
||||
item.is_running = '<span id="inactive-script" class="badge fs-6 bg-warning">' + lang.waiting + '</span>';
|
||||
} else {
|
||||
item.is_running = '<span id="disabled-script" class="badge fs-6 bg-danger">' + lang.inactive + '</span>';
|
||||
}
|
||||
if (!item.last_run > 0) {
|
||||
item.last_run = lang.waiting;
|
||||
if (!item.last_run) {
|
||||
item.last_run = lang.never;
|
||||
}
|
||||
if (item.success == null) {
|
||||
item.success = '-';
|
||||
|
@ -329,14 +337,6 @@ jQuery(function($){
|
|||
data: 'log',
|
||||
defaultContent: ''
|
||||
},
|
||||
{
|
||||
title: lang.active,
|
||||
data: 'active',
|
||||
defaultContent: '',
|
||||
render: function (data, type) {
|
||||
return 1==data?'<i class="bi bi-check-lg"></i>':0==data&&'<i class="bi bi-x-lg"></i>'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: lang.status,
|
||||
data: 'is_running',
|
||||
|
@ -346,17 +346,20 @@ jQuery(function($){
|
|||
{
|
||||
title: lang.encryption,
|
||||
data: 'enc1',
|
||||
defaultContent: ''
|
||||
defaultContent: '',
|
||||
className: 'none'
|
||||
},
|
||||
{
|
||||
title: lang.excludes,
|
||||
data: 'exclude',
|
||||
defaultContent: ''
|
||||
defaultContent: '',
|
||||
className: 'none'
|
||||
},
|
||||
{
|
||||
title: lang.interval + " (min)",
|
||||
data: 'mins_interval',
|
||||
defaultContent: ''
|
||||
defaultContent: '',
|
||||
className: 'none'
|
||||
},
|
||||
{
|
||||
title: lang.action,
|
||||
|
|
|
@ -777,6 +777,7 @@
|
|||
"edit": "Bearbeiten",
|
||||
"empty": "Keine Einträge vorhanden",
|
||||
"enable_x": "Aktivieren",
|
||||
"encryption": "Verschlüsselung",
|
||||
"excludes": "Ausschlüsse",
|
||||
"filter_table": "Filtern",
|
||||
"filters": "Filter",
|
||||
|
@ -1181,6 +1182,7 @@
|
|||
"recent_successful_connections": "Kürzlich erfolgreiche Verbindungen",
|
||||
"remove": "Entfernen",
|
||||
"running": "Wird ausgeführt",
|
||||
"inactive": "Inaktiv",
|
||||
"save": "Änderungen speichern",
|
||||
"save_changes": "Änderungen speichern",
|
||||
"sender_acl_disabled": "<span class=\"badge fs-6 bg-danger\">Absenderprüfung deaktiviert</span>",
|
||||
|
@ -1226,7 +1228,7 @@
|
|||
"user_settings": "Benutzereinstellungen",
|
||||
"username": "Benutzername",
|
||||
"verify": "Verifizieren",
|
||||
"waiting": "Warte auf Ausführung",
|
||||
"waiting": "Wartend",
|
||||
"week": "Woche",
|
||||
"weekly": "Wöchentlich",
|
||||
"weeks": "Wochen",
|
||||
|
|
|
@ -779,6 +779,7 @@
|
|||
"edit": "Edit",
|
||||
"empty": "No results",
|
||||
"enable_x": "Enable",
|
||||
"encryption": "Encryption",
|
||||
"excludes": "Excludes",
|
||||
"filter_table": "Filter table",
|
||||
"filters": "Filters",
|
||||
|
@ -1143,6 +1144,7 @@
|
|||
"hour": "hour",
|
||||
"hourly": "Hourly",
|
||||
"hours": "hours",
|
||||
"inactive": "Inactive",
|
||||
"in_use": "Used",
|
||||
"interval": "Interval",
|
||||
"is_catch_all": "Catch-all for domain/s",
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
<button class="btn d-md-none flex-grow-1 text-start" data-bs-target="#collapse-tab-Syncjobs" data-bs-toggle="collapse" aria-controls="collapse-tab-Syncjobs">
|
||||
{{ lang.user.sync_jobs }}
|
||||
</button>
|
||||
<span class="d-none d-md-block">{{ lang.user.sync_jobs }}
|
||||
<span class="d-none d-md-block">{{ lang.user.sync_jobs }} <span class="badge bg-info table-lines"></span></span>
|
||||
|
||||
<div class="btn-group ms-auto d-flex">
|
||||
<button class="btn btn-xs btn-secondary refresh_table" data-draw="draw_sync_job_table" data-table="sync_job_table">{{ lang.admin.refresh }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse-tab-Syncjobs" class="card-body collapse" data-bs-parent="#user-content">
|
||||
<div class="mass-actions-user mb-4">
|
||||
|
|
Loading…
Reference in New Issue