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:
parent
eac3239817
commit
74b97a0036
13 changed files with 59 additions and 109 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue