mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-30 11:26:23 +00:00
Update notification service
This commit is contained in:
@@ -275,12 +275,6 @@ const generateLatencyReport = (report: ReportData) => {
|
|||||||
font-size: 14px; font-weight: 600; cursor: pointer;
|
font-size: 14px; font-weight: 600; cursor: pointer;
|
||||||
}
|
}
|
||||||
.top-bar button:hover { background: #0891b2; }
|
.top-bar button:hover { background: #0891b2; }
|
||||||
.top-bar .close-btn {
|
|
||||||
background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2);
|
|
||||||
padding: 8px 14px; border-radius: 6px; display: flex; align-items: center; gap: 6px;
|
|
||||||
cursor: pointer; font-size: 14px; font-weight: 500;
|
|
||||||
}
|
|
||||||
.top-bar .close-btn:hover { background: rgba(255,255,255,0.2); }
|
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
.top-bar { padding: 12px 24px; }
|
.top-bar { padding: 12px 24px; }
|
||||||
.top-bar-subtitle { display: block; }
|
.top-bar-subtitle { display: block; }
|
||||||
@@ -441,21 +435,12 @@ const generateLatencyReport = (report: ReportData) => {
|
|||||||
<!-- Top bar for screen -->
|
<!-- Top bar for screen -->
|
||||||
<div class="top-bar no-print">
|
<div class="top-bar no-print">
|
||||||
<div class="top-bar-left">
|
<div class="top-bar-left">
|
||||||
<button class="close-btn" onclick="window.close()">
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
||||||
<path d="M18 6L6 18M6 6l12 12"/>
|
|
||||||
</svg>
|
|
||||||
<span>Close</span>
|
|
||||||
</button>
|
|
||||||
<div>
|
<div>
|
||||||
<div class="top-bar-title">ProxMenux Network Latency Report</div>
|
<div class="top-bar-title">ProxMenux Network Latency Report</div>
|
||||||
<div class="top-bar-subtitle">Review the report, then print or save as PDF</div>
|
<div class="top-bar-subtitle">Review the report, then print or save as PDF</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display:flex;align-items:center;gap:12px;">
|
<button onclick="window.print()">Print / Save as PDF</button>
|
||||||
<span class="top-bar-subtitle">Ctrl+P</span>
|
|
||||||
<button onclick="window.print()">Print / Save as PDF</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
@@ -999,7 +984,15 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
stroke="#6b7280"
|
stroke="#6b7280"
|
||||||
fontSize={10}
|
fontSize={10}
|
||||||
tickLine={false}
|
tickLine={false}
|
||||||
domain={[(dataMin: number) => Math.max(0, dataMin - Math.max(5, dataMin * 0.5)), (dataMax: number) => dataMax + Math.max(10, dataMax * 0.3)]}
|
domain={[(dataMin: number, dataMax: number) => {
|
||||||
|
const range = dataMax - dataMin
|
||||||
|
const padding = Math.max(range * 0.3, dataMin * 0.2)
|
||||||
|
return Math.max(0, dataMin - padding)
|
||||||
|
}, (dataMin: number, dataMax: number) => {
|
||||||
|
const range = dataMax - dataMin
|
||||||
|
const padding = Math.max(range * 0.3, dataMax * 0.2)
|
||||||
|
return dataMax + padding
|
||||||
|
}]}
|
||||||
tickFormatter={(v) => `${v.toFixed(1)}ms`}
|
tickFormatter={(v) => `${v.toFixed(1)}ms`}
|
||||||
/>
|
/>
|
||||||
<Tooltip content={<CustomTooltip />} />
|
<Tooltip content={<CustomTooltip />} />
|
||||||
@@ -1048,7 +1041,15 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
stroke="#6b7280"
|
stroke="#6b7280"
|
||||||
fontSize={10}
|
fontSize={10}
|
||||||
tickLine={false}
|
tickLine={false}
|
||||||
domain={[(dataMin: number) => Math.max(0, dataMin - Math.max(5, dataMin * 0.5)), (dataMax: number) => dataMax + Math.max(10, dataMax * 0.3)]}
|
domain={[(dataMin: number, dataMax: number) => {
|
||||||
|
const range = dataMax - dataMin
|
||||||
|
const padding = Math.max(range * 0.3, dataMin * 0.2)
|
||||||
|
return Math.max(0, dataMin - padding)
|
||||||
|
}, (dataMin: number, dataMax: number) => {
|
||||||
|
const range = dataMax - dataMin
|
||||||
|
const padding = Math.max(range * 0.3, dataMax * 0.2)
|
||||||
|
return dataMax + padding
|
||||||
|
}]}
|
||||||
tickFormatter={(v) => `${v.toFixed(1)}ms`}
|
tickFormatter={(v) => `${v.toFixed(1)}ms`}
|
||||||
/>
|
/>
|
||||||
<Tooltip content={<CustomTooltip />} />
|
<Tooltip content={<CustomTooltip />} />
|
||||||
|
|||||||
@@ -1005,13 +1005,6 @@ export function Security() {
|
|||||||
font-size: 14px; font-weight: 600; cursor: pointer;
|
font-size: 14px; font-weight: 600; cursor: pointer;
|
||||||
}
|
}
|
||||||
.top-bar button:hover { background: #0891b2; }
|
.top-bar button:hover { background: #0891b2; }
|
||||||
.top-bar .close-btn {
|
|
||||||
background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2);
|
|
||||||
padding: 8px 14px; border-radius: 6px; display: flex; align-items: center; gap: 6px;
|
|
||||||
cursor: pointer; font-size: 14px; font-weight: 500;
|
|
||||||
}
|
|
||||||
.top-bar .close-btn:hover { background: rgba(255,255,255,0.2); }
|
|
||||||
.top-bar .close-text { display: inline; }
|
|
||||||
.hide-mobile { }
|
.hide-mobile { }
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
.top-bar { padding: 12px 24px; }
|
.top-bar { padding: 12px 24px; }
|
||||||
@@ -1131,18 +1124,11 @@ function pmxPrint(){
|
|||||||
</script>
|
</script>
|
||||||
<div class="top-bar no-print">
|
<div class="top-bar no-print">
|
||||||
<div style="display:flex;align-items:center;gap:12px;">
|
<div style="display:flex;align-items:center;gap:12px;">
|
||||||
<button onclick="window.close();window.history.back();" class="close-btn" title="Close">
|
<strong>ProxMenux Security Audit Report</strong>
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
||||||
<span class="close-text">Close</span>
|
|
||||||
</button>
|
|
||||||
<strong class="hide-mobile">ProxMenux Security Audit Report</strong>
|
|
||||||
<span id="pmx-print-hint" class="hide-mobile" style="font-size:11px;opacity:0.7;">Review the report, then print or save as PDF</span>
|
<span id="pmx-print-hint" class="hide-mobile" style="font-size:11px;opacity:0.7;">Review the report, then print or save as PDF</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display:flex;align-items:center;gap:8px;">
|
|
||||||
<span class="hide-mobile" style="font-size:11px;opacity:0.5;">\u2318P / Ctrl+P</span>
|
|
||||||
<button onclick="pmxPrint()">Print / Save as PDF</button>
|
<button onclick="pmxPrint()">Print / Save as PDF</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div class="rpt-header">
|
<div class="rpt-header">
|
||||||
|
|||||||
Reference in New Issue
Block a user