diff --git a/plugins/dynamix.docker.manager/DockerSettings.page b/plugins/dynamix.docker.manager/DockerSettings.page index 7e793a07c..b1a3bc3b1 100644 --- a/plugins/dynamix.docker.manager/DockerSettings.page +++ b/plugins/dynamix.docker.manager/DockerSettings.page @@ -823,15 +823,15 @@ function checkDHCP() { var id = $(this).attr('name'); var pool = $(this).val().split('/'); var base = $('#'+id).text().split('/'); - if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');} - if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');} + if (good && typeof(pool[1])=='undefined') {good = false; swal({title:'_(Missing subnet size)_',text:'_(Pool subnet size is not defined)_',type:'error',confirmButtonText:'_(Ok)_'});} + if (good && pool[1]<=base[1]) {good = false; swal({title:'_(Invalid subnet size)_',text:'_(Pool subnet size is too large)_',type:'error',confirmButtonText:'_(Ok)_'});} if (typeof(pool[1])=='undefined') pool[1] = 0; if (typeof(base[1])=='undefined') base[1] = 32; var toppool = ip2int(pool[0]); var topbase = ip2int(base[0]); var endpool = toppool+Math.pow(2,32-pool[1]); var endbase = topbase+Math.pow(2,32-base[1]); - if (good && (toppool < topbase || endpool > endbase)) {good = false; swal('_(Invalid pool address)_','_(Pool address is out of range)_','error');} + if (good && (toppool < topbase || endpool > endbase)) {good = false; swal({title:'_(Invalid pool address)_',text:'_(Pool address is out of range)_',type:'error',confirmButtonText:'_(Ok)_'});} } }); if (good) $('#settingsForm').find('input[name^="DOCKER_DHCP6_"]').each(function(){ @@ -839,8 +839,8 @@ function checkDHCP() { var id = $(this).attr('name'); var pool = $(this).val().split('/'); var base = $('#'+id).text().split('/'); - if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');} - if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');} + if (good && typeof(pool[1])=='undefined') {good = false; swal({title:'_(Missing subnet size)_',text:'_(Pool subnet size is not defined)_',type:'error',confirmButtonText:'_(Ok)_'});} + if (good && pool[1]<=base[1]) {good = false; swal({title:'_(Invalid subnet size)_',text:'_(Pool subnet size is too large)_',type:'error',confirmButtonText:'_(Ok)_'});} } }); return good; @@ -852,27 +852,27 @@ function checkIP() { $('#settingsForm').find('input[name^="DOCKER_SUBNET_"]').each(function(){ if ($(this).val() && !validIP4.test($(this).val())) error = true; }); - if (error) {swal('_(Invalid IPv4 subnet)_','_(Please enter a valid subnet)_','error'); return false;} + if (error) {swal({title:'_(Invalid IPv4 subnet)_',text:'_(Please enter a valid subnet)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;} $('#settingsForm').find('input[name^="DOCKER_GATEWAY_"]').each(function(){ if ($(this).val() && !validIP4.test($(this).val())) error = true; }); - if (error) {swal('_(Invalid IPv4 gateway)_','_(Please enter a valid gateway)_','error'); return false;} + if (error) {swal({title:'_(Invalid IPv4 gateway)_',text:'_(Please enter a valid gateway)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;} $('#settingsForm').find('input[name^="DOCKER_RANGE_"]').each(function(){ if ($(this).val() && !validIP4.test($(this).val())) error = true; }); - if (error) {swal('_(Invalid IPv4 range)_','_(Please enter a valid range)_','error'); return false;} + if (error) {swal({title:'_(Invalid IPv4 range)_',text:'_(Please enter a valid range)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;} $('#settingsForm').find('input[name^="DOCKER_SUBNET6_"]').each(function(){ if ($(this).val() && !validIP6.test($(this).val())) error = true; }); - if (error) {swal('_(Invalid IPv6 subnet)_','_(Please enter a valid subnet)_','error'); return false;} + if (error) {swal({title:'_(Invalid IPv6 subnet)_',text:'_(Please enter a valid subnet)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;} $('#settingsForm').find('input[name^="DOCKER_GATEWAY6_"]').each(function(){ if ($(this).val() && !validIP6.test($(this).val())) error = true; }); - if (error) {swal('_(Invalid IPv6 gateway)_','_(Please enter a valid gateway)_','error'); return false;} + if (error) {swal({title:'_(Invalid IPv6 gateway)_',text:'_(Please enter a valid gateway)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;} $('#settingsForm').find('input[name^="DOCKER_RANGE6_"]').each(function(){ if ($(this).val() && !validIP6.test($(this).val())) error = true; }); - if (error) {swal('_(Invalid IPv6 range)_','_(Please enter a valid range)_','error'); return false;} + if (error) {swal({title:'_(Invalid IPv6 range)_',text:'_(Please enter a valid range)_',type:'error',confirmButtonText:'_(Ok)_'}); return false;} return true; } function showLogOptions(log) { diff --git a/plugins/dynamix.docker.manager/include/DockerContainers.php b/plugins/dynamix.docker.manager/include/DockerContainers.php index 3e8ae3c1f..6bc73ed9e 100644 --- a/plugins/dynamix.docker.manager/include/DockerContainers.php +++ b/plugins/dynamix.docker.manager/include/DockerContainers.php @@ -48,6 +48,13 @@ $menu = []; $autostart = @file($autostart_file, FILE_IGNORE_NEW_LINES) ?: []; $names = array_map('var_split', $autostart); +function my_lang_log($text) { + global $language; + if (isset($language['healthy'])) $text = str_replace('healthy',$language['healthy'],$text); + if (isset($language['Exited'])) $text = str_replace('Exited',$language['Exited'],$text); + return my_lang(my_lang(_($text),2)); +} + foreach ($containers as $ct) { $name = $ct['Name']; $id = $ct['Id']; @@ -126,19 +133,19 @@ foreach ($containers as $ct) { echo "
(orphan image)
("._('orphan image').")
_(WARNING)_'
+ '
_(A format is NEVER part of a data recovery or disk rebuild process and if done in such circumstances will normally lead to loss of all data on the disks being formatted)_.',
type: "warning",
+ confirmButtonText:'_(Ok)_',
html: true
});
}
diff --git a/plugins/dynamix/CPUvms.page b/plugins/dynamix/CPUvms.page
index 1dc142078..8871dd042 100644
--- a/plugins/dynamix/CPUvms.page
+++ b/plugins/dynamix/CPUvms.page
@@ -72,7 +72,7 @@ function apply(form) {
// step 1: prepare the update and report back the changes
$.post('/webGui/include/UpdateOne.php',args,function(reply){
if (reply.error) {
- swal({type:'error', title:'_(Assignment error)_', text:reply.error},function(){
+ swal({type:'error',title:'_(Assignment error)_',text:reply.error,confirmButtonText:'_(Ok)_'},function(){
$('#wait-'+id).hide();
$(form).find('input[value="_(Done)_"]').val('_(Reset)_').prop('disabled',false).prop('onclick',null).off('click').click(function(){reset($('form[name="'+id+'"]'));});
});
@@ -86,7 +86,7 @@ function apply(form) {
$.post('/webGui/include/UpdateTwo.php',{id:id,name:encodeURI(name)},function(reply){
if (reply.error) {
// report error and reload table
- swal({type:'error', title:'_(Execution error)_', text:reply.error},function(){
+ swal({type:'error',title:'_(Execution error)_',text:reply.error,confirmButtonText:'_(Ok)_'},function(){
$('#wait-'+id).hide();
$('input[value="_(Done)_"]').prop('disabled',false);
reset($('form[name="'+id+'"]'));
diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page
index 39bd763fc..8ddab6426 100644
--- a/plugins/dynamix/DashStats.page
+++ b/plugins/dynamix/DashStats.page
@@ -939,7 +939,7 @@ function toggleView(field,init,view) {
}
function StopArray() {
- swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true},function(){StopArrayNow();});
+ swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){StopArrayNow();});
StopArrayNow();
@@ -950,7 +950,7 @@ function StopArrayNow() {
}
function StartArray() {
- swal({title:'_(Proceed)_?',text:'_(This will start the array)_',type:'warning',showCancelButton:true},function(){StartArrayNow();});
+ swal({title:'_(Proceed)_?',text:'_(This will start the array)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){StartArrayNow();});
StartArrayNow();
@@ -961,7 +961,7 @@ function StartArrayNow() {
}
function Reboot() {
- swal({title:'_(Proceed)_?',text:'_(This will reboot the system)_',type:'warning',showCancelButton:true},function(){RebootNow();});
+ swal({title:'_(Proceed)_?',text:'_(This will reboot the system)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){RebootNow();});
RebootNow();
@@ -972,7 +972,7 @@ function RebootNow() {
}
function Shutdown() {
- swal({title:'_(Proceed)_?',text:'_(This will shutdown the system)_',type:'warning',showCancelButton:true},function(){ShutdownNow();});
+ swal({title:'_(Proceed)_?',text:'_(This will shutdown the system)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){ShutdownNow();});
ShutdownNow();
@@ -985,7 +985,7 @@ function ShutdownNow() {
function Sleep() {
- swal({title:'_(Proceed)_?',text:'_(This will put the system to sleep)_',type:'warning',showCancelButton:true},function(){SleepNow();});
+ swal({title:'_(Proceed)_?',text:'_(This will put the system to sleep)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){SleepNow();});
SleepNow();
diff --git a/plugins/dynamix/DisplaySettings.page b/plugins/dynamix/DisplaySettings.page
index 3d0574d8c..c61dcee81 100644
--- a/plugins/dynamix/DisplaySettings.page
+++ b/plugins/dynamix/DisplaySettings.page
@@ -73,20 +73,20 @@ $(function() {
url:'/webGui/include/FileUpload.php',
beforeEach:function(file) {
if (!file.type.match(/^image\/png/)) {
- swal({title:"_(Warning)_",text:"_(Only PNG images are allowed)_!",type:"warning"});
+ swal({title:"_(Warning)_",text:"_(Only PNG images are allowed)_!",type:"warning",confirmButtonText:'_(Ok)_'});
return false;
}
},
error: function(err, file, i) {
switch (err) {
case 'BrowserNotSupported':
- swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"});
+ swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error",confirmButtonText:'_(Ok)_'});
break;
case 'TooManyFiles':
swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"});
break;
case 'FileTooLarge':
- swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB)_ (524,288 _(bytes)_)",type:"error"});
+ swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB)_ (524,288 _(bytes)_)",type:"error",confirmButtonText:'_(Ok)_'});
break;
}
},
@@ -104,7 +104,7 @@ $(function() {
$('select[name="banner"]').trigger('change');
filename = file.name;
} else {
- swal({title:"_(Upload error)_",text:response,type:"error"});
+ swal({title:"_(Upload error)_",text:response,type:"error",confirmButtonText:'_(Ok)_'});
}
}
});
diff --git a/plugins/dynamix/Eth0.page b/plugins/dynamix/Eth0.page
index 1482623de..354486cb3 100644
--- a/plugins/dynamix/Eth0.page
+++ b/plugins/dynamix/Eth0.page
@@ -97,7 +97,7 @@ function prepareSettings(form) {
$(form).find('input[name^="METRIC:"]').each(function(){metrics.push($(this).val());});
$(form).find('input[name^="METRIC6:"]').each(function(){metrics6.push($(this).val());});
if (metrics.same() || metrics6.same()) {
- swal('Duplicate metrics','List of default gateways contains duplicate metric values','error');
+ swal({title:'Duplicate metrics',text:'List of default gateways contains duplicate metric values',type:'error',confirmButtonText:'_(Ok)_'});
return false;
}
if (form.TYPE.value == 'access') {
@@ -118,7 +118,7 @@ function prepareSettings(form) {
var vlans = [];
$(form).find('input[name^="VLANID:"]').each(function(){vlans.push($(this).val());});
if (vlans.same()) {
- swal('_(VLAN assignment mismatch)_','_(List of VLANs contains duplicate VLAN numbers)_','error');
+ swal({title:'_(VLAN assignment mismatch)_',text:'_(List of VLANs contains duplicate VLAN numbers)_',type:'error',confirmButtonText:'_(Ok)_'});
return false;
}
}
diff --git a/plugins/dynamix/FlashInfo.page b/plugins/dynamix/FlashInfo.page
index 41efaf701..c6c051c35 100644
--- a/plugins/dynamix/FlashInfo.page
+++ b/plugins/dynamix/FlashInfo.page
@@ -37,7 +37,7 @@ function backup() {
$('input[value="_(Creating Flash backup)_..."]').val('_(Flash backup)_');
$('div.spinner').hide('slow');
$('#pleaseWait').hide('slow');
- swal('_(Creation error)_','_(Insufficient free disk space available)_','error');
+ swal({title:'_(Creation error)_',text:'_(Insufficient free disk space available)_',type:'error',confirmButtonText:'_(Ok)_'});
}
});
}
diff --git a/plugins/dynamix/Language.page b/plugins/dynamix/Language.page
index df4ef9bad..dcb55ccaf 100644
--- a/plugins/dynamix/Language.page
+++ b/plugins/dynamix/Language.page
@@ -31,7 +31,7 @@ var keys = {};
function upload(form) {
var language = form.language.value;
if (!language) {
- swal('_(Missing Language)_','_(Please select a language before proceeding)_!','error');
+ swal({title:'_(Missing Language)_',text:'_(Please select a language before proceeding)_!',type:'error',confirmButtonText:'_(Ok)_'});
return;
}
var cmd = form.check.checked ? 'rm' :'add';
@@ -42,7 +42,7 @@ function upload(form) {
var name = list.split(',');
for (var i=0; i < name.length; i++) installed.push(keys[name[i]]);
$('#installed').text(installed.join(', '));
- swal({title:title,text:'_(See)_ _(Display Settings)_ _(to select your language)_',type:'success',html:true});
+ swal({title:title,text:'_(See)_ _(Display Settings)_ _(to select your language)_',type:'success',html:true,confirmButtonText:'_(Ok)_'});
$('#uploadbutton').prop('disabled',true);
}
});
@@ -56,7 +56,7 @@ function getZIPfile(event,form) {
form.file.value = reader.result;
$('#uploadbutton').prop('disabled',false);
} else {
- swal('_(Wrong File Extension)_','_(Only ZIP files are allowed)_','warning');
+ swal({title:'_(Wrong File Extension)_',text:'_(Only ZIP files are allowed)_',type:'warning',confirmButtonText:'_(Ok)_'});
}
};
reader.readAsDataURL(input.files[0]);
diff --git a/plugins/dynamix/ManagementAccess.page b/plugins/dynamix/ManagementAccess.page
index b06a4b4e0..5e3e8591b 100644
--- a/plugins/dynamix/ManagementAccess.page
+++ b/plugins/dynamix/ManagementAccess.page
@@ -58,7 +58,7 @@ function provisionSSL(button) {
var obj = data.responseJSON;
var msg = "_(Sorry, an error occurred in processing your SSL certificate)_. _(The error is)_: "+obj.error+".";
$(button).prop("disabled", false).html(oldlabel);
- swal("_(Oops)_",msg,"error");
+ swal({title:"_(Oops)_",text:msg,type:"error",confirmButtonText:'_(Ok)_'});
};
var success_provision = function(data) {
if (data.bundle) {
@@ -78,7 +78,7 @@ function provisionSSL(button) {
};
var success_rebind_check = function(data) {
$.post("/webGui/include/CertUpload.php",{text:data.bundle,csrf_token:"=$var['csrf_token']?>"},function(data2) {
- swal({title:"",text:msg,type:"success",allowEscapeKey:false},function(){button.form.submit();});
+ swal({title:"",text:msg,type:"success",allowEscapeKey:false,confirmButtonText:'_(Ok)_'},function(){button.form.submit();});
}).fail(failure);
};
$.post("/webGui/include/ProvisionCert.php",success_provision).fail(failure);
@@ -90,11 +90,11 @@ function updateDNS(button) {
var obj = data.responseJSON;
var msg = "_(Sorry, an error occurred updating unraid.net DNS records)_. _(The error is)_: "+obj.error+".";
$(button).prop("disabled", false).html('_(Update DNS)_');
- swal("_(Oops)_",msg,"error");
+ swal({title:"_(Oops)_",text:msg,type:"error",confirmButtonText:'_(Ok)_'});
};
var success = function(data) {
$(button).prop("disabled", false).html('_(Update DNS)_');
- swal("","_(Your local IP address)_ =$internalip?> _(has been updated for unraid.net)_.","success");
+ swal({title:"",text:"_(Your local IP address)_ =$internalip?> _(has been updated for unraid.net)_.",type:"success",confirmButtonText:'_(Ok)_'});
};
$.post("/webGui/include/UpdateDNS.php",success).fail(failure);
}
@@ -111,7 +111,7 @@ function checkPorts(form) {
item.prop('disabled',false);
}
if (list.length > 0) {
- swal({title:'_(Non-recommended port)_'+(list.length>1?'s':''),text:list.join(', ')+'
_(may conflict with well-known services)_',html:true,type:'warning',showCancelButton:true},function(){form.submit();});
+ swal({title:'_(Non-recommended port)_'+(list.length>1?'s':''),text:list.join(', ')+'
_(may conflict with well-known services)_',html:true,type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){form.submit();});
} else {
form.submit();
}
diff --git a/plugins/dynamix/NetworkRules.page b/plugins/dynamix/NetworkRules.page
index 7481976a5..6273f42e3 100644
--- a/plugins/dynamix/NetworkRules.page
+++ b/plugins/dynamix/NetworkRules.page
@@ -50,7 +50,7 @@ function check_rules(form) {
var mac = [];
$(form).find('select[name^="eth"]').each(function(){mac.push($(this).val());});
if (mac.same()) {
- swal('_(MAC address mismatch)_','_(Rules contain duplicate MAC address assignments)_','error');
+ swal({title:'_(MAC address mismatch)_',text:'_(Rules contain duplicate MAC address assignments)_',type:'error',confirmButtonText:'_(Ok)_'});
return false;
} else {
return true;
diff --git a/plugins/dynamix/NewPerms.page b/plugins/dynamix/NewPerms.page
index 83ec09634..c17bbc169 100644
--- a/plugins/dynamix/NewPerms.page
+++ b/plugins/dynamix/NewPerms.page
@@ -44,7 +44,7 @@ function setNewPerms(form) {
dirs += item.value;
}
}
- if (dirs) swal({title:'_(Proceed)_?',text:'_(This will update folder & file permissions)_',type:'warning',showCancelButton:true},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'_(New Permissions)_',490,430,true);});
+ if (dirs) swal({title:'_(Proceed)_?',text:'_(This will update folder & file permissions)_',type:'warning',showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){openBox('/webGui/scripts/newperms&arg1='+dirs,'_(New Permissions)_',490,430,true);});
}
$(function() {
$('#s1').dropdownchecklist({emptyText:'_(None)_', width:=$width[0]?>, firstItemChecksAll:true, explicitClose:'..._(close)_'});
diff --git a/plugins/dynamix/NotificationsArchive.page b/plugins/dynamix/NotificationsArchive.page
index 23f71e7c2..aaa749f42 100644
--- a/plugins/dynamix/NotificationsArchive.page
+++ b/plugins/dynamix/NotificationsArchive.page
@@ -62,7 +62,7 @@ function archiveList(init) {
});
}
function askConfirmation() {
- swal({title:"_(Are you sure)_?",text:"_(This will delete all notification files)_!",type:"warning",showCancelButton:true},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});});
+ swal({title:"_(Are you sure)_?",text:"_(This will delete all notification files)_!",type:"warning",showCancelButton:true,confirmButtonText:'_(Proceed)_',cancelButtonText:'_(Cancel)_'},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});});
}
function openClose(row) {
var extra = '#archive_list .tablesorter-childRow.row'+row+' td';
diff --git a/plugins/dynamix/RoutingTable.page b/plugins/dynamix/RoutingTable.page
index 76272da28..62fe16176 100644
--- a/plugins/dynamix/RoutingTable.page
+++ b/plugins/dynamix/RoutingTable.page
@@ -37,7 +37,7 @@ span.status.vhshift{margin-right:-10px!important}