Visual console changes

This commit is contained in:
Jose Gonzalez 2023-03-03 13:52:28 +01:00
parent 5d7738a05e
commit 128dc9c42c
7 changed files with 166 additions and 90 deletions

View File

@ -1,28 +1,38 @@
<?php
/**
* Map builder First Task.
*
* @category Topology maps
* @package Pandora FMS
* @subpackage Visual consoles
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2007-2023 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.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 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; 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.
// Begin.
global $config;
global $vconsoles_write;
global $vconsoles_manage;
check_login();
ui_require_css_file('first_task');
ui_print_info_message(
[
'no_close' => true,
'message' => __('There are no visual console defined yet.'),
]
);
if ($vconsoles_write || $vconsoles_manage) {
?>
@ -31,7 +41,7 @@ if ($vconsoles_write || $vconsoles_manage) {
<?php echo html_print_image('images/first_task/icono_grande_visualconsole.png', true, ['title' => __('Visual Console')]); ?>
</div>
<div class="text_task">
<h3> <?php echo __('Create Visual Console'); ?></h3><p id="description_task">
<h3> <?php echo __('Visual Consoles'); ?></h3><p id="description_task">
<?php
echo __(
'%s allows users to create visual maps on which each user is able to create his or her '.'own monitoring map. The new visual console editor is much more practical, although the prior '."visual console editor had its advantages. On the new visual console, we've been successful in "."imitating the sensation and touch of a drawing application like GIMP. We've also simplified the "."editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of "."Elements' and 'Editor'. The items the %s Visual Map was designed to handle are "."'static images', 'percentage bars', 'module graphs' and 'simple values'.",
@ -41,8 +51,18 @@ if ($vconsoles_write || $vconsoles_manage) {
?>
</p>
<form action="index.php?sec=network&amp;sec2=godmode/reporting/visual_console_builder" method="post">
<?php html_print_input_hidden('edit_layout', 1); ?>
<input type="submit" class="button_task" value="<?php echo __('Create Visual Console'); ?>" />
<?php
html_print_input_hidden('edit_layout', 1);
html_print_action_buttons(
html_print_submit_button(
__('Create a Visual Console'),
'button_task',
false,
['icon' => 'wand'],
true
)
);
?>
</form>
</div>
</div>

View File

@ -1,29 +1,44 @@
<?php
/**
* Services first task.
*
* @category Topology maps
* @package Pandora FMS
* @subpackage Services
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2007-2023 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.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 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; 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.
// Begin.
global $config;
check_login();
ui_require_css_file('first_task');
?>
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no services defined yet.') ]); ?>
<?php if ((bool) $agent_w === true) { ?>
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/item-service.svg', true, ['title' => __('Services'), 'class' => 'w120px']); ?>
</div>
<div class="text_task">
<h3> <?php echo __('Create Services'); ?></h3>
<h3> <?php echo __('Services'); ?></h3>
<p id="description_task">
<?php
echo __(

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 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
@ -193,18 +193,18 @@ foreach ($layoutDatas as $layoutData) {
switch ($layoutData['type']) {
case STATIC_GRAPH:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/camera_mc.png',
'images/static-graph.svg',
true,
[
'title' => __('Static Image'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case PERCENTILE_BAR:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/chart_bar.png',
'images/percentil.svg',
true,
[
'title' => __('Percentile Bar'),
@ -215,173 +215,200 @@ foreach ($layoutDatas as $layoutData) {
case PERCENTILE_BUBBLE:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/dot_red.png',
'images/percentil.svg',
true,
['title' => __('Percentile Bubble')]
[
'title' => __('Percentile Bubble'),
'class' => 'invert_filter',
]
);
break;
case CIRCULAR_INTERIOR_PROGRESS_BAR:
case CIRCULAR_PROGRESS_BAR:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/percentile_item.png',
'images/percentil.svg',
true,
['title' => __('Percentile')]
[
'title' => __('Percentile'),
'class' => 'invert_filter',
]
);
break;
case MODULE_GRAPH:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/chart_curve.png',
'images/module-graph.svg',
true,
[
'title' => __('Module Graph'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case AUTO_SLA_GRAPH:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/auto_sla_graph.png',
'images/event-history.svg',
true,
['title' => __('Event history graph')]
[
'title' => __('Event history graph'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
case SIMPLE_VALUE:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/binary.png',
'images/simple-value.svg',
true,
[
'title' => __('Simple Value'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case SIMPLE_VALUE_MAX:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/binary.png',
'images/simple-value.svg',
true,
[
'title' => __('Simple Value (Process Max)'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case SIMPLE_VALUE_MIN:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/binary.png',
'images/simple-value.svg',
true,
[
'title' => __('Simple Value (Process Min)'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case SIMPLE_VALUE_AVG:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/binary.png',
'images/simple-value.svg',
true,
[
'title' => __('Simple Value (Process Avg)'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case LABEL:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/tag_red.png',
'images/item-label.svg',
true,
['title' => __('Label')]
[
'title' => __('Label'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
case ICON:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/photo.png',
'images/item-icon.svg',
true,
[
'title' => __('Icon'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case BOX_ITEM:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/box_item.png',
'images/item-box.svg',
true,
[
'title' => __('Box'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case GROUP_ITEM:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/group_green.png',
'images/item-group.svg',
true,
['title' => __('Group')]
[
'title' => __('Group'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
case NETWORK_LINK:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/network_link_item.png',
'images/network-line.svg',
true,
[
'title' => __('Network link'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case LINE_ITEM:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/line_item.png',
'images/item-line.svg',
true,
[
'title' => __('Line'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
break;
case COLOR_CLOUD:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/color_cloud_item.png',
'images/color-cloud.svg',
true,
['title' => __('Color cloud')]
[
'title' => __('Color cloud'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
case BASIC_CHART:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/basic_chart.png',
'images/SNMP@svg.svg',
true,
['title' => __('Basic chart')]
[
'title' => __('Basic chart'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
case ODOMETER:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/odometer.png',
'images/odometro.svg',
true,
['title' => __('Odometer')]
[
'title' => __('Odometer'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
case CLOCK:
$table->data[($i + 1)]['icon'] = html_print_image(
'images/clock-tab.png',
'images/clock.svg',
true,
['title' => __('Clock')]
[
'title' => __('Clock'),
'class' => 'main_menu_icon invert_filter',
]
);
break;
@ -510,7 +537,7 @@ foreach ($layoutDatas as $layoutData) {
$table->data[($i + 1)][5] = '';
$table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'" '.'onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>';
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'" '.'onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
// Second row
$table->data[($i + 2)]['icon'] = '';
@ -785,11 +812,8 @@ $buttons .= html_print_button(
true
);
html_print_div(
[
'class' => 'action-buttons',
'content' => $buttons,
]
html_print_action_buttons(
$buttons
);
echo '</form>';

View File

@ -10151,8 +10151,14 @@ button.submitButton > div {
button.buttonButton.onlyIcon,
button.submitButton.onlyIcon {
/*
min-width: 32px;
height: 32px;
*/
padding: 0 !important;
min-width: 2em !important;
width: 2em !important;
height: 2em !important;
border: none;
box-shadow: none;
}

