Add printer lookup page and fiscal week theme styling
- Add printerlookup.asp for Zabbix integration (lookup by IP/FQDN) - Add fiscal week sidebar styling for all 16 themes - Update CLAUDE.md with External Integrations section - Fix fiscal week box centering with inline styles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -142,6 +142,12 @@ PCs are in the machines table, identified by:
|
|||||||
| getDashboardData | GET | Health check |
|
| getDashboardData | GET | Health check |
|
||||||
| updatePrinterMapping | POST | Printer assignments |
|
| updatePrinterMapping | POST | Printer assignments |
|
||||||
|
|
||||||
|
## External Integrations
|
||||||
|
|
||||||
|
| Page | Purpose |
|
||||||
|
|------|---------|
|
||||||
|
| `printerlookup.asp?ip=x.x.x.x` | Zabbix printer lookup by IP/FQDN |
|
||||||
|
|
||||||
## Quick Reference
|
## Quick Reference
|
||||||
|
|
||||||
### Start Dev Environment
|
### Start Dev Environment
|
||||||
|
|||||||
@@ -572,6 +572,54 @@ body.bg-theme16 {
|
|||||||
background-image: linear-gradient(60deg, #6a11cb, #cccccc);
|
background-image: linear-gradient(60deg, #6a11cb, #cccccc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fiscal Week Sidebar Section */
|
||||||
|
.fiscal-week-box {
|
||||||
|
width: 250px;
|
||||||
|
padding: 10px 0;
|
||||||
|
margin: 0;
|
||||||
|
border-top: 1px solid rgba(255,255,255,0.1);
|
||||||
|
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||||
|
text-align: center;
|
||||||
|
background: rgba(0,0,0,0.2);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.fiscal-week-box .fiscal-label {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 10px;
|
||||||
|
color: rgba(255,255,255,0.5);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.fiscal-week-box .fiscal-number {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Theme-specific fiscal week styling */
|
||||||
|
body.bg-theme1 .fiscal-week-box,
|
||||||
|
body.bg-theme2 .fiscal-week-box,
|
||||||
|
body.bg-theme3 .fiscal-week-box,
|
||||||
|
body.bg-theme4 .fiscal-week-box,
|
||||||
|
body.bg-theme5 .fiscal-week-box,
|
||||||
|
body.bg-theme6 .fiscal-week-box { background: rgba(0,0,0,0.3); }
|
||||||
|
|
||||||
|
body.bg-theme7 .fiscal-week-box { background: rgba(12,103,94,0.5); border-color: rgba(6,158,144,0.3); }
|
||||||
|
body.bg-theme8 .fiscal-week-box { background: rgba(165,42,4,0.3); border-color: rgba(165,42,4,0.2); }
|
||||||
|
body.bg-theme9 .fiscal-week-box { background: rgba(41,50,60,0.5); border-color: rgba(72,85,99,0.3); }
|
||||||
|
body.bg-theme10 .fiscal-week-box { background: rgba(121,85,72,0.5); border-color: rgba(148,92,72,0.3); }
|
||||||
|
body.bg-theme11 .fiscal-week-box { background: rgba(21,101,192,0.5); border-color: rgba(30,136,229,0.3); }
|
||||||
|
body.bg-theme12 .fiscal-week-box { background: rgba(101,55,155,0.5); border-color: rgba(136,106,234,0.3); }
|
||||||
|
body.bg-theme13 .fiscal-week-box { background: rgba(255,84,71,0.4); border-color: rgba(241,7,111,0.3); }
|
||||||
|
body.bg-theme14 .fiscal-week-box { background: rgba(8,165,14,0.4); border-color: rgba(105,187,3,0.3); }
|
||||||
|
body.bg-theme15 .fiscal-week-box { background: rgba(106,17,203,0.5); border-color: rgba(37,117,252,0.3); }
|
||||||
|
body.bg-theme16 .fiscal-week-box { background: rgba(106,17,203,0.4); border-color: rgba(204,204,204,0.2); }
|
||||||
|
|
||||||
/* Topbar Header */
|
/* Topbar Header */
|
||||||
.topbar-nav .navbar{
|
.topbar-nav .navbar{
|
||||||
padding: 0px 15px;
|
padding: 0px 15px;
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ End If
|
|||||||
<h5 class="logo-text">West Jefferson</h5>
|
<h5 class="logo-text">West Jefferson</h5>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px 0; background: #2a2a2a; border-top: 1px solid #3a3a3a; border-bottom: 1px solid #3a3a3a; text-align: center;">
|
<div class="fiscal-week-box" style="width:100%; text-align:center; padding:15px 0;">
|
||||||
<span style="font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 1px;">Fiscal Week</span>
|
<span class="fiscal-label" style="display:block; text-align:center;">Fiscal Week</span>
|
||||||
<div style="font-size: 22px; font-weight: 600; color: #fff;"><%=fiscalWeek%></div>
|
<div class="fiscal-number" style="display:block; text-align:center;"><%=fiscalWeek%></div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="sidebar-menu do-nicescrol">
|
<ul class="sidebar-menu do-nicescrol">
|
||||||
<li class="sidebar-header">MAIN NAVIGATION</li>
|
<li class="sidebar-header">MAIN NAVIGATION</li>
|
||||||
|
|||||||
40
printerlookup.asp
Normal file
40
printerlookup.asp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<%@ Language="VBScript" %>
|
||||||
|
<%
|
||||||
|
Option Explicit
|
||||||
|
Response.Buffer = True
|
||||||
|
%>
|
||||||
|
<!--#include file="includes/sql.asp"-->
|
||||||
|
<%
|
||||||
|
' Lookup printer by IP address or FQDN and redirect to displayprinter.asp
|
||||||
|
' Used by Zabbix to link directly to printer details
|
||||||
|
Dim ip, fqdn, lookupValue, cmd, rs
|
||||||
|
|
||||||
|
ip = Trim(Request.QueryString("ip") & "")
|
||||||
|
fqdn = Trim(Request.QueryString("fqdn") & "")
|
||||||
|
|
||||||
|
If ip <> "" Then
|
||||||
|
lookupValue = ip
|
||||||
|
ElseIf fqdn <> "" Then
|
||||||
|
lookupValue = fqdn
|
||||||
|
Else
|
||||||
|
Response.Write "No IP or FQDN provided. Usage: printerlookup.asp?ip=x.x.x.x or printerlookup.asp?fqdn=hostname"
|
||||||
|
Response.End
|
||||||
|
End If
|
||||||
|
|
||||||
|
Set cmd = Server.CreateObject("ADODB.Command")
|
||||||
|
cmd.ActiveConnection = objConn
|
||||||
|
cmd.CommandText = "SELECT printerid FROM printers WHERE address = ? AND isactive = 1"
|
||||||
|
cmd.Parameters.Append cmd.CreateParameter("@addr", 200, 1, 100, lookupValue)
|
||||||
|
Set rs = cmd.Execute()
|
||||||
|
|
||||||
|
If Not rs.EOF Then
|
||||||
|
Response.Redirect "displayprinter.asp?printerid=" & rs("printerid")
|
||||||
|
Else
|
||||||
|
Response.Write "Printer not found: " & Server.HTMLEncode(lookupValue)
|
||||||
|
End If
|
||||||
|
|
||||||
|
rs.Close
|
||||||
|
Set rs = Nothing
|
||||||
|
Set cmd = Nothing
|
||||||
|
objConn.Close
|
||||||
|
%>
|
||||||
Reference in New Issue
Block a user