diff --git a/plugins/dynamix.docker.manager/include/ContainerSize.php b/plugins/dynamix.docker.manager/include/ContainerSize.php
index 63600b5f2..5a44fe96b 100644
--- a/plugins/dynamix.docker.manager/include/ContainerSize.php
+++ b/plugins/dynamix.docker.manager/include/ContainerSize.php
@@ -12,12 +12,16 @@
?>
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+// add translations
+$_SERVER['REQUEST_URI'] = 'docker';
+require_once "$docroot/webGui/include/Translations.php";
+
require_once "$docroot/webGui/include/Helpers.php";
?>
-Container Size
+=_('Container Size')?>
@@ -55,6 +59,6 @@ $(function(){
-
+
diff --git a/plugins/dynamix.docker.manager/include/Events.php b/plugins/dynamix.docker.manager/include/Events.php
index 11346a9c4..87464df4d 100644
--- a/plugins/dynamix.docker.manager/include/Events.php
+++ b/plugins/dynamix.docker.manager/include/Events.php
@@ -1,7 +1,7 @@
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+// add translations
+$_SERVER['REQUEST_URI'] = 'docker';
+require_once "$docroot/webGui/include/Translations.php";
+
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
$DockerClient = new DockerClient();
@@ -21,7 +25,7 @@ $action = $_REQUEST['action'] ?? '';
$container = $_REQUEST['container'] ?? '';
$name = $_REQUEST['name'] ?? '';
$image = $_REQUEST['image'] ?? '';
-$arrResponse = ['error' => 'Missing parameters'];
+$arrResponse = ['error' => _('Missing parameters')];
switch ($action) {
case 'start':
@@ -66,7 +70,7 @@ switch ($action) {
if (!$since) {
readfile("$docroot/plugins/dynamix.docker.manager/log.htm");
echo "";
- echo "";
+ echo "";
$tail = 350;
} else {
$tail = null;
@@ -99,7 +103,7 @@ switch ($action) {
exec("exec ttyd -o -d0 -i '/var/tmp/$name.sock' docker exec -it '$name' $shell &>/dev/null &");
break;
default:
- $arrResponse = ['error' => "Unknown action '$action'"];
+ $arrResponse = ['error' => _('Unknown action')." '$action'"];
break;
}
diff --git a/plugins/dynamix.docker.manager/include/GetContainerSize.php b/plugins/dynamix.docker.manager/include/GetContainerSize.php
index 8b08878bd..0371e8a71 100644
--- a/plugins/dynamix.docker.manager/include/GetContainerSize.php
+++ b/plugins/dynamix.docker.manager/include/GetContainerSize.php
@@ -1,6 +1,6 @@
+$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+// add translations
+$_SERVER['REQUEST_URI'] = 'docker';
+require_once "$docroot/webGui/include/Translations.php";
+
$unit = ['B','kB','MB','GB','TB','PB','EB','ZB','YB'];
$list = [];
@@ -34,12 +39,12 @@ function align($text, $w=13) {
}
exec("docker ps -sa --format='{{.Names}}|{{.Size}}'",$container);
-echo align('Name',-30).align('Container').align('Writable').align('Log')."\n";
+echo align(_('Name'),-30).align(_('Container')).align(_('Writable')).align(_('Log'))."\n";
echo str_repeat('-',69)."\n";
foreach ($container as $ct) {
- list($name,$size) = explode('|',$ct);
- list($writable,$dummy,$total) = explode(' ',str_replace(['(',')'],'',$size));
- list($value,$base) = explode(' ',gap($total));
+ [$name,$size] = explode('|',$ct);
+ [$writable,$dummy,$total] = explode(' ',str_replace(['(',')'],'',$size));
+ [$value,$base] = explode(' ',gap($total));
$list[] = ['name' => $name, 'total' => $value*pow(1000,array_search($base,$unit)), 'writable' => $writable, 'log' => (exec("docker inspect --format='{{.LogPath}}' $name|xargs du -b 2>/dev/null |cut -f1")) ?: "0"];
}
array_multisort(array_column($list,'total'),SORT_DESC,$list); // sort on container size
diff --git a/plugins/dynamix.vm.manager/VMMachines.page b/plugins/dynamix.vm.manager/VMMachines.page
index 01f8061f4..73e8ab610 100644
--- a/plugins/dynamix.vm.manager/VMMachines.page
+++ b/plugins/dynamix.vm.manager/VMMachines.page
@@ -147,7 +147,7 @@ var sortableHelper = function(e,i){
return i;
};
function loadlist() {
- timers.vm = setTimeout(function(){$('div.spinner.fixed').show('slow');},150);
+ timers.vm = setTimeout(function(){$('div.spinner.fixed').show('slow');},500);
$.get('/plugins/dynamix.vm.manager/include/VMMachines.php',{show:$.cookie('vmshow')},function(d) {
clearTimeout(timers.vm);
var data = d.split(/\0/);
diff --git a/plugins/dynamix/LogButton.page b/plugins/dynamix/LogButton.page
index f9a7f89c0..1a6835868 100644
--- a/plugins/dynamix/LogButton.page
+++ b/plugins/dynamix/LogButton.page
@@ -17,6 +17,6 @@ Code="e936"
?>
diff --git a/plugins/dynamix/scripts/tail_log b/plugins/dynamix/scripts/tail_log
index 20996747b..f793ed18a 100755
--- a/plugins/dynamix/scripts/tail_log
+++ b/plugins/dynamix/scripts/tail_log
@@ -1,7 +1,7 @@
#!/usr/bin/php -q
-echo "ErrorWarningSystemArrayLogin
\n";
-
+session_start();
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+// add translations
+$_SESSION['locale'] = $argv[2];
+$_SERVER['REQUEST_URI'] = '';
+require_once "$docroot/webGui/include/Translations.php";
+
require_once "$docroot/webGui/include/ColorCoding.php";
+echo ""._('Error').""._('Warning').""._('System').""._('Array').""._('Login')."
\n";
+
$handle = popen('/usr/bin/tail -n 40 -f '.escapeshellarg("/var/log/{$argv[1]}").' 2>&1', 'r');
while (!feof($handle)) {
$line = fgets($handle);