better toastr message on device delete
This commit is contained in:
@@ -104,12 +104,17 @@
|
||||
,url: uri_base + '/ajax/control/admin/' + mode
|
||||
,data: tr.find('input[data-form="' + mode + '"],textarea[data-form="' + mode + '"]').serializeArray()
|
||||
,success: function() {
|
||||
toastr.info('Requested '+ mode +' for device '+ tr.data('for-device'));
|
||||
if (mode != 'delete') {
|
||||
toastr.info('Requested '+ mode +' for device '+ tr.data('for-device'));
|
||||
}
|
||||
else {
|
||||
toastr.success('Deleted device '+ tr.data('for-device'));
|
||||
}
|
||||
}
|
||||
// skip any error reporting for now
|
||||
// TODO: fix sanity_ok in Netdisco Web
|
||||
,error: function() {
|
||||
toastr.error('Failed to '+ mode +' for device '+ tr.data('for-device'));
|
||||
toastr.error('Failed to '+ mode +' device '+ tr.data('for-device'));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user