From 375bfca6ff944ab1d0e06f21c005224dbe276b6b Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Fri, 20 Sep 2019 12:27:36 +0200 Subject: [PATCH] New view - Dashboard details of Integria IMS tickets - #4644 --- .../include/styles/integriaims.css | 95 ++++++++ pandora_console/include/styles/pandora.css | 11 - .../dashboard_detail_integriaims_incident.php | 217 ++++++++++++++++++ .../incidents/list_integriaims_incidents.php | 9 +- 4 files changed, 319 insertions(+), 13 deletions(-) create mode 100644 pandora_console/include/styles/integriaims.css create mode 100644 pandora_console/operation/incidents/dashboard_detail_integriaims_incident.php diff --git a/pandora_console/include/styles/integriaims.css b/pandora_console/include/styles/integriaims.css new file mode 100644 index 0000000000..420873c90c --- /dev/null +++ b/pandora_console/include/styles/integriaims.css @@ -0,0 +1,95 @@ +/* --- Integria IMS --- */ +div.priority { + width: 80px; + color: #fff; + text-align: center; + border-radius: 5px; + padding: 5px; + display: table-cell; + vertical-align: middle; +} + +/* Details view */ +div.integria_details { + display: grid; + grid-column-gap: 10px; + grid-template-columns: repeat(3, 1fr); + grid-auto-rows: 1fr; +} + +div.integria_details div.box-shadow.white_table_graph { + box-shadow: none; +} + +div.integria_details div.priority { + display: inline-block; +} + +div.integriaims_details_row { + display: grid; + grid-gap: 10px; + text-align: center; + margin-top: 8px; + margin-bottom: 8px; +} + +div.integriaims_details_titles { + font-weight: bold; +} + +div.integria_details_row_five { + grid-template-columns: repeat(5, 1fr); +} + +div.integria_details_row_three { + grid-template-columns: repeat(3, 1fr); +} + +div.integria_details_description { + width: 100%; + background-color: #fbfbfb; + border: 1px solid #cbcbcb; + border-radius: 3px; + padding: 5px 10px 5px 5px; + min-height: 100px; +} + +.integriaims_details_box { + display: grid; + grid-column-gap: 10px; + grid-row-gap: 5px; + align-items: center; + width: 100%; + text-align: center; +} + +.integriaims_details_box_five { + grid-template-rows: repeat(3, 1fr); + grid-template-columns: repeat(5, 1fr); +} + +.integriaims_details_box_three { + grid-template-rows: repeat(3, 1fr); + grid-template-columns: repeat(3, 1fr); +} + +/* ui_toggles */ +.integria_details_shadow { + background-color: #fff; + border-bottom: 1px solid #e2e2e2; + border-left: 1px solid #e2e2e2; + border-top-left-radius: 5px; + border-right: 1px solid #e2e2e2; + border-top-right-radius: 5px; +} + +.integria_details_shadow .white_table_graph_header { + border-left: none; + border-right: none; +} + +.integria_details_content { + border-bottom: none; + border-left: none; + border-right: none; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index e27b32b3f7..576011ba16 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5903,14 +5903,3 @@ table.table_modal_alternate tr td:first-child { .fullwidth { width: 100%; } - -/* Class for integria incidents */ -div.priority { - width: 80px; - color: #fff; - text-align: center; - border-radius: 5px; - padding: 5px; - display: table-cell; - vertical-align: middle; -} diff --git a/pandora_console/operation/incidents/dashboard_detail_integriaims_incident.php b/pandora_console/operation/incidents/dashboard_detail_integriaims_incident.php new file mode 100644 index 0000000000..fb26b3b118 --- /dev/null +++ b/pandora_console/operation/incidents/dashboard_detail_integriaims_incident.php @@ -0,0 +1,217 @@ +'; +$details_box .= ' +
'.__('Status').'
+
'.__('Resolution').'
+
'.__('Group').'
+
'.__('Priority').'
+
'.__('Type').'
'; +$details_box .= ' +
'.html_print_image('images/heart.png', true).'
+
'.html_print_image('images/builder.png', true).'
+
'.html_print_image('images/user_green.png', true).'
+
'.ui_print_integria_incident_priority($priority, $priority_incident[$priority]).'
+
'.html_print_image('images/incidents.png', true).'
'; +$details_box .= ' +
'.$status_text.'
+
'.$resolution_text.'
+
'.$group_text.'
+
'.$priority_text.'
+
'.$type_text.'
'; +$details_box .= ''; + + +// People box. +$people_box = '
'; +$people_box .= ' +
'.html_print_image('images/header_user_green.png', true, ['width' => '21']).'
+
'.html_print_image('images/header_user_green.png', true, ['width' => '21']).'
+
'.html_print_image('images/header_user_green.png', true, ['width' => '21']).'
'; +$people_box .= ' +
'.__('Created by').':
+
'.__('Owned by').':
+
'.__('Closed by').':
'; +$people_box .= ' +
'.$creator.'
+
'.$owner.'
+
'.$closed_by.'
'; +$people_box .= '
'; + + +// Dates box. +$dates_box = '
'; +$dates_box .= ' +
'.html_print_image('images/tick.png', true).'
+
'.html_print_image('images/update.png', true, ['width' => '21']).'
+
'.html_print_image('images/mul.png', true).'
'; +$dates_box .= ' +
'.__('Created at').':
+
'.__('Updated at').':
+
'.__('Closed at').':
'; +$dates_box .= ' +
'.$created_at.'
+
'.$updated_at.'
+
'.$closed_at.'
'; +$dates_box .= '
'; + + +// Show details, people and dates. +echo '
'; + ui_toggle($details_box, __('Details'), '', 'details_box', false, false, '', 'integria_details_content white-box-content', 'integria_details_shadow box-shadow white_table_graph'); + ui_toggle($people_box, __('People'), '', 'people_box', false, false, '', 'integria_details_content white-box-content', 'integria_details_shadow box-shadow white_table_graph'); + ui_toggle($dates_box, __('Dates'), '', 'dates_box', false, false, '', 'integria_details_content white-box-content', 'integria_details_shadow box-shadow white_table_graph'); +echo '
'; + + // Show description. +$description_box = '
'.$description.'
'; +ui_toggle($description_box, __('Description'), '', '', false); + +?> + \ No newline at end of file diff --git a/pandora_console/operation/incidents/list_integriaims_incidents.php b/pandora_console/operation/incidents/list_integriaims_incidents.php index 428693e39f..0dd2bd20a4 100644 --- a/pandora_console/operation/incidents/list_integriaims_incidents.php +++ b/pandora_console/operation/incidents/list_integriaims_incidents.php @@ -39,6 +39,9 @@ if ($has_connection === false) { return; } +// Styles. +ui_require_css_file('integriaims'); + // Get parameters for filters. $incident_text = (string) get_parameter('incident_text', ''); $incident_status = (int) get_parameter('incident_status', 0); @@ -283,11 +286,13 @@ foreach ($incidents_paginated as $key => $value) { } $table->data[$i][0] = '#'.$array_get_incidents[$key][0]; - $table->data[$i][1] = $array_get_incidents[$key][3]; + $table->data[$i][1] = ''; + $table->data[$i][1] .= $array_get_incidents[$key][3]; + $table->data[$i][1] .= ''; $table->data[$i][2] = $group_incident[$array_get_incidents[$key][8]]; $table->data[$i][3] = $status_incident[$array_get_incidents[$key][6]].' / '.$resolution_incident[$array_get_incidents[$key][12]]; $table->data[$i][4] = ui_print_integria_incident_priority($array_get_incidents[$key][7], $priority_incident[$array_get_incidents[$key][7]]); - $table->data[$i][5] = $array_get_incidents[$key][9]; + $table->data[$i][5] = $array_get_incidents[$key][9].' / '.$array_get_incidents[$key][1]; $table->data[$i][6] = $array_get_incidents[$key][10]; $table->data[$i][7] = $array_get_incidents[$key][5]; $table->data[$i][8] = '';