Skip to content

Commit

Permalink
Merge pull request #72 from EyesOfNetworkCommunity/itsm_fix
Browse files Browse the repository at this point in the history
5.3-8
  • Loading branch information
davoult authored Oct 15, 2020
2 parents 450477b + baf5b5a commit 0811d99
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
9 changes: 8 additions & 1 deletion appliance/eonweb.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: EyesOfNetwork Web Interface
Name: eonweb
Version: 5.3
Release: 7
Release: 8
Source: https://github.com/EyesOfNetworkCommunity/%{name}/archive/%{version}-%{release}.tar.gz
Group: Applications/System
License: GPL
Expand Down Expand Up @@ -60,6 +60,8 @@ case "$1" in
ln -s /srv/eyesofnetwork/eonweb/themes/EONFlatDark/thruk/EONFlatDark/ /etc/thruk/themes/themes-enabled/EONFlatDark 2>/dev/null
ln -s /srv/eyesofnetwork/eonweb/themes/EONFlatLight/thruk/EONFlatLight/ /etc/thruk/themes/themes-enabled/EONFlatLight 2>/dev/null
systemctl restart httpd
# Update EON 5.3.8
/usr/bin/chown apache:apache /srv/eyesofnetwork/eonweb/module/admin_itsm/uploaded_file
;;
esac

Expand All @@ -75,6 +77,11 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf

%changelog
* Thu Oct 15 2020 Sebastien DAVOULT <[email protected]> - 5.3-8.eon
- fix itsm rights and repositories
- fix theme manager (when using AD)
- fix theme manager (timeout on CSS files)

* Mon Aug 17 2020 Sebastien DAVOULT <[email protected]> - 5.3-7.eon
- fix 'select_tool' access
- fix protect login/logout logs recording
Expand Down
3 changes: 3 additions & 0 deletions appliance/eonwebconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ mysql -u root --password=root66 ${eonwebdb} < ${eonconfdir}/eonweb.sql
# Change DocumentRoot for apache
sed -i 's/^DocumentRoot.*/DocumentRoot\ \"\/srv\/eyesofnetwork\/eonweb\"/g' /etc/httpd/conf/httpd.conf

# Change own user for itsm directory
chown apache:apache /srv/eyesofnetwork/eonweb/module/admin_itsm/uploaded_file

# crons for eon
cp -rf ${eonconfdir}/eonbackup /etc/cron.d/
cp -rf ${eonconfdir}/eondowntime /etc/cron.d/
Expand Down
6 changes: 3 additions & 3 deletions module/admin_itsm/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#########################################
*/

ini_set('display_errors','on');
error_reporting(E_ALL);
//ini_set('display_errors','on');
//error_reporting(E_ALL);
include_once("../../include/config.php");
include_once("../../include/function.php");
include_once("./function_itsm.php");
Expand Down Expand Up @@ -89,7 +89,7 @@

$id = $itsm->save();
if($id > 0 ){
$message .= "<div class=\"alert alert-success\" role=\"alert\">".$itsm->getItsm_url()." succesfully saved. Is id is : ".$id."</div>";
$message .= "<div class=\"alert alert-success\" role=\"alert\">".$itsm->getItsm_url()." succesfully saved.</div>";
}else {
$message .= "<div class=\"alert alert-danger\" role=\"alert\">".$_POST["itsm_url"]." failed to saved.".$id."</div>";
}
Expand Down
1 change: 1 addition & 0 deletions module/admin_itsm/classes/Itsm.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function save(){
$this->maj_vars_db();
$description = "itsm config: " . $this->itsm_url . " was updated";
logging("itsm", $description, $_COOKIE['user_name']);
$result = 1;
}else{
//insert
$prepare = ["ssss", "$this->itsm_url", "$this->itsm_file", "$this->itsm_return_champ", "$this->itsm_type_request"];
Expand Down
4 changes: 2 additions & 2 deletions module/admin_itsm/function_itsm.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function report_itsm($ged_type=NULL, $queue=NULL, $id_ged=NULL, $array_vars=arra

function get_champ_ged($champ, $ged_type, $queue, $id_ged){
global $database_ged;
$prepare =["i", $id_ged];
$prepare =["i", intval($id_ged)];
$sql = "SELECT $champ FROM ".$ged_type."_queue_".$queue." WHERE id = ?";
$result = sqlrequest($database_ged, $sql, false,$prepare);
$event = mysqli_fetch_assoc($result);
Expand All @@ -144,7 +144,7 @@ function get_champ_ged($champ, $ged_type, $queue, $id_ged){
function curl_call($headers,$url,$file,$type="get",$ssl=false){
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, $ssl); // TODO create a variable in database
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );

Expand Down
Empty file.

0 comments on commit 0811d99

Please sign in to comment.