2009-08-11 Sancho Lerena <slerena@artica.es>

* 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1842 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-08-11 17:14:21 +00:00
parent c345808b70
commit b3df6b91a1
7 changed files with 198 additions and 39 deletions

View File

@ -1,3 +1,15 @@
2009-08-11 Sancho Lerena <slerena@artica.es>
* 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 <miguel.dedios@artica.es>
* general/header.php: change the short php tags for standar php tags.

View File

@ -0,0 +1,9 @@
<h1>Event viewer</h1>
<br><br>
<div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;">
<h3>Status</h3><img src="../images/pixel_green.png" title="Validated event" alt="Validated event" width="10" height="10"> - Validated event<br><img src="../images/pixel_red.png" title="Event not validated" alt="Event not validated" width="10" height="10"> - Event not validated</div><div style="padding-left: 30px; width: 150px; float: left; line-height: 17px;"><h3>Actions</h3><img src="../images/ok.png" title="Validate event" alt="Validate event"> - Validate event<br><img src="../images/cross.png" title="Delete event" alt="Delete event"> - Delete event<br><img src="../images/page_lightning.png" title="Create incident from event" alt="Create incident from event"> - Create incident from event</div><div style="clear: both;">&nbsp;</div></div>

View File

@ -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 */

View File

@ -226,7 +226,7 @@ function install_step2() {
echo "
<div id='install_container'>
<h1>Pandora FMS console installation wizard. Step #2 of 4</h1>
<div id='wizard' style='height: 390px;'>
<div id='wizard' style='height: 440px;'>
<div id='install_box'>";
echo "<h2>Checking software dependencies</h2>";
echo "<table border=0 width=230>";

View File

@ -174,6 +174,10 @@ echo '<h3 id="result" style="display:none">&nbsp;</h3>';
echo "<h2>".__('Events')." &raquo; ".__('Main event view'). "&nbsp;";
echo print_help_icon ("eventview", true);
echo "&nbsp;";
if ($config["pure"] == 1) {
echo '<a target="_top" href="'.$url.'&amp;pure=0">';
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 '</div></form>';
if ($config["pure"]== 0) {
//Print legend
echo '<div style="padding-left:30px; width:150px; float:left; line-height:17px;">';
echo '<h3>'.__('Status').'</h3>';
print_image ("images/pixel_green.png", false,
array ("width" => 10,
"height" => 10,
"title" => __('Validated event')));
echo ' - '.__('Validated event');
echo '<br />';
print_image ("images/pixel_red.png", false,
array ("width" => 10,
"height" => 10,
"title" => __('Event not validated')));
echo ' - '.__('Event not validated');
echo '</div><div style="padding-left:30px; width:150px; float:left; line-height:17px;">';
echo '<h3>'.__('Actions').'</h3>';
print_image ("images/ok.png", false,
array ("title" => __('Validate event')));
echo ' - '.__('Validate event');
echo '<br />';
print_image ("images/cross.png", false,
array ("title" => __('Delete event')));
echo ' - '.__('Delete event');
echo '<br />';
print_image ("images/page_lightning.png", false,
array ("title" => __('Create incident from event')));
echo ' - '.__('Create incident from event');
echo '</div><div style="clear:both;">&nbsp;</div>';
}
} else {
echo '<div class="nf">'.__('No events').'</div>';
}

View File

@ -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 <sancho.lerena@artica.es>
Vendor: Artica ST <info@artica.es>
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)

View File

@ -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