mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2013-04-16 Sergio Martin <sergio.martin@artica.es>
* include/styles/pandora.css images/blade.png: Aesthetic changes * include/ajax/events.php include/functions_ui.php include/javascript/pandora_events.js operation/events/events.build_table.php operation/events/events.php include/functions_config.php: Add the readonly mode to events list when the new option is enabled on setup git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7992 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
67e41f24a3
commit
3819da902f
@ -1,3 +1,17 @@
|
|||||||
|
2013-04-16 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/styles/pandora.css
|
||||||
|
images/blade.png: Aesthetic changes
|
||||||
|
|
||||||
|
* include/ajax/events.php
|
||||||
|
include/functions_ui.php
|
||||||
|
include/javascript/pandora_events.js
|
||||||
|
operation/events/events.build_table.php
|
||||||
|
operation/events/events.php
|
||||||
|
include/functions_config.php: Add the readonly
|
||||||
|
mode to events list when the new option is
|
||||||
|
enabled on setup
|
||||||
|
|
||||||
2013-04-16 Miguel de Dios <miguel.dedios@artica.es>
|
2013-04-16 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/setup/setup.php: updated the method to fill the header
|
* godmode/setup/setup.php: updated the method to fill the header
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 378 B |
@ -217,6 +217,14 @@ if ($get_extended_event) {
|
|||||||
$event = events_get_event($event_id);
|
$event = events_get_event($event_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$readonly = false;
|
||||||
|
if(!$meta &&
|
||||||
|
isset($config['event_replication']) &&
|
||||||
|
$config['event_replication'] == 1 &&
|
||||||
|
$config['show_events_in_local'] == 1) {
|
||||||
|
$readonly = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Clean url from events and store in array
|
// Clean url from events and store in array
|
||||||
$event['clean_tags'] = events_clean_tags($event['tags']);
|
$event['clean_tags'] = events_clean_tags($event['tags']);
|
||||||
|
|
||||||
@ -276,7 +284,8 @@ if ($get_extended_event) {
|
|||||||
$tabs .= "<li><a href='#extended_event_details_page' id='link_details'>".html_print_image('images/zoom.png',true).__('Details')."</a></li>";
|
$tabs .= "<li><a href='#extended_event_details_page' id='link_details'>".html_print_image('images/zoom.png',true).__('Details')."</a></li>";
|
||||||
$tabs .= "<li><a href='#extended_event_custom_fields_page' id='link_custom_fields'>".html_print_image('images/custom_field_col.png',true).__('Agent fields')."</a></li>";
|
$tabs .= "<li><a href='#extended_event_custom_fields_page' id='link_custom_fields'>".html_print_image('images/custom_field_col.png',true).__('Agent fields')."</a></li>";
|
||||||
$tabs .= "<li><a href='#extended_event_comments_page' id='link_comments'>".html_print_image('images/pencil.png',true).__('Comments')."</a></li>";
|
$tabs .= "<li><a href='#extended_event_comments_page' id='link_comments'>".html_print_image('images/pencil.png',true).__('Comments')."</a></li>";
|
||||||
if (tags_check_acl ($config['id_user'], $event['id_grupo'], "EW", $event['clean_tags']) || tags_check_acl ($config['id_user'], $event['id_grupo'], "EM", $event['clean_tags'])) {
|
if (!$readonly &&
|
||||||
|
(tags_check_acl ($config['id_user'], $event['id_grupo'], "EW", $event['clean_tags']) || tags_check_acl ($config['id_user'], $event['id_grupo'], "EM", $event['clean_tags']))) {
|
||||||
$tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image('images/cog.png',true).__('Responses')."</a></li>";
|
$tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image('images/cog.png',true).__('Responses')."</a></li>";
|
||||||
}
|
}
|
||||||
$tabs .= "</ul>";
|
$tabs .= "</ul>";
|
||||||
@ -307,7 +316,8 @@ if ($get_extended_event) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tags_check_acl ($config['id_user'], $event['id_grupo'], "EW", $event['clean_tags']) || tags_check_acl ($config['id_user'], $event['id_grupo'], "EM", $event['clean_tags'])) {
|
if (!$readonly &&
|
||||||
|
(tags_check_acl ($config['id_user'], $event['id_grupo'], "EW", $event['clean_tags']) || tags_check_acl ($config['id_user'], $event['id_grupo'], "EM", $event['clean_tags']))) {
|
||||||
$responses = events_page_responses($event);
|
$responses = events_page_responses($event);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -207,6 +207,8 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Replication DB port');
|
$error_update[] = __('Replication DB port');
|
||||||
if (!config_update_value ('replication_mode', (string)get_parameter('replication_mode')))
|
if (!config_update_value ('replication_mode', (string)get_parameter('replication_mode')))
|
||||||
$error_update[] = __('Replication mode');
|
$error_update[] = __('Replication mode');
|
||||||
|
if (!config_update_value ('show_events_in_local', (string)get_parameter('show_events_in_local')))
|
||||||
|
$error_update[] = __('Show events list in local console (read only)');
|
||||||
}
|
}
|
||||||
if (!config_update_value ('log_collector', (bool)get_parameter('log_collector')))
|
if (!config_update_value ('log_collector', (bool)get_parameter('log_collector')))
|
||||||
$error_update[] = __('Activate Log Collector');
|
$error_update[] = __('Activate Log Collector');
|
||||||
@ -679,6 +681,10 @@ function config_process_config () {
|
|||||||
config_update_value ('replication_mode', "only_validated");
|
config_update_value ('replication_mode', "only_validated");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset ($config["show_events_in_local"])) {
|
||||||
|
config_update_value ('show_events_in_local', 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset ($config["log_collector"])) {
|
if (!isset ($config["log_collector"])) {
|
||||||
config_update_value ('log_collector', 0);
|
config_update_value ('log_collector', 0);
|
||||||
}
|
}
|
||||||
|
@ -2111,7 +2111,7 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
|
|||||||
$buffer .= '<ul class="mn"><li class="'.$type.'"> ' . html_print_image($icon, true, array("style" => "vertical-align:middle;", "class" => "bottom", "border" => "0", "alt" => "")) . ' ';
|
$buffer .= '<ul class="mn"><li class="'.$type.'"> ' . html_print_image($icon, true, array("style" => "vertical-align:middle;", "class" => "bottom", "border" => "0", "alt" => "")) . ' ';
|
||||||
$buffer .= '<span style="display: inline-block; vertical-align: top; margin-top: 2px;">' . ui_print_truncate_text($title, 45);
|
$buffer .= '<span style="display: inline-block; vertical-align: top; margin-top: 2px;">' . ui_print_truncate_text($title, 45);
|
||||||
if ($help != "")
|
if ($help != "")
|
||||||
$buffer .= "<div style='float: right;'>" . ui_print_help_icon ($help, true, '', 'images/help_w.png') . "</div>";
|
$buffer .= "<div class='head_help' style='float: right; margin-top: -3px !important; margin-left: 2px !important;'>" . ui_print_help_icon ($help, true, '', 'images/help_w.png') . "</div>";
|
||||||
$buffer .= '</span></li></ul></div>';
|
$buffer .= '</span></li></ul></div>';
|
||||||
|
|
||||||
if (is_array($options)) {
|
if (is_array($options)) {
|
||||||
|
@ -71,6 +71,8 @@ function show_event_dialog(event_id, group_rep, dialog_page, result) {
|
|||||||
$('#notification_owner_error').show();
|
$('#notification_owner_error').show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
forced_title_callback();
|
||||||
},
|
},
|
||||||
"html"
|
"html"
|
||||||
);
|
);
|
||||||
|
@ -84,7 +84,7 @@ textarea.conf_error {
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: top right;
|
background-position: top right;
|
||||||
}
|
}
|
||||||
input {
|
input, select {
|
||||||
padding: 2px 3px 4px 3px;
|
padding: 2px 3px 4px 3px;
|
||||||
}
|
}
|
||||||
input.button {
|
input.button {
|
||||||
@ -95,7 +95,6 @@ input.button {
|
|||||||
margin: 10px 15px;
|
margin: 10px 15px;
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
padding: 0px;
|
|
||||||
border:1px solid #ddd;
|
border:1px solid #ddd;
|
||||||
}
|
}
|
||||||
checkbox {
|
checkbox {
|
||||||
@ -2399,7 +2398,7 @@ DIV.forced_title_layer {
|
|||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
z-index: 100000;
|
||||||
border: 1px solid #708090;
|
border: 1px solid #708090;
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
color: #DDD;
|
color: #DDD;
|
||||||
|
@ -475,25 +475,28 @@ foreach ($result as $event) {
|
|||||||
if ($i != 0 && $allow_action) {
|
if ($i != 0 && $allow_action) {
|
||||||
//Actions
|
//Actions
|
||||||
$data[$i] = '';
|
$data[$i] = '';
|
||||||
// Validate event
|
|
||||||
if (($event["estado"] != 1) && (tags_check_acl ($config["id_user"], $event["id_grupo"], "EW", $event['clean_tags']) == 1)) {
|
|
||||||
$data[$i] .= '<a href="javascript:validate_event_advanced('.$event["id_evento"].', 1)" id="validate-'.$event["id_evento"].'">';
|
|
||||||
$data[$i] .= html_print_image ("images/ok.png", true,
|
|
||||||
array ("title" => __('Validate event')));
|
|
||||||
$data[$i] .= '</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete event
|
if(!$readonly) {
|
||||||
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags']) == 1) {
|
// Validate event
|
||||||
if($event['estado'] != 2) {
|
if (($event["estado"] != 1) && (tags_check_acl ($config["id_user"], $event["id_grupo"], "EW", $event['clean_tags']) == 1)) {
|
||||||
$data[$i] .= '<a class="delete_event" href="javascript:" id="delete-'.$event['id_evento'].'">';
|
$data[$i] .= '<a href="javascript:validate_event_advanced('.$event["id_evento"].', 1)" id="validate-'.$event["id_evento"].'">';
|
||||||
$data[$i] .= html_print_image ("images/cross.png", true,
|
$data[$i] .= html_print_image ("images/ok.png", true,
|
||||||
array ("title" => __('Delete event'), "id" => 'delete_cross_' . $event['id_evento']));
|
array ("title" => __('Validate event')));
|
||||||
$data[$i] .= '</a>';
|
$data[$i] .= '</a>';
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$data[$i] .= html_print_image ("images/cross.disabled.png", true,
|
// Delete event
|
||||||
array ("title" => __('Is not allowed delete events in process'))).' ';
|
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags']) == 1) {
|
||||||
|
if($event['estado'] != 2) {
|
||||||
|
$data[$i] .= '<a class="delete_event" href="javascript:" id="delete-'.$event['id_evento'].'">';
|
||||||
|
$data[$i] .= html_print_image ("images/cross.png", true,
|
||||||
|
array ("title" => __('Delete event'), "id" => 'delete_cross_' . $event['id_evento']));
|
||||||
|
$data[$i] .= '</a>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data[$i] .= html_print_image ("images/cross.disabled.png", true,
|
||||||
|
array ("title" => __('Is not allowed delete events in process'))).' ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,10 +542,10 @@ if (!empty ($table->data)) {
|
|||||||
|
|
||||||
if ($allow_action) {
|
if ($allow_action) {
|
||||||
echo '<div style="width:'.$table->width.';" class="action-buttons">';
|
echo '<div style="width:'.$table->width.';" class="action-buttons">';
|
||||||
if (tags_check_acl ($config["id_user"], 0, "EW", $event['clean_tags']) == 1) {
|
if (!$readonly && tags_check_acl ($config["id_user"], 0, "EW", $event['clean_tags']) == 1) {
|
||||||
html_print_button(__('Validate selected'), 'validate_button', false, 'validate_selected();', 'class="sub ok"');
|
html_print_button(__('Validate selected'), 'validate_button', false, 'validate_selected();', 'class="sub ok"');
|
||||||
}
|
}
|
||||||
if (tags_check_acl ($config["id_user"], 0,"EM", $event['clean_tags']) == 1) {
|
if (!$readonly && tags_check_acl ($config["id_user"], 0,"EM", $event['clean_tags']) == 1) {
|
||||||
html_print_button(__('Delete selected'), 'delete_button', false, 'delete_selected();', 'class="sub delete"');
|
html_print_button(__('Delete selected'), 'delete_button', false, 'delete_selected();', 'class="sub delete"');
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -41,11 +41,22 @@ if(enterprise_installed() && defined("METACONSOLE")) {
|
|||||||
// Get the history mode
|
// Get the history mode
|
||||||
$history = (bool) get_parameter('history', 0);
|
$history = (bool) get_parameter('history', 0);
|
||||||
|
|
||||||
if (isset($config['event_replication']) && $config['event_replication'] == 1 && !$meta) {
|
$readonly = false;
|
||||||
db_pandora_audit("ACL Violation",
|
|
||||||
"Trying to access event viewer. View disabled due event replication.");
|
if(!$meta) {
|
||||||
ui_print_info_message('Event viewer is disabled due event replication. For more information, please contact with the administrator');
|
if (isset($config['event_replication']) &&
|
||||||
return;
|
$config['event_replication'] == 1) {
|
||||||
|
|
||||||
|
if($config['show_events_in_local'] == 0) {
|
||||||
|
db_pandora_audit("ACL Violation",
|
||||||
|
"Trying to access event viewer. View disabled due event replication.");
|
||||||
|
ui_print_info_message('Event viewer is disabled due event replication. For more information, please contact with the administrator');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$readonly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ajax ()) {
|
if (is_ajax ()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user