aboutsummaryrefslogtreecommitdiffstats
path: root/moon_dashboard/moon/static/moon/js/util.service.js
diff options
context:
space:
mode:
authorAsteroide <thomas.duval@orange.com>2018-10-05 15:01:17 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-05 15:01:17 +0000
commitcbea4e360e9bfaa9698cf7c61c83c96a1ba89b8c (patch)
treea8bf6a7bfb06605ed5bfab77570afbe1e46cff4b /moon_dashboard/moon/static/moon/js/util.service.js
parenta3f68df52836676b23ac0f5e3d8c40c957ee80a7 (diff)
parent2e35a7e46f0929438c1c206e3116caa829f07dc6 (diff)
Merge "Update code to 4.6 official version"
Diffstat (limited to 'moon_dashboard/moon/static/moon/js/util.service.js')
-rwxr-xr-xmoon_dashboard/moon/static/moon/js/util.service.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/moon_dashboard/moon/static/moon/js/util.service.js b/moon_dashboard/moon/static/moon/js/util.service.js
index 18ae901d..29680a43 100755
--- a/moon_dashboard/moon/static/moon/js/util.service.js
+++ b/moon_dashboard/moon/static/moon/js/util.service.js
@@ -117,8 +117,12 @@
},
displayErrorFunction: function displayErrorFunction(message) {
- return function() {
- toast.add('error', gettext(message));
+ return function(response) {
+ var text = gettext(message);
+ if (response && response.data && response.data.message) {
+ text += ' (' + response.data.message + ')'
+ }
+ toast.add('error', text);
}
},