WPHammer
Log in
  • Site-level settings
  • Authorization
  • Validation rules
  • Related
  • Report Configuration

    Report generation is controlled at two levels: team settings determine branding and global behavior, while site settings control whether individual sites participate in report generation.

    Team-level settings

    Team report configuration is managed from the report settings page (teams/settings/reports). Available settings:

    Setting Description Default
    reports_enabled Master toggle for report generation across the team false
    report_downtime_threshold_hours Hours of downtime before flagging in reports (1–72) 8
    report_company_name Company name displayed on reports
    report_accent_color Hex color for report branding (e.g., #2563eb)
    report_footer_text Custom footer text on published reports (up to 1000 characters)
    report_logo_path Path to uploaded logo for report headers

    Logo upload

    The report logo supports PNG, JPG, JPEG, SVG, and WebP formats up to 2 MB. Logos are stored on the public disk and referenced via report_logo_path. The hasReportLogo() method on the Team model checks whether a logo has been configured.

    Site-level settings

    Each site has a reports_enabled boolean (defaulting to true) that controls whether it is included in monthly report generation. When the team has reports enabled but a specific site has them disabled, that site is skipped during the GenerateMonthlyReportsCommand run.

    You can toggle this per site from the site reports panel.

    Authorization

    The SiteReportPolicy controls access to report operations:

    Action Requirement
    View reports list User can access the site
    View a single report User can access the site
    Create a report User can access site, team reports enabled, site reports enabled
    Edit a draft report User can access site, report is a draft
    Delete a report User can access site, user has canManageSites role
    Publish a draft User can access site, report is a draft
    Unpublish a report User can access site, report is published

    Validation rules

    The report settings form validates:

    • reportsEnabled — must be a boolean
    • downtimeThresholdHours — integer between 1 and 72
    • companyName — string, max 255 characters
    • accentColor — required, valid hex color format
    • footerText — string, max 1000 characters
    • logoFile — image (PNG, JPG, JPEG, SVG, WebP), max 2 MB

    Related