Обновить query.cfm
This commit is contained in:
parent
83717c9d23
commit
ff7efef2bd
87
query.cfm
87
query.cfm
@ -1,12 +1,77 @@
|
|||||||
Request
|
<style>
|
||||||
<cfdump var=#request#/>
|
body { font-family: sans-serif; line-height: 1.5; color: #333; margin: 20px; }
|
||||||
This
|
table { border-collapse: collapse; width: 100%; margin-bottom: 20px; border: 1px solid #ddd; }
|
||||||
<cfdump var=#this#/>
|
th, td { text-align: left; padding: 12px; border: 1px solid #ddd; }
|
||||||
System Env
|
th { background-color: #f4f4f4; width: 30%; }
|
||||||
<cfdump var=#createObject("java", "java.lang.System").getEnv()#/>
|
.status-ok { color: #2ecc71; font-weight: bold; }
|
||||||
<a name="q">Query</a>
|
.header { background: #2c3e50; color: white; padding: 10px 20px; margin: -20px -20px 20px -20px; }
|
||||||
<cfquery name="test" result="res">
|
.label-tf { color: #e67e22; font-weight: bold; }
|
||||||
select CURRENT_TIMESTAMP;
|
details { background: #f9f9f9; padding: 10px; border: 1px solid #ddd; margin-top: 20px; }
|
||||||
|
summary { cursor: pointer; font-weight: bold; color: #2980b9; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<h1>📊 Lucee Connection Report</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>1. Database Test (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>
|
</cfquery>
|
||||||
Result
|
|
||||||
<cfdump var=#test#/>
|
<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>Server 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>2. DataSource Configuration (testds)</h2>
|
||||||
|
<cfif structKeyExists(this, "datasources") AND structKeyExists(this.datasources, "testds")>
|
||||||
|
<cfdump var="#this.datasources.testds#" label="Lucee Engine Settings (testds)" />
|
||||||
|
<cfelse>
|
||||||
|
<p style="color:orange;">⚠️ DataSource 'testds' is not defined in this.datasources.</p>
|
||||||
|
</cfif>
|
||||||
|
|
||||||
|
<h2>3. Environment Variables (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>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>🔍 Click to view Request Details (Headers, IP, etc.)</summary>
|
||||||
|
<h3>Request Scope</h3>
|
||||||
|
<cfdump var="#request#" label="Request Scope Data" />
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p><small>Generated by Lucee Engine | Managed by Terraform Infrastructure</small></p>
|
||||||
Loading…
Reference in New Issue
Block a user