WIP command center

This commit is contained in:
Daniel Barbero Martin 2021-05-06 14:22:39 +02:00
parent d5dcc5bf69
commit 51f38f3589
4 changed files with 140 additions and 2 deletions

View File

@ -0,0 +1,69 @@
<?php
/**
* Static page to lock access to console
*
* @category Wizard
* @package Pandora FMS
* @subpackage Applications.VMware
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* 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 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.
* ============================================================================
*/
// Begin.
ui_require_css_file('maintenance');
?>
<html>
<body>
<h1>Ups ...</h1>
<div class="responsive">
<p><?php echo __('Maintenance tasks in progress'); ?></p>
<br>
<br>
<?php
html_print_image(
'images/maintenance.png',
false,
[
'class' => 'responsive',
'width' => 800,
]
);
?>
<br>
<br>
<p><?php echo __('You will be automatically redirected when all tasks finish'); ?></p>
</div>
</body>
<script type="text/javascript">
$(document).ready(function() {
setTimeout(
function() {
location.reload();
},
10000
);
})
</script>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -0,0 +1,56 @@
/* Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.responsive {
max-width: 100%;
height: auto;
}
html {
font-size: 18px;
font-family: "lato-bolder", "Open Sans", sans-serif;
}
h1 {
font-size: 80px;
font-weight: bold;
margin-bottom: 1.5rem;
color: #83b92f;
}
p {
font-size: 2rem;
margin-bottom: 0.5rem;
letter-spacing: 1.5px;
font-weight: lighter;
color: #333;
}
body {
text-align: center;
padding: 30px;
font: 20px Helvetica, sans-serif;
color: #333;
line-height: 1;
}
#article {
display: block;
text-align: left;
width: 650px;
margin: 0 auto;
}
a {
color: #dc8100;
text-decoration: none;
}
a:hover {
color: #333;
text-decoration: none;
}

View File

@ -1045,6 +1045,21 @@ if (get_parameter('login', 0) !== 0) {
}
}
if ((bool) $config['maintenance_mode'] === true
&& (bool) users_is_admin() === false
) {
// Show maintenance web-page. For non-admin users only.
include 'general/maintenance.php';
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
}
// Header.
if ($config['pure'] == 0) {
echo '<div id="container"><div id="head">';
@ -1079,8 +1094,6 @@ if ($config['pure'] == 0) {
echo '<div id="main">';
}
// Page loader / selector.
if ($searchPage) {
include 'operation/search_results.php';