fixed styles
This commit is contained in:
parent
d0c8794361
commit
e21d9968e8
|
@ -471,10 +471,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
</div> <!-- Closes #table_header_inner -->
|
||||
</div> <!-- Closes #table_header -->
|
||||
|
||||
|
||||
<!-- Notifications content wrapper-->
|
||||
<div id='notification-content' class='invisible'/></div>
|
||||
|
||||
<!-- Old style div wrapper -->
|
||||
<div id="alert_messages" class="invisible"></div>
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ $url = sprintf(
|
|||
$url_id_agente
|
||||
);
|
||||
|
||||
enterprise_include('godmode/agentes/module_manager.php');
|
||||
$isFunctionPolicies = enterprise_include_once('include/functions_policies.php');
|
||||
require_once $config['homedir'].'/include/functions_modules.php';
|
||||
require_once $config['homedir'].'/include/functions_agents.php';
|
||||
|
@ -51,196 +50,10 @@ if (isset($policy_page) === false) {
|
|||
$checked = (bool) get_parameter('checked');
|
||||
$sec2 = (string) get_parameter('sec2');
|
||||
|
||||
// Table for filter bar.
|
||||
$filterTable = new stdClass();
|
||||
$filterTable->class = 'fixed_filter_bar';
|
||||
$filterTable->data = [];
|
||||
$filterTable->cellstyle[0][0] = 'width:0';
|
||||
$filterTable->data[0][0] = __('Search');
|
||||
$filterTable->data[1][0] .= html_print_input_text(
|
||||
'search_string',
|
||||
$search_string,
|
||||
'',
|
||||
30,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
''
|
||||
);
|
||||
$filterTable->data[0][0] .= html_print_input_hidden('search', 1, true);
|
||||
|
||||
if ((bool) $policy_page === false) {
|
||||
$filterTable->data[0][1] = __('Show in hierachy mode');
|
||||
$filterTable->data[1][1] = html_print_checkbox_switch(
|
||||
'status_hierachy_mode',
|
||||
'',
|
||||
((string) $checked === 'true'),
|
||||
true,
|
||||
false,
|
||||
'onChange=change_mod_filter();'
|
||||
);
|
||||
}
|
||||
|
||||
$filterTable->data[1][2] = html_print_submit_button(
|
||||
__('Filter'),
|
||||
'filter',
|
||||
false,
|
||||
[
|
||||
'icon' => 'search',
|
||||
'class' => 'float-right',
|
||||
'mode' => 'secondary mini',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Print filter table.
|
||||
echo '<form id="create_module_type" method="post" action="'.$url.'">';
|
||||
html_print_table($filterTable);
|
||||
echo '</form>';
|
||||
// Check if there is at least one server of each type available to assign that
|
||||
// kind of modules. If not, do not show server type in combo.
|
||||
$network_available = db_get_sql(
|
||||
'SELECT count(*)
|
||||
FROM tserver
|
||||
WHERE server_type = '.SERVER_TYPE_NETWORK
|
||||
);
|
||||
// POSTGRESQL AND ORACLE COMPATIBLE.
|
||||
$wmi_available = db_get_sql(
|
||||
'SELECT count(*)
|
||||
FROM tserver
|
||||
WHERE server_type = '.SERVER_TYPE_WMI
|
||||
);
|
||||
// POSTGRESQL AND ORACLE COMPATIBLE.
|
||||
$plugin_available = db_get_sql(
|
||||
'SELECT count(*)
|
||||
FROM tserver
|
||||
WHERE server_type = '.SERVER_TYPE_PLUGIN
|
||||
);
|
||||
// POSTGRESQL AND ORACLE COMPATIBLE.
|
||||
$prediction_available = db_get_sql(
|
||||
'SELECT count(*)
|
||||
FROM tserver
|
||||
WHERE server_type = '.SERVER_TYPE_PREDICTION
|
||||
);
|
||||
// POSTGRESQL AND ORACLE COMPATIBLE.
|
||||
$web_available = db_get_sql(
|
||||
'SELECT count(*)
|
||||
FROM tserver
|
||||
WHERE server_type = '.SERVER_TYPE_WEB
|
||||
);
|
||||
// POSTGRESQL AND ORACLE COMPATIBLE.
|
||||
// Development mode to use all servers.
|
||||
if ($develop_bypass || is_metaconsole()) {
|
||||
$network_available = 1;
|
||||
$wmi_available = 1;
|
||||
$plugin_available = 1;
|
||||
// FIXME when prediction predictions server modules can be configured.
|
||||
// on metaconsole.
|
||||
$prediction_available = (is_metaconsole() === true) ? 0 : 1;
|
||||
}
|
||||
|
||||
$modules = [];
|
||||
$modules['dataserver'] = __('Create a new data server module');
|
||||
if ($network_available) {
|
||||
$modules['networkserver'] = __('Create a new network server module');
|
||||
}
|
||||
|
||||
if ($plugin_available) {
|
||||
$modules['pluginserver'] = __('Create a new plugin server module');
|
||||
}
|
||||
|
||||
if ($wmi_available) {
|
||||
$modules['wmiserver'] = __('Create a new WMI server module');
|
||||
}
|
||||
|
||||
if ($prediction_available) {
|
||||
$modules['predictionserver'] = __('Create a new prediction server module');
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true || $web_available >= '1') {
|
||||
$modules['webserver'] = __('Create a new web Server module');
|
||||
}
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
set_enterprise_module_types($modules);
|
||||
}
|
||||
|
||||
if (strstr($sec2, 'enterprise/godmode/policies/policies') !== false) {
|
||||
// It is unset because the policies haven't a table tmodule_synth and the
|
||||
// some part of code to apply this kind of modules in policy agents.
|
||||
// But in the future maybe will be good to make this feature, but remember
|
||||
// the modules to show in syntetic module policy form must be the policy
|
||||
// modules from the same policy.
|
||||
unset($modules['predictionserver']);
|
||||
if (enterprise_installed() === true) {
|
||||
unset($modules['webux']);
|
||||
}
|
||||
}
|
||||
|
||||
if (($policy_page === true) || (isset($agent) === true)) {
|
||||
if ($policy_page === true) {
|
||||
$show_creation = is_management_allowed();
|
||||
} else {
|
||||
if (isset($all_groups) === false) {
|
||||
$all_groups = agents_get_all_groups_agent(
|
||||
$agent['id_agente'],
|
||||
$agent['id_grupo']
|
||||
);
|
||||
}
|
||||
|
||||
$show_creation = check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true;
|
||||
}
|
||||
} else {
|
||||
$show_creation = false;
|
||||
}
|
||||
|
||||
if ($show_creation === true) {
|
||||
// Create module/type combo.
|
||||
$tableCreateModule = new stdClass();
|
||||
$tableCreateModule->id = 'create';
|
||||
$tableCreateModule->class = 'create_module_dialog';
|
||||
$tableCreateModule->width = '100%';
|
||||
$tableCreateModule->data = [];
|
||||
$tableCreateModule->style = [];
|
||||
|
||||
$tableCreateModule->data['caption_type'] = html_print_input_hidden('edit_module', 1);
|
||||
$tableCreateModule->data['caption_type'] .= __('Type');
|
||||
$tableCreateModule->data['type'] = html_print_select(
|
||||
$modules,
|
||||
'moduletype',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'width:380px;'
|
||||
);
|
||||
|
||||
// Link for get more modules.
|
||||
if ((bool) $config['disable_help'] === false) {
|
||||
$tableCreateModule->data['get_more_modules'] = html_print_anchor(
|
||||
[
|
||||
'href' => 'https://pandorafms.com/Library/Library/',
|
||||
'target' => '_blank',
|
||||
'class' => 'color-black-grey',
|
||||
'content' => __('Get more modules on Monitoring Library'),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($id_agente) === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$module_action = (string) get_parameter('module_action');
|
||||
|
||||
if ($module_action === 'delete') {
|
||||
|
@ -1256,35 +1069,6 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
|
|||
[ 'type' => 'data_table' ]
|
||||
);
|
||||
echo '</form>';
|
||||
|
||||
|
||||
$modalCreateModule = '<form name="create_module_form" method="post">';
|
||||
$modalCreateModule .= html_print_table($tableCreateModule, true);
|
||||
$modalCreateModule .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Create'),
|
||||
'create_module',
|
||||
false,
|
||||
[
|
||||
'icon' => 'next',
|
||||
'mode' => 'mini secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$modalCreateModule .= '</form>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'modal',
|
||||
'style' => 'display: none',
|
||||
'content' => $modalCreateModule,
|
||||
]
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ $tableBasicThresholds->data = [];
|
|||
$tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width pdd_t_10px';
|
||||
$tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').' ';
|
||||
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === false)) {
|
||||
if ($edit_module === false && (isset($stringTypeModule) === false || $stringTypeModule === false)) {
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_minmax_warning">('.__('Min / Max').')</span>';
|
||||
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
|
||||
'min_warning',
|
||||
|
@ -482,7 +482,7 @@ if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeM
|
|||
);
|
||||
}
|
||||
|
||||
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === true)) {
|
||||
if ($edit_module === false && isset($stringTypeModule) === true && $stringTypeModule === true) {
|
||||
$basicThresholdsIntervalWarning = [];
|
||||
$basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>';
|
||||
$basicThresholdsIntervalWarning[] = html_print_checkbox_switch(
|
||||
|
@ -531,7 +531,7 @@ $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
|
|||
$tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px';
|
||||
$tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').' ';
|
||||
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === false)) {
|
||||
if ($edit_module === false && (isset($stringTypeModule) === false || $stringTypeModule === false)) {
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_minmax_critical">('.__('Min / Max').')</span>';
|
||||
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
|
||||
'min_critical',
|
||||
|
@ -569,7 +569,7 @@ if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeM
|
|||
);
|
||||
}
|
||||
|
||||
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === true)) {
|
||||
if ($edit_module === false && isset($stringTypeModule) === true && $stringTypeModule === true) {
|
||||
$basicThresholdsIntervalCritical = [];
|
||||
$basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>';
|
||||
$basicThresholdsIntervalCritical[] = html_print_checkbox_switch(
|
||||
|
|
|
@ -544,7 +544,7 @@ class HTML
|
|||
'container_class' => $input['toggle_container_class'],
|
||||
'img_a' => $input['toggle_img_a'],
|
||||
'img_b' => $input['toggle_img_b'],
|
||||
'clean' => (isset($input['toggle_clean']) ? $input['toggle_clean'] : true),
|
||||
'clean' => (isset($input['toggle_clean']) ? $input['toggle_clean'] : false),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -4519,8 +4519,8 @@ function ui_print_toggle($data)
|
|||
(isset($data['toggle_class']) === true) ? $data['toggle_class'] : '',
|
||||
(isset($data['container_class']) === true) ? $data['container_class'] : 'white-box-content',
|
||||
(isset($data['main_class']) === true) ? $data['main_class'] : 'box-flat white_table_graph',
|
||||
(isset($data['img_a']) === true) ? $data['img_a'] : 'images/arrow_down_green.png',
|
||||
(isset($data['img_b']) === true) ? $data['img_b'] : 'images/arrow_right_green.png',
|
||||
(isset($data['img_a']) === true) ? $data['img_a'] : 'images/arrow@svg.svg',
|
||||
(isset($data['img_b']) === true) ? $data['img_b'] : 'images/arrow@svg.svg',
|
||||
(isset($data['clean']) === true) ? $data['clean'] : false,
|
||||
(isset($data['reverseImg']) === true) ? $data['reverseImg'] : false,
|
||||
(isset($data['switch']) === true) ? $data['switch'] : false,
|
||||
|
|
|
@ -297,6 +297,7 @@ td input[type="checkbox"] {
|
|||
padding: 10px;
|
||||
margin-top: 2px;
|
||||
display: table-cell;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
input[type="image"] {
|
||||
|
@ -4816,7 +4817,7 @@ div#dialog_messages table th:last-child {
|
|||
z-index: 900000;
|
||||
position: absolute;
|
||||
width: 550px;
|
||||
margin-top: -5px;
|
||||
margin-top: 55px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1169,6 +1169,10 @@ if ($config['pure'] == 0) {
|
|||
$menuTypeClass = ($menuCollapsed === true) ? 'collapsed' : 'classic';
|
||||
// Container.
|
||||
echo '<div id="container">';
|
||||
|
||||
// Notifications content wrapper
|
||||
echo '<div id="notification-content" class="invisible"/></div>';
|
||||
|
||||
// Header.
|
||||
echo '<div id="head">';
|
||||
include 'general/header.php';
|
||||
|
|
Loading…
Reference in New Issue