@ -90,6 +90,8 @@ class StatusPage extends BeanModel {
* @ param { StatusPage } statusPage
* @ param { StatusPage } statusPage
* /
* /
static async getStatusPageData ( statusPage ) {
static async getStatusPageData ( statusPage ) {
const config = await statusPage . toPublicJSON ( ) ;
// Incident
// Incident
let incident = await R . findOne ( "incident" , " pin = 1 AND active = 1 AND status_page_id = ? " , [
let incident = await R . findOne ( "incident" , " pin = 1 AND active = 1 AND status_page_id = ? " , [
statusPage . id ,
statusPage . id ,
@ -110,13 +112,13 @@ class StatusPage extends BeanModel {
] ) ;
] ) ;
for ( let groupBean of list ) {
for ( let groupBean of list ) {
let monitorGroup = await groupBean . toPublicJSON ( showTags );
let monitorGroup = await groupBean . toPublicJSON ( showTags , config ? . showCertificateExpiry );
publicGroupList . push ( monitorGroup ) ;
publicGroupList . push ( monitorGroup ) ;
}
}
// Response
// Response
return {
return {
config : await statusPage . toPublicJSON ( ) ,
config ,
incident ,
incident ,
publicGroupList ,
publicGroupList ,
maintenanceList ,
maintenanceList ,
@ -234,6 +236,7 @@ class StatusPage extends BeanModel {
footerText : this . footer _text ,
footerText : this . footer _text ,
showPoweredBy : ! ! this . show _powered _by ,
showPoweredBy : ! ! this . show _powered _by ,
googleAnalyticsId : this . google _analytics _tag _id ,
googleAnalyticsId : this . google _analytics _tag _id ,
showCertificateExpiry : ! ! this . show _certificate _expiry ,
} ;
} ;
}
}
@ -255,6 +258,7 @@ class StatusPage extends BeanModel {
footerText : this . footer _text ,
footerText : this . footer _text ,
showPoweredBy : ! ! this . show _powered _by ,
showPoweredBy : ! ! this . show _powered _by ,
googleAnalyticsId : this . google _analytics _tag _id ,
googleAnalyticsId : this . google _analytics _tag _id ,
showCertificateExpiry : ! ! this . show _certificate _expiry ,
} ;
} ;
}
}