2011-06-29 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_messages.php include/functions_config.php extensions/dbmanager.php operation/users/user_edit.php operation/messages/message.php images/skin/skin_default/include/styles/pandora.css general/header.php godmode/agentes/module_manager_editor.php godmode/menu.php godmode/users/user_list.php godmode/users/configure_user.php godmode/users/configure_profile.php: Messages and alert sections in header are now dropable and resizable. * images/profiles.png: Added profile image * godmode/users/profile_list.php_ Added new manage profiles section git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4503 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
581bb9e7e1
commit
9eda8ecfb4
|
@ -1,3 +1,23 @@
|
|||
2011-06-29 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_messages.php
|
||||
include/functions_config.php
|
||||
extensions/dbmanager.php
|
||||
operation/users/user_edit.php
|
||||
operation/messages/message.php
|
||||
images/skin/skin_default/include/styles/pandora.css
|
||||
general/header.php
|
||||
godmode/agentes/module_manager_editor.php
|
||||
godmode/menu.php
|
||||
godmode/users/user_list.php
|
||||
godmode/users/configure_user.php
|
||||
godmode/users/configure_profile.php: Messages and alert sections in
|
||||
header are now dropable and resizable.
|
||||
|
||||
* images/profiles.png: Added profile image
|
||||
|
||||
* godmode/users/profile_list.php_ Added new manage profiles section
|
||||
|
||||
2011-06-29 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/help/en/help_snmp_trap_types.php
|
||||
|
|
|
@ -137,6 +137,7 @@ function dbmgr_extension_main () {
|
|||
return;
|
||||
}
|
||||
|
||||
echo "<div style='overflow: auto;'>";
|
||||
$table->width = '90%';
|
||||
$table->class = 'dbmanager';
|
||||
$table->head = array_keys ($result[0]);
|
||||
|
@ -144,6 +145,7 @@ function dbmgr_extension_main () {
|
|||
$table->data = $result;
|
||||
|
||||
html_print_table ($table);
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
/* This adds a option in the operation menu */
|
||||
|
|
|
@ -194,6 +194,12 @@ if ($config["metaconsole"] == 0){
|
|||
ui_require_jquery_file ('countdown');
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript" src="include/javascript/jquery.ui.dialog.js "></script>
|
||||
<script type="text/javascript" src="include/javascript/jquery.ui.draggable.js "></script>
|
||||
<script type="text/javascript" src="include/javascript/jquery.ui.droppable.js "></script>
|
||||
<script type="text/javascript" src="include/javascript/jquery.ui.resizable.js "></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
|
|
|
@ -327,12 +327,6 @@ switch ($moduletype) {
|
|||
break;
|
||||
}
|
||||
|
||||
echo "<h2>".__('Modules')."</h2>";
|
||||
|
||||
echo '<h3>'.__('Module assignment');
|
||||
if (isset ($extra_title))
|
||||
echo ' - '.$extra_title;
|
||||
echo '</h3>';
|
||||
|
||||
if($config['enterprise_installed'] && $id_agent_module) {
|
||||
if (policies_is_module_in_policy($id_agent_module)) {
|
||||
|
|
|
@ -102,7 +102,11 @@ if (check_acl ($config['id_user'], 0, "UM")) {
|
|||
$menu["gusuarios"]["text"] = __('Manage users');
|
||||
$menu["gusuarios"]["sec2"] = "godmode/users/user_list";
|
||||
$menu["gusuarios"]["id"] = "god-users";
|
||||
|
||||
|
||||
$sub = array ();
|
||||
$sub['godmode/users/profile_list']['text'] = __('Manage profiles');
|
||||
|
||||
$menu["gusuarios"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
// SNMP console
|
||||
|
|
|
@ -25,8 +25,22 @@ if (! check_acl ($config['id_user'], 0, "PM")) {
|
|||
return;
|
||||
}
|
||||
|
||||
$tab = get_parameter('tab', 'profile');
|
||||
|
||||
$buttons = array(
|
||||
'user' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user">' .
|
||||
html_print_image ("images/god3.png", true, array ("title" => __('User management'))) .'</a>'),
|
||||
'profile' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile">' .
|
||||
html_print_image ("images/profiles.png", true, array ("title" => __('Profile management'))) .'</a>'));
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('User management').' » '.__('Profiles defined in Pandora'), "images/god3.png", false, "", true);
|
||||
ui_print_page_header (__('User management').' » '.__('Profiles defined in Pandora'), "images/god3.png", false, "", true, $buttons);
|
||||
|
||||
$new_profile = (bool) get_parameter ('new_profile');
|
||||
$create_profile = (bool) get_parameter ('create_profile');
|
||||
|
@ -48,7 +62,7 @@ if ($delete_profile) {
|
|||
"Delete profile ". $profile['name']);
|
||||
|
||||
echo '<h3 class="suc">'.__('Successfully deleted').'</h3>';
|
||||
echo '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list">« Back</a>';
|
||||
echo '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list">« Back</a>';
|
||||
}
|
||||
|
||||
//Delete profile from user data
|
||||
|
@ -93,7 +107,7 @@ if ($update_profile) {
|
|||
"Update profile ". $name, false, false, $info);
|
||||
|
||||
echo '<h3 class="suc">'.__('Successfully updated').'</h3>';
|
||||
echo '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list">« Back</a>';
|
||||
echo '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list">« Back</a>';
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="error"'.__('There was a problem updating this profile').'</h3>';
|
||||
|
@ -131,7 +145,7 @@ if ($create_profile) {
|
|||
|
||||
if ($ret !== false) {
|
||||
echo '<h3 class="suc">'.__('Successfully created').'</h3>';
|
||||
echo '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list">« Back</a>';
|
||||
echo '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list">« Back</a>';
|
||||
|
||||
$info = 'Name: ' . $name . ' Incident view: ' . $incident_view .
|
||||
' Incident edit: ' . $incident_edit . ' Incident management: ' . $incident_management .
|
||||
|
@ -202,7 +216,7 @@ if ($id_profile || $new_profile) {
|
|||
$page_title = __('Update profile');
|
||||
}
|
||||
|
||||
$table->width = '400px';
|
||||
$table->width = '98%';
|
||||
$table->class = 'databox';
|
||||
$table->size = array ();
|
||||
$table->style = array ();
|
||||
|
|
|
@ -47,8 +47,22 @@ if (! check_acl ($config['id_user'], 0, "UM")) {
|
|||
return;
|
||||
}
|
||||
|
||||
$tab = get_parameter('tab', 'user');
|
||||
|
||||
$buttons = array(
|
||||
'user' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user">' .
|
||||
html_print_image ("images/god3.png", true, array ("title" => __('User management'))) .'</a>'),
|
||||
'profile' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile">' .
|
||||
html_print_image ("images/profiles.png", true, array ("title" => __('Profile management'))) .'</a>'));
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('User detail editor'), "images/god3.png", false, "", true);
|
||||
ui_print_page_header (__('User detail editor'), "images/god3.png", false, "", true, $buttons);
|
||||
|
||||
|
||||
if ($config['user_can_update_info']) {
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
include_once($config['homedir'] . "/include/functions_profile.php");
|
||||
include_once ($config['homedir'].'/include/functions_users.php');
|
||||
require_once ($config['homedir'] . '/include/functions_groups.php');
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "UM")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access User Management");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$tab = get_parameter('tab', 'profile');
|
||||
|
||||
$buttons = array(
|
||||
'user' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user">' .
|
||||
html_print_image ("images/god3.png", true, array ("title" => __('User management'))) .'</a>'),
|
||||
'profile' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile">' .
|
||||
html_print_image ("images/profiles.png", true, array ("title" => __('Profile management'))) .'</a>'));
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('User management').' » '.__('Profiles defined in Pandora'), "images/god3.png", false, "", true, $buttons);
|
||||
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->class = 'databox';
|
||||
$table->width = '98%';
|
||||
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->size = array ();
|
||||
$table->align = array ();
|
||||
|
||||
$table->head[0] = __('Profiles');
|
||||
|
||||
$table->head[1] = "IR" . ui_print_help_tip (__('System incidents reading'), true);
|
||||
$table->head[2] = "IW" . ui_print_help_tip (__('System incidents writing'), true);
|
||||
$table->head[3] = "IM" . ui_print_help_tip (__('System incidents management'), true);
|
||||
$table->head[4] = "AR" . ui_print_help_tip (__('Agents reading'), true);
|
||||
$table->head[5] = "AW" . ui_print_help_tip (__('Agents management'), true);
|
||||
$table->head[6] = "LW" . ui_print_help_tip (__('Alerts editing'), true);
|
||||
$table->head[7] = "UM" . ui_print_help_tip (__('Users management'), true);
|
||||
$table->head[8] = "DM" . ui_print_help_tip (__('Database management'), true);
|
||||
$table->head[9] = "LM" . ui_print_help_tip (__('Alerts management'), true);
|
||||
$table->head[10] = "PM" . ui_print_help_tip (__('Systems management'), true);
|
||||
$table->head[11] = __('Delete');
|
||||
|
||||
$table->align = array_fill (1, 11, "center");
|
||||
$table->size = array_fill (1, 10, 40);
|
||||
|
||||
$profiles = db_get_all_rows_in_table ("tperfil");
|
||||
|
||||
$img = html_print_image ("images/ok.png", true, array ("border" => 0));
|
||||
|
||||
foreach ($profiles as $profile) {
|
||||
$data[0] = '<a href="index.php?sec=gusuarios&sec2=godmode/users/configure_profile&id='.$profile["id_perfil"].'"><b>'.$profile["name"].'</b></a>';
|
||||
$data[1] = ($profile["incident_view"] ? $img : '');
|
||||
$data[2] = ($profile["incident_edit"] ? $img : '');
|
||||
$data[3] = ($profile["incident_management"] ? $img : '');
|
||||
$data[4] = ($profile["agent_view"] ? $img : '');
|
||||
$data[5] = ($profile["agent_edit"] ? $img : '');
|
||||
$data[6] = ($profile["alert_edit"] ? $img : '');
|
||||
$data[7] = ($profile["user_management"] ? $img : '');
|
||||
$data[8] = ($profile["db_management"] ? $img : '');
|
||||
$data[9] = ($profile["alert_management"] ? $img : '');
|
||||
$data[10] = ($profile["pandora_management"] ? $img : '');
|
||||
$data[11] = '<a href="index.php?sec=gagente&sec2=godmode/users/configure_profile&delete_profile=1&id='.$profile["id_perfil"].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'. html_print_image("images/cross.png", true) . '</a>';
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gusuarios&sec2=godmode/users/configure_profile">';
|
||||
html_print_table ($table);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_input_hidden ('new_profile', 1);
|
||||
html_print_submit_button (__('Create'), "crt", false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
echo '</form>';
|
||||
unset ($table);
|
||||
|
||||
?>
|
|
@ -31,6 +31,7 @@ if (! check_acl ($config['id_user'], 0, "UM")) {
|
|||
|
||||
$sortField = get_parameter('sort_field');
|
||||
$sort = get_parameter('sort', 'none');
|
||||
$tab = get_parameter('tab', 'user');
|
||||
|
||||
$selected = 'border: 1px solid black;';
|
||||
$selectUserIDUp = '';
|
||||
|
@ -89,8 +90,20 @@ switch ($sortField) {
|
|||
break;
|
||||
}
|
||||
|
||||
$buttons = array(
|
||||
'user' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user">' .
|
||||
html_print_image ("images/god3.png", true, array ("title" => __('User management'))) .'</a>'),
|
||||
'profile' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile">' .
|
||||
html_print_image ("images/profiles.png", true, array ("title" => __('Profile management'))) .'</a>'));
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('User management').' » '.__('Users defined in Pandora'), "images/god3.png", false, "", true);
|
||||
ui_print_page_header (__('User management').' » '.__('Users defined in Pandora'), "images/god3.png", false, "", true, $buttons);
|
||||
|
||||
if (isset ($_GET["user_del"])) { //delete user
|
||||
$id_user = get_parameter ("delete_user", 0);
|
||||
|
@ -238,62 +251,5 @@ else {
|
|||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<h3>'.__('Profiles defined in Pandora').'</h3>';
|
||||
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->class = 'databox';
|
||||
$table->width = '98%';
|
||||
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->size = array ();
|
||||
$table->align = array ();
|
||||
|
||||
$table->head[0] = __('Profiles');
|
||||
|
||||
$table->head[1] = "IR" . ui_print_help_tip (__('System incidents reading'), true);
|
||||
$table->head[2] = "IW" . ui_print_help_tip (__('System incidents writing'), true);
|
||||
$table->head[3] = "IM" . ui_print_help_tip (__('System incidents management'), true);
|
||||
$table->head[4] = "AR" . ui_print_help_tip (__('Agents reading'), true);
|
||||
$table->head[5] = "AW" . ui_print_help_tip (__('Agents management'), true);
|
||||
$table->head[6] = "LW" . ui_print_help_tip (__('Alerts editing'), true);
|
||||
$table->head[7] = "UM" . ui_print_help_tip (__('Users management'), true);
|
||||
$table->head[8] = "DM" . ui_print_help_tip (__('Database management'), true);
|
||||
$table->head[9] = "LM" . ui_print_help_tip (__('Alerts management'), true);
|
||||
$table->head[10] = "PM" . ui_print_help_tip (__('Systems management'), true);
|
||||
$table->head[11] = __('Delete');
|
||||
|
||||
$table->align = array_fill (1, 11, "center");
|
||||
$table->size = array_fill (1, 10, 40);
|
||||
|
||||
$profiles = db_get_all_rows_in_table ("tperfil");
|
||||
|
||||
$img = html_print_image ("images/ok.png", true, array ("border" => 0));
|
||||
|
||||
foreach ($profiles as $profile) {
|
||||
$data[0] = '<a href="index.php?sec=gusuarios&sec2=godmode/users/configure_profile&id='.$profile["id_perfil"].'"><b>'.$profile["name"].'</b></a>';
|
||||
$data[1] = ($profile["incident_view"] ? $img : '');
|
||||
$data[2] = ($profile["incident_edit"] ? $img : '');
|
||||
$data[3] = ($profile["incident_management"] ? $img : '');
|
||||
$data[4] = ($profile["agent_view"] ? $img : '');
|
||||
$data[5] = ($profile["agent_edit"] ? $img : '');
|
||||
$data[6] = ($profile["alert_edit"] ? $img : '');
|
||||
$data[7] = ($profile["user_management"] ? $img : '');
|
||||
$data[8] = ($profile["db_management"] ? $img : '');
|
||||
$data[9] = ($profile["alert_management"] ? $img : '');
|
||||
$data[10] = ($profile["pandora_management"] ? $img : '');
|
||||
$data[11] = '<a href="index.php?sec=gagente&sec2=godmode/users/configure_profile&delete_profile=1&id='.$profile["id_perfil"].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'. html_print_image("images/cross.png", true) . '</a>';
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gusuarios&sec2=godmode/users/configure_profile">';
|
||||
html_print_table ($table);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_input_hidden ('new_profile', 1);
|
||||
html_print_submit_button (__('Create'), "crt", false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
echo '</form>';
|
||||
unset ($table);
|
||||
|
||||
?>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 855 B |
|
@ -282,6 +282,19 @@ div#main {
|
|||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
div#main_help {
|
||||
width: 98%;
|
||||
min-height: 400px;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 25px;
|
||||
background-color: #fefefe;
|
||||
background-image: url(../../images/backgrounds/background4.jpg);
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
div#menu {
|
||||
width: 180px;
|
||||
/*width: 190px;*/
|
||||
|
|
|
@ -721,7 +721,7 @@ function config_check (){
|
|||
if (($fontpath == "") OR (!file_exists ($fontpath))) {
|
||||
$config["alert_cnt"]++;
|
||||
$_SESSION["alert_msg"] .= '<h3 class="error">'.__("Default font doesnt exist").'</h3>';
|
||||
$_SESSION["alert_msg"] .= __('Your defined fonr doesnt exist or is not defined. Please check font parameters in your config').'</h3>';
|
||||
$_SESSION["alert_msg"] .= __('Your defined font doesnt exist or is not defined. Please check font parameters in your config').'</h3>';
|
||||
}
|
||||
|
||||
global $develop_bypass;
|
||||
|
|
|
@ -204,7 +204,7 @@ function messages_get_overview ($order = "status", $order_dir = "ASC") {
|
|||
break;
|
||||
case "status":
|
||||
default:
|
||||
$order = "estado";
|
||||
$order = "estado, timestamp";
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ if (isset ($_GET["read_message"]) || !isset ($_GET["new_msg"])) {
|
|||
html_print_table ($table);
|
||||
echo '</form>';
|
||||
}
|
||||
echo '<div class="action-buttons" style="width:85%">';
|
||||
echo '<div class="action-buttons" style="width:90%">';
|
||||
echo '<form method="post" action="index.php?sec=messages&sec2=operation/messages/message&new_msg=1">';
|
||||
html_print_submit_button (__('New message'), "send_mes", false, 'class="sub next"');
|
||||
echo '</form></div>';
|
||||
|
|
|
@ -178,7 +178,7 @@ if (!$config["user_can_update_info"]) {
|
|||
}
|
||||
echo '</div></form>';
|
||||
|
||||
echo '<h3>'.__('Profiles/Groups assigned to this user').'</h3>';
|
||||
echo '<h4>'.__('Profiles/Groups assigned to this user').'</h4>';
|
||||
|
||||
$table->width = '98%';
|
||||
$table->data = array ();
|
||||
|
|
Loading…
Reference in New Issue