on HTTP fail to configureMonitor in UI provide feedback
parent
3b2b31579a
commit
9e10730abf
|
|
@ -424,7 +424,9 @@ var copyMonitorSettingsToSelected = function(monitorConfig){
|
|||
})
|
||||
$.post(getApiPrefix()+'/configureMonitor/'+$user.ke+'/'+monitor.mid,{data:JSON.stringify(monitor)},function(d){
|
||||
debugLog(d)
|
||||
})
|
||||
}).fail(function(xhr, status, error) {
|
||||
console.error(error)
|
||||
});
|
||||
chosenMonitors[monitor.mid] = monitor;
|
||||
})
|
||||
}
|
||||
|
|
@ -827,6 +829,13 @@ editorForm.submit(function(e){
|
|||
}
|
||||
debugLog(d)
|
||||
setSubmitButton(editorForm, lang.Save, `check`, false)
|
||||
}).fail((err) => {
|
||||
new PNotify({
|
||||
title: lang['Action Failed'],
|
||||
text: JSON.stringify(err, null, 3),
|
||||
type: 'danger'
|
||||
})
|
||||
setSubmitButton(editorForm, lang.Save, `check`, false)
|
||||
})
|
||||
//
|
||||
if(copySettingsSelector.val() === '1'){
|
||||
|
|
|
|||
|
|
@ -152,7 +152,9 @@ $(document).ready(function(e){
|
|||
var newMon = mergeDeep(generateDefaultMonitorSettings(),monitorToPost)
|
||||
$.post(getApiPrefix(`configureMonitor`) + '/' + monitorToPost.mid,{data:JSON.stringify(newMon,null,3)},function(d){
|
||||
debugLog(d)
|
||||
})
|
||||
}).fail(function(xhr, status, error) {
|
||||
console.error(error)
|
||||
});
|
||||
}
|
||||
function loadLocalOptions(){
|
||||
var currentOptions = dashboardOptions()
|
||||
|
|
|
|||
Loading…
Reference in New Issue