From c2d0377a8da30a42a7507300ed464926a4350253 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 16 Dec 2019 12:16:21 +0100 Subject: [PATCH 1/4] Revert "RPMBUILD console updated with gotty binary file" Undo Gotty in Pandora Console RPM This reverts commit e43d8914aa83fa1c43d2ad04fc9e4329ded7afa3. --- extras/build_rpm.sh | 12 ------------ extras/build_rpm_redhat.sh | 12 ------------ extras/build_rpm_rhel7.sh | 16 ++-------------- pandora_console/pandora_console.redhat.spec | 4 ---- pandora_console/pandora_console.rhel7.spec | 4 ---- pandora_console/pandora_console.spec | 4 ---- 6 files changed, 2 insertions(+), 50 deletions(-) diff --git a/extras/build_rpm.sh b/extras/build_rpm.sh index 054434de71..f523eeaa7d 100755 --- a/extras/build_rpm.sh +++ b/extras/build_rpm.sh @@ -8,20 +8,8 @@ fi echo "Creating RPM packages in $RPMHOME/RPMS" # Console -# Extra files to be added to rpm. -if [ "$X86_64" == "" ]; then - # Fake gotty. - echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty - chmod +x pandora_console/gotty -else - cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ -fi - rpmbuild -ba $CODEHOME/pandora_console/pandora_console.spec || exit 1 -# Cleanup. -rm -f pandora_console/gotty - # Server rpmbuild -ba $CODEHOME/pandora_server/pandora_server.spec || exit 1 diff --git a/extras/build_rpm_redhat.sh b/extras/build_rpm_redhat.sh index 001120ae4d..7f45bc6773 100755 --- a/extras/build_rpm_redhat.sh +++ b/extras/build_rpm_redhat.sh @@ -8,20 +8,8 @@ fi echo "Creating RPM packages in $RPMHOME/RPMS" # Console -# Extra files to be added to rpm. -if [ "$X86_64" == "" ]; then - # Fake gotty. - echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty - chmod +x pandora_console/gotty -else - cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ -fi - rpmbuild -ba $CODEHOME/pandora_console/pandora_console.redhat.spec || exit 1 -# Cleanup. -rm -f pandora_console/gotty - # Server rpmbuild -ba $CODEHOME/pandora_server/pandora_server.redhat.spec || exit 1 diff --git a/extras/build_rpm_rhel7.sh b/extras/build_rpm_rhel7.sh index 9ddb0aedf7..3684bd42e5 100755 --- a/extras/build_rpm_rhel7.sh +++ b/extras/build_rpm_rhel7.sh @@ -8,25 +8,13 @@ fi echo "Creating RPM packages in $RPMHOME/RPMS" # Console -# Extra files to be added to rpm. -if [ "$X86_64" == "" ]; then - # Fake gotty. - echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty - chmod +x pandora_console/gotty -else - cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ -fi - rpmbuild -ba $CODEHOME/pandora_console/pandora_console.rhel7.spec || exit 1 -# Cleanup. -rm -f pandora_console/gotty - # Server -rpmbuild -ba $CODEHOME/pandora_server/pandora_server.redhat.spec || exit 1 +#rpmbuild -ba $CODEHOME/pandora_server/pandora_server.rhel7.spec || exit 1 # Unix agent -rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec || exit 1 +#rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.rhel7.spec || exit 1 # Enterprise console rpmbuild -ba $PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.rhel7.spec || exit 1 diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index a9e4dc262a..1d2c818edf 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -57,10 +57,6 @@ install -m 0644 pandora_console_logrotate_centos $RPM_BUILD_ROOT%{_sysconfdir}/l rm -rf $RPM_BUILD_ROOT %post -# Install GoTTY binary file. -cp -pf %{prefix}/pandora_console/gotty /usr/bin/ -chmod +x /usr/bin/gotty - # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ chmod +x /etc/init.d/pandora_websocket_engine diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index f8aab6db42..d74a29fa16 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -57,10 +57,6 @@ install -m 0644 pandora_console_logrotate_centos $RPM_BUILD_ROOT%{_sysconfdir}/l rm -rf $RPM_BUILD_ROOT %post -# Install GoTTY binary file. -cp -pf %{prefix}/pandora_console/gotty /usr/bin/ -chmod +x /usr/bin/gotty - # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ chmod +x /etc/init.d/pandora_websocket_engine diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 8017b1f295..96594c4f5b 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -58,10 +58,6 @@ fi rm -rf $RPM_BUILD_ROOT %post -# Install GoTTY binary file. -cp -pf %{prefix}/pandora_console/gotty /usr/bin/ -chmod +x /usr/bin/gotty - # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ chmod +x /etc/init.d/pandora_websocket_engine From 89b97e340e5fd353e81fee052783263c00b179fd Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 16 Dec 2019 12:16:42 +0100 Subject: [PATCH 2/4] Revert "DEBIAN console updated with gotty binary file" Undo GoTTY in Pandora Console DEB packages This reverts commit d370fa560a86cb78f91fad53949a49d59cc847bf. --- extras/build_deb.sh | 11 ----------- pandora_console/DEBIAN/postinst | 3 --- 2 files changed, 14 deletions(-) diff --git a/extras/build_deb.sh b/extras/build_deb.sh index 543469d473..788eb72536 100755 --- a/extras/build_deb.sh +++ b/extras/build_deb.sh @@ -8,19 +8,8 @@ fi echo "Creating DEB packages in $RPMHOME/DEB" # Console -# Extra files to be added to rpm. -if [ "$X86_64" == "" ]; then - # Fake gotty. - echo 'Only x86_64 is supported' > $CODEHOME/pandora_console/gotty - chmod +x pandora_console/gotty -else - cp /root/bin/winexe/x64/gotty $CODEHOME/pandora_console/ -fi cd $CODEHOME/pandora_console/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1 -# Cleanup. -rm -f pandora_console/gotty - # Server cd $CODEHOME/pandora_server/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1 diff --git a/pandora_console/DEBIAN/postinst b/pandora_console/DEBIAN/postinst index f6fe667ff5..a899c6bf0a 100755 --- a/pandora_console/DEBIAN/postinst +++ b/pandora_console/DEBIAN/postinst @@ -10,9 +10,6 @@ if [ -f /etc/init.d/apache2 ]; then echo Restart the apache. /etc/init.d/apache2 restart fi -# Install GoTTY binary file. -cp -pf %{prefix}/pandora_console/gotty /usr/bin/ -chmod +x /usr/bin/gotty # Install pandora_websocket_engine service. cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ From abd2213e71168360b8298a79917f573c8a70a03a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 16 Dec 2019 15:42:54 +0100 Subject: [PATCH 3/4] Menu entry for websocket engine settings --- pandora_console/godmode/menu.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index b1f8685ada..14b66eda3c 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -316,12 +316,8 @@ if (check_acl($config['id_user'], 0, 'PM')) { $sub2['godmode/setup/setup&section=notifications']['text'] = __('Notifications'); $sub2['godmode/setup/setup&section=notifications']['refr'] = 0; - - // Enable only if quickshell is enabled. - if (function_exists('quickShellSettings') === true) { - $sub2['godmode/setup/setup&section=quickshell']['text'] = __('QuickShell'); - $sub2['godmode/setup/setup&section=quickshell']['refr'] = 0; - } + $sub2['godmode/setup/setup&section=websocket_engine']['text'] = __('Websocket Engine'); + $sub2['godmode/setup/setup&section=websocket_engine']['refr'] = 0; if ($config['activate_gis']) { $sub2['godmode/setup/gis']['text'] = __('Map conections GIS'); From 4631d9ea644d8899a310ca883b604d12d8421e31 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 16 Dec 2019 16:48:29 +0100 Subject: [PATCH 4/4] minor style fix --- pandora_console/extensions/quick_shell.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 8228c9f59d..6b70ae21e8 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -398,7 +398,8 @@ function quickShellSettings() $t->width = '100%'; $t->class = 'databox filters'; $t->data = []; - $t->style[0] = 'font-weight: bold'; + $t->style = []; + $t->style[0] = 'font-weight: bold; width: 40%;'; $t->data[0][0] = __('Gotty path'); $t->data[0][1] = html_print_input_text( @@ -445,7 +446,7 @@ function quickShellSettings() $hidden->width = '100%'; $hidden->class = 'databox filters'; $hidden->data = []; - $hidden->style[0] = 'font-weight: bold'; + $hidden->style[0] = 'font-weight: bold;width: 40%;'; $hidden->data[0][0] = __('Gotty user').ui_print_help_tip( __('Optional, set a user to access gotty service'),