add "retry" button to reset device skip timeout count
This commit is contained in:
@@ -13,6 +13,15 @@ register_admin_task({
|
|||||||
label => 'SNMP Connect Failures',
|
label => 'SNMP Connect Failures',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ajax '/ajax/control/admin/timedoutdevices/del' => require_role admin => sub {
|
||||||
|
send_error('Missing backend', 400) unless param('backend');
|
||||||
|
send_error('Missing device', 400) unless param('device');
|
||||||
|
|
||||||
|
schema('netdisco')->resultset('DeviceSkip')->find_or_create({
|
||||||
|
backend => param('backend'), device => param('device'),
|
||||||
|
},{ key => 'device_skip_pkey' })->update({ deferrals => 0 });
|
||||||
|
};
|
||||||
|
|
||||||
ajax '/ajax/content/admin/timedoutdevices' => require_role admin => sub {
|
ajax '/ajax/content/admin/timedoutdevices' => require_role admin => sub {
|
||||||
my @set = schema('netdisco')->resultset('DeviceSkip')->search({
|
my @set = schema('netdisco')->resultset('DeviceSkip')->search({
|
||||||
deferrals => { '>' => 0 }
|
deferrals => { '>' => 0 }
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<th class="nd_center-cell">Device DNS</th>
|
<th class="nd_center-cell">Device DNS</th>
|
||||||
<th class="nd_center-cell">Failed Connections</th>
|
<th class="nd_center-cell">Failed Connections</th>
|
||||||
<th class="nd_center-cell">Last Retry</th>
|
<th class="nd_center-cell">Last Retry</th>
|
||||||
|
<th class="nd_center-cell">Try Again</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -20,6 +21,13 @@
|
|||||||
<td class="nd_center-cell">[% row.dns | html_entity %]</td>
|
<td class="nd_center-cell">[% row.dns | html_entity %]</td>
|
||||||
<td class="nd_center-cell">[% row.deferrals | html_entity %]</td>
|
<td class="nd_center-cell">[% row.deferrals | html_entity %]</td>
|
||||||
<td class="nd_center-cell">[% row.last_defer | html_entity %]</td>
|
<td class="nd_center-cell">[% row.last_defer | html_entity %]</td>
|
||||||
|
<td class="nd_center-cell">
|
||||||
|
<input data-form="del" name="backend" type="hidden" value="[% row.backend | html_entity %]">
|
||||||
|
<input data-form="del" name="device" type="hidden" value="[% row.device | html_entity %]">
|
||||||
|
<button class="btn nd_adminbutton" name="del" type="submit">
|
||||||
|
<i class="icon-repeat text-success"></i>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user