X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Fproject_management%2Fsrc%2Fdashboard%2FprojectMgmtSource.js;h=55646e88523f08bc1e9bb74fcffe0bae17e9f806;hb=cefb13b7e32e68315f5f246ff27010315c830834;hp=ce0c984fe29f98d865a11661a36394b8efdcefd2;hpb=c5950910c89bba8bbd1809258a7a56c9c09c2261;p=osm%2FUI.git diff --git a/skyquake/plugins/project_management/src/dashboard/projectMgmtSource.js b/skyquake/plugins/project_management/src/dashboard/projectMgmtSource.js index ce0c984fe..55646e885 100644 --- a/skyquake/plugins/project_management/src/dashboard/projectMgmtSource.js +++ b/skyquake/plugins/project_management/src/dashboard/projectMgmtSource.js @@ -25,11 +25,16 @@ module.exports = function(Alt) { type: 'GET', beforeSend: Utils.addAuthorizationStub, success: function(data, textStatus, jqXHR) { - resolve(data.users); + resolve(data.user); } }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); + let msg = xhr.responseText; + if(xhr.errorMessage) { + msg = xhr.errorMessage + } + reject(msg); }); }); }, @@ -53,6 +58,11 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); + let msg = xhr.responseText; + if(xhr.errorMessage) { + msg = xhr.errorMessage + } + reject(msg); }); }); }, @@ -77,6 +87,11 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); + let msg = xhr.responseText; + if(xhr.errorMessage) { + msg = xhr.errorMessage + } + reject(msg); }); }); }, @@ -100,6 +115,11 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); + let msg = xhr.responseText; + if(xhr.errorMessage) { + msg = xhr.errorMessage + } + reject(msg); }); }); }, @@ -125,6 +145,11 @@ module.exports = function(Alt) { }).fail(function(xhr){ //Authentication and the handling of fail states should be wrapped up into a connection class. Utils.checkAuthentication(xhr.status); + let msg = xhr.responseText; + if(xhr.errorMessage) { + msg = xhr.errorMessage + } + reject(msg); }); }); },