Added item in button palette with default fields
This commit is contained in:
parent
f907f3cdb7
commit
9db5669f16
|
@ -1346,6 +1346,9 @@ function hiddenFields(item) {
|
|||
$("#process_value_row").css('display', 'none');
|
||||
$("#process_value_row." + item).css('display', '');
|
||||
|
||||
$("#event_max_time_row").css('display', 'none');
|
||||
$("#event_max_time_row." + item).css('display', '');
|
||||
|
||||
$("#background_row_1").css('display', 'none');
|
||||
$("#background_row_1." + item).css('display', '');
|
||||
|
||||
|
@ -3218,6 +3221,10 @@ function click_button_toolbox(id) {
|
|||
toolbuttonActive = creationItem = 'module_graph';
|
||||
toggle_item_palette();
|
||||
break;
|
||||
case 'auto_sla_graph':
|
||||
toolbuttonActive = creationItem = 'auto_sla_graph';
|
||||
toggle_item_palette();
|
||||
break;
|
||||
case 'simple_value':
|
||||
toolbuttonActive = creationItem = 'simple_value';
|
||||
toggle_item_palette();
|
||||
|
|
|
@ -152,6 +152,11 @@ foreach ($layoutDatas as $layoutData) {
|
|||
html_print_image('images/chart_curve.png', true,
|
||||
array('title' => __('Module Graph')));
|
||||
break;
|
||||
case AUTO_SLA_GRAPH:
|
||||
$table->data[$i + 1]['icon'] =
|
||||
html_print_image('images/auto_sla_graph.png', true,
|
||||
array('title' => __('Auto SLA Graph')));
|
||||
break;
|
||||
case SIMPLE_VALUE:
|
||||
$table->data[$i + 1]['icon'] =
|
||||
html_print_image('images/binary.png', true,
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 410 B |
Binary file not shown.
After Width: | Height: | Size: 410 B |
|
@ -185,6 +185,7 @@ define('AGENT_STATUS_WARNING', 2);
|
|||
define('STATIC_GRAPH', 0);
|
||||
define('PERCENTILE_BAR', 3);
|
||||
define('MODULE_GRAPH', 1);
|
||||
define('AUTO_SLA_GRAPH', 14);
|
||||
define('SIMPLE_VALUE', 2);
|
||||
define('LABEL', 4);
|
||||
define('ICON', 5);
|
||||
|
|
|
@ -2746,6 +2746,10 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age
|
|||
case MODULE_GRAPH:
|
||||
$text = __('Module graph');
|
||||
break;
|
||||
case 'auto_sla_graph':
|
||||
case AUTO_SLA_GRAPH:
|
||||
$text = __('Auto SLA Graph');
|
||||
break;
|
||||
case 'percentile_bar':
|
||||
case PERCENTILE_BAR:
|
||||
$text = __('Percentile bar');
|
||||
|
|
|
@ -54,6 +54,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
'static_graph' => __('Static Graph'),
|
||||
'percentile_item' => __('Percentile Item'),
|
||||
'module_graph' => __('Graph'),
|
||||
'auto_sla_graph' => __('Auto SLA Graph'),
|
||||
'simple_value' => __('Simple value') . ui_print_help_tip(__("To use 'label'field, you should write
|
||||
a text to replace '(_VALUE_)' and the value of the module will be printed at the end."), true),
|
||||
'label' => __('Label'),
|
||||
|
@ -276,7 +277,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
$form_items['agent_row'] = array();
|
||||
$form_items['agent_row']['items'] = array('static_graph',
|
||||
'percentile_bar', 'percentile_item', 'module_graph',
|
||||
'simple_value', 'datos');
|
||||
'simple_value', 'datos', 'auto_sla_graph');
|
||||
$form_items['agent_row']['html'] = '<td align="left">' .
|
||||
__('Agent') . '</td>';
|
||||
$params = array();
|
||||
|
@ -306,28 +307,38 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
ui_print_agent_autocomplete_input($params) .
|
||||
'</td>';
|
||||
|
||||
|
||||
$form_items['module_row'] = array();
|
||||
$form_items['module_row']['items'] = array('static_graph',
|
||||
'percentile_bar', 'percentile_item', 'module_graph',
|
||||
'simple_value', 'datos');
|
||||
'simple_value', 'datos', 'auto_sla_graph');
|
||||
$form_items['module_row']['html'] = '<td align="left">' .
|
||||
__('Module') . '</td>
|
||||
<td align="left">' .
|
||||
html_print_select(array(), 'module', '', '', __('Any'), 0, true) .
|
||||
'</td>';
|
||||
|
||||
$event_times = array(86400 => __('24h'),
|
||||
28800 => __('8h'),
|
||||
7200 => __('2h'),
|
||||
3600 => __('1h'),);
|
||||
$form_items['event_max_time_row'] = array();
|
||||
$form_items['event_max_time_row']['items'] = array('auto_sla_graph');
|
||||
$form_items['event_max_time_row']['html'] = '<td align="left">' .
|
||||
__('Max. Time') . '</td>
|
||||
<td align="left">' .
|
||||
html_print_select($event_times, 'event_max_time_row', '', '', 0, 86400, true, false, false) .
|
||||
'</td>';
|
||||
|
||||
|
||||
$form_items['type_graph'] = array();
|
||||
$form_items['type_graph']['items'] = array(
|
||||
'Line',
|
||||
'Area');
|
||||
$form_items['type_graph']['html'] = '<td align="left"><span>' .
|
||||
__('Type of graph') . '</span></td>
|
||||
<td align="left">'. html_print_select (
|
||||
array ('line' => __('Line'),
|
||||
'area' => __('Area')),
|
||||
'type_graph', '', '', 0, 'area', true, false, false) . '</td>';
|
||||
$form_items['type_graph'] = array();
|
||||
$form_items['type_graph']['items'] = array(
|
||||
'Line',
|
||||
'Area');
|
||||
$form_items['type_graph']['html'] = '<td align="left"><span>' .
|
||||
__('Type of graph') . '</span></td>
|
||||
<td align="left">'. html_print_select (
|
||||
array ('line' => __('Line'),
|
||||
'area' => __('Area')),
|
||||
'type_graph', '', '', 0, 'area', true, false, false) . '</td>';
|
||||
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
if (!$own_info['is_admin'] && !check_acl ($config['id_user'], 0, "PM"))
|
||||
|
@ -654,6 +665,7 @@ function visual_map_editor_print_toolbox() {
|
|||
visual_map_print_button_editor('static_graph', __('Static Graph'), 'left', false, 'camera_min', true);
|
||||
visual_map_print_button_editor('percentile_item', __('Percentile Item'), 'left', false, 'percentile_item_min', true);
|
||||
visual_map_print_button_editor('module_graph', __('Module Graph'), 'left', false, 'graph_min', true);
|
||||
visual_map_print_button_editor('auto_sla_graph', __('Auto SLA Graph'), 'left', false, 'auto_sla_graph_min', true);
|
||||
visual_map_print_button_editor('simple_value', __('Simple Value'), 'left', false, 'binary_min', true);
|
||||
visual_map_print_button_editor('label', __('Label'), 'left', false, 'label_min', true);
|
||||
visual_map_print_button_editor('icon', __('Icon'), 'left', false, 'icon_min', true);
|
||||
|
@ -672,7 +684,6 @@ function visual_map_editor_print_toolbox() {
|
|||
|
||||
$text_autosave = html_print_input_hidden ('auto_save', true, true);
|
||||
visual_map_print_item_toolbox('auto_save', $text_autosave, 'right');
|
||||
//visual_map_print_button_editor('save_visualmap', __('Save'), 'right', true, 'save_min', true);
|
||||
visual_map_print_button_editor('show_grid', __('Show grid'), 'right', true, 'grid_min', true);
|
||||
visual_map_print_button_editor('edit_item', __('Update item'), 'right', true, 'config_min', true);
|
||||
visual_map_print_button_editor('delete_item', __('Delete item'), 'right', true, 'delete_min', true);
|
||||
|
|
|
@ -778,6 +778,12 @@ input.percentile_item_min {
|
|||
input.percentile_item_min[disabled] {
|
||||
background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat center !important;
|
||||
}
|
||||
input.auto_sla_graph_min {
|
||||
background: #fefefe url(../../images/auto_sla_graph.png) no-repeat center !important;
|
||||
}
|
||||
input.auto_sla_graph_min[disabled] {
|
||||
background: #fefefe url(../../images/auto_sla_graph.disabled.png) no-repeat center !important;
|
||||
}
|
||||
input.binary_min {
|
||||
background: #fefefe url(../../images/binary.png) no-repeat center !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue