diff --git a/src/UI/Shared/ErrorModel.js b/src/UI/Shared/ErrorModel.js
new file mode 100644
index 000000000..b8ccf4fea
--- /dev/null
+++ b/src/UI/Shared/ErrorModel.js
@@ -0,0 +1,10 @@
+var _ = require('underscore');
+var Backbone = require('backbone');
+
+module.exports = Backbone.Model.extend({
+ defaults : {
+ 'type' : 'danger',
+ 'title' : '',
+ 'message' : ''
+ }
+});
\ No newline at end of file
diff --git a/src/UI/Shared/ErrorView.js b/src/UI/Shared/ErrorView.js
new file mode 100644
index 000000000..de52d19d3
--- /dev/null
+++ b/src/UI/Shared/ErrorView.js
@@ -0,0 +1,10 @@
+var Marionette = require('marionette');
+var ErrorModel = require('./ErrorModel');
+
+module.exports = Marionette.ItemView.extend({
+ template : 'Shared/ErrorViewTemplate',
+
+ initialize: function(data) {
+ this.model = new ErrorModel(data);
+ }
+});
\ No newline at end of file
diff --git a/src/UI/Shared/ErrorViewTemplate.hbs b/src/UI/Shared/ErrorViewTemplate.hbs
new file mode 100644
index 000000000..fb69f67fa
--- /dev/null
+++ b/src/UI/Shared/ErrorViewTemplate.hbs
@@ -0,0 +1,6 @@
+
+ {{#if title}}
+ {{title}}
+ {{/if}}
+ {{message}}
+
\ No newline at end of file
diff --git a/src/UI/System/Logs/Table/LogsTableLayout.js b/src/UI/System/Logs/Table/LogsTableLayout.js
index f7d9430b6..e320ca7fa 100644
--- a/src/UI/System/Logs/Table/LogsTableLayout.js
+++ b/src/UI/System/Logs/Table/LogsTableLayout.js
@@ -8,6 +8,7 @@ var GridPager = require('../../../Shared/Grid/Pager');
var LogCollection = require('../LogsCollection');
var ToolbarLayout = require('../../../Shared/Toolbar/ToolbarLayout');
var LoadingView = require('../../../Shared/LoadingView');
+var ErrorView = require('../../../Shared/ErrorView');
require('../../../jQuery/jquery.spin');
module.exports = Marionette.Layout.extend({
@@ -57,6 +58,7 @@ module.exports = Marionette.Layout.extend({
this.collection = new LogCollection();
this.listenTo(this.collection, 'sync', this._showTable);
+ this.listenTo(this.collection, 'error', this._showTableError);
this.listenTo(vent, vent.Events.CommandComplete, this._commandComplete);
},
@@ -68,6 +70,13 @@ module.exports = Marionette.Layout.extend({
this._showToolbar();
},
+ _showTableError : function() {
+ this.grid.show(new ErrorView({
+ title: "Oh snap!",
+ message: "Failed to load logs, your ad blocker might be blocking the api calls."
+ }));
+ },
+
_showTable : function() {
this.grid.show(new Backgrid.Grid({
row : LogRow,