2012-05-21 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_alerts.js godmode/alerts/configure_alert_action.php: Added descrption of the selected command under the combo when select one in the action editor to help user. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6328 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d52f4ce2c3
commit
a72abd8fc5
|
@ -1,3 +1,10 @@
|
|||
2012-05-21 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/javascript/pandora_alerts.js
|
||||
godmode/alerts/configure_alert_action.php: Added descrption of
|
||||
the selected command under the combo when select one in
|
||||
the action editor to help user.
|
||||
|
||||
2012-05-21 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* pandoradb.sql
|
||||
|
|
|
@ -118,6 +118,7 @@ if (check_acl ($config['id_user'], 0, "PM")){
|
|||
$table->data[2][1] .= __('Create Command');
|
||||
$table->data[2][1] .= '</a>';
|
||||
}
|
||||
$table->data[2][1] .= '<div id="command_description" style=""></div>';
|
||||
$table->data[3][0] = __('Threshold');
|
||||
$table->data[3][1] = html_print_input_text ('action_threshold', $action_threshold, '', 5, 7, true);
|
||||
$table->data[3][1] .= ' '.__('seconds') . ui_print_help_icon ('action_threshold', true);
|
||||
|
@ -159,6 +160,9 @@ $(document).ready (function () {
|
|||
echo addslashes($command);
|
||||
?>";
|
||||
render_command_preview ();
|
||||
command_description = "<?php echo str_replace("\r\n","<br>",addslashes(io_safe_output(alerts_get_alert_command_description ($id_command)))); ?>";
|
||||
|
||||
render_command_description(command_description);
|
||||
<?php endif; ?>
|
||||
$("#id_command").change (function () {
|
||||
values = Array ();
|
||||
|
@ -173,6 +177,8 @@ $(document).ready (function () {
|
|||
function (data, status) {
|
||||
original_command = js_html_entity_decode (data["command"]);
|
||||
render_command_preview (original_command);
|
||||
command_description = js_html_entity_decode (data["description"]);
|
||||
render_command_description(command_description);
|
||||
},
|
||||
"json"
|
||||
);
|
||||
|
|
|
@ -19,3 +19,9 @@ function parse_alert_command (command) {
|
|||
function render_command_preview () {
|
||||
$("#textarea_command_preview").text (parse_alert_command (original_command));
|
||||
}
|
||||
function render_command_description (command_description) {
|
||||
if(command_description != '') {
|
||||
command_description = '<br>'+command_description;
|
||||
}
|
||||
$("#command_description").html(command_description);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue