Обновить query.cfm
This commit is contained in:
parent
d476cae5d7
commit
4136c71dcc
74
query.cfm
74
query.cfm
@ -1,28 +1,27 @@
|
||||
<style>
|
||||
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; margin: 30px; background-color: #f8f9fa; }
|
||||
.container { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
|
||||
.header { background: #2c3e50; color: white; padding: 15px 25px; margin: -30px -30px 30px -30px; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; align-items: center; }
|
||||
h2 { border-bottom: 2px solid #eee; padding-bottom: 10px; color: #2c3e50; margin-top: 30px; }
|
||||
table { border-collapse: collapse; width: 100%; background: white; margin: 10px 0; }
|
||||
th, td { text-align: left; padding: 12px; border: 1px solid #dee2e6; }
|
||||
th { background-color: #f1f3f5; width: 30%; font-weight: 600; }
|
||||
.status-badge { background: #2ecc71; color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.9em; font-weight: bold; }
|
||||
.val-highlight { color: #d35400; font-family: monospace; font-weight: bold; }
|
||||
body { font-family: 'Segoe UI', sans-serif; margin: 25px; background: #f4f7f6; color: #333; }
|
||||
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); margin-bottom: 25px; }
|
||||
.header { background: #2c3e50; color: white; padding: 15px; border-radius: 8px 8px 0 0; margin: -20px -20px 20px -20px; }
|
||||
h2 { color: #2c3e50; border-bottom: 2px solid #e1e8ed; padding-bottom: 8px; margin-top: 0; }
|
||||
.status-ok { background: #2ecc71; color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.9em; }
|
||||
table { width: 100%; border-collapse: collapse; margin: 10px 0; }
|
||||
th, td { text-align: left; padding: 10px; border: 1px solid #eee; }
|
||||
th { background: #f8f9fa; width: 30%; }
|
||||
.tf-var { color: #d35400; font-family: monospace; font-weight: bold; }
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h1 style="margin:0;">📊 System Connectivity Report</h1>
|
||||
<span>Lucee 5.4 | managed by Terraform</span>
|
||||
<h1 style="margin:0; font-size: 1.5em;">🚀 Lucee Connection Dashboard</h1>
|
||||
</div>
|
||||
|
||||
<h2>1. Request Information</h2>
|
||||
<cfdump var="#request#" label="HTTP Request Context" />
|
||||
<cfdump var="#request#" label="Full Request Scope" expand="false" />
|
||||
|
||||
<h2>2. Application Configuration (this)</h2>
|
||||
<h2>2. Application Context (this)</h2>
|
||||
<cfdump var="#this#" label="Application.cfc Settings" expand="false" />
|
||||
|
||||
<h2>3. Database Verification (PostgreSQL)</h2>
|
||||
<h2>3. Database Test (PostgreSQL)</h2>
|
||||
<cftry>
|
||||
<cfquery name="qTest" result="res">
|
||||
SELECT
|
||||
@ -32,27 +31,42 @@
|
||||
</cfquery>
|
||||
|
||||
<table>
|
||||
<tr><th>Connection Status</th><td><span class="status-badge">✅ ACTIVE</span></td></tr>
|
||||
<tr><th>Database Name</th><td class="val-highlight"><cfoutput>#qTest.db_name#</cfoutput></td></tr>
|
||||
<tr><th>Database User</th><td class="val-highlight"><cfoutput>#qTest.db_user#</cfoutput></td></tr>
|
||||
<tr><th>Server Timestamp</th><td><cfoutput>#qTest.db_time#</cfoutput></td></tr>
|
||||
<tr><th>Query Performance</th><td><cfoutput>#res.executiontime# ms</cfoutput></td></tr>
|
||||
<tr>
|
||||
<th>Connection Status</th>
|
||||
<td><span class="status-ok">✅ ACTIVE</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Current Database</th>
|
||||
<td><strong><cfoutput>#qTest.db_name#</cfoutput></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>DB User</th>
|
||||
<td><cfoutput>#qTest.db_user#</cfoutput></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>DB 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: #ff7675; color: white; padding: 15px; border-radius: 5px;">
|
||||
<div style="background: #e74c3c; color: white; padding: 15px; border-radius: 5px;">
|
||||
<strong>❌ DATABASE ERROR:</strong><br>
|
||||
<cfoutput>#cfcatch.message#</cfoutput>
|
||||
</div>
|
||||
</cfcatch>
|
||||
</cftry>
|
||||
|
||||
<h2>4. Environment Variables (Terraform Mapping)</h2>
|
||||
<h2>4. Terraform Environment Variables (🟥➡️)</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Variable Key</th>
|
||||
<th>Value (Decoded)</th>
|
||||
<th>Value from Terraform</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -60,15 +74,15 @@
|
||||
<cfloop collection="#env#" item="key">
|
||||
<cfif findNoCase("testds_", key) OR findNoCase("PG", key)>
|
||||
<tr>
|
||||
<td><strong><cfoutput>#key#</cfoutput></strong></td>
|
||||
<td class="val-highlight"><cfoutput>#env[key]#</cfoutput></td>
|
||||
<td class="tf-var"><cfoutput>#key#</cfoutput></td>
|
||||
<td><cfoutput>#env[key]#</cfoutput></td>
|
||||
</tr>
|
||||
</cfif>
|
||||
</cfloop>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p style="text-align: right; color: #95a5a6; font-size: 0.8em; margin-top: 40px;">
|
||||
Report Generated: <cfoutput>#dateTimeFormat(now(), "yyyy-mm-dd HH:nn:ss")#</cfoutput>
|
||||
</p>
|
||||
</div>
|
||||
<p style="text-align: center; color: #95a5a6; font-size: 0.8em;">
|
||||
Managed by Terraform | Dashboard Generated: <cfoutput>#dateTimeFormat(now(), "yyyy-mm-dd HH:nn:ss")#</cfoutput>
|
||||
</p>
|
||||
Loading…
Reference in New Issue
Block a user