Fix header and menu
This commit is contained in:
parent
6e8eb9800f
commit
a063c7a0ac
|
@ -187,7 +187,7 @@ $table->data[2][0] = html_print_label_input_block(
|
|||
);
|
||||
|
||||
if (isset($step) === false) {
|
||||
echo '<form class="add_alert_form max_floating_element_size" method="post">';
|
||||
echo '<form id="form_alerts" class="add_alert_form max_floating_element_size" method="post">';
|
||||
html_print_table($table);
|
||||
}
|
||||
|
||||
|
@ -216,6 +216,26 @@ if (isset($step) === false) {
|
|||
true
|
||||
);
|
||||
|
||||
if ($_GET['sec2'] === 'operation/cluster/cluster') {
|
||||
html_print_div(
|
||||
[
|
||||
'content' => html_print_submit_button(
|
||||
__('Add alert'),
|
||||
'add',
|
||||
false,
|
||||
[
|
||||
'icon' => 'wand',
|
||||
'form' => 'form_alerts',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
'style' => 'display:none',
|
||||
'id' => 'add_alert_div',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
html_print_action_buttons($actionButtons, ['right_content' => $pagination]);
|
||||
|
||||
html_print_input_hidden('create_alert', 1);
|
||||
|
|
|
@ -497,45 +497,47 @@ if (is_metaconsole() === false) {
|
|||
$buttons = '';
|
||||
}
|
||||
|
||||
if ($tab !== 'alert') {
|
||||
if ($tab === 'list') {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
if ($_GET['sec2'] !== 'operation/cluster/cluster') {
|
||||
if ($tab !== 'alert') {
|
||||
if ($tab === 'list') {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('List'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('List'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Create'),
|
||||
],
|
||||
]
|
||||
);
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Create'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -84,7 +84,7 @@ $buttons['gis_maps_list'] = [
|
|||
true,
|
||||
[
|
||||
'title' => __('GIS Maps list'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
|
@ -96,19 +96,30 @@ if ($idMap) {
|
|||
true,
|
||||
[
|
||||
'title' => __('View GIS'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('GIS Maps builder'),
|
||||
'images/gm_gis.png',
|
||||
false,
|
||||
'configure_gis_map_edit',
|
||||
true,
|
||||
$buttons
|
||||
false,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('GIS Maps'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
switch ($action) {
|
||||
|
@ -480,7 +491,7 @@ $table->data[1][1] = "<table class='no-class' border='0' id='map_connection'>
|
|||
<a href='javascript: addConnectionMap();'>".html_print_image(
|
||||
'images/add.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
['class' => 'invert_filter main_menu_icon']
|
||||
)."</a>
|
||||
<input type='hidden' name='map_connection_list' value='' id='map_connection_list' />
|
||||
<input type='hidden' name='layer_list' value='' id='layer_list' />
|
||||
|
@ -583,7 +594,7 @@ $table->data[1][1] = '<div id="form_layer" class="invisible">
|
|||
|
||||
|
||||
|
||||
$table->data[1][1] .= html_print_button(__('Add agent'), 'add_agent', true, '', 'class="sub add"', true);
|
||||
$table->data[1][1] .= html_print_button(__('Add agent'), 'add_agent', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
|
||||
|
||||
$params = [];
|
||||
$params['return'] = true;
|
||||
|
@ -628,7 +639,7 @@ $params['javascript_is_function_select'] = true;
|
|||
// Filter by group.
|
||||
$params['disabled_javascript_on_blur_function'] = false;
|
||||
$agent_for_group_input = ui_print_agent_autocomplete_input($params);
|
||||
$add_group_btn = html_print_button(__('Add'), 'add_group', true, '', 'class="sub add"', true);
|
||||
$add_group_btn = html_print_button(__('Add'), 'add_group', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
|
||||
|
||||
$table->data[1][1] .= '<tr><td colspan="4"><hr /></td></tr>
|
||||
<tr>
|
||||
|
@ -660,21 +671,19 @@ $table->data[1][1] .= '<tr>
|
|||
|
||||
html_print_table($table);
|
||||
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
switch ($action) {
|
||||
case 'save_new':
|
||||
case 'edit_map':
|
||||
case 'update_saved':
|
||||
if (empty($invalidFields) === true) {
|
||||
html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"');
|
||||
$action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
} else {
|
||||
html_print_submit_button(_('Update map'), 'update_button', false, 'class="sub upd"');
|
||||
$action_button = html_print_submit_button(_('Update map'), 'update_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'new_map':
|
||||
html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"');
|
||||
$action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -682,7 +691,10 @@ switch ($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
html_print_action_buttons(
|
||||
$action_button,
|
||||
['type' => 'form_action']
|
||||
);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
@ -702,7 +714,7 @@ echo '</form>';
|
|||
false,
|
||||
[
|
||||
'alt' => '',
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
@ -899,7 +911,7 @@ function setLayerEditorData (data) {
|
|||
var $layerFormVisibleCheckbox = $("input#checkbox-layer_visible_form");
|
||||
var $layerFormAgentsFromGroupSelect = $("#layer_group_form");
|
||||
var $layerFormAgentInput = $("input#text-agent_alias");
|
||||
var $layerFormAgentButton = $("input#button-add_agent");
|
||||
var $layerFormAgentButton = $("button#button-add_agent");
|
||||
var $layerFormAgentsListItems = $("tr.agents_list_item");
|
||||
var $layerFormGroupsListItems = $("tr.groups_list_item");
|
||||
|
||||
|
@ -1005,7 +1017,7 @@ function getAgentRow (layerId, agentId, agentAlias) {
|
|||
var $deleteCol = $("<td />");
|
||||
|
||||
var $agentAlias = $("<span class=\"agent_alias\" data-agent-id=\"" + agentId + "\">" + agentAlias + "</span>");
|
||||
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/delete.svg', false, ['class' => 'invert_filter']); ?> </a>');
|
||||
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/delete.svg', false, ['class' => 'invert_filter main_menu_icon']); ?> </a>');
|
||||
|
||||
$removeBtn.click(function (event) {
|
||||
var $layerRow = $("tr#layer_row_" + layerId);
|
||||
|
@ -1061,7 +1073,7 @@ function getGroupRow (layerId, groupId, groupName, agentId, agentAlias) {
|
|||
+ "<i>" + agentAlias + "</i>"
|
||||
+ ")"
|
||||
+ "</span>");
|
||||
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>');
|
||||
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']); ?></a>');
|
||||
|
||||
$removeBtn.click(function (event) {
|
||||
var $layerRow = $("tr#layer_row_" + layerId);
|
||||
|
@ -1139,8 +1151,8 @@ function getLayerRow (layerId, layerData) {
|
|||
var $layerName = $("<span class=\"layer_name\">" + layerData.name + "</span>");
|
||||
var $sortUpBtn = $("<a class=\"up_arrow\" href=\"javascript:;\" />");
|
||||
var $sortDownBtn = $("<a class=\"down_arrow\" href=\"javascript:;\" />");
|
||||
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/edit.svg', true, ['class' => 'invert_filter']); ?></a>');
|
||||
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>');
|
||||
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/edit.svg', true, ['class' => 'invert_filter main_menu_icon']); ?></a>');
|
||||
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']); ?></a>');
|
||||
|
||||
$sortUpBtn.click(moveLayerRowUpOnClick);
|
||||
$sortDownBtn.click(moveLayerRowDownOnClick);
|
||||
|
@ -1231,9 +1243,9 @@ function onLayerGroupIdChange (event) {
|
|||
|
||||
// Bind events
|
||||
$("form#form_setup").submit(onFormSubmit);
|
||||
$("input#button-add_agent").click(addAgentClick);
|
||||
$("button#button-add_agent").click(addAgentClick);
|
||||
$("select#layer_group_id").change(onLayerGroupIdChange);
|
||||
$("input#button-add_group").click(addGroupClick);
|
||||
$("button#button-add_group").click(addGroupClick);
|
||||
|
||||
// Populate layer list
|
||||
var layers = <?php echo json_encode($layer_list); ?>;
|
||||
|
|
|
@ -220,7 +220,7 @@ $alertstab = [
|
|||
true,
|
||||
[
|
||||
'title' => __('Alerts operations'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_alerts',
|
||||
|
@ -232,7 +232,7 @@ $userstab = [
|
|||
true,
|
||||
[
|
||||
'title' => __('Users operations'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_users',
|
||||
|
@ -244,7 +244,7 @@ $agentstab = [
|
|||
true,
|
||||
[
|
||||
'title' => __('Agents operations'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_agents',
|
||||
|
@ -256,7 +256,7 @@ $modulestab = [
|
|||
true,
|
||||
[
|
||||
'title' => __('Modules operations'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_modules',
|
||||
|
@ -268,7 +268,7 @@ $pluginstab = [
|
|||
true,
|
||||
[
|
||||
'title' => __('Plugins operations'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => $tab == 'massive_plugins',
|
||||
|
@ -308,34 +308,58 @@ $onheader['services'] = $servicestab;
|
|||
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Bulk operations').' - '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
false,
|
||||
[
|
||||
$agentstab,
|
||||
$modulestab,
|
||||
$pluginstab,
|
||||
$userstab,
|
||||
$alertstab,
|
||||
$policiestab,
|
||||
$snmptab,
|
||||
$satellitetab,
|
||||
$servicestab,
|
||||
],
|
||||
[
|
||||
if (is_metaconsole() === false) {
|
||||
ui_print_standard_header(
|
||||
__('Bulk operations').' - '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
false,
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Configuration'),
|
||||
$agentstab,
|
||||
$modulestab,
|
||||
$pluginstab,
|
||||
$userstab,
|
||||
$alertstab,
|
||||
$policiestab,
|
||||
$snmptab,
|
||||
$satellitetab,
|
||||
$servicestab,
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Bulk operations'),
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Configuration'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Bulk operations'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Bulk operations').' - '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
false,
|
||||
[
|
||||
$userstab,
|
||||
$agentstab,
|
||||
],
|
||||
]
|
||||
);
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Configuration'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Bulk operations'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Checks if the PHP configuration is correctly.
|
||||
|
|
|
@ -25,8 +25,25 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('Site news management'), '', false, '', true);
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Site news management'),
|
||||
'images/custom_field.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Admin tools'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Site news'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,12 @@ function menu_print_menu(&$menu)
|
|||
$sec2 = 'godmode/alerts/alert_commands';
|
||||
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
||||
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
||||
} else if ($sec2 === 'godmode/gis_maps/configure_gis_map') {
|
||||
$map_id = (string) get_parameter('map_id');
|
||||
$sec2 = 'operation/gis_maps/render_view&map_id='.$map_id;
|
||||
} else if ($sec2 === 'operation/gis_maps/render_view') {
|
||||
$map_id = (string) get_parameter('map_id');
|
||||
$sec2 = 'operation/gis_maps/render_view&map_id='.$map_id;
|
||||
} else if ($sec2 === 'godmode/servers/discovery') {
|
||||
$wiz = (string) get_parameter('wiz');
|
||||
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
||||
|
|
|
@ -31,13 +31,24 @@ $buttons['gis_maps_list'] = [
|
|||
).'</a>',
|
||||
];
|
||||
|
||||
ui_print_page_header(
|
||||
__('GIS Maps'),
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('List of GIS maps'),
|
||||
'images/op_gis.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('GIS Maps'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
|
@ -187,7 +198,7 @@ if ($maps !== false) {
|
|||
}
|
||||
|
||||
$table->cellclass[]['op'] = 'table_action_buttons';
|
||||
$data['op'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&action=edit_map">'.html_print_image('images/edit.svg', true, ['title' => __('Edit')]).'</a>'.'<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map&map_id='.$map['id_tgis_map'].'&action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
$data['op'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&action=edit_map">'.html_print_image('images/edit.svg', true, ['title' => __('Edit')]).'</a>'.'<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map&map_id='.$map['id_tgis_map'].'&action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter main_menu_icon']).'</a>';
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
|
|
|
@ -174,13 +174,24 @@ if ($has_management_acl) {
|
|||
$buttons['setup']['godmode'] = 1;
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
__('Map').' » '.__('Map').' '.$map['map_name'],
|
||||
'images/op_gis.png',
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Map').': '.$map['map_name'],
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'render_view_tab',
|
||||
'snmp_console',
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('GIS Maps'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$map_inline_style = 'width: 100%; min-height:500px; height: calc(100vh - 80px);';
|
||||
|
@ -320,5 +331,8 @@ if ($layers != false) {
|
|||
$(document).ready(function() {
|
||||
var $map = $("#map");
|
||||
$map.css("height", "calc(100vh - " + $map.offset().top + "px - 20px)");
|
||||
|
||||
$('#select2-show_status-container').parent().parent().parent().removeClass('select2');
|
||||
$('#select2-refresh_time-container').parent().parent().parent().removeClass('select2');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -143,7 +143,9 @@ html_print_action_buttons(
|
|||
var buttonback = $('#button-submit').parent().html();
|
||||
$('#button-submit').hide();
|
||||
var buttonback = buttonback.replace('button-submit','button-submit_copy');
|
||||
$('.action_buttons_right_content').parent().html(buttonnext+buttonback);
|
||||
var buttonalert = $('#button-add').parent().html();
|
||||
var buttonalert = buttonalert.replace('button-add','button-add_copy');
|
||||
$('.action_buttons_right_content').parent().html(buttonnext+buttonback+buttonalert);
|
||||
var style = $('#principal_action_buttons').attr('style');
|
||||
$('#principal_action_buttons').attr('style',style+' justify-content: unset;');
|
||||
|
||||
|
|
|
@ -27,12 +27,23 @@
|
|||
*/
|
||||
|
||||
// Header.
|
||||
\ui_print_page_header(
|
||||
__('Monitoring').' » '.__('Clusters'),
|
||||
ui_print_standard_header(
|
||||
__('Cluster view'),
|
||||
'images/chart.png',
|
||||
false,
|
||||
'',
|
||||
false
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Clusters'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (empty($message) === false) {
|
||||
|
|
Loading…
Reference in New Issue