Merge "Drupal: Add views tile which is hidden if views are disabled"
This commit is contained in:
commit
edd84f4f74
@ -47,17 +47,9 @@
|
||||
warning="70"
|
||||
critical="40"></bansho-drupal-tile>
|
||||
|
||||
<!--
|
||||
<bansho-drupal-tile host-name="{{hostName}}"
|
||||
plugin="drupal_status"
|
||||
title="Status"
|
||||
warning="70"
|
||||
critical="40"></bansho-drupal-tile>
|
||||
|
||||
<bansho-drupal-tile host-name="{{hostName}}"
|
||||
plugin="drupal_views"
|
||||
title="Views"
|
||||
warning="70"
|
||||
critical="40"></bansho-drupal-tile>
|
||||
-->
|
||||
</article>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="tile__main" ng-controller='DrupalTileCtrl'>
|
||||
<div class="tile__main" ng-controller='DrupalTileCtrl' ng-hide="hide">
|
||||
<h1>{{title}} <span ng-class="finalScoreClass">{{finalScore}}</span></h1>
|
||||
<table class="data-table">
|
||||
<tbody>
|
||||
|
@ -34,6 +34,12 @@ angular.module('bansho.drupal.tile', [])
|
||||
$scope.finalScoreClass = 'tile__score-warning';
|
||||
}
|
||||
|
||||
if ($scope.plugins === 'drupal_views') {
|
||||
if (response[0].plugin_output.indexOf('Views is not enabled.') !== -1) {
|
||||
$scope.hide = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Split data into (metric, score_class, action) tuples
|
||||
for (var i = 0; i < data.length; i+=3) {
|
||||
var tuple = [];
|
||||
|
Loading…
Reference in New Issue
Block a user