diff --git a/pandora_console/general/shortcut_bar.php b/pandora_console/general/shortcut_bar.php index f37915b110..124fcc1e92 100644 --- a/pandora_console/general/shortcut_bar.php +++ b/pandora_console/general/shortcut_bar.php @@ -196,7 +196,6 @@ if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM") || check_ac } // Calculate opened incidents (id integria incidents are not enabled) -if ($config['integria_enabled'] == 0) { $shortcut_incidents = sc_get_opened_incidents(); $shortcut_html .= ""; @@ -206,7 +205,6 @@ if ($config['integria_enabled'] == 0) { $shortcut_html .= ""; $num_shortcut_items++; -} if ($num_shortcut_items > 0) { $shortcut_html .= ""; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 8d3d1c7e9f..c5602edca8 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -388,7 +388,7 @@ if ($id_agente) { $total_incidents = agents_get_count_incidents($id_agente); /* Incident tab */ - if ($config['integria_enabled'] == 0 and $total_incidents > 0) { + if ($total_incidents > 0) { $incidenttab['text'] = '' . html_print_image ("images/book_edit.png", true, array ("title" =>__('Incidents'))) . ''; diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index b0267c724b..7a676bb6d3 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -103,82 +103,6 @@ $table->data[17][0] = __('Enable GIS features in Pandora Console'); $table->data[17][1] = __('Yes').'   '.html_print_radio_button ('activate_gis', 1, '', $config["activate_gis"], true).'  '; $table->data[17][1] .= __('No').'   '.html_print_radio_button ('activate_gis', 0, '', $config["activate_gis"], true); -$table->data[18][0] = __('Enable Integria incidents in Pandora Console'); -$table->data[18][1] = __('Yes').'   '.html_print_radio_button ('integria_enabled', 1, '', $config["integria_enabled"], true).'  '; -$table->data[18][1] .= __('No').'   '.html_print_radio_button ('integria_enabled', 0, '', $config["integria_enabled"], true); - -if ($config["integria_enabled"]) { - require_once('include/functions_incidents.php'); - $invent = incidents_call_api( - $config['integria_url'] . "/include/api.php?" . - "user=" . $config['id_user'] . "&" . - "pass=" . io_output_password($config['integria_api_password']) ."&" . - "op=get_inventories"); - $bad_input = false; - // Wrong connection to api, bad password - if (empty($invent)) { - $bad_input = true; - } - - $inventories = array(); - // Right connection but theres is no inventories - if ($invent == 'false') { - unset($invent); - $invent = array(); - } - // Checks if URL is right - else { - $invent = explode("\n",$invent); - } - // Wrong URL - if ((strripos($config['integria_url'], '.php') !== false)) { - $bad_input = true; - } - // Check page result and detect errors - else { - foreach ($invent as $inv) { - if ((stristr($inv, 'ERROR 404') !== false) - OR (stristr($inv, 'Status 404') !== false) - OR (stristr($inv, 'Internal Server Error') !== false)) { - $inventories[""] = __('None'); - $bad_input = true; - break; - } - } - } - $table->data[20][0] = __('Integria URL') . ui_print_help_icon ("integria_url", true); - $table->data[20][1] = html_print_input_text('integria_url', - $config["integria_url"], '', 25, 255, true); - // If something goes wrong - if ($bad_input) { - $table->data[20][1] .= html_print_image('images/error.png', - true, array('title' => __('URL and/or Integria password are incorrect'))); - } - - $table->data[21][0] = __('Integria API password'); - $table->data[21][1] = html_print_input_text('integria_api_password', - io_output_password($config["integria_api_password"]), '', 25, 25, true); - - if (!$bad_input) { - foreach ($invent as $inv) { - if ($inv == '') { - continue; - } - $invexp = explode(',',$inv); - if (count($invexp) > 2) { - if (substr($invexp[1], 0, 1) == '"' - && substr($invexp[1], strlen($invexp[1])-1, 1) == '"') { - $invexp[1] = substr($invexp[1], 1, strlen($invexp[1])-2); - } - - $inventories[$invexp[0]] = $invexp[1]; - } - } - } - $table->data[22][0] = __('Integria inventory'); - $table->data[22][1] = html_print_select($inventories, 'integria_inventory', $config["integria_inventory"], '', '', '', true); -} - $table->data[19][0] = __('Enable Netflow'); $rbt_disabled = false; if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index ff69d159b0..e0c706cd46 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1370,22 +1370,6 @@ function config_process_config () { config_update_value ('saml_path', '/opt/'); } - if (!isset ($config['integria_enabled'])) { - config_update_value ( 'integria_enabled', '0'); - } - - if (!isset ($config['integria_api_password'])) { - config_update_value ( 'integria_api_password', ''); - } - - if (!isset ($config['integria_inventory'])) { - config_update_value ( 'integria_inventory', '0'); - } - - if (!isset ($config['integria_url'])) { - config_update_value ( 'integria_url', ''); - } - if (!isset ($config['autoupdate'])) { config_update_value ( 'autoupdate', 1); } diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index da23b601dd..ffcaf5f3fd 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1068,7 +1068,7 @@ if ($config['activate_gis']) { /* Incident tab */ $total_incidents = agents_get_count_incidents($id_agente); -if ($config['integria_enabled'] == 0 and $total_incidents > 0) { +if ($total_incidents > 0) { $incidenttab['text'] = '' . html_print_image ("images/book_edit.png", true, array ("title" =>__('Incidents'))) . ''; diff --git a/pandora_console/operation/integria_incidents/incident.download_file.php b/pandora_console/operation/integria_incidents/incident.download_file.php deleted file mode 100644 index b57a11cfb8..0000000000 --- a/pandora_console/operation/integria_incidents/incident.download_file.php +++ /dev/null @@ -1,36 +0,0 @@ - diff --git a/pandora_console/operation/integria_incidents/incident.files.php b/pandora_console/operation/integria_incidents/incident.files.php deleted file mode 100644 index dd1cf7f4a2..0000000000 --- a/pandora_console/operation/integria_incidents/incident.files.php +++ /dev/null @@ -1,72 +0,0 @@ -width = "98%"; -$table->class = "databox"; - -$table->data = array(); - -$profiles = array(); -$table->data[0][0] = "".__('File')."
".html_print_input_file ('new_file', true, array('size' => "50%")); - -$table->data[1][0] = "".__('Description')."
".html_print_textarea('description', 3, 6, '' , '', true); - -$form = "
"; -$form .= html_print_table($table, true); -$form .= html_print_submit_button(__('Add'), 'submit_button', false, 'class="sub next"', true); -$form .= html_print_input_hidden('tab', 'files', true); -$form .= html_print_input_hidden('attach_file', '1', true); -$form .= html_print_input_hidden('id_incident', $id_incident, true); -$form .= "
"; - -ui_toggle($form, __('Add a file')); - -unset($table); - -$table->width = "98%"; -$table->class = "databox"; - -$table->head[0] = __('Filename'); -$table->head[1] = __('Timestamp'); -$table->head[2] = __('Description'); -$table->head[3] = __('Size'); -$table->head[4] = __('Delete'); - -$table->data = array(); - -if (isset($result['file'][0]) && is_array($result['file'][0])) { - $files = $result['file']; -} -else { - $files = $result; -} - -$row = 0; -foreach($files as $value) { - $table->data[$row][0] = ''.$value['filename'].''; - $table->data[$row][1] = $value['id_usuario']; - if(is_array($value['description'])) { - $value['description'] = ''; - } - $table->data[$row][2] = $value['description']; - $table->data[$row][3] = $value['size']; - $table->data[$row][4] = "".html_print_image("images/cross.png", true, array('title' => __('Delete file'))).""; - $row++; -} - -html_print_table($table); - -?> diff --git a/pandora_console/operation/integria_incidents/incident.incident.php b/pandora_console/operation/integria_incidents/incident.incident.php deleted file mode 100644 index 7d55bc4aaa..0000000000 --- a/pandora_console/operation/integria_incidents/incident.incident.php +++ /dev/null @@ -1,131 +0,0 @@ -width = "98%"; -$table->class = "databox"; - -$table->data = array(); -$table->colspan[0][0] = 2; -$table->colspan[3][0] = 3; -$table->colspan[4][0] = 3; - -$table->data[0][0] = "".__('Title')."
".html_print_input_text("title", $result['titulo'], '', 80, 255, true); - -$table->data[0][1] = "".__('Creator')."
".$result['id_creator']; - -if (isset($groups)) { - $table->data[1][0] = "".__('Group')."
".html_print_select ($groups, 'group', $result['id_grupo'], '', '', 0, true, false, false); -} - -$table->data[1][1] = "".__('Priority')."
".html_print_select (incidents_get_priorities (), 'priority', $result['prioridad'], '', '', 0, true, false, false); - -if (isset($result['id_incidencia'])) { - $table->data[1][2] = "".__('Assigned user')."
".html_print_select ($users, 'id_user_assigned', $result['id_usuario'], '', '', 0, true, false, false); -} - -if (isset($result['id_incidencia'])) { - $table->data[2][0] = "".__('Resolution')."
".html_print_select ($resolutions, 'resolution', $result['resolution'], '', '', 0, true, false, false); - $table->data[2][1] = "".__('Status')."
".html_print_select ($status, 'status', $result['estado'], '', '', 0, true, false, false); -} - -if (is_array($result['descripcion'])) { - $result['descripcion'] = ""; -} - -$table->data[3][0] = "".__('Description')."
".html_print_textarea("description", 10, 6, $result['descripcion'] , '', true); - -if (isset($result['id_incidencia'])) { - if(is_array($result['epilog'])) { - $result['epilog'] = implode(',', $result['epilog']); - } - $table->data[4][0] = "".__('Resolution epilog')."
".html_print_textarea("epilog", 10, 6, $result['epilog'] , '', true); -} - -if (isset($result['id_incidencia'])) { - echo "
"; - html_print_table($table); - html_print_submit_button(__('Update'), 'submit_button', false, "class='sub upd'"); - html_print_input_hidden('tab', 'incident'); - html_print_input_hidden('update_incident', '1'); - html_print_input_hidden('id_incident', $result['id_incidencia']); - echo "
"; -} -else { - echo "
"; - html_print_table($table); - html_print_submit_button(__('Create'), 'submit_button', false, "class='sub next'"); - html_print_input_hidden('tab', 'list'); - html_print_input_hidden('create_incident', '1'); - echo "
"; -} -?> diff --git a/pandora_console/operation/integria_incidents/incident.list.php b/pandora_console/operation/integria_incidents/incident.list.php deleted file mode 100644 index d9139bce02..0000000000 --- a/pandora_console/operation/integria_incidents/incident.list.php +++ /dev/null @@ -1,141 +0,0 @@ -'; - -echo '
'; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo '
'; -echo "".__('Search string').""; -echo ''; -echo "".__('Status').""; -echo ''; -echo "".__('Group').""; -echo '
'; -html_print_input_text('search_string', $search_string, ''); -echo ''; -html_print_select ($status, 'search_status', $search_status, '', '', 0, false); -echo ''; -if (isset($groups)) { -html_print_select ($groups, 'search_group', $search_group, '', '', 0, false, false, false); -} -echo ''; -html_print_submit_button (__('Search'), '', false, "class='sub search'"); -echo '
'; - -echo ''; - - -// Show headers -$table->width = "98%"; -$table->class = "databox"; -$table->cellpadding = 4; -$table->cellspacing = 4; -$table->head = array (); -$table->data = array (); -$table->size = array (); -$table->align = array (); - -$table->head[0] = __('ID'); -$table->head[1] = __('Incident'); -$table->head[2] = __('Group'); -$table->head[3] = __('Status')."
".__('Resolution').""; -$table->head[4] = __('Priority'); -$table->head[5] = __('Updated')."
".__('Started').""; -$table->head[6] = __('Details'); -$table->head[7] = __('Creator'); -$table->head[8] = __('Owner'); -$table->head[9] = __('Action'); - -$table->align[3] = "center"; -$table->align[4] = "center"; - -if(isset($result['incident'][0]) && is_array($result['incident'][0])) { - $incidents = $result['incident']; -} -else { - $incidents = array($result['incident']); -} - -$rowPair = true; -$iterator = 0; -foreach ($incidents as $row) { - if ($rowPair) - $table->rowclass[$iterator] = 'rowPair'; - else - $table->rowclass[$iterator] = 'rowOdd'; - $rowPair = !$rowPair; - $iterator++; - - $data = array(); - - $data[0] = ''.$row["id_incidencia"].''; - $data[1] = ''.substr(io_safe_output($row["titulo"]),0,45).''; - $data[2] = $groups[$row["id_grupo"]]; - $data[3] = $status[$row["estado"]]."
".$resolutions[$row["resolution"]].""; - $data[4] = incidents_print_priority_img ($row["prioridad"], true); - $data[5] = ui_print_timestamp ($row["actualizacion"], true)."
" . ui_print_timestamp ($row["inicio"], true).""; - $data[6] = $row["workunits_hours"]." ".__('Hours')."
".$row["workunits_count"]." ".__('Workunits'); - $data[7] = !empty($row["id_creator"]) ? $row["id_creator"] : __('None'); - $data[8] = !empty($row["id_usuario"]) ? $row["id_usuario"] : __('None'); - $data[9] = "".html_print_image("images/cross.png", true, array('title' => __('Delete incident')))."".html_print_image("images/config.png", true, array('title' => __('View incident details'))).""; - - array_push ($table->data, $data); -} - -html_print_table ($table); -?> diff --git a/pandora_console/operation/integria_incidents/incident.php b/pandora_console/operation/integria_incidents/incident.php deleted file mode 100755 index 46f538f3ab..0000000000 --- a/pandora_console/operation/integria_incidents/incident.php +++ /dev/null @@ -1,343 +0,0 @@ - array( - 'active' => false, - 'text' => '' . - html_print_image ("images/list.png", true, array ("title" => __('Incidents'))) .''), - 'editor' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/pen.png", true, array ("title" => __('New Incident'))) .'')); -} -else { - $buttons = array( - 'list' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/list.png", true, array ("title" => __('Incidents'))) .''), - 'incident' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/zoom_mc.png", true, array ("title" => __('Incident details'))) .''), - 'workunits' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/star_white.png", true, array ("title" => __('Workunits'))) .''), - 'files' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/save_mc.png", true, array ("title" => __('Files'))) .''), - 'tracking' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/gm_log.png", true, array ("title" => __('Tracking'))) .'')); -} - -$buttons[$tab]['active'] = true; - -ui_print_page_header (__('Incident management'), "images/book_edit.png", false, "", false, $buttons); - -if ($update_incident == 1) { - $values[0] = $id_incident; - $values[1] = urlencode(io_safe_output(get_parameter('title'))); - $values[2] = urlencode(io_safe_output(get_parameter('description'))); - $values[3] = urlencode(io_safe_output(get_parameter('epilog'))); - $values[4] = get_parameter('group'); - $values[5] = get_parameter('priority'); - $values[6] = get_parameter('resolution'); - $values[7] = get_parameter('status'); - $values[8] = get_parameter('id_user_assigned'); - - $params = implode($token, $values); - - $url = $integria_api."&op=update_incident&token=".$token."¶ms=".$params; - - // Call the integria API - $result = incidents_call_api($url); - - $result_array = incidents_xml_to_array($result); - - if ($result_array['data']) { - ui_print_success_message (__("Incident updated")); - } - else { - ui_print_error_message (__("There was a problem updating the incident, please check if any field was modified and the values are correct.")); - } -} - -$create_incident = get_parameter('create_incident', 0); - -if ($create_incident == 1) { - - $values[0] = urlencode(io_safe_output(get_parameter('title'))); - $values[1] = get_parameter('group'); - $values[2] = get_parameter('priority'); - $values[3] = urlencode(io_safe_output(get_parameter('description'))); - $values[4] = $config['integria_inventory']; - - $params = implode($token, $values); - - $url = $integria_api."&op=create_incident&token=".$token."¶ms=".$params; - - // Call the integria API - $result = incidents_call_api($url); - - $result_array = incidents_xml_to_array($result); - - if ($result_array['data']) { - ui_print_success_message (__("Incident created")); - } - else { - ui_print_error_message (__("There was a problem creating incident")); - } -} - -$attach_file = get_parameter('attach_file', 0); - -if ($attach_file == 1) { - if ($_FILES['new_file']['name'] != "" && $_FILES['new_file']['error'] == 0) { - $file_content = file_get_contents($_FILES["new_file"]["tmp_name"]); - - $values[0] = $id_incident; - $values[1] = $_FILES['new_file']['name']; - $values[2] = $_FILES['new_file']['size']; - $values[3] = io_safe_output(get_parameter('description'), __('No description available')); - $values[4] = base64_encode($file_content); - - - $params = implode($token, $values); - - $url = $integria_api."&op=attach_file&token=".$token; - - // Call the integria API - $result = incidents_call_api($url, array('params' => $params)); - - $result_array = incidents_xml_to_array($result); - - if ($result_array['data'] == 0) { - ui_print_success_message (__("File uploaded")); - } - else { - ui_print_error_message (__("There was a problem uploading file")); - } - } - else { - switch ($_FILES['new_file']['error']) { - case 1: - ui_print_error_message (__('File is too big')); - break; - case 3: - ui_print_error_message (__('File was partially uploaded. Please try again')); - break; - case 4: - ui_print_error_message (__('No file was uploaded')); - break; - default: - ui_print_error_message (__('Generic upload error').'(Code: '.$_FILES['new_file']['error'].')'); - break; - } - } -} - -$delete_file = get_parameter('delete_file', 0); - -if ($delete_file != 0 && !$attach_file) { - $url = $integria_api."&op=delete_file¶ms=".$delete_file; - - // Call the integria API - $result = incidents_call_api($url); - - $result = incidents_call_api($url); - - $result_array = incidents_xml_to_array($result); - - if ($result_array['data'] == 0 || $result_array['data'] == -2) { - ui_print_success_message (__("File deleted")); - } - else if ($result_array['data'] == -1) { - ui_print_error_message (__("You user doesn't have enough rights to delete this file")); - } -} - -$delete_incident = get_parameter('delete_incident', 0); - -if ($delete_incident != 0) { - $url = $integria_api."&op=delete_incident¶ms=".$delete_incident; - - // Call the integria API - $result = incidents_call_api($url); - - $result_array = incidents_xml_to_array($result); - - if ($result_array['data']) { - ui_print_success_message (__("Incident deleted")); - } - else { - ui_print_error_message (__("There was a problem deteling incident")); - } -} - -$create_workunit = get_parameter('create_workunit', 0); - -if ($create_workunit == 1) { - $values[0] = $id_incident; - $values[1] = str_replace(" ", "%20", io_safe_output(get_parameter('description'))); - $values[2] = get_parameter('time_used'); - $values[3] = get_parameter('have_cost'); - $values[4] = get_parameter('public'); - $values[5] = get_parameter('profile'); - - $params = implode($token, $values); - - $url = $integria_api."&op=create_workunit&token=".$token."¶ms=".$params; - - // Call the integria API - $result = incidents_call_api($url); - - $result_array = incidents_xml_to_array($result); - - if ($result_array['data']) { - ui_print_success_message (__("Workunit added")); - } - else { - ui_print_error_message (__("There was a problem adding workunit")); - } -} - -$params = array(); - -// Set the url with parameters to call the api -switch ($tab) { - case 'list': - - $search_string = get_parameter('search_string', ""); - $params[0] = $search_string; - - $search_status = get_parameter('search_status', -10); - $params[1] = $search_status; - - $search_group = get_parameter('search_group', 1); - $params[2] = $search_group; - - $params = implode($token,$params); - - $url = $integria_api."&op=get_incidents&token=".$token."¶ms=".$params; - $url_resolutions = $integria_api."&op=get_incidents_resolutions"; - $url_status = $integria_api."&op=get_incidents_status"; - $url_groups = $integria_api."&op=get_groups¶ms=1"; - break; - case 'incident': - case 'editor': - //Request incident information if any - if ($id_incident) { - $url = $integria_api."&op=get_incident_details¶ms=".$id_incident; - } - else { - $url = $integria_api."&op=get_incident_details"; - } - $url_resolutions = $integria_api."&op=get_incidents_resolutions"; - $url_status = $integria_api."&op=get_incidents_status"; - $url_groups = $integria_api."&op=get_groups¶ms=0"; - $url_users = $integria_api."&op=get_users"; - break; - case 'workunits': - $url = $integria_api."&op=get_incident_workunits¶ms=".$id_incident; - break; - case 'files': - $url = $integria_api."&op=get_incident_files¶ms=".$id_incident; - break; - case 'tracking': - $url = $integria_api."&op=get_incident_tracking¶ms=".$id_incident; - break; -} - -if (isset($url)) { - // Call the integria API - $xml = incidents_call_api($url); -} -else { - $xml = ""; -} - -// If is a valid XML, parse it -if (xml_parse(xml_parser_create(), $xml)) { - // Check if xml is empty - if($xml == "\n\n") { - $result = false; - } - else { - $result = incidents_xml_to_array($xml); - } - - if($result == false) { - $result = array(); - } - switch($tab) { - case 'list': - $result_resolutions = incidents_xml_to_array(incidents_call_api($url_resolutions)); - $result_status = incidents_xml_to_array(incidents_call_api($url_status)); - $result_groups = incidents_xml_to_array(incidents_call_api($url_groups)); - require_once('incident.list.php'); - break; - case 'editor': - case 'incident': - $result_resolutions = incidents_xml_to_array(incidents_call_api($url_resolutions)); - $result_status = incidents_xml_to_array(incidents_call_api($url_status)); - $result_groups = incidents_xml_to_array(incidents_call_api($url_groups)); - $result_users = incidents_xml_to_array(incidents_call_api($url_users)); - require_once('incident.incident.php'); - break; - case 'workunits': - require_once('incident.workunits.php'); - break; - case 'files': - require_once('incident.files.php'); - break; - case 'tracking': - require_once('incident.tracking.php'); - break; - } -} -else { - ui_print_error_message(__("There is a error in the message from your Integria or there is not connection.")); -} - -echo '
 
