Changed the word incident for ticket - #4461
This commit is contained in:
parent
188fce7174
commit
5436df5575
|
@ -55,7 +55,7 @@ if ($has_connection === false) {
|
|||
|
||||
if (get_parameter('update_config', 0) == 1) {
|
||||
// Try to retrieve event response 'Create incident in IntegriaIMS from event' to check if it exists.
|
||||
$event_response_exists = db_get_row_filter('tevent_response', ['name' => io_safe_input('Create incident in IntegriaIMS from event')]);
|
||||
$event_response_exists = db_get_row_filter('tevent_response', ['name' => io_safe_input('Create ticket in IntegriaIMS from event')]);
|
||||
|
||||
// Try to retrieve command 'Integia IMS Ticket' to check if it exists.
|
||||
$command_exists = db_get_row_filter('talert_commands', ['name' => io_safe_input('Integria IMS Ticket')]);
|
||||
|
@ -66,8 +66,8 @@ if (get_parameter('update_config', 0) == 1) {
|
|||
db_process_sql_insert(
|
||||
'tevent_response',
|
||||
[
|
||||
'name' => io_safe_input('Create incident in IntegriaIMS from event'),
|
||||
'description' => io_safe_input('Create an incident in Integria IMS from an event'),
|
||||
'name' => io_safe_input('Create ticket in IntegriaIMS from event'),
|
||||
'description' => io_safe_input('Create a ticket in Integria IMS from an event'),
|
||||
'target' => io_safe_input('index.php?sec=incident&sec2=operation/incidents/configure_integriaims_incident&from_event=_event_id_'),
|
||||
'type' => 'url',
|
||||
'id_group' => '0',
|
||||
|
@ -88,7 +88,7 @@ if (get_parameter('update_config', 0) == 1) {
|
|||
'name' => io_safe_input('Integria IMS Ticket'),
|
||||
'command' => io_safe_input('perl /usr/share/pandora_server/util/integria_rticket.pl -p '.$config['integria_hostname'].'/integria/include/api.php -u '.$config['integria_api_pass'].','.$config['integria_user'].','.$config['integria_pass'].' -create_ticket -name "_field1_" -desc "_field2_" -group _field3_ -priority _field4_ -owner _field5_ -type _field6_'),
|
||||
'internal' => 1,
|
||||
'description' => io_safe_input('Create an incident in Integria IMS'),
|
||||
'description' => io_safe_input('Create a ticket in Integria IMS'),
|
||||
'fields_descriptions' => '["'.io_safe_input('Ticket title').'","'.io_safe_input('Ticket description').'","'.io_safe_input('Ticket group ID').'","'.io_safe_input('Ticket priority').'","'.io_safe_input('Ticket owner').'","'.io_safe_input('Ticket type').'"]',
|
||||
'fields_values' => '["'.io_safe_input($config['incident_title']).'", "'.io_safe_input($config['incident_content']).'", "'.io_safe_input($config['default_group']).'", "'.io_safe_input($config['default_criticity']).'", "'.io_safe_input($config['default_owner']).'", "'.io_safe_input($config['incident_type']).'"]',
|
||||
'fields_hidden' => '["","","","","","","","","",""]',
|
||||
|
@ -144,7 +144,7 @@ if (get_parameter('update_config', 0) == 1) {
|
|||
} else {
|
||||
if ($event_response_exists != false) {
|
||||
// Delete 'Create incident in IntegriaIMS from event' event response if it does exist and IntegriaIMS integration is disabled.
|
||||
db_process_sql_delete('tevent_response', ['name' => io_safe_input('Create incident in IntegriaIMS from event')]);
|
||||
db_process_sql_delete('tevent_response', ['name' => io_safe_input('Create ticket in IntegriaIMS from event')]);
|
||||
}
|
||||
|
||||
if ($command_exists != false) {
|
||||
|
@ -201,7 +201,7 @@ $table_enable->style['name'] = 'font-weight: bold';
|
|||
|
||||
// Enable Integria.
|
||||
$row = [];
|
||||
$row['name'] = __('Enable Integria');
|
||||
$row['name'] = __('Enable Integria IMS');
|
||||
$row['control'] = html_print_checkbox_switch('integria_enabled', 1, $config['integria_enabled'], true);
|
||||
$table_enable->data['integria_enabled'] = $row;
|
||||
|
||||
|
@ -308,7 +308,7 @@ $table_cr_settings->data['custom_response_def_group'] = $row;
|
|||
|
||||
// Custom response default criticity.
|
||||
$row = [];
|
||||
$row['name'] = __('Criticity');
|
||||
$row['name'] = __('Priority');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_criticity_values,
|
||||
'default_criticity',
|
||||
|
@ -428,7 +428,7 @@ if ($has_connection != false) {
|
|||
// Form custom response settings.
|
||||
echo '<div id="form_custom_response_settings">';
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Incident default values').'</legend>';
|
||||
echo '<legend>'.__('Ticket default values').'</legend>';
|
||||
|
||||
html_print_table($table_cr_settings);
|
||||
|
||||
|
|
|
@ -1436,7 +1436,7 @@ function config_update_config()
|
|||
|
||||
case 'integria':
|
||||
if (!config_update_value('integria_enabled', (int) get_parameter('integria_enabled', 0))) {
|
||||
$error_update[] = __('Enable Integria');
|
||||
$error_update[] = __('Enable Integria IMS');
|
||||
}
|
||||
|
||||
if (!config_update_value('integria_user', (string) get_parameter('integria_user', $config['integria_user']))) {
|
||||
|
@ -1464,7 +1464,7 @@ function config_update_config()
|
|||
}
|
||||
|
||||
if (!config_update_value('default_criticity', (int) get_parameter('default_criticity', $config['default_criticity']))) {
|
||||
$error_update[] = __('Integria default criticity');
|
||||
$error_update[] = __('Integria default priority');
|
||||
}
|
||||
|
||||
if (!config_update_value('default_creator', (string) get_parameter('default_creator', $config['default_creator']))) {
|
||||
|
@ -1476,19 +1476,19 @@ function config_update_config()
|
|||
}
|
||||
|
||||
if (!config_update_value('incident_type', (int) get_parameter('incident_type', $config['incident_type']))) {
|
||||
$error_update[] = __('Integria default incident type');
|
||||
$error_update[] = __('Integria default ticket type');
|
||||
}
|
||||
|
||||
if (!config_update_value('incident_status', (int) get_parameter('incident_status', $config['incident_status']))) {
|
||||
$error_update[] = __('Integria default incident status');
|
||||
$error_update[] = __('Integria default ticket status');
|
||||
}
|
||||
|
||||
if (!config_update_value('incident_title', (string) get_parameter('incident_title', $config['incident_title']))) {
|
||||
$error_update[] = __('Integria default incident title');
|
||||
$error_update[] = __('Integria default ticket title');
|
||||
}
|
||||
|
||||
if (!config_update_value('incident_content', (string) get_parameter('incident_content', $config['incident_content']))) {
|
||||
$error_update[] = __('Integria default incident content');
|
||||
$error_update[] = __('Integria default ticket content');
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ function integriaims_tabs($active_tab, $view=false)
|
|||
$url_tabs = ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/');
|
||||
|
||||
$setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image('images/setup.png', true, ['title' => __('Configure Integria IMS')]).'</a>';
|
||||
$list_tab['text'] = '<a href="'.$url_tabs.'list_integriaims_incidents">'.html_print_image('images/list.png', true, ['title' => __('List incidents')]).'</a>';
|
||||
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident">'.html_print_image('images/pencil.png', true, ['title' => __('New incident')]).'</a>';
|
||||
$list_tab['text'] = '<a href="'.$url_tabs.'list_integriaims_incidents">'.html_print_image('images/list.png', true, ['title' => __('Ticket list')]).'</a>';
|
||||
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident">'.html_print_image('images/pencil.png', true, ['title' => __('New ticket')]).'</a>';
|
||||
|
||||
switch ($active_tab) {
|
||||
case 'setup_tab':
|
||||
|
@ -69,8 +69,8 @@ function integriaims_tabs($active_tab, $view=false)
|
|||
}
|
||||
|
||||
if ($view) {
|
||||
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit incident')]).'</a>';
|
||||
$view_tab['text'] = '<a href="'.$url_tabs.'dashboard_detail_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/operation.png', true, ['title' => __('View incident')]).'</a>';
|
||||
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit ticket')]).'</a>';
|
||||
$view_tab['text'] = '<a href="'.$url_tabs.'dashboard_detail_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/operation.png', true, ['title' => __('View ticket')]).'</a>';
|
||||
// When the current page is the View page.
|
||||
if (!$active_tab) {
|
||||
$view_tab['active'] = true;
|
||||
|
@ -83,7 +83,7 @@ function integriaims_tabs($active_tab, $view=false)
|
|||
$onheader['view'] = $view_tab;
|
||||
}
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'PM') && is_user_admin($config['id_user'])) {
|
||||
if (check_acl($config['id_user'], 0, 'PM')) {
|
||||
$onheader['configure'] = $setup_tab;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ function integriaims_tabs($active_tab, $view=false)
|
|||
$onheader['list'] = $list_tab;
|
||||
}
|
||||
|
||||
if ((check_acl($config['id_user'], 0, 'IW') && check_acl($config['id_user'], 0, 'IR'))) {
|
||||
if (check_acl($config['id_user'], 0, 'IW')) {
|
||||
$onheader['create'] = $create_tab;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ $update = (isset($_GET['incident_id']) === true);
|
|||
// Header tabs.
|
||||
$onheader = integriaims_tabs('create_tab', $_GET['incident_id']);
|
||||
if ($update) {
|
||||
ui_print_page_header(__('Update Integria IMS Incident'), '', false, '', false, $onheader);
|
||||
ui_print_page_header(__('Update Integria IMS Ticket'), '', false, '', false, $onheader);
|
||||
} else {
|
||||
ui_print_page_header(__('Create Integria IMS Incident'), '', false, '', false, $onheader);
|
||||
ui_print_page_header(__('Create Integria IMS Ticket'), '', false, '', false, $onheader);
|
||||
}
|
||||
|
||||
// Check if Integria integration enabled.
|
||||
|
@ -237,7 +237,7 @@ $table->data[2][1] .= '<div class="label_select_parent">'.html_print_autocomplet
|
|||
true
|
||||
).'</div>';
|
||||
|
||||
$table->data[1][2] = '<div class="label_select"><p class="input_label">'.__('Criticity').': </p>';
|
||||
$table->data[1][2] = '<div class="label_select"><p class="input_label">'.__('Priority').': </p>';
|
||||
$table->data[1][2] .= '<div class="label_select_parent">'.html_print_select(
|
||||
$integria_criticity_values,
|
||||
'criticity',
|
||||
|
|
|
@ -306,7 +306,7 @@ foreach ($incidents_paginated as $key => $value) {
|
|||
// Show table incidents.
|
||||
ui_pagination(count($array_get_incidents), $url, $offset);
|
||||
if (empty($table->data) === true) {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No incidents to show').'.' ]);
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No tickets to show').'.' ]);
|
||||
} else {
|
||||
html_print_table($table);
|
||||
ui_pagination(count($array_get_incidents), $url, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
|
|
Loading…
Reference in New Issue