From 4be4444a2f0e0cd38ef084b58352a205f10c92d9 Mon Sep 17 00:00:00 2001
From: AleaJactaEst
Date: Thu, 11 Oct 2018 00:48:24 +0200
Subject: [PATCH] update view Opennel Manager and change terminal header
---
.../stretch/x86_64/build-under-docker.sh | 1 +
.../common/rootweb/opennelmanager_admin.php | 35 +++++++++++--------
.../common/rootweb/opennelmanager_filter.php | 13 ++++---
.../common/rootweb/opennelmanager_player.php | 35 +++++++++++--------
.../servercontainer_configure_launcher.sh | 2 +-
.../servercontainer_init_configure_envi.sh | 14 ++------
6 files changed, 56 insertions(+), 44 deletions(-)
diff --git a/builder/debian/stretch/x86_64/build-under-docker.sh b/builder/debian/stretch/x86_64/build-under-docker.sh
index 514fe42..7fee05f 100755
--- a/builder/debian/stretch/x86_64/build-under-docker.sh
+++ b/builder/debian/stretch/x86_64/build-under-docker.sh
@@ -178,6 +178,7 @@ then
mkdir -p /tmp/pymanager/tmp || exit 2
cp -pr $DIRPYMANAGER/* /tmp/pymanager || exit 2
msg_debug "cd /tmp/pymanager; `which python3` setup.py bdist_wheel -d ${DIRBUILD} -b /tmp"
+ rm -f ${DIRBUILD}/*.whl || exit 2
cd /tmp/pymanager; `which python3` setup.py bdist_wheel -d ${DIRBUILD} -b /tmp/pymanager/tmp || exit 2
fi
diff --git a/server/common/rootweb/opennelmanager_admin.php b/server/common/rootweb/opennelmanager_admin.php
index a8ad93a..0d423f5 100644
--- a/server/common/rootweb/opennelmanager_admin.php
+++ b/server/common/rootweb/opennelmanager_admin.php
@@ -134,26 +134,33 @@ if (file_exists($cfgfile)) {
curl_close($ch);
$data = json_decode($result,true);
ksort($data);
- echo "";
- echo "Line | ";
- foreach ($data as $key => $value)
+ if ( $data )
{
- foreach ($value as $key2 => $value2)
+ echo "";
+ echo "Line | ";
+ foreach ($data as $key => $value)
{
- echo "$key2 | ";
+ ksort($value);
+ foreach ($value as $key2 => $value2)
+ {
+ echo "$key2 | ";
+ }
+ break;
}
- break;
- }
- echo "
";
- foreach ($data as $key => $value)
- {
- echo "$key | ";
- foreach ($value as $key2 => $value2)
+ echo "
";
+ foreach ($data as $key => $value)
{
- echo "$value2 | ";
+ echo "$key | ";
+ ksort($value);
+ foreach ($value as $key2 => $value2)
+ {
+ echo "$value2 | ";
+ }
}
+ echo "
";
+ } else {
+ echo "No admin command executed";
}
- echo "
---|
";
} else {
echo "OpenNelManager not enabled";
}
diff --git a/server/common/rootweb/opennelmanager_filter.php b/server/common/rootweb/opennelmanager_filter.php
index 4241383..376f400 100644
--- a/server/common/rootweb/opennelmanager_filter.php
+++ b/server/common/rootweb/opennelmanager_filter.php
@@ -138,12 +138,17 @@ if (file_exists($cfgfile)) {
{
echo "$key
";
echo "";
- echo "Key | Value |
";
- foreach ($value as $key2 => $value2)
+ if ( $value )
{
- echo "$key2 | $value2 | ";
+ echo "
Key | Value |
";
+ foreach ($value as $key2 => $value2)
+ {
+ echo "$key2 | $value2 | ";
+ }
+ echo "
";
+ } else {
+ echo "Nothing";
}
- echo "";
echo "
";
}
diff --git a/server/common/rootweb/opennelmanager_player.php b/server/common/rootweb/opennelmanager_player.php
index 4f38d04..e53d641 100644
--- a/server/common/rootweb/opennelmanager_player.php
+++ b/server/common/rootweb/opennelmanager_player.php
@@ -134,26 +134,33 @@ if (file_exists($cfgfile)) {
curl_close($ch);
$data = json_decode($result,true);
ksort($data);
- echo "";
- echo "Player | ";
- foreach ($data as $key => $value)
+ if ( $data )
{
- foreach ($value as $key2 => $value2)
+ echo "";
+ echo "Player | ";
+ foreach ($data as $key => $value)
{
- echo "$key2 | ";
+ ksort($value);
+ foreach ($value as $key2 => $value2)
+ {
+ echo "$key2 | ";
+ }
+ break;
}
- break;
- }
- echo "
";
- foreach ($data as $key => $value)
- {
- echo "$key | ";
- foreach ($value as $key2 => $value2)
+ echo "
";
+ foreach ($data as $key => $value)
{
- echo "$value2 | ";
+ echo "$key | ";
+ ksort($value);
+ foreach ($value as $key2 => $value2)
+ {
+ echo "$value2 | ";
+ }
}
+ echo "
";
+ } else {
+ echo "No player connected";
}
- echo "
---|
";
} else {
echo "OpenNelManager not enabled";
diff --git a/server/debian/common/servercontainer_configure_launcher.sh b/server/debian/common/servercontainer_configure_launcher.sh
index 4739a23..9b306c2 100755
--- a/server/debian/common/servercontainer_configure_launcher.sh
+++ b/server/debian/common/servercontainer_configure_launcher.sh
@@ -76,7 +76,7 @@ source /home/gameserver/.bashrc
# opennel-pymanager
####################################
msg_info "[$(basename $0):$LINENO] install/update opennel-pymanager"
-last_pymanager_package=$(ls /opt/ref/pymanager/pymanager*.whl | head -n 1)
+last_pymanager_package=$(ls /opt/ref/pymanager/pymanager*.whl | sort -r | head -n 1)
if [[ -n "$last_pymanager_package" ]]
then
pip3 show pymanager
diff --git a/server/debian/common/servercontainer_init_configure_envi.sh b/server/debian/common/servercontainer_init_configure_envi.sh
index df605ec..0bc8800 100755
--- a/server/debian/common/servercontainer_init_configure_envi.sh
+++ b/server/debian/common/servercontainer_init_configure_envi.sh
@@ -194,17 +194,9 @@ SSH : ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no gameserver
+------------+----------+-------------------+
Use 'sudo bash' to connect on root (ssh/terminal)
-
------------------------------------------
-SCREEN
---------
-+A+N : next windows
-+A+P : previous windows
-+A+0 : windows 0 (terminal)
-+A+1 : windows 1 (AES)
------------------------------------------
-To launch server : go to windows AES and ENTER
------------------------------------------
+---------------------------------------------------
+log khanat server : /home/gameserver/khanat/server/log/log.log
+***************************************************
ENDOFCOMMENT
EOF