Merge branch 'ent-5575-wizard-de-modulos-y-recon-by-steps' of brutus.artica.es:artica/pandorafms into ent-5575-wizard-de-modulos-y-recon-by-steps
This commit is contained in:
commit
5db6ba6c5d
|
@ -1295,10 +1295,10 @@ class DiscoveryTaskList extends HTML
|
|||
echo '<span>';
|
||||
echo __('Please select devices to be monitored');
|
||||
echo '</span><div class="manage">';
|
||||
echo '<button onclick="$(\'.sim-tree li a\').each(function(){simTree_tree.doCheck($(this), false); simTree_tree.clickNode($(this));});">';
|
||||
echo '<button onclick="$(\'.sim-tree li:not(.disabled) a\').each(function(){simTree_tree.doCheck($(this), false); simTree_tree.clickNode($(this));});">';
|
||||
echo __('select all');
|
||||
echo '</button>';
|
||||
echo '<button onclick="$(\'.sim-tree li a\').each(function(){simTree_tree.doCheck($(this), true); simTree_tree.clickNode($(this));});">';
|
||||
echo '<button onclick="$(\'.sim-tree li:not(.disabled) a\').each(function(){simTree_tree.doCheck($(this), true); simTree_tree.clickNode($(this));});">';
|
||||
echo __('deselect all');
|
||||
echo '</button>';
|
||||
echo '<button onclick="$(\'.sim-tree-spread.sim-icon-r\').click();">';
|
||||
|
@ -1343,10 +1343,22 @@ class DiscoveryTaskList extends HTML
|
|||
$ids = array_reduce(
|
||||
$selection,
|
||||
function ($carry, $item) use (&$n_agents) {
|
||||
if (explode('-', $item['id'])[1] === null) {
|
||||
// String is agent-module.
|
||||
$fields = explode('-', $item['id']);
|
||||
$agent_name = $fields[0];
|
||||
$module_name = $fields[1];
|
||||
if ($module_name === null) {
|
||||
// Do not count if already created.
|
||||
if (db_get_value(
|
||||
'id_agente',
|
||||
'tagente',
|
||||
'nombre',
|
||||
io_safe_input($agent_name)
|
||||
) === false
|
||||
) {
|
||||
$n_agents++;
|
||||
}
|
||||
}
|
||||
|
||||
$carry[] = $item['id'];
|
||||
return $carry;
|
||||
|
@ -1411,8 +1423,10 @@ class DiscoveryTaskList extends HTML
|
|||
$data['modules'][$module_name]['checked'] = 1;
|
||||
} else {
|
||||
if ($data['modules'][$module_name]['checked'] == 1) {
|
||||
if ($module_name != 'Host Alive') {
|
||||
$summary[] = '<li class="removed">'.__('Removed').' '.$agent_name.' - '.$module_name.'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
$data['modules'][$module_name]['checked'] = 0;
|
||||
}
|
||||
|
|
|
@ -57,10 +57,15 @@ div.subtitle div.manage button {
|
|||
font-size: 1.2em;
|
||||
font-family: "lato", "Open Sans", sans-serif;
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
margin-right: 1em;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
border-radius: 21px;
|
||||
box-shadow: 0 0 10px -5px #888;
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #ddd;
|
||||
user-select: none;
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
div.subtitle .link.review {
|
||||
|
@ -100,3 +105,8 @@ span.link {
|
|||
span.link.review {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#review {
|
||||
padding-top: 2em;
|
||||
padding-left: 6.7em;
|
||||
}
|
||||
|
|
|
@ -6275,6 +6275,10 @@ sub notification_get_users {
|
|||
',
|
||||
safe_input($source)
|
||||
);
|
||||
|
||||
@results = map { $_->{'id_user'} } @results;
|
||||
|
||||
return @results;
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
|
@ -6296,6 +6300,10 @@ sub notification_get_groups {
|
|||
',
|
||||
safe_input($source)
|
||||
);
|
||||
|
||||
@results = map { $_->{'id_group'} } @results;
|
||||
|
||||
return @results;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue