Revision 9040e9fe ui/templates/home.html

b/ui/templates/home.html
74 74
        var LOGOUT_REDIRECT = undefined;
75 75
        var INVITATIONS_URL = "{% url invitations %}"
76 76
        var INVITATIONS_TITLE = "{% trans "Invitations" %}"
77
        var APP_DEBUG = {% if DEBUG %}true{% else %}false{% endif %};
77 78

  
78 79
        // server statuses and transitions
79 80
        var STATUSES = {
......
196 197
                if (serverName) {
197 198
                    serverName = "<p>{% trans "Server" %}: " + serverName + "</p>";
198 199
                }
200

  
199 201
                if ((errors[0].details === undefined) || (errors[0].details === "")) {
200 202
                    details = ERRORS["NO_DETAILS"];
203
                    
204
                    // if no details message show debug info
205
                    if (window.APP_DEBUG) {
206
                        details = responseText;
207
                        try {
208
                            console.trace();
209
                        } catch (err) {
210
                        }
211
                    }
201 212
                } else {
202 213
                    details = errors[0].details;
203 214
                }
......
208 219
                $("#error-success .password-container").hide();
209 220
                $("#error-success .popup-details").addClass("popup-details-error");
210 221
                $("#error-success .popup-separator").addClass("popup-separator-error");
211
                $("#error-success .popup-details").html("<p>" + (errors[0].message || ERRORS[errors[0].code]) + "</p>" + serverName + "<p>{% trans "Action" %}: " + action + "</p><p>{% trans "Code" %}: " + errors[0].code + "<p><a class='expand-details' href='#'>{% trans 'Details' %}</a><div class='more-details'>" + details + "</div></p>");
222
                $("#error-success .popup-details").html("<p>" + 
223
                    (errors[0].message || ERRORS[errors[0].code] || serverID) + 
224
                    "</p>" + serverName + "<p>{% trans "Action" %}:" + 
225
                    action + "</p><p>{% trans "Code" %}: " + errors[0].code + 
226
                    "<p><a class='expand-details' href='#'>{% trans 'Details' %}</a><div class='more-details'>" + 
227
                    details + "</div></p>");
228

  
212 229
            } else if (ERRORS[status] !== undefined) {
213 230
                if (serverID === undefined) {
214 231
                    //eg no_images, no_flavors cases

Also available in: Unified diff