68 lines
2.4 KiB
Plaintext
68 lines
2.4 KiB
Plaintext
<style>
|
|
body { font-family: sans-serif; line-height: 1.5; color: #333; margin: 20px; }
|
|
table { border-collapse: collapse; width: 100%; margin-bottom: 20px; border: 1px solid #ddd; }
|
|
th, td { text-align: left; padding: 12px; border: 1px solid #ddd; }
|
|
th { background-color: #f4f4f4; width: 30%; }
|
|
.status-ok { color: #2ecc71; font-weight: bold; }
|
|
.header { background: #2c3e50; color: white; padding: 10px 20px; margin: -20px -20px 20px -20px; }
|
|
.label-tf { color: #e67e22; font-weight: bold; }
|
|
</style>
|
|
|
|
<div class="header">
|
|
<h1>📊 Lucee System & Connection Report</h1>
|
|
</div>
|
|
|
|
<h2>1. Request Scope</h2>
|
|
<cfdump var="#request#" label="Request Data (Full List)" />
|
|
|
|
<h2>2. Application Scope (This)</h2>
|
|
<cfdump var="#this#" label="Lucee Component Settings" expand="false" />
|
|
|
|
<h2>3. Query Result (PostgreSQL)</h2>
|
|
<cftry>
|
|
<cfquery name="qTest" result="res">
|
|
SELECT
|
|
CURRENT_TIMESTAMP as db_time,
|
|
current_database() as db_name,
|
|
current_user as db_user;
|
|
</cfquery>
|
|
|
|
<table>
|
|
<tr><th>Status</th><td class="status-ok">✅ CONNECTED</td></tr>
|
|
<tr><th>Database Name</th><td><cfoutput>#qTest.db_name#</cfoutput></td></tr>
|
|
<tr><th>Connected As</th><td><cfoutput>#qTest.db_user#</cfoutput></td></tr>
|
|
<tr><th>Current DB Time</th><td><cfoutput>#qTest.db_time#</cfoutput></td></tr>
|
|
<tr><th>Execution Time</th><td><cfoutput>#res.executiontime# ms</cfoutput></td></tr>
|
|
</table>
|
|
|
|
<cfcatch>
|
|
<div style="background: #e74c3c; color: white; padding: 15px; border-radius: 5px;">
|
|
<strong>❌ CONNECTION FAILED:</strong><br>
|
|
<cfoutput>#cfcatch.message#</cfoutput>
|
|
</div>
|
|
</cfcatch>
|
|
</cftry>
|
|
|
|
<h2>4. System Environment (Terraform 🟥➡️)</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Variable Name</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<cfset env = createObject("java", "java.lang.System").getEnv()>
|
|
<cfloop collection="#env#" item="key">
|
|
<cfif findNoCase("testds_", key) OR findNoCase("PG", key)>
|
|
<tr>
|
|
<td><span class="label-tf"><cfoutput>#key#</cfoutput></span></td>
|
|
<td><cfoutput>#env[key]#</cfoutput></td>
|
|
</tr>
|
|
</cfif>
|
|
</cfloop>
|
|
</tbody>
|
|
</table>
|
|
|
|
<hr>
|
|
<p><small>Report Date: <cfoutput>#now()#</cfoutput> | Managed by Terraform</small></p> |