mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2014-02-04 Sergio Martin <sergio.martin@artica.es>
* include/functions_groups.php mobile/operation/tactical.php mobile/operation/groups.php mobile/include/style/main.css: Improve mobile console. Especially groups view git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9402 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3b7ca9e868
commit
31d305b7d5
@ -1,3 +1,11 @@
|
|||||||
|
2014-02-04 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/functions_groups.php
|
||||||
|
mobile/operation/tactical.php
|
||||||
|
mobile/operation/groups.php
|
||||||
|
mobile/include/style/main.css: Improve mobile
|
||||||
|
console. Especially groups view
|
||||||
|
|
||||||
2014-01-31 Sergio Martin <sergio.martin@artica.es>
|
2014-01-31 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* mobile/operation/agent.php
|
* mobile/operation/agent.php
|
||||||
|
@ -748,51 +748,77 @@ function groups_get_group_row_data($id_group, $group_all, $group, &$printed_grou
|
|||||||
WHERE disabled = 0");
|
WHERE disabled = 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
$row[__('Agents')] = "<a class='link_count' href='index.php?" .
|
// Total agents
|
||||||
"page=agents&group=" . $id_group . "'>";
|
$row['links'][__('Agents')] = "index.php?" .
|
||||||
$row[__('Agents')] .= $data["total_agents"];
|
"page=agents&group=" . $id_group;
|
||||||
|
$row['counts'][__('Agents')] = $data["total_agents"];
|
||||||
|
|
||||||
|
$row[__('Agents')] = "<a class='link_count' href='" . $row['links'][__('Agents')] . "'>";
|
||||||
|
$row[__('Agents')] .= $row['counts'][__('Agents')];
|
||||||
$row[__('Agents')] .= "</a>";
|
$row[__('Agents')] .= "</a>";
|
||||||
|
|
||||||
|
|
||||||
// Agents unknown
|
// Agents unknown
|
||||||
$row[__('Agents unknown')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Agents unknown')] = "index.php?" .
|
||||||
"page=agents&group=" . $id_group . "&status=" . AGENT_STATUS_UNKNOWN . "'>";
|
"page=agents&group=" . $id_group . "&status=" . AGENT_STATUS_UNKNOWN;
|
||||||
$row[__('Agents unknown')] .= $data["agents_unknown"];
|
$row['counts'][__('Agents unknown')] = $data["agents_unknown"];
|
||||||
|
|
||||||
|
$row[__('Agents unknown')] = "<a class='link_count' href='" . $row['counts'][__('Agents unknown')] . "'>";
|
||||||
|
$row[__('Agents unknown')] .= $row['counts'][__('Agents unknown')];
|
||||||
$row[__('Agents unknown')] .= "</a>";
|
$row[__('Agents unknown')] .= "</a>";
|
||||||
|
|
||||||
// Monitors Unknown
|
// Monitors Unknown
|
||||||
$row[__('Unknown')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Unknown')] = "index.php?" .
|
||||||
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_UNKNOWN . "'>";
|
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_UNKNOWN;
|
||||||
$row[__('Unknown')] .= $data["monitor_unknown"];
|
$row['counts'][__('Unknown')] = $data["monitor_unknown"];
|
||||||
|
|
||||||
|
$row[__('Unknown')] = "<a class='link_count' href='" . $row['links'][__('Unknown')] . "'>";
|
||||||
|
$row[__('Unknown')] .= $row['counts'][__('Unknown')];
|
||||||
$row[__('Unknown')] .= "</a>";
|
$row[__('Unknown')] .= "</a>";
|
||||||
|
|
||||||
// Monitors Not Init
|
// Monitors Not Init
|
||||||
$row[__('Not init')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Not init')] = "index.php?" .
|
||||||
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_NOT_INIT . "'>";
|
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_NOT_INIT;
|
||||||
$row[__('Not init')] .= $data["monitor_not_init"];
|
$row['counts'][__('Not init')] = $data["monitor_unknown"];
|
||||||
|
|
||||||
|
$row[__('Not init')] = "<a class='link_count' href='" . $row['links'][__('Not init')] . "'>";
|
||||||
|
$row[__('Not init')] .= $row['counts'][__('Not init')];
|
||||||
$row[__('Not init')] .= "</a>";
|
$row[__('Not init')] .= "</a>";
|
||||||
|
|
||||||
// Monitors OK
|
// Monitors OK
|
||||||
$row[__('Normal')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Normal')] = "index.php?" .
|
||||||
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_NORMAL . "'>";
|
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_NORMAL;
|
||||||
$row[__('Normal')] .= $data["monitor_ok"];
|
$row['counts'][__('Normal')] = $data["monitor_ok"];
|
||||||
|
|
||||||
|
$row[__('Normal')] = "<a class='link_count' href='" . $row['links'][__('Normal')] . "'>";
|
||||||
|
$row[__('Normal')] .= $row['counts'][__('Normal')];
|
||||||
$row[__('Normal')] .= "</a>";
|
$row[__('Normal')] .= "</a>";
|
||||||
|
|
||||||
// Monitors Warning
|
// Monitors Warning
|
||||||
$row[__('Warning')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Warning')] = "index.php?" .
|
||||||
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_WARNING . "'>";
|
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_WARNING;
|
||||||
$row[__('Warning')] .= $data["monitor_warning"];
|
$row['counts'][__('Warning')] = $data["monitor_warning"];
|
||||||
|
|
||||||
|
$row[__('Warning')] = "<a class='link_count' href='" . $row['links'][__('Warning')] . "'>";
|
||||||
|
$row[__('Warning')] .= $row['counts'][__('Normal')];
|
||||||
$row[__('Warning')] .= "</a>";
|
$row[__('Warning')] .= "</a>";
|
||||||
|
|
||||||
// Monitors Critical
|
// Monitors Critical
|
||||||
$row[__('Critical')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Critical')] = "index.php?" .
|
||||||
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD . "'>";
|
"page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD;
|
||||||
$row[__('Critical')] .= $data["monitor_critical"];
|
$row['counts'][__('Critical')] = $data["monitor_critical"];
|
||||||
|
|
||||||
|
$row[__('Critical')] = "<a class='link_count' href='" . $row['links'][__('Critical')] . "'>";
|
||||||
|
$row[__('Critical')] .= $row['counts'][__('Critical')];
|
||||||
$row[__('Critical')] .= "</a>";
|
$row[__('Critical')] .= "</a>";
|
||||||
|
|
||||||
// Alerts fired
|
// Alerts fired
|
||||||
$row[__('Alerts fired')] = "<a class='link_count' href='index.php?" .
|
$row['links'][__('Alerts fired')] = "index.php?" .
|
||||||
"page=alerts&group=" . $id_group . "&status=fired'>";;
|
"page=alerts&group=" . $id_group . "&status=fired";
|
||||||
$row[__('Alerts fired')] .= $data["monitor_alerts_fired"];
|
$row['counts'][__('Alerts fired')] = $data["monitor_alerts_fired"];
|
||||||
|
|
||||||
|
$row[__('Alerts fired')] = "<a class='link_count' href='" . $row['links'][__('Alerts fired')] . "'>";
|
||||||
|
$row[__('Alerts fired')] .= $row['counts'][__('Alerts fired')];
|
||||||
$row[__('Alerts fired')] .= "</a>";
|
$row[__('Alerts fired')] .= "</a>";
|
||||||
|
|
||||||
$rows[$id_group] = $row;
|
$rows[$id_group] = $row;
|
||||||
|
@ -41,10 +41,6 @@ legend {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-d {
|
|
||||||
border-radius: 0.6em 0.6em 0.6em 0.6em !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-btn-up-c {
|
.ui-btn-up-c {
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
text-shadow: none !important;
|
text-shadow: none !important;
|
||||||
@ -160,7 +156,7 @@ tr.group_view_alrm, .group_view_alrm {
|
|||||||
}
|
}
|
||||||
.ui-btn-up-group_view_alrm, .ui-btn-hover-group_view_alrm {
|
.ui-btn-up-group_view_alrm, .ui-btn-hover-group_view_alrm {
|
||||||
background-color: #F7931E;
|
background-color: #F7931E;
|
||||||
color: #111;
|
color: #FFF;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
@ -211,12 +207,40 @@ tr.group_view_data, .group_view_data {
|
|||||||
display: inline !important;
|
display: inline !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_groups .link_count.ui-link-inherit {
|
|
||||||
margin-top: -5px;
|
.list_groups .number_count, .list_groups .name_count {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list_groups .number_count {
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list_groups .name_count {
|
||||||
|
left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list_groups .name_count img {
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For mobiles */
|
||||||
|
@media screen and (max-width: 750px)
|
||||||
|
{
|
||||||
|
.list_groups .name_count img {
|
||||||
|
margin-top: -7px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* For tablets */
|
||||||
|
@media screen and (min-width: 750px)
|
||||||
|
{
|
||||||
|
.list_groups .name_count img {
|
||||||
|
margin-top: -3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*END-----------Groups styles-----------------------------------------*/
|
/*END-----------Groups styles-----------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
@ -493,6 +517,15 @@ table.event_details td.cell_event_name {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#list_agents .cell_0 img {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list_agents td {
|
||||||
|
height: 35px;
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 25em) {
|
@media screen and (max-width: 25em) {
|
||||||
#list_agents .cell_2 .ui-table-cell-label,
|
#list_agents .cell_2 .ui-table-cell-label,
|
||||||
@ -726,7 +759,7 @@ table.event_details td.cell_event_name {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ul.ui-listview li.ui-btn div.ui-btn-inner div.ui-btn-text {
|
ul.ui-listview li.ui-btn div.ui-btn-inner div.ui-btn-text a {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
@ -835,6 +868,16 @@ li.ui-btn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Common */
|
||||||
|
|
||||||
|
.ui-li>.ui-btn-inner {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.groups_sublist li {
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
/* For mobiles */
|
/* For mobiles */
|
||||||
@media screen and (max-width: 750px)
|
@media screen and (max-width: 750px)
|
||||||
{
|
{
|
||||||
@ -847,6 +890,11 @@ li.ui-btn {
|
|||||||
label, input, .ui-btn-inner {
|
label, input, .ui-btn-inner {
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list_groups .ui-btn-inner {
|
||||||
|
padding-top: 15px !important;
|
||||||
|
height: 20px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* For tablets */
|
/* For tablets */
|
||||||
@media screen and (min-width: 750px)
|
@media screen and (min-width: 750px)
|
||||||
@ -864,6 +912,11 @@ li.ui-btn {
|
|||||||
padding-top: 6px !important;
|
padding-top: 6px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list_groups .ui-btn-inner {
|
||||||
|
padding-top: 20px !important;
|
||||||
|
height: 35px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.ui-header .ui-title {
|
.ui-header .ui-title {
|
||||||
font-size: 18px !important;
|
font-size: 18px !important;
|
||||||
}
|
}
|
||||||
|
@ -83,39 +83,46 @@ class Groups {
|
|||||||
'data-iconpos="right" data-role="collapsible" ' .
|
'data-iconpos="right" data-role="collapsible" ' .
|
||||||
'data-collapsed="true" data-theme="' . $group['status'] . '" data-content-theme="d">');
|
'data-collapsed="true" data-theme="' . $group['status'] . '" data-content-theme="d">');
|
||||||
$ui->contentAddHtml('<h4>' . $group['group_name'] . '</h4>');
|
$ui->contentAddHtml('<h4>' . $group['group_name'] . '</h4>');
|
||||||
$ui->contentAddHtml('<ul data-role="listview">');
|
$ui->contentAddHtml('<ul data-role="listview" class="groups_sublist">');
|
||||||
$ui->contentAddHtml('<li>' .
|
|
||||||
__('Agents') .
|
foreach ($group['counts'] as $k => $v) {
|
||||||
' ' . $group[__('Agents')] .
|
if($v == 0) {
|
||||||
'</li>');
|
$group['counts'][$k] = '-';
|
||||||
$ui->contentAddHtml('<li>' .
|
}
|
||||||
__('Agents unknown') .
|
}
|
||||||
' ' . $group[__('Agents unknown')] .
|
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Agents')] . '">' .
|
||||||
$ui->contentAddHtml('<li>' .
|
'<span class="name_count">' . html_print_image('images/agent.png', true) . __('Total agents') . '</span>' .
|
||||||
__('Unknown') .
|
'<span class="number_count">' . $group['counts'][__('Agents')] . '</span>' .
|
||||||
' ' . $group[__('Unknown')] .
|
'</a></li>');
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Agents unknown')] . '">' .
|
||||||
$ui->contentAddHtml('<li>' .
|
'<span class="name_count">' . html_print_image('images/agent_unknown.png', true) . __('Agents unknown') . '</span>' .
|
||||||
__('Not init') .
|
'<span class="number_count">' . $group['counts'][__('Agents unknown')] . '</span>' .
|
||||||
' ' . $group[__('Not init')] .
|
'</a></li>');
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Unknown')] . '">' .
|
||||||
$ui->contentAddHtml('<li>' .
|
'<span class="name_count">' . html_print_image('images/module_unknown.png', true) . __('Unknown modules') . '</span>' .
|
||||||
__('Normal') .
|
'<span class="number_count">' . $group['counts'][__('Unknown')] . '</span>' .
|
||||||
' ' . $group[__('Normal')] .
|
'</a></li>');
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Not init')] . '">' .
|
||||||
$ui->contentAddHtml('<li>' .
|
'<span class="name_count">' . html_print_image('images/module_notinit.png', true) . __('Not init modules') . '</span>' .
|
||||||
__('Warning') .
|
'<span class="number_count">' . $group['counts'][__('Not init')] . '</span>' .
|
||||||
' ' . $group[__('Warning')] .
|
'</a></li>');
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Normal')] . '">' .
|
||||||
$ui->contentAddHtml('<li>' .
|
'<span class="name_count">' . html_print_image('images/module_ok.png', true) . __('Normal modules') . '</span>' .
|
||||||
__('Critical') .
|
'<span class="number_count">' . $group['counts'][__('Normal')] . '</span>' .
|
||||||
' ' . $group[__('Critical')] .
|
'</a></li>');
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Warning')] . '">' .
|
||||||
$ui->contentAddHtml('<li>' .
|
'<span class="name_count">' . html_print_image('images/module_warning.png', true) . __('Warning modules') . '</span>' .
|
||||||
__('Alerts fired') .
|
'<span class="number_count">' . $group['counts'][__('Warning')] . '</span>' .
|
||||||
' ' . $group[__('Alerts fired')] .
|
'</a></li>');
|
||||||
'</li>');
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Critical')] . '">' .
|
||||||
|
'<span class="name_count">' . html_print_image('images/module_critical.png', true) . __('Critical modules') . '</span>' .
|
||||||
|
'<span class="number_count">' . $group['counts'][__('Critical')] . '</span>' .
|
||||||
|
'</a></li>');
|
||||||
|
$ui->contentAddHtml('<li data-icon="false"><a href="' . $group['links'][__('Alerts fired')] . '">' .
|
||||||
|
'<span class="name_count">' . html_print_image('images/bell_error.png', true) . __('Alerts fired') . '</span>' .
|
||||||
|
'<span class="number_count">' . $group['counts'][__('Alerts fired')] . '</span>' .
|
||||||
|
'</a></li>');
|
||||||
$ui->contentAddHtml('</ul>');
|
$ui->contentAddHtml('</ul>');
|
||||||
$ui->contentAddHtml('</div>');
|
$ui->contentAddHtml('</div>');
|
||||||
|
|
||||||
|
@ -68,30 +68,22 @@ class Tactical {
|
|||||||
<tr>
|
<tr>
|
||||||
<td>' . $formatted_data['server_health']['title'] . '</td>
|
<td>' . $formatted_data['server_health']['title'] . '</td>
|
||||||
<td class="tiny tactical_bar">' . $formatted_data['server_health']['graph'] . '</td>
|
<td class="tiny tactical_bar">' . $formatted_data['server_health']['graph'] . '</td>
|
||||||
</tr>
|
<td class="untiny tactical_bar">' . $formatted_data_untiny['server_health']['graph'] . '</td>
|
||||||
<tr class="untiny tactical_bar">
|
|
||||||
<td>' . $formatted_data_untiny['server_health']['graph'] . '</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>' . $formatted_data['monitor_health']['title'] . '</td>
|
<td>' . $formatted_data['monitor_health']['title'] . '</td>
|
||||||
<td class="tiny tactical_bar">' . $formatted_data['monitor_health']['graph'] . '</td>
|
<td class="tiny tactical_bar">' . $formatted_data['monitor_health']['graph'] . '</td>
|
||||||
</tr>
|
<td class="untiny tactical_bar">' . $formatted_data_untiny['monitor_health']['graph'] . '</td>
|
||||||
<tr class="untiny tactical_bar">
|
|
||||||
<td>' . $formatted_data_untiny['monitor_health']['graph'] . '</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>' . $formatted_data['module_sanity']['title'] . '</td>
|
<td>' . $formatted_data['module_sanity']['title'] . '</td>
|
||||||
<td class="tiny tactical_bar">' . $formatted_data['module_sanity']['graph'] . '</td>
|
<td class="tiny tactical_bar">' . $formatted_data['module_sanity']['graph'] . '</td>
|
||||||
</tr>
|
<td class="untiny tactical_bar">' . $formatted_data_untiny['module_sanity']['graph'] . '</td>
|
||||||
<tr class="untiny tactical_bar">
|
|
||||||
<td>' . $formatted_data_untiny['module_sanity']['graph'] . '</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>' . $formatted_data['alert_level']['title'] . '</td>
|
<td>' . $formatted_data['alert_level']['title'] . '</td>
|
||||||
<td class="tiny tactical_bar">' . $formatted_data['alert_level']['graph'] . '</td>
|
<td class="tiny tactical_bar">' . $formatted_data['alert_level']['graph'] . '</td>
|
||||||
</tr>
|
<td class="untiny tactical_bar">' . $formatted_data_untiny['alert_level']['graph'] . '</td>
|
||||||
<tr class="untiny tactical_bar">
|
|
||||||
<td>' . $formatted_data_untiny['alert_level']['graph'] . '</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user