diff --git a/pandora_console/extras/mr/66.sql b/pandora_console/extras/mr/66.sql
index 49b9b67148..9e8f9b54ff 100644
--- a/pandora_console/extras/mr/66.sql
+++ b/pandora_console/extras/mr/66.sql
@@ -2,4 +2,8 @@ START TRANSACTION;
ALTER TABLE `tusuario` MODIFY COLUMN `integria_user_level_pass` TEXT;
+DROP TABLE `tincidencia`;
+DROP TABLE `tnota`;
+DROP TABLE `tattachment`;
+
COMMIT;
\ No newline at end of file
diff --git a/pandora_console/godmode/setup/setup_ITSM.php b/pandora_console/godmode/setup/setup_ITSM.php
index d9f33b7699..a2b0a69fa5 100644
--- a/pandora_console/godmode/setup/setup_ITSM.php
+++ b/pandora_console/godmode/setup/setup_ITSM.php
@@ -511,9 +511,9 @@ $table_remote->data['ITSM_test'] = $row;
echo '
';
echo '
';
html_print_image(
- 'images/integria_logo.svg',
+ 'images/pandoraITSM_logo.png',
false,
- ['class' => 'w400px mrgn_top_15px']
+ ['class' => 'w600px mrgn_top_15px']
);
echo '';
echo '
';
diff --git a/pandora_console/images/integria_logo.png b/pandora_console/images/integria_logo.png
deleted file mode 100644
index f56ecfdab5..0000000000
Binary files a/pandora_console/images/integria_logo.png and /dev/null differ
diff --git a/pandora_console/images/integria_logo.svg b/pandora_console/images/integria_logo.svg
deleted file mode 100644
index b894a2ada3..0000000000
--- a/pandora_console/images/integria_logo.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
\ No newline at end of file
diff --git a/pandora_console/images/integria_logo_gray.png b/pandora_console/images/integria_logo_gray.png
deleted file mode 100644
index d901e72493..0000000000
Binary files a/pandora_console/images/integria_logo_gray.png and /dev/null differ
diff --git a/pandora_console/images/pandoraITSM_logo.png b/pandora_console/images/pandoraITSM_logo.png
new file mode 100644
index 0000000000..952c15759f
Binary files /dev/null and b/pandora_console/images/pandoraITSM_logo.png differ
diff --git a/pandora_console/images/pandoraITSM_logo_gray.png b/pandora_console/images/pandoraITSM_logo_gray.png
new file mode 100644
index 0000000000..9a4a8bf9e4
Binary files /dev/null and b/pandora_console/images/pandoraITSM_logo_gray.png differ
diff --git a/pandora_console/include/lib/ITSM/Manager.php b/pandora_console/include/lib/ITSM/Manager.php
index 2db51874c0..f43b60ad75 100644
--- a/pandora_console/include/lib/ITSM/Manager.php
+++ b/pandora_console/include/lib/ITSM/Manager.php
@@ -144,6 +144,9 @@ class Manager
$successfullyMsg = '';
$groups = [];
$status = [];
+
+ $headerTabs = $this->ITSM_tabs('list');
+
try {
$ITSM = new ITSM();
$groups = $ITSM->getGroups();
@@ -165,6 +168,7 @@ class Manager
'successfullyMsg' => $successfullyMsg,
'groups' => $groups,
'status' => $status,
+ 'headerTabs' => $headerTabs,
]
);
}
@@ -276,6 +280,8 @@ class Manager
$idAttachment = (int) \get_parameter('idAttachment', 0);
$addComment = (bool) \get_parameter('addComment', 0);
+ $headerTabs = $this->ITSM_tabs('');
+
$error = '';
$successfullyMsg = null;
$incidence = null;
@@ -884,6 +890,110 @@ class Manager
}
+ function ITSM_tabs($active_tab, $view=false)
+ {
+ global $config;
+
+ $url_tabs = ui_get_full_url('index.php?sec=ITSM&sec2=operation/ITSM/itsm');
+ $url_setup = ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=ITSM');
+
+ $setup_tab['text'] = '
';
+ $setup_tab['text'] .= html_print_image(
+ 'images/configuration@svg.svg',
+ true,
+ [
+ 'title' => __('Configure Pandora ITSM'),
+ 'class' => 'main_menu_icon invert_filter',
+ ]
+ );
+ $setup_tab['text'] .= '';
+
+ $list_tab['text'] = '
';
+ $list_tab['text'] .= html_print_image(
+ 'images/logs@svg.svg',
+ true,
+ [
+ 'title' => __('Ticket list'),
+ 'class' => 'main_menu_icon invert_filter',
+ ]
+ );
+ $list_tab['text'] .= '';
+
+ $create_tab['text'] = '
';
+ $create_tab['text'] .= html_print_image(
+ 'images/edit.svg',
+ true,
+ [
+ 'title' => __('New ticket'),
+ 'class' => 'main_menu_icon invert_filter',
+ ]
+ );
+ $create_tab['text'] .= '';
+
+ switch ($active_tab) {
+ case 'setup':
+ $setup_tab['active'] = true;
+ $list_tab['active'] = false;
+ $create_tab['active'] = false;
+ break;
+
+ case 'list':
+ $setup_tab['active'] = false;
+ $list_tab['active'] = true;
+ $create_tab['active'] = false;
+ break;
+
+ case 'edit':
+ $setup_tab['active'] = false;
+ $list_tab['active'] = false;
+ $create_tab['active'] = true;
+ break;
+
+ default:
+ $setup_tab['active'] = false;
+ $list_tab['active'] = false;
+ $create_tab['active'] = false;
+ break;
+ }
+
+ if ($view) {
+ $create_tab['text'] = '
';
+ $create_tab['text'] .= html_print_image(
+ 'images/edit.svg',
+ true,
+ [
+ 'title' => __('Edit ticket'),
+ 'class' => 'main_menu_icon invert_filter',
+ ]
+ );
+ $create_tab['text'] .= '';
+
+ $view_tab['text'] = '
';
+ $view_tab['text'] .= html_print_image(
+ 'images/details.svg',
+ true,
+ [
+ 'title' => __('View ticket'),
+ 'class' => 'main_menu_icon invert_filter',
+ ]
+ );
+ $view_tab['text'] .= '';
+ // When the current page is the View page.
+ if (!$active_tab) {
+ $view_tab['active'] = true;
+ }
+ }
+
+ $onheader = [];
+ $onheader['view'] = $view_tab;
+ $onheader['configure'] = $setup_tab;
+ $onheader['list'] = $list_tab;
+ $onheader['create'] = $create_tab;
+
+ return $onheader;
+ }
+
+
/**
* Get list tickets and prepare data for datatable.
*
diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql
index bf3d8b98f6..f6b49f1528 100644
--- a/pandora_console/pandoradb.sql
+++ b/pandora_console/pandoradb.sql
@@ -620,19 +620,6 @@ CREATE TABLE IF NOT EXISTS `talert_execution_queue` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
--- -----------------------------------------------------
--- Table `tattachment`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `tattachment` (
- `id_attachment` INT UNSIGNED NOT NULL AUTO_INCREMENT,
- `id_incidencia` INT UNSIGNED NOT NULL DEFAULT 0,
- `id_usuario` VARCHAR(255) NOT NULL DEFAULT '',
- `filename` VARCHAR(255) NOT NULL DEFAULT '',
- `description` VARCHAR(150) DEFAULT '',
- `size` BIGINT UNSIGNED NOT NULL DEFAULT 0,
- PRIMARY KEY (`id_attachment`)
-) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-
-- -----------------------------------------------------
-- Table `tconfig`
-- -----------------------------------------------------
@@ -794,30 +781,6 @@ CREATE TABLE IF NOT EXISTS `tcredential_store` (
PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
--- ---------------------------------------------------------------------
--- Table `tincidencia`
--- ---------------------------------------------------------------------
-CREATE TABLE IF NOT EXISTS `tincidencia` (
- `id_incidencia` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
- `inicio` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
- `cierre` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
- `titulo` TEXT,
- `descripcion` TEXT,
- `id_usuario` VARCHAR(255) NOT NULL DEFAULT '',
- `origen` VARCHAR(100) NOT NULL DEFAULT '',
- `estado` INT NOT NULL DEFAULT 0,
- `prioridad` INT NOT NULL DEFAULT 0,
- `id_grupo` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0,
- `actualizacion` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `id_creator` VARCHAR(60) DEFAULT NULL,
- `id_lastupdate` VARCHAR(60) DEFAULT NULL,
- `id_agente_modulo` BIGINT NOT NULL,
- `notify_email` TINYINT UNSIGNED NOT NULL DEFAULT 0,
- `id_agent` INT UNSIGNED NULL DEFAULT 0,
- PRIMARY KEY (`id_incidencia`),
- KEY `incident_index_1` (`id_usuario`,`id_incidencia`),
- KEY `id_agente_modulo` (`id_agente_modulo`)
-) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ---------------------------------------------------------------------
-- Table `tlanguage`
@@ -1095,19 +1058,6 @@ CREATE TABLE IF NOT EXISTS `tnetwork_profile_pen` (
REFERENCES `tnetwork_profile` (`id_np`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
--- ----------------------------------------------------------------------
--- Table `tnota`
--- ----------------------------------------------------------------------
-CREATE TABLE IF NOT EXISTS `tnota` (
- `id_nota` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
- `id_incident` BIGINT UNSIGNED NOT NULL,
- `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
- `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `nota` MEDIUMTEXT,
- PRIMARY KEY (`id_nota`),
- KEY `id_incident` (`id_incident`)
-) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-
-- ----------------------------------------------------------------------
-- Table `torigen`
-- ----------------------------------------------------------------------
diff --git a/pandora_console/views/ITSM/ITSMTicketEditView.php b/pandora_console/views/ITSM/ITSMTicketEditView.php
index f534ffa870..686cdad25c 100644
--- a/pandora_console/views/ITSM/ITSMTicketEditView.php
+++ b/pandora_console/views/ITSM/ITSMTicketEditView.php
@@ -90,9 +90,9 @@ $table->data[0][0] = html_print_label_input_block(
)
);
-$ITSM_logo = 'images/integria_logo_gray.png';
+$ITSM_logo = 'images/pandoraITSM_logo_gray.png';
if ($config['style'] === 'pandora_black' && is_metaconsole() === false) {
- $ITSM_logo = 'images/integria_logo.svg';
+ $ITSM_logo = 'images/pandoraITSM_logo.png';
}
$table->data[0][2] = '
'.html_print_image(
diff --git a/pandora_console/views/ITSM/ITSMTicketListView.php b/pandora_console/views/ITSM/ITSMTicketListView.php
index b2e8d8eb8d..50ba2dbe0d 100644
--- a/pandora_console/views/ITSM/ITSMTicketListView.php
+++ b/pandora_console/views/ITSM/ITSMTicketListView.php
@@ -38,7 +38,7 @@ ui_print_standard_header(
false,
'ITSM_tab',
false,
- [],
+ $headerTabs,
[
[
'link' => 'index.php?sec=ITSM&sec2=operation/ITSM/itsm',