1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 04:15:28 +02:00

feat(ui): new exception management

This commit is contained in:
Anthony Lapenna 2016-09-02 17:40:03 +12:00
parent eac3239817
commit 74b97a0036
13 changed files with 59 additions and 109 deletions

View file

@ -206,10 +206,17 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
}
});
},
error: function (title, text) {
error: function (title, e, fallbackText) {
console.log(JSON.stringify(e, null, 4));
var msg = fallbackText;
if (e.data && e.data.message) {
msg = e.data.message;
} else if (e.message) {
msg = e.message;
}
$.gritter.add({
title: $sanitize(title),
text: $sanitize(text),
text: $sanitize(msg),
time: 10000,
before_open: function () {
if ($('.gritter-item-wrapper').length === 4) {