This commit is contained in:
cesar991 2016-09-30 11:02:36 +02:00
commit dd8771cf77
10 changed files with 67 additions and 67 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -989,8 +989,9 @@ li.ui-btn {
}
.login_logo img {
width: 185px;
width: 220px;
margin-bottom: 10px;
padding-top: 5%;
}
.untiny {
@ -1033,6 +1034,7 @@ li.ui-btn {
.login_logo img {
width: 300px;
margin-bottom: 20px;
padding-top: 5%;
}
.tiny {
@ -1044,6 +1046,7 @@ li.ui-btn {
width: 60%;
margin: 0 auto;
max-width: 300px;
padding-top: 5%;
}
.event_name {
@ -1089,35 +1092,35 @@ table.tactical_bars {
/*INIT-----------Icons styles---------------------------------------*/
.ui-icon-tactical_view {
background-image: url(../../../images/op_monitoring.png) !important;
background-image: url(../../../images/op_monitoring.menu.png) !important;
}
.ui-icon-events {
background-image: url(../../../images/op_events.png) !important;
background-image: url(../../../images/op_events.menu.png) !important;
}
.ui-icon-groups {
background-image: url(../../../images/group.png) !important;
background-image: url(../../../images/group.menu.png) !important;
}
.ui-icon-alerts {
background-image: url(../../../images/op_alerts.png) !important;
background-image: url(../../../images/op_alerts.menu.png) !important;
}
.ui-icon-agents {
background-image: url(../../../images/agent_mc.png) !important;
background-image: url(../../../images/agent_mc.menu.png) !important;
}
.ui-icon-modules {
background-image: url(../../../images/brick.png) !important;
background-image: url(../../../images/brick.menu.png) !important;
}
.ui-icon-network_maps {
background-image: url(../../../images/op_network.png) !important;
background-image: url(../../../images/op_network.menu.png) !important;
}
.ui-icon-visual_console {
background-image: url(../../../images/visual_console.png) !important;
background-image: url(../../../images/visual_console.menu.png) !important;
}
.ui-icon-tactical_view, .ui-icon-events,

View File

@ -202,6 +202,7 @@ class User {
global $pandora_version;
$ui = Ui::getInstance();
$system = System::getInstance();
$ui->createPage();
if ($this->errorLogin) {
@ -224,36 +225,42 @@ class User {
$ui->createHeader();
$ui->showFooter(false);
$ui->beginContent();
$ui->contentAddHtml('<div style="text-align: center;" class="login_logo">' .
html_print_image ("mobile/images/pandora_mobile_console.png",
true, array ("alt" => "logo", "border" => 0)) .
'</div>');
$ui->contentAddHtml('<div id="login_container">');
$ui->beginForm();
$ui->formAddHtml(html_print_input_hidden('action', 'login', true));
$options = array(
'name' => 'user',
'value' => $this->user,
'placeholder' => __('user'),
'label' => __('User')
);
$ui->formAddInputText($options);
$options = array(
'name' => 'password',
'value' => '',
'placeholder' => __('password'),
'label' => __('Password')
);
$ui->formAddInputPassword($options);
$options = array(
'value' => __('Login'),
'icon' => 'arrow-r',
'icon_pos' => 'right',
'name' => 'login_btn'
);
$ui->formAddSubmitButton($options);
$ui->endForm();
$ui->contentAddHtml('</div>');
if (!$system->getConfig('metaconsole'))
$logo_image = html_print_image ("mobile/images/pandora_mobile_console.png",
true, array ("alt" => "logo", "border" => 0));
else
$logo_image = html_print_image ("mobile/images/metaconsole_mobile.png",
true, array ("alt" => "logo", "border" => 0),false, false, false, true);
$ui->contentAddHtml('<div style="text-align: center;" class="login_logo">' .
$logo_image . '</div>');
$ui->contentAddHtml('<div id="login_container">');
$ui->beginForm();
$ui->formAddHtml(html_print_input_hidden('action', 'login', true));
$options = array(
'name' => 'user',
'value' => $this->user,
'placeholder' => __('user'),
'label' => __('User')
);
$ui->formAddInputText($options);
$options = array(
'name' => 'password',
'value' => '',
'placeholder' => __('password'),
'label' => __('Password')
);
$ui->formAddInputPassword($options);
$options = array(
'value' => __('Login'),
'icon' => 'arrow-r',
'icon_pos' => 'right',
'name' => 'login_btn'
);
$ui->formAddSubmitButton($options);
$ui->endForm();
$ui->contentAddHtml('</div>');
$ui->endContent();
$ui->showPage();

View File

@ -18,7 +18,7 @@ if (function_exists ('mb_internal_encoding')) {
mb_internal_encoding ("UTF-8");
}
$develop_bypass = 1;
$develop_bypass = 0;
require_once("include/ui.class.php");
require_once("include/system.class.php");

View File

@ -183,35 +183,25 @@ class Groups {
private function getListGroups() {
$return = array();
$system = System::getInstance();
$user = User::getInstance();
// Get group list that user has access
$groups_full = users_get_groups($user->getIdUser(), "AR", true, true);
$groups = array();
foreach ($groups_full as $group) {
$groups[$group['id_grupo']]['name'] = $group['nombre'];
if ($group['id_grupo'] != 0) {
$groups[$group['parent']]['childs'][] = $group['id_grupo'];
$groups[$group['id_grupo']]['prefix'] = $groups[$group['parent']]['prefix'].'&nbsp;&nbsp;&nbsp;';
}
else {
$groups[$group['id_grupo']]['prefix'] = '';
}
if (!isset($groups[$group['id_grupo']]['childs'])) {
$groups[$group['id_grupo']]['childs'] = array();
}
$all_data = groupview_status_modules_agents ($system->getConfig('id_user'), false, 'AR', false);
$result_groups = groupview_get_groups_list($system->getConfig('id_user'), false, 'AR', true, true);
foreach ($all_data as $group_all_data) {
$result_groups[0]['_total_agents_'] += $group_all_data["_total_agents_"];
$result_groups[0]['_monitors_ok_'] += $group_all_data["_monitors_ok_"];
$result_groups[0]['_monitors_warning_'] += $group_all_data["_monitors_warning_"];
$result_groups[0]['_monitors_critical_'] += $group_all_data["_monitors_critical_"];
$result_groups[0]['_monitors_unknown_'] += $group_all_data["_monitors_unknown_"];
$result_groups[0]['_monitors_not_init_'] += $group_all_data["_monitors_not_init_"];
$result_groups[0]['_agents_unknown_'] += $group_all_data["_agents_unknown_"];
$result_groups[0]['_agents_not_init_'] += $group_all_data["_agents_not_init_"];
$result_groups[0]['_agents_critical_'] += $group_all_data["_agents_critical_"];
$result_groups[0]['_monitors_alerts_fired_'] += $group_all_data["_monitors_alerts_fired_"];
}
// For each valid group for this user, take data from agent and modules
foreach ($groups as $id_group => $group) {
$rows = groups_get_group_row_data($id_group, $groups, $group, $printed_groups);
if (!empty($rows))
$return = array_merge($return, $rows);
}
return $return;
return $result_groups;
}
}

View File

@ -420,7 +420,7 @@ class Modules {
continue;
$temp_modules = db_get_all_rows_sql($sql_select . $sql . $sql_limit);
html_debug($temp_modules, true);
foreach ($temp_modules as $result_element_key => $result_element_value) {
array_push($modules_db, $result_element_value);
}