mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-11 14:50:19 +01:00
improve error handling
This commit is contained in:
@@ -139,7 +139,12 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{
|
||||
failure: function(){
|
||||
el.unmask();
|
||||
clearTimeout(tid);
|
||||
alert('failure');
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Could not load config.',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -90,8 +90,13 @@ Sonia.plugin.installPlugin = function(pluginId){
|
||||
if ( debug ){
|
||||
console.debug('plugin installation failed');
|
||||
}
|
||||
alert( 'failure' );
|
||||
loadingBox.hide();
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Plugin installation failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -127,8 +132,13 @@ Sonia.plugin.uninstallPlugin = function(pluginId){
|
||||
if ( debug ){
|
||||
console.debug('plugin uninstallation failed');
|
||||
}
|
||||
alert( 'failure' );
|
||||
loadingBox.hide();
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Plugin uninstallation failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -162,10 +172,15 @@ Sonia.plugin.updatePlugin = function(pluginId){
|
||||
},
|
||||
failure: function(){
|
||||
if ( debug ){
|
||||
console.debug('plugin updated failed');
|
||||
console.debug('plugin update failed');
|
||||
}
|
||||
alert( 'failure' );
|
||||
loadingBox.hide();
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Plugin update failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -357,7 +357,12 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
failure: function(){
|
||||
clearTimeout(tid);
|
||||
el.unmask();
|
||||
alert( 'failure' );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Repository update failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -390,7 +395,12 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
failure: function(){
|
||||
clearTimeout(tid);
|
||||
el.unmask();
|
||||
alert( 'failure' );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Repository creation failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -486,7 +496,12 @@ Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
||||
this.resetPanel();
|
||||
},
|
||||
failure: function(){
|
||||
alert( 'failure' );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Repository deletion failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -47,7 +47,12 @@ Sonia.rest.JsonStore = Ext.extend( Ext.data.JsonStore, {
|
||||
}
|
||||
this.removeAll();
|
||||
} else {
|
||||
alert( action + "(" + status + "): " + response.responseText );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'Could not load items. Server returned status: ' + status,
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
},
|
||||
scope: this
|
||||
|
||||
@@ -207,7 +207,12 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
this.execCallback(this.onUpdate, item);
|
||||
},
|
||||
failure: function(){
|
||||
alert( 'failure' );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'User update failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -233,7 +238,12 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
this.execCallback(this.onCreate, user);
|
||||
},
|
||||
failure: function(){
|
||||
alert( 'failure' );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'User creation failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -343,7 +353,12 @@ Sonia.user.Panel = Ext.extend(Ext.Panel, {
|
||||
this.resetPanel();
|
||||
},
|
||||
failure: function(){
|
||||
alert( 'failure' );
|
||||
Ext.MessageBox.show({
|
||||
title: 'Error',
|
||||
msg: 'User deletion failed',
|
||||
buttons: Ext.MessageBox.OK,
|
||||
icon:Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user