GUI improvement, add enterprise edition popup - ticket gitlab 49/68

This commit is contained in:
enriquecd 2016-09-19 16:20:18 +02:00
parent 1d708c5622
commit a051243b64
13 changed files with 88 additions and 43 deletions

View File

@ -71,7 +71,7 @@ config_check();
$table->width = "100%";
$table->styleTable = 'margin: auto; margin-top: 0px;';
$table->rowclass[0] = '';
$table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true);
// Search bar
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) {
@ -303,9 +303,9 @@ config_check();
$table->data[0][9] .= html_print_image ("images/header_email.png", true, array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot", 'style' => 'width:24px;'));
$table->data[0][9] .= '</a>';
}
$table->data[0][11] = ui_print_help_tip (__("Blank characters are used as AND conditions"), true);
html_print_table($table);
unset($table);
@ -386,8 +386,8 @@ config_check();
<?php
}
?>
$("#publienterprise").pulsate ();
<?php
if ($_GET["refr"]) {
$_get_refr = strip_tags($_GET["refr"]);

View File

@ -79,9 +79,9 @@ echo '<div id="login_in">';
echo '<table id="login_layout">';
echo'<tr style="height:15px;"><td>';
echo '<div class="login_links">';
echo '<a href="http://wiki.pandorafms.com/" target="_blank">' . __('Help') . '</a>';
echo '<a href="http://wiki.pandorafms.com/" target="_blank">' . __('Docs') . '</a>';
echo ' | ';
echo '<a href="http://forums.pandorafms.com/" target="_blank">' . __('Support') . '</a>';
echo '<a href="https://pandorafms.com/monitoring-services/support/" target="_blank">' . __('Support') . '</a>';
echo '</div>';
echo '</td></tr>';
echo'<tr>
@ -96,15 +96,16 @@ echo '<div id="login_in">';
}
else {
html_print_image ("images/logo_login.png", false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
echo "<br><span style='font-size:120%;color:white;top:10px;position:relative;'>Community edition</span>";
}
echo '</a>';
// This prints the current pandora console version.
// For stable/live function it might be wise to comment it out
/* CUSTOM BRANDING ENDS HERE */
echo '</td><td style="padding-top: 15px; position:absolute;">';
switch ($login_screen) {
case 'login':
if (!empty ($page) && !empty ($sec)) {

View File

@ -205,7 +205,7 @@ $onheader['satellite'] = $satellitetab;
ui_print_page_header(
__('Massive operations') . ' &raquo; '. $options[$option],
"images/gm_massive_operations.png", false, "", true, $onheader);
"images/gm_massive_operations.png", false, "", true, $onheader,true, "massive");
// Checks if the PHP configuration is correctly
if ((get_cfg_var("max_execution_time") != 0)

View File

@ -40,7 +40,7 @@ if (defined('METACONSOLE')) {
else {
ui_print_page_header (__('Module management') . ' &raquo; ' .
__('Network component management'), "", false,
"network_component", true);
"network_component", true,"sell",true,"module");
$sec = 'gmodules';
}

View File

@ -27,7 +27,7 @@ if (! check_acl ($config['id_user'], 0, "PM")) {
}
// Header
ui_print_page_header (__('Module management')." &raquo; ".__('Module template management'), "images/gm_modules.png", false, "template_tab", true);
ui_print_page_header (__('Module management')." &raquo; ".__('Module template management'), "images/gm_modules.png", false, "template_tab", true,"",true,"module");
require_once ('include/functions_network_profiles.php');
@ -180,7 +180,7 @@ $table->class = "databox data";
$table->head = array ();
$table->head[0] = __('Name');
$table->head[1] = __('Description');
$table->head[2] = __('Action') .
$table->head[2] = '<span style="margin-right:7%;">'.__('Action') .'</span>'.
html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();');
$table->size = array ();
$table->size[1] = '65%';

View File

@ -620,7 +620,7 @@ $class = 'databox filters';
<td style="">
<?php
if ($action == 'new') {
html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '');
html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '','','','','','','','','',true,'reporting');
}
else {
$report_type = reports_get_report_types();

View File

@ -95,27 +95,27 @@ $table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->style[0] = 'font-weight: bolder;';
$table->style[0] = 'font-weight: bolder;width:250px';
$table->data[0][0] = __('URL update manager:');
$table->data[0][1] = html_print_input_text('url_update_manager',
$url_update_manager, __('URL update manager'), 40, 60, true);
$url_update_manager, __('URL update manager'), 80, 60, true);
$table->data[1][0] = __('Proxy server:');
$table->data[1][1] = html_print_input_text('update_manager_proxy_server',
$update_manager_proxy_server, __('Proxy server'), 40, 60, true);
$update_manager_proxy_server, __('Proxy server'), 80, 60, true);
$table->data[2][0] = __('Proxy port:');
$table->data[2][1] = html_print_input_text('update_manager_proxy_port',
$update_manager_proxy_port, __('Proxy port'), 40, 60, true);
$update_manager_proxy_port, __('Proxy port'), 80, 60, true);
$table->data[3][0] = __('Proxy user:');
$table->data[3][1] = html_print_input_text('update_manager_proxy_user',
$update_manager_proxy_user, __('Proxy user'), 40, 60, true);
$update_manager_proxy_user, __('Proxy user'), 80, 60, true);
$table->data[4][0] = __('Proxy password:');
$table->data[4][1] = html_print_input_password('update_manager_proxy_password',
$update_manager_proxy_password, __('Proxy password'), 40, 60, true);
$update_manager_proxy_password, __('Proxy password'), 80, 60, true);
if (license_free()) {
$config["identification_reminder"] = isset($config["identification_reminder"]) ? $config["identification_reminder"] : 1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -429,8 +429,8 @@ function html_print_select_groups($id_user = false, $privilege = "AR",
function html_print_select ($fields, $name, $selected = '', $script = '',
$nothing = '', $nothing_value = 0, $return = false, $multiple = false,
$sort = true, $class = '', $disabled = false, $style = false,
$option_style = false, $size = false) {
$option_style = false, $size = false,$modal=false,$message=''){
$output = "\n";
static $idcounter = array ();
@ -543,7 +543,11 @@ function html_print_select ($fields, $name, $selected = '', $script = '',
}
$output .= "</select>";
if ($modal){
$output .= "
<div id='publienterprise' class='".$message."' title='Community version' style='display:inline;position:relative;top:10px;left:0px;margin-top: -2px !important; margin-left: 2px !important;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>
";
}
if ($return)
return $output;

View File

@ -2383,7 +2383,7 @@ function ui_get_full_url ($url = '', $no_proxy = false, $add_name_php_file = fal
* @return string Header HTML
*/
function ui_print_page_header ($title, $icon = "", $return = false, $help = "", $godmode = false, $options = "") {
function ui_print_page_header ($title, $icon = "", $return = false, $help = "", $godmode = false, $options = "",$modal = false, $message = "") {
$title = io_safe_input_html($title);
if (($icon == "") && ($godmode == true)) {
$icon = "images/gm_setup.png";
@ -2411,6 +2411,12 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
$buffer .= '<ul class="mn"><li class="' . $type . '">&nbsp;' . '&nbsp; ';
$buffer .= '<span style="">' .
ui_print_truncate_text($title, 38);
if ($modal){
$buffer .= "
<div id='publienterprise' class='".$message."' title='Community version' style='float: right;margin-top: -2px !important; margin-left: 2px !important;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>
";
}
if ($help != "")
$buffer .= "<div class='head_help' style='float: right; margin-top: -2px !important; margin-left: 2px !important;'>" .
ui_print_help_icon ($help, true, '', 'images/help_w.png') . "</div>";

View File

@ -83,7 +83,40 @@ $(document).ready (function () {
);
return false;
});
$("#publienterprise").click (function () {
jQuery.get ("ajax.php",
{
"page": "general/alert_enterprise",
"message":$(this).attr("class")},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
.append (data)
.dialog ({
title: $("#publienterprise").attr ("title"),
resizable: true,
draggable: true,
modal: true,
open: function (event, ui) {
$(this).css({'overflow': 'hidden','text-align': 'center','padding-right':'25px','padding-bottom':'25px'}); //this line does the actual hiding
},
overlay: {
opacity: 0.5,
background: "black"
},
width: 600
})
.show ();
},
"html"
);
return false;
});
if ($('#license_error_msg_dialog').length) {
if (typeof(process_login_ok) == "undefined")
process_login_ok = 0;

View File

@ -400,7 +400,7 @@ if ($config["pure"] == 0 || $meta) {
if (! defined ('METACONSOLE')) {
unset($onheader['history']);
ui_print_page_header (__("Events"), "images/op_events.png",
false, "eventview", false, $onheader);
false, "eventview", false, $onheader,true, "events");
}
else {
unset($onheader['rss']);

View File

@ -201,13 +201,14 @@ if (defined('METACONSOLE')) {
$table->head_colspan[0] = 5;
$table->headstyle[0] = 'text-align: center';
}
$table->style[0] = 'width: 500px;';
$table->style[2] = 'width: 200px;';
$data = array();
$data[0] = '<b>' . __('User ID') . '</b>';
$data[0] .= $jump . '<span style="font-weight: normal;">' . $id . '</span>';
$data[0] .= '<div style="position:absolute;left:200px;display:inline;">'.$jump . '<span style="font-weight: normal;">' . $id . '</span></div>';
$data[1] = '<b>' . __('Full (display) name') . '</b>';
$data[1] .= $jump . html_print_input_text_extended ("fullname", $user_info["fullname"], '', '', 40, 100, $view_mode, '', 'class="input"', true);
$data[1] .= '<div style="position:absolute;left:700px;display:inline;">'.$jump . html_print_input_text_extended ("fullname", $user_info["fullname"], '', '', 40, 100, $view_mode, '', 'class="input"', true).'</div>';
// Show "Picture" (in future versions, why not, allow users to upload it's own avatar here.
if (is_user_admin ($id)) {
@ -229,9 +230,9 @@ $table->data[] = $data;
$data = array();
$data[0] = __('E-mail');
$data[0] .= $jump . html_print_input_text_extended ("email", $user_info["email"], '', '', '40', '100', $view_mode, '', 'class="input"', true);
$data[0] .= '<div style="position:absolute;left:200px;display:inline;">'.$jump . html_print_input_text_extended ("email", $user_info["email"], '', '', '40', '100', $view_mode, '', 'class="input"', true).'</div>';
$data[1] = __('Phone number');
$data[1] .= $jump . html_print_input_text_extended ("phone", $user_info["phone"], '', '', '40', '30', $view_mode, '', 'class="input"', true);
$data[1] .= '<div style="position:absolute;left:700px;display:inline;">'.$jump . html_print_input_text_extended ("phone", $user_info["phone"], '', '', '40', '30', $view_mode, '', 'class="input"', true).'</div>';
$table->rowclass[] = '';
$table->rowstyle[] = 'font-weight: bold;';
$table->data[] = $data;
@ -240,9 +241,9 @@ if ($view_mode === false) {
if ($config["user_can_update_password"]) {
$data = array();
$data[0] = __('New Password');
$data[0] .= $jump . html_print_input_text_extended ("password_new", "", '', '', '40', '45', $view_mode, '', 'class="input"', true, true);
$data[0] .= '<div style="position:absolute;left:200px;display:inline;">'.$jump . html_print_input_text_extended ("password_new", "", '', '', '40', '45', $view_mode, '', 'class="input"', true, true).'</div>';
$data[1] = __('Password confirmation');
$data[1] .= $jump . html_print_input_text_extended ("password_conf", "", '', '', '40', '45', $view_mode, '', 'class="input"', true, true);
$data[1] .= '<div style="position:absolute;left:700px;display:inline;">'.$jump . html_print_input_text_extended ("password_conf", "", '', '', '40', '45', $view_mode, '', 'class="input"', true, true).'</div>';
$table->rowclass[] = '';
$table->rowstyle[] = 'font-weight: bold;';
$table->data[] = $data;
@ -272,7 +273,7 @@ $data[0] .= __('Default').' ('.$config["global_block_size"].')';
$values = array(-1 => __('Default'),1 => __('Yes'),0 => __('No'));
$data[1] = __('Interactive charts') . ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
$data[1] .= $jump . html_print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false);
$data[1] .= '<div style="position:absolute;left:700px;display:inline;">'.$jump . html_print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false).'</div>';
$data[2] = __('Language');
@ -295,8 +296,8 @@ $id_usr = $config['id_user'];
if (!$meta) {
$data = array();
$data[0] = __('Shortcut bar') . ui_print_help_tip(__('This will activate a shortcut bar with alerts, events, messages... information'), true);
$data[0] .= $jump . html_print_checkbox('shortcut_bar', 1, $user_info["shortcut"], true);
$data[0] .= '<div style="position:absolute;left:200px;display:inline;">'.$jump . html_print_checkbox('shortcut_bar', 1, $user_info["shortcut"], true).'</div>';
$data[1] = __('Home screen'). ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true);
$values = array (
'Default' =>__('Default'),
@ -309,9 +310,9 @@ if (!$meta) {
if (enterprise_installed()) {
$values['Dashboard'] = __('Dashboard');
}
$data[1] .= $jump . html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false);
$data[1] .= '<div style="position:absolute;left:700px;display:inline;">'.$jump . html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false).'</div>';
if (enterprise_installed()) {
$dashboards = get_user_dashboards ($config['id_user']);
$dashboards_aux = array();
@ -358,8 +359,8 @@ if (!$meta) {
$double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']);
$data = array();
$data[0] = __('Double authentication');
$data[0] .= $jump;
$data[0] .= html_print_checkbox('double_auth', 1, $double_auth_enabled, true);
$data[0] .= '<div style="position:absolute;left:200px;display:inline;">'.$jump;
$data[0] .= html_print_checkbox('double_auth', 1, $double_auth_enabled, true).'</span>';
if ($double_auth_enabled) {
$data[0] .= $jump;
$data[0] .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true);
@ -369,8 +370,8 @@ $data[0] .= "<div id=\"dialog-double_auth\"><div id=\"dialog-double_auth-contain
if (check_acl ($config['id_user'], 0, "ER")){
$data[1] = __('Event filter');
$data[1] .= $jump . html_print_select_from_sql ('SELECT id_filter, id_name FROM tevent_filter',
'event_filter', $user_info["id_filter"], '', __('None'), NULL, true);
$data[1] .= '<div style="position:absolute;left:700px;display:inline;">'.$jump . html_print_select_from_sql ('SELECT id_filter, id_name FROM tevent_filter',
'event_filter', $user_info["id_filter"], '', __('None'), NULL, true).'</div>';
}// Newsletter
else if (license_free()) {
$data[1] = __('Newsletter Subscribed') . ':';