This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62f22b9
commit d4c031c
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/** | ||
* Report for listing domains who are using Let's Encrypt | ||
*/ | ||
class LetsEncryptReport extends SS_Report | ||
{ | ||
public function title() | ||
{ | ||
return 'Domains using Let\'s Encrypt'; | ||
} | ||
|
||
public function description() | ||
{ | ||
return 'Lists domains that are using Let\'s Encrypt for their certificates'; | ||
} | ||
|
||
public function sourceRecords($params = null) | ||
{ | ||
return Domain::get() | ||
->filter(['Certificates.Issuer:PartialMatch' => 'Let\'s Encrypt']) | ||
->sort('Domain'); | ||
} | ||
|
||
public function columns() | ||
{ | ||
return [ | ||
'Domain' => 'Domain', | ||
'CurrentCertificate.Name' => 'Certificate Name', | ||
'CurrentCertificate.Issuer' => 'Issuer', | ||
'CurrentCertificate.ValidFrom' => 'Valid From', | ||
'CurrentCertificate.ValidTo' => 'Valid Until', | ||
'ErrorCode' => 'Error Code', | ||
'ErrorMessage' => 'Error Message', | ||
]; | ||
} | ||
} |