'; -?> diff --git a/pandora_console/operation/integria_incidents/incident.tracking.php b/pandora_console/operation/integria_incidents/incident.tracking.php deleted file mode 100644 index c94791bdc1..0000000000 --- a/pandora_console/operation/integria_incidents/incident.tracking.php +++ /dev/null @@ -1,45 +0,0 @@ -width = "98%"; -$table->class = "databox"; - -$table->head[0] = __('Description'); -$table->head[1] = __('User'); -$table->head[2] = __('Date'); - -$table->data = array(); - -if (isset($result['tracking'][0]) && is_array($result['tracking'][0])) { - $tracking = $result['tracking']; -} -else { - $tracking = $result; -} - -$row = 0; -foreach ($tracking as $value) { - - $table->data[$row][0] = $value['description']; - $table->data[$row][1] = $value['id_user']; - $table->data[$row][2] = $value['timestamp']; - $row++; -} - -html_print_table($table); - -?> diff --git a/pandora_console/operation/integria_incidents/incident.workunits.php b/pandora_console/operation/integria_incidents/incident.workunits.php deleted file mode 100644 index 448015216b..0000000000 --- a/pandora_console/operation/integria_incidents/incident.workunits.php +++ /dev/null @@ -1,67 +0,0 @@ -width = "98%"; -$table->class = "databox"; - -$table->data = array(); -$table->colspan[1][0] = 3; - -$profiles = array(); -$default_time = "0"; -$table->data[0][0] = "".__('Time used')."
".html_print_input_text ('time_used', $default_time, '', 10, 255, true); -$table->data[0][1] = "".__('Have cost')."
".html_print_checkbox ('have_cost', '', false, true); -$table->data[0][2] = "".__('Public')."
".html_print_checkbox ('public', '', true, true); - -$table->data[1][0] = "".__('Description')."
".html_print_textarea('description', 3, 6, '' , '', true); - -$form = "
"; -$form .= html_print_table($table, true); -$form .= html_print_submit_button(__('Add'), 'submit_button', false, 'class="sub next"', true); -$form .= html_print_input_hidden('tab', 'workunits', true); -$form .= html_print_input_hidden('create_workunit', '1', true); -$form .= html_print_input_hidden('id_incident', $id_incident, true); -$form .= html_print_input_hidden('profile', '0', true); -$form .= "
"; - -ui_toggle($form, __('Add workunit')); - -if (isset($result['workunit'][0]) && is_array($result['workunit'][0])) { - $workunits = $result['workunit']; -} -else { - $workunits = $result; -} - -foreach ($workunits as $value) { - $table->width = "98%"; - $table->class = "databox"; - $table->colspan[1][0] = 4; - $table->size[0] = "80%"; - $table->size[1] = "20%"; - - $table->data = array(); - - $table->data[0][0] = $value['id_user'] . " " . __('said') . " " . $value['timestamp']; - $table->data[0][1] = $value['duration'] . " " . __('Hours') . " " . __('Public') . ": " . $value['public']; - - $table->data[1][0] = $value['description']; - - html_print_table($table); -} -?> diff --git a/pandora_console/operation/integria_incidents/incident_statistics.php b/pandora_console/operation/integria_incidents/incident_statistics.php deleted file mode 100755 index 5f98691057..0000000000 --- a/pandora_console/operation/integria_incidents/incident_statistics.php +++ /dev/null @@ -1,62 +0,0 @@ - -

'.__('Incidents by status').'

'; -echo pie3d_graph($config['flash_charts'], $data, 370, 180, - __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size']); - -echo ''; -?> diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 93c2b33e3f..e31ac6ceb7 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -349,15 +349,8 @@ if (check_acl ($config['id_user'], 0, "IR") || check_acl ($config['id_user'], 0, "IW") || check_acl ($config['id_user'], 0, "IM")) { $temp_sec2 = $sec2; - if($config['integria_enabled']) { - $sec2 = "incident"; - $sec2sub = "operation/integria_incidents/incident_statistics"; - } - else { - $sec2 = "incident"; - $sec2sub = "operation/incidents/incident_statistics"; - } - + $sec2 = "incident"; + $sec2sub = "operation/incidents/incident_statistics"; $sub[$sec2]["text"] = __('Incidents'); $sub[$sec2]["id"] = 'Incidents'; $sub[$sec2]["type"] = "direct";