提交 70507faf 编写于 作者: F Floran Brutel

Hide raid plugin if no data

上级 1006adcc
......@@ -51,7 +51,7 @@
<section id="network" class="plugin table-row-group" ng-show="show.network" ng-include src="'plugins/network.html'"></section>
<section id="diskio" class="plugin table-row-group" ng-show="show.diskio" ng-include src="'plugins/diskio.html'"></section>
<section id="fs" class="plugin table-row-group" ng-show="show.fs" ng-include src="'plugins/fs.html'"></section>
<section id="raid" class="plugin table-row-group" ng-show="show.fs" ng-include src="'plugins/raid.html'"></section>
<section id="raid" class="plugin table-row-group" ng-show="statsRaid.hasDisks()" ng-include src="'plugins/raid.html'"></section>
<section id="sensors" class="plugin table-row-group" ng-show="show.sensors && statsSensors.sensors.length > 0" ng-include src="'plugins/sensors.html'"></section>
</div>
</div>
......
......@@ -30,6 +30,10 @@ glancesApp.service('GlancesPluginRaid', function () {
}, this);
};
this.hasDisks = function() {
return this.disks.length > 0;
}
this.getAlert = function(disk) {
if (disk.inactive) {
return 'critical';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册