View File

@ -33,9 +33,14 @@ div#vc-controls ul.white-box-content {
border: 0px;
}
div#vc-controls .nomn,
div#vc-controls .nomn #vc-refr-form {
display: flex;
align-items: center;
}
div#vc-controls div.vc-title,
div#vc-controls div.vc-refr {
margin-top: 15px;
/*margin-top: 15px;*/
margin-left: 3px;
margin-right: 3px;
}
@ -52,7 +57,7 @@ div#vc-controls div.vc-refr-meta > div {
display: inline;
}
div#vc-controls img.vc-qr {
margin-top: 12px;
margin-top: 0;
margin-left: 8px;
margin-right: 8px;
}
@ -73,6 +78,7 @@ div#vc-controls img.vc-qr {
display: flex;
justify-content: space-between;
margin: 1em 0;
padding-left: 12px;
}
.visual-console-edit-controls > span {
@ -873,3 +879,8 @@ div.label strong span {
font-size: 36pt;
line-height: 36pt;
}
.center_switch .p-switch {
margin: 0;
padding: 0;
}

View File

@ -111,16 +111,16 @@ echo '<ul class="mn white-box-content box-shadow flex-row">';
// QR code.
echo '<li class="nomn">';
echo '<a href="javascript: show_dialog_qrcode();">';
echo '<a style="padding-top: 0;" href="javascript: show_dialog_qrcode();">';
echo '<img class="vc-qr" src="../../images/qrcode_icon_2.jpg"/>';
echo '</a>';
echo '</li>';
// Countdown.
echo '<li class="nomn">';
echo '<li class="nomn" style="display: flex; align-items: center">';
echo '<div class="vc-refr">';
echo '<div id="vc-refr-form">';
echo __('Refresh').':';
echo '<div id="vc-refr-form" style="display: flex; align-items: center">';
echo '<span class="margin-right-1">'.__('Refresh').'</span>';
echo html_print_select(
get_refresh_time_array(),
'vc-refr',

View File

@ -405,15 +405,15 @@ if ($pure === false) {
if ($aclWrite === true || $aclManage === true) {
echo '<div class="flex-row" style="width:220px;">';
if (is_metaconsole() === false) {
echo '<div id="force_check_control" class="flex-column">';
echo '<div id="force_check_control" class="flex-colum-center">';
echo html_print_label(__('Force'), 'force-mode', true);
echo '<a id ="force_check" href="">';
echo html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force remote checks'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
echo '</a>';
@ -431,7 +431,7 @@ if ($pure === false) {
}
}
echo '<div id="maintenance-mode-control" class="flex-column">';
echo '<div id="maintenance-mode-control" class="flex-colum-center center_switch">';
echo html_print_label(
__('Maintenance'),
'maintenance-mode',
@ -446,7 +446,7 @@ if ($pure === false) {
echo '</div>';
}
echo '<div id="edit-mode-control" class="flex-column">';
echo '<div id="edit-mode-control" class="flex-colum-center center_switch">';
echo html_print_label(__('Edit'), 'edit-mode', true);
echo html_print_checkbox_switch('edit-mode', 1, false, true, $disabled_edit_mode);
echo '</div>';