mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 22:55:55 +03:00
WebUi : check if alerts is empty
This commit is contained in:
parent
d59ca96cf0
commit
11671cba47
@ -3,10 +3,15 @@ glancesApp.service('GlancesPluginAlert', function () {
|
||||
var _alerts = [];
|
||||
|
||||
this.setData = function (data, views) {
|
||||
data = data[_pluginName];
|
||||
_alerts = [];
|
||||
|
||||
for (var i = 0; i < data[_pluginName].length; i++) {
|
||||
var alertData = data[_pluginName][i];
|
||||
if(!_.isArray(data)) {
|
||||
data = [];
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var alertData = data[i];
|
||||
var alert = {};
|
||||
|
||||
alert.name = alertData[3];
|
||||
|
Loading…
Reference in New Issue
Block a user