diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1e01dfd308..fd8da983bb 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2009-08-11 Sancho Lerena + + * pandora_console_install: New installer for console. + + * pandora_console.spec, install.php: minimal fixes. + + * pandora.css: Color change for table dual colors. + + * events.php: Added help and removed legend from table bottom. + + * include/help/en/help_eventview.php: Help added. + 2009-08-11 Miguel de Dios * general/header.php: change the short php tags for standar php tags. diff --git a/pandora_console/include/help/en/help_eventview.php b/pandora_console/include/help/en/help_eventview.php new file mode 100644 index 0000000000..d4a9e35aab --- /dev/null +++ b/pandora_console/include/help/en/help_eventview.php @@ -0,0 +1,9 @@ +

Event viewer

+ +

+ +
+

Status

Validated event - Validated event
Event not validated - Event not validated

Actions

Validate event - Validate event
Delete event - Delete event
Create incident from event - Create incident from event
 
+ + + diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 8e0c283ebc..e84109b2e9 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -335,15 +335,15 @@ tr.rowPair { } tr.rowOdd { - background-color: #CFD2D4; + background-color: #EEEEEE; } tr.rowPair:hover { - background-color: #ddd; + background-color: #E0E0E0; } tr.rowOdd:hover { - background-color: #A2A2C2; /*#8F9294;*/ + background-color: #E0E0E0 } .bg { /* op menu */ diff --git a/pandora_console/install.php b/pandora_console/install.php index 972c055c9b..56bb3f4938 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -226,7 +226,7 @@ function install_step2() { echo "

Pandora FMS console installation wizard. Step #2 of 4

-
+
"; echo "

Checking software dependencies

"; echo ""; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 6390cadf82..7b00419126 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -174,6 +174,10 @@ echo ''; echo "

".__('Events')." » ".__('Main event view'). " "; + +echo print_help_icon ("eventview", true); +echo " "; + if ($config["pure"] == 1) { echo ''; print_image ("images/normalscreen.png", false, array ("title" => __('Normal screen'))); @@ -504,37 +508,7 @@ if (!empty ($table->data)) { print_submit_button (__('Delete'), 'delete', false, 'class="sub delete"'); } echo ''; - - if ($config["pure"]== 0) { - //Print legend - echo '
'; - echo '

'.__('Status').'

'; - print_image ("images/pixel_green.png", false, - array ("width" => 10, - "height" => 10, - "title" => __('Validated event'))); - echo ' - '.__('Validated event'); - echo '
'; - print_image ("images/pixel_red.png", false, - array ("width" => 10, - "height" => 10, - "title" => __('Event not validated'))); - echo ' - '.__('Event not validated'); - echo '
'; - echo '

'.__('Actions').'

'; - print_image ("images/ok.png", false, - array ("title" => __('Validate event'))); - echo ' - '.__('Validate event'); - echo '
'; - print_image ("images/cross.png", false, - array ("title" => __('Delete event'))); - echo ' - '.__('Delete event'); - echo '
'; - print_image ("images/page_lightning.png", false, - array ("title" => __('Create incident from event'))); - echo ' - '.__('Create incident from event'); - echo '
 
'; - } + } else { echo '
'.__('No events').'
'; } diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index af23ab3dc1..20fe34f1b9 100755 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -47,12 +47,12 @@ # Evaluate PHP version %define phpver_lt_430 %(out=`rpm -q --queryformat='%{VERSION}' php` 2>&1 >/dev/null || out=0 ; out=`echo $out | tr . : | sed s/://g` ; if [ $out -lt 430 ] ; then out=1 ; else out=0; fi ; echo $out) -Summary: Web Console for Pandora FMS +Summary: Pandora FMS Console Name: %{name} Version: %{version} Release: 1 License: GPL -Vendor: Sancho Lerena +Vendor: Artica ST Source0: %{name}-%{version}.tar.gz URL: http://www.pandorafms.com Group: Productivity/Networking/Web/Utilities @@ -110,7 +110,7 @@ fi %clean rm -rf $RPM_BUILD_ROOT %post -echo "Please, now, point your broswer to http://localhost/pandora_console/install.php and follow all the steps described on it." +echo "Please, now, point your browser to http://your_ip_address/pandora_console/install.php and follow all the steps described on it." # # Has an install already been done, if so we only want to update the files @@ -121,7 +121,7 @@ if [ -f %{prefix}/pandora_console/include/config.php ] ; then mv %{prefix}/pandora_console/install.php %{prefix}/pandora_console/install.done else pear install DB - echo "Please, now, point your broswer to http://localhost/pandora_console/install.php and follow all the steps described on it." + echo "Please, now, point your browser to http://your_IP_address/pandora_console/install.php and follow all the steps described on it." fi %files %defattr(0644,%{httpd_user},%{httpd_group},0755) diff --git a/pandora_console/pandora_console_install b/pandora_console/pandora_console_install new file mode 100755 index 0000000000..4dd6770c71 --- /dev/null +++ b/pandora_console/pandora_console_install @@ -0,0 +1,164 @@ +#!/bin/bash + +# Pandora FMS Console Installer (c) 2008-2009 Artica ST +# Linux Version (generic), for SuSe and Debian/Ubuntu only +# other Linux distros could not work properly without modifications +# Please see http://www.pandorafms.org +# v3.0 Build 090810 +# This code is licensed under GPL 2.0 license. +# ********************************************************************** + +PI_VERSION=3.0.0 +FORCE=0 +LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"` +MODE=$1 + + +get_distro () { + + # Get Linux Distro type and version + if [ -f "/etc/SuSE-release" ] + then + OS_VERSION=`cat /etc/SuSE-release | grep VERSION | cut -f 3 -d " "` + LINUX_DISTRO=SUSE + else + if [ -f "/etc/lsb-release" ] + then + OS_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -f 2 -d "="` + LINUX_DISTRO=UBUNTU + OS_VERSION="UBUNTU $OS_VERSION" + else + if [ -f "/etc/debian_version" ] + then + OS_VERSION=`cat /etc/debian_version` + OS_VERSION="DEBIAN $OS_VERSION" + LINUX_DISTRO=DEBIAN + else + if [ -f "/etc/fedora-release" ] + then + OS_VERSION=`cat /etc/fedora-release | cut -f 4 -d " "` + OS_VERSION="FEDORA $OS_VERSION" + LINUX_DISTRO=FEDORA + else + LINUX_DISTRO=GENERIC + OS_VERSION=`uname -r` + fi + fi + fi + fi + echo $LINUX_DISTRO +} + +uninstall () { + echo "Removing Pandora FMS Console" + rm -Rf $PANDORA_HOME + echo "You need to manually drop pandora database from your Database server" + echo "Done" +} + +install () { + + DISTRO=`get_distro` + OLDFILENAMETMP=`date +"%Y-%m-%d"` + + if [ "$DISTRO" == "UBUNTU" ] + then + PANDORA_HOME=/var/www/pandora + PANDORA_CONF=$PANDORA_HOME/include/config.php + else + PANDORA_HOME=/srv/www/htdocs/pandora + PANDORA_CONF=$PANDORA_HOME/include/config.php + fi + + echo "Detecting Linux distribution: $DISTRO" + + if [ -f $PANDORA_HOME ] && [ "$FORCE" = "0" ] + then + echo "Seems that default dir already exists. Please use --force to" + echo "force installer to install on $PANDORA_HOME" + exit + else + echo "Checking default dir $PANDORA_HOME..." + fi + + # Create directories + echo "Creating Pandora FMS Console home directory at $PANDORA_HOME ..." + mkdir $PANDORA_HOME 2> /dev/null + + # Copying Pandora FMS console + echo "Copying Pandora FMS Console to $PANDORA_HOME.." + cp -R * $PANDORA_HOME + chmod -R 750 $PANDORA_HOME + + # Creating 'pandora' user + id pandora + if [ $? -eq 0 ]; then + echo " " + echo "User pandora does exist, skipping this step" + else + echo "Creating 'pandora' user" + useradd pandora + mkdir /home/pandora 2> /dev/null + mkdir /home/pandora/.ssh 2> /dev/null + chown -R pandora /home/pandora + fi + + #Ownership + if [ "$DISTRO" == "UBUNTU" ] + then + chown -R www-data:root $PANDORA_HOME + chown -R pandora:www-data /var/spool/pandora/ + else + chown -R wwwrun:root $PANDORA_HOME + chown -R pandora:www /var/spool/pandora/ + fi + + echo "Setting secure permissions for Pandora FMS spool dir..." + chmod -R 770 /var/spool/pandora/ + + echo "Done." + echo " " + echo "You have your Pandora FMS console installed on $PANDORA_HOME." + echo " " + echo "Now you can setup your Pandora FMS console and install" + echo "database using a broser and point to: " + echo " " + echo " http://ip_address_of_this_server/pandora/install.php" + echo " " + echo " " +} + +help () { + echo " --force-install To force installation if already installed on system " + echo " --install To install Pandora FMS Console on this system" + echo " " +} + +# Script banner at start +echo " " +echo "Pandora FMS Console Installer $PI_VERSION (c) 2008-2009 ArticaST" +echo "This program is licensed under GPL2 Terms. http://pandorafms.com" +echo " " + +case "$MODE" in + +'--force-install') + FORCE=1 + install + exit + ;; + +'--install') + install + exit + ;; + +'--uninstall') + uninstall + exit + ;; + +*) + help +esac +