Drupal: Add views tile which is hidden if views are disabled
Change-Id: I3f3c9d95c9fb754052f29c7627fed125804cb6e3
This commit is contained in:
parent
980e4ee258
commit
4056cd3e68
@ -47,17 +47,9 @@
|
|||||||
warning="70"
|
warning="70"
|
||||||
critical="40"></bansho-drupal-tile>
|
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}}"
|
<bansho-drupal-tile host-name="{{hostName}}"
|
||||||
plugin="drupal_views"
|
plugin="drupal_views"
|
||||||
title="Views"
|
title="Views"
|
||||||
warning="70"
|
warning="70"
|
||||||
critical="40"></bansho-drupal-tile>
|
critical="40"></bansho-drupal-tile>
|
||||||
-->
|
|
||||||
</article>
|
</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>
|
<h1>{{title}} <span ng-class="finalScoreClass">{{finalScore}}</span></h1>
|
||||||
<table class="data-table">
|
<table class="data-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -34,6 +34,12 @@ angular.module('bansho.drupal.tile', [])
|
|||||||
$scope.finalScoreClass = 'tile__score-warning';
|
$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
|
// Split data into (metric, score_class, action) tuples
|
||||||
for (var i = 0; i < data.length; i+=3) {
|
for (var i = 0; i < data.length; i+=3) {
|
||||||
var tuple = [];
|
var tuple = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user