Merge branch 'ent-10559-no-deja-borrar-tareas-ipam-creadas-antes-de-los-cambios-del-ticket-10133' into 'develop'

Ent 10559 no deja borrar tareas ipam creadas antes de los cambios del ticket 10133

See merge request artica/pandorafms!5568
This commit is contained in:
Matias Didier 2023-02-28 09:04:50 +00:00
commit ad066b9e1a
1 changed files with 36 additions and 23 deletions

View File

@ -955,6 +955,7 @@ class DiscoveryTaskList extends HTML
) )
) { ) {
if ($ipam === true) { if ($ipam === true) {
if (empty($tipam_task_id) === false) {
$data[9] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(
sprintf( sprintf(
'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=edit&id=%d', 'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=edit&id=%d',
@ -978,6 +979,18 @@ class DiscoveryTaskList extends HTML
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
).'</a>'; ).'</a>';
} else {
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
]
).'</a>';
}
} else { } else {
// Check if is a H&D, Cloud or Application or IPAM. // Check if is a H&D, Cloud or Application or IPAM.
$data[9] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(