From 7cf69ae10104220b9643fc3b5124d139492142bd Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 8 May 2023 08:49:35 +0200 Subject: [PATCH] 11058-New welcome message --- pandora_console/general/logon_ok.php | 52 +++- pandora_console/godmode/setup/news.php | 31 ++- pandora_console/images/welcome_image.svg | 291 +++++++++++++++++++++++ pandora_console/include/styles/news.css | 78 +++++- 4 files changed, 419 insertions(+), 33 deletions(-) create mode 100644 pandora_console/images/welcome_image.svg diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 2b88b6a103..d50fc33336 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -202,22 +202,58 @@ if (!empty($news)) { $output_news = '
'; foreach ($news as $article) { - $image = false; + $default = false; if ($article['text'] == '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -> Site news.</p> ') { - $image = true; + $article['subject'] = __('Welcome to Pandora FMS Console'); + $default = true; } $text_bbdd = io_safe_output($article['text']); $text = html_entity_decode($text_bbdd); - $output_news .= ''.$article['subject'].''; + + $output_news .= '
'; + $output_news .= '
'; + $output_news .= ''.$article['subject'].''; + $output_news .= ''.__('By').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).''; + $output_news .= '
'; $output_news .= '
'; - $output_news .= '

'.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.'

'; - if ($image) { - $output_news .= '
img colabora con nosotros - Support
'; + + if ($default) { + $output_news .= '
'; + $output_news .= '
'; + $output_news .= 'img colabora con nosotros - Support'; + $output_news .= '
'; + + $output_news .= ' +

'.__('Welcome to our monitoring tool so grand,').' +
'.__('Where data insights are at your command.').' +
'.__('Sales, marketing, operations too,').' +
'.__("Customer support, we've got you.").' +

+ +

'.__('Our interface is user-friendly,').' +
'.__("Customize your dashboard, it's easy.").' +
'.__('Set up alerts and gain insights so keen,').' +
'.__("Optimize your data, like you've never seen.").' +

+ +

'.__('Unleash its power now, and join the pro league,').' +
'.__('Unlock the potential of your data to intrigue.').' +
'.__('Monitoring made simple, efficient and fun,').' +
'.__('Discover a whole new way to get things done.').' +

+ +

'.__('And take control of your IT once and for all.').'

+ + '.__('You can replace this message with a personalized one at Admin tools -> Site news.').' + '; + + $output_news .= '
'; + } else { + $output_news .= nl2br($text); } - $output_news .= nl2br($text); - $output_news .= '
'; + $output_news .= '
'; } $output_news .= ''; diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index e9bd82f46e..6055401820 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -147,6 +147,10 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) { $result = db_get_row('tnews', 'id_news', $id_news); + if ($result['text'] == '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ') { + header('Location: '.ui_get_full_url('index.php?sec=gextensions&sec2=godmode/setup/news')); + } + if ($result !== false) { $subject = $result['subject']; $text = $result['text']; @@ -355,42 +359,37 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) { echo ''; - $color = 1; foreach ($rows as $row) { - if ($color == 1) { - $tdcolor = 'datos'; - $color = 0; + if ($row['text'] == '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ') { + echo ''.__('Welcome to Pandora FMS Console').''; } else { - $tdcolor = 'datos2'; - $color = 1; + echo "".$row['subject'].''; } - echo "".$row['subject'].''; - if ($row['modal']) { - echo "".__('Modal').''; + echo ''.__('Modal').''; } else { - echo "".__('Board').''; + echo ''.__('Board').''; } - echo "".$row['author'].''; + echo ''.$row['author'].''; $utimestamp = time_w_fixed_tz($row['timestamp']); - echo "".date($config['date_format'], $utimestamp).''; + echo ''.date($config['date_format'], $utimestamp).''; if ($row['expire']) { $expire_utimestamp = time_w_fixed_tz($row['expire_timestamp']); $expire_in_secs = ($expire_utimestamp - $utimestamp); if ($expire_in_secs <= 0) { - echo "".__('Expired').''; + echo ''.__('Expired').''; } else { $expire_in = human_time_description_raw($expire_in_secs, false, 'large'); - echo "".$expire_in.''; + echo ''.$expire_in.''; } } else { - echo "".__('No').''; + echo ''.__('No').''; } - echo ''.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).''; + echo ''.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter main_menu_icon']).''; } echo ''; diff --git a/pandora_console/images/welcome_image.svg b/pandora_console/images/welcome_image.svg new file mode 100644 index 0000000000..0a15560136 --- /dev/null +++ b/pandora_console/images/welcome_image.svg @@ -0,0 +1,291 @@ + + + 9C390E1A-9FE4-4604-9F9A-D60ED1281F4D + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/include/styles/news.css b/pandora_console/include/styles/news.css index d94116a1c1..c9e66bd462 100644 --- a/pandora_console/include/styles/news.css +++ b/pandora_console/include/styles/news.css @@ -1,14 +1,74 @@ -.green_title { - background-color: #82b92e; +.new-board { + background-color: #ffffff; + border: 1px solid #e5e9ed; + border-radius: 4px; + margin-bottom: 15px; +} + +.new-board-header { + background-image: linear-gradient(180deg, #fdfdfe 0%, #ffffff 100%); + border-radius: 4px 4px 0 0; + width: 100%; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; +} + +.new-board-title { font-weight: 600; - width: auto; - text-align: center; - display: block; - padding: 1em; - font-size: 1.3em; - color: #fff; + font-size: 16px; + line-height: 24px; + color: #161628; + margin: 15px; +} + +.new-board-author { + color: #8a96a6; + margin: 15px; } .new.content { - padding: 0 4em 2em; + padding: 0 15px 15px; +} + +.default-new { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; +} + +.default-new > div > img { + width: 100%; + max-width: 430px; + height: auto; +} + +.default-new > div.default-text-new { + margin-left: 20px; + width: 400px; +} + +.default-new > div.default-text-new > p { + color: #454545; + font-size: 15px; + line-height: 24px; +} + +.default-new > div.default-text-new > p:first-child { + margin-top: 0px; +} + +.default-new > div.default-text-new > span { + color: #8a96a6; + font-size: 11px; + line-height: 20px; +} + +@media screen and (max-width: 1430px) { + .default-new > div.default-text-new > p { + font-size: 12px; + line-height: 18px; + } }