prepared view and database to display SSLLabs grade

This commit is contained in:
hauke 2015-12-24 09:49:35 +01:00
parent 128f653992
commit 6b4da31a97
4 changed files with 8 additions and 3 deletions

View file

@ -167,6 +167,7 @@ CREATE TABLE IF NOT EXISTS `site-health` (
`admin_name` varchar(255) NULL DEFAULT NULL,
`admin_profile` varchar(255) NULL DEFAULT NULL,
`ssl_state` bit(1) NULL DEFAULT NULL,
`ssl_grade` varchar(2) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `base_url` (`base_url`),
KEY `health_score` (`health_score`),

View file

@ -41,6 +41,7 @@ function servers_content(&$a) {
//Stop at unhealthy sites.
$site = $site_healths[$k];
if($site['health_score'] <= 20) break;
//Skip small sites.
@ -94,7 +95,7 @@ function servers_content(&$a) {
$site['supports_more']++;
}
}
//Push to results.
$public_sites[] = $site;

View file

@ -20,7 +20,10 @@
<div class="site-supports">
<em>Features</em>
<?php foreach ($site['popular_supports'] as $key => $value): if(!$value) continue; ?>
<div class="supports <?php echo strtolower($key); ?>"><?php echo $key; ?>&nbsp;&nbsp;&radic;</div>
<div class="supports <?php echo strtolower($key); ?>">
<?php echo $key; ?><?php if($key == 'HTTPS' && $site['ssl_grade'] != null): ?>,&nbsp;Grade:&nbsp;<?php echo $site['ssl_grade']; ?><?php endif ?>&nbsp;&nbsp;&radic;
</div>
<?php endforeach ?>
<?php if ($site['supports_more'] > 0): ?>

View file

@ -7,7 +7,7 @@
We recommend these based on their <abbr title="Decent speed, proper security, recent version, etc.">health</abbr>.
</p>
<p class="intro">
Keep in mind that different servers may support different networks besides Friendica.
Keep in mind that different servers may support different features like communicating with additional networks besides Friendica.
It's best to pick the one that best suits your needs.
</p>