Merge branch 'ent-12997-eliminar-sistema-de-skins' into 'develop'

Ent 12997 eliminar sistema de skins

See merge request artica/pandorafms!7007
This commit is contained in:
Rafael Ameijeiras 2024-03-25 10:03:05 +00:00
commit 6a58c74dbc
12 changed files with 25 additions and 46 deletions

View File

@ -1,7 +1,8 @@
START TRANSACTION;
-- START MIGRATION MSSQL --
DROP TABLE tskin;
-- START MIGRATION MSSQL --
SET @current_app_type = 12;
SET @short_name = 'pandorafms.mssql';
SET @name = 'Microsoft SQL Server';

View File

@ -58,7 +58,6 @@ if ($id_group > 0) {
$alerts_disabled = $group['disabled'];
$custom_id = $group['custom_id'];
$propagate = $group['propagate'];
$skin = $group['id_skin'];
$contact = $group['contact'];
$other = $group['other'];
$description = $group['description'];
@ -80,7 +79,6 @@ if ($id_group > 0) {
$alerts_disabled = 0;
$custom_id = '';
$propagate = 0;
$skin = 0;
$contact = '';
$other = '';
$description = '';

View File

@ -439,7 +439,6 @@ if ($is_management_allowed === true
$group_pass = (string) get_parameter('group_pass');
$alerts_disabled = (bool) get_parameter('alerts_disabled');
$custom_id = (string) get_parameter('custom_id');
$skin = (string) get_parameter('skin');
$description = (string) get_parameter('description');
$contact = (string) get_parameter('contact');
$other = (string) get_parameter('other');
@ -462,7 +461,6 @@ if ($is_management_allowed === true
'parent' => $id_parent,
'disabled' => $alerts_disabled,
'custom_id' => $custom_id,
'id_skin' => $skin,
'description' => $description,
'contact' => $contact,
'propagate' => $propagate,
@ -498,7 +496,6 @@ if ($is_management_allowed === true && $update_group === true) {
$alerts_enabled = (bool) get_parameter('alerts_enabled');
$custom_id = (string) get_parameter('custom_id');
$propagate = (bool) get_parameter('propagate');
$skin = (string) get_parameter('skin');
$description = (string) get_parameter('description');
$contact = (string) get_parameter('contact');
$other = (string) get_parameter('other');
@ -530,7 +527,6 @@ if ($is_management_allowed === true && $update_group === true) {
'parent' => ($id_parent == -1) ? 0 : $id_parent,
'disabled' => !$alerts_enabled,
'custom_id' => $custom_id,
'id_skin' => $skin,
'description' => $description,
'contact' => $contact,
'propagate' => $propagate,

View File

@ -500,8 +500,6 @@ if ($access_console_node === true) {
$sub['godmode/setup/license']['text'] = __('License');
$sub['godmode/setup/license']['id'] = 'license';
enterprise_hook('skins_submenu');
enterprise_hook('translate_string_submenu');
$menu_godmode['gsetup']['sub'] = $sub;

View File

@ -40,8 +40,6 @@ require_once $config['homedir'].'/include/functions_visual_map.php';
require_once $config['homedir'].'/include/functions_custom_fields.php';
enterprise_include_once('include/functions_profile.php');
$isFunctionSkins = enterprise_include_once('include/functions_skins.php');
// Add the columns for the enterprise Pandora edition.
$enterprise_include = false;
if (ENTERPRISE_NOT_HOOK !== enterprise_include('include/functions_policies.php')) {
@ -1306,12 +1304,12 @@ if ($new_user) {
if (is_metaconsole() === false) {
// User only can change skins if has more than one group.
if (function_exists('skins_print_select')) {
if (count($usr_groups) > 1) {
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Skin').'</p>';
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
$skins[DEFAULT_THEME] = __('Default theme');
$skins[BLACK_THEME] = __('Black theme');
$skin .= html_print_select($skins, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
}
}

View File

@ -720,10 +720,10 @@ if (is_metaconsole() === true) {
$userManagementTable->data['line2_looknfeel'][1] = $outputMetaAccess[1];
}
} else {
if (function_exists('skins_print_select')) {
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme').$hin_change_theme;
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
}
$skins[DEFAULT_THEME] = __('Default theme');
$skins[BLACK_THEME] = __('Black theme');
$userManagementTable->data['line2_looknfeel'][1] = html_print_select($skins, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
}
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));

View File

@ -300,6 +300,10 @@ define('HEADER_LOGO_DEFAULT_COLLAPSED', 'logo-default-pandorafms-collapsed.png')
define('HEADER_LOGO_BLACK_CLASSIC', 'logo-black-pandorafms.png');
define('HEADER_LOGO_BLACK_COLLAPSED', 'logo-default-pandorafms-collapsed.png');
// Pandora Themes.
define('DEFAULT_THEME', 1);
define('BLACK_THEME', 2);
// Status images.
// For modules.
define('STATUS_MODULE_OK', 'module_ok.png');

View File

@ -64,8 +64,6 @@ function menu_print_menu(&$menu)
$sec2 = 'godmode/alerts/alert_actions';
} else if ($sec2 === 'godmode/alerts/configure_alert_command') {
$sec2 = 'godmode/alerts/alert_commands';
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
$sec2 = 'enterprise/godmode/setup/setup_skins';
} else if ($sec2 === 'operation/agentes/networkmap.dinamic') {
$sec2 = 'operation/agentes/pandora_networkmap';
} else if ($sec2 === 'godmode/gis_maps/configure_gis_map') {

View File

@ -47,6 +47,10 @@ function themes_get_css($path=false)
continue;
}
if ($file === 'pandoraitsm.css') {
continue;
}
// Skip '..' and '.' entries and files not ended in '.css'.
if ($path && ($file == '.' || $file == '..' || strtolower(substr($file, (strlen($file) - 4))) !== '.css')) {
continue;

View File

@ -516,11 +516,11 @@ $skin = '';
$home_screen .= html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true, false);
// User only can change skins if has more than one group.
if (function_exists('skins_print_select')) {
if (count($usr_groups) > 1) {
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Theme').': </p>';
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
$skins[DEFAULT_THEME] = __('Default theme');
$skins[BLACK_THEME] = __('Black theme');
$skin .= html_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}

View File

@ -2991,18 +2991,6 @@ CREATE TABLE IF NOT EXISTS `tsesion_extended` (
KEY idx_session (id_sesion)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- -----------------------------------------------------
-- Table `tskin`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tskin` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` TEXT ,
`relative_path` TEXT ,
`description` TEXT ,
`disabled` TINYINT NOT NULL DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ---------------------------------------------------------------------
-- Table `tpolicy_queue`
-- ---------------------------------------------------------------------

View File

@ -1221,12 +1221,6 @@ INSERT INTO `tevent_response` VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
--
-- Dumping data for table `tskin`
--
INSERT INTO `tskin` VALUES (1,'Default&#x20;theme', 'pandora.css', 'Default&#x20;skin&#x20;for&#x20;Pandora&#x20;FMS&#x20;web&#x20;console', 0);
INSERT INTO `tskin` VALUES (2,'Black&#x20;theme', 'pandora_black.css', 'Black&#x20;theme', 0);
--
-- Dumping data for table `tcollection`
--