Added item to editor palette

This commit is contained in:
Arturo Gonzalez 2017-10-19 10:03:53 +02:00
parent 7121d4a343
commit 20cccbc87f
2 changed files with 27 additions and 9 deletions

View File

@ -146,7 +146,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
'</td>';
$form_items['module_graph_size_row'] = array();
$form_items['module_graph_size_row']['items'] = array('module_graph', 'datos');
$form_items['module_graph_size_row']['items'] = array('module_graph', 'datos', 'bars_graph');
$form_items['module_graph_size_row']['html'] = '<td align="left">' . __('Size') . '</td>
<td align="left">' .
html_print_input_text('width_module_graph', 300, '', 3, 5, true) .
@ -163,7 +163,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
'simple_value',
'datos',
'group_item',
'auto_sla_graph');
'auto_sla_graph',
'bars_graph');
$form_items['label_row']['html'] =
'<td align="left" valign="top" style="">' . __('Label') . '
@ -214,7 +215,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
'module_graph',
'simple_value',
'datos',
'icon');
'icon',
'bars_graph');
if (!is_metaconsole())
$form_items['enable_link_row']['items'][] = 'group_item';
@ -237,7 +239,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items['background_color'] = array();
$form_items['background_color']['items'] = array(
'module_graph',
'datos');
'datos',
'bars_graph');
$form_items['background_color']['html'] = '<td align="left"><span>' .
__('Background color') . '</span></td>
<td align="left">'. html_print_select (
@ -449,7 +452,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items['period_row'] = array();
$form_items['period_row']['items'] = array('module_graph', 'simple_value', 'datos');
$form_items['period_row']['items'] = array('module_graph', 'simple_value', 'datos', 'bars_graph');
$form_items['period_row']['html'] = '<td align="left">' . __('Period') . '</td>
<td align="left">' . html_print_extended_select_for_time ('period', SECONDS_5MINUTES, '', '', '', false, true) . '</td>';
@ -462,7 +465,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items['module_graph_size_row'] = array();
$form_items['module_graph_size_row']['items'] = array('module_graph', 'datos');
$form_items['module_graph_size_row']['items'] = array('module_graph', 'datos', 'bars_graph');
$form_items['module_graph_size_row']['html'] = '<td align="left">' . __('Size') . '</td>
<td align="left">' .
html_print_input_text('width_module_graph', 300, '', 3, 5, true) .
@ -494,6 +497,14 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true) . '<span ="margin-right:10px;">&nbsp</span>' .
html_print_button(__('Create'), 'create_button', false, 'create_button_palette_callback();', 'class="sub wand"', true) .
'</td>';
$bars_graph_types = array('vertical' => __('Vertical'), 'horizontal' => __('Horizontal'));
$form_items['bars_graph_type'] = array();
$form_items['bars_graph_type']['items'] = array('bars_graph');
$form_items['bars_graph_type']['html'] = '<td align="left">' .
__('Background') . '</td>
<td align="left">' . html_print_select($bars_graph_types, 'bars_graph_type', 'vertical', '', '', '', true) . '</td>';
foreach ($form_items as $item => $item_options) {
@ -518,7 +529,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items_advance['position_row']['items'] = array('static_graph',
'percentile_bar', 'percentile_item', 'module_graph',
'simple_value', 'label', 'icon', 'datos', 'box_item',
'auto_sla_graph');
'auto_sla_graph', 'bars_graph');
$form_items_advance['position_row']['html'] = '
<td align="left">' . __('Position') . '</td>
<td align="left">(' . html_print_input_text('left', '0', '', 3, 5, true) .
@ -547,7 +558,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items_advance['parent_row']['items'] = array(
'group_item', 'static_graph',
'percentile_bar', 'percentile_item', 'module_graph',
'simple_value', 'label', 'icon', 'datos', 'auto_sla_graph');
'simple_value', 'label', 'icon', 'datos', 'auto_sla_graph',
'bars_graph');
$form_items_advance['parent_row']['html'] = '<td align="left">' .
__('Parent') . '</td>
<td align="left">' .
@ -572,7 +584,6 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
$form_items_advance['line_case']['html'] = '
<td align="left">' . __('Lines haven\'t advanced options') . '</td>';
//Insert and modify before the buttons to create or update.
if (enterprise_installed()) {
enterprise_visual_map_editor_modify_form_items_advance_palette($form_items_advance);
@ -674,6 +685,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('bars_graph', __('Bars Graph'), 'left', false, 'bars_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);

View File

@ -769,6 +769,12 @@ input.graph_min {
input.graph_min[disabled] {
background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat center !important;
}
input.bars_graph_min {
background: #fefefe url(../../images/chart_curve.png) no-repeat center !important;
}
input.bars_graph_min[disabled] {
background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat center !important;
}
input.percentile_min {
background: #fefefe url(../../images/chart_bar.png) no-repeat center !important;
}