优化布局
This commit is contained in:
@@ -1288,7 +1288,7 @@ input:checked+.slider:before {
|
||||
|
||||
.detail-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1px;
|
||||
background: var(--border-color);
|
||||
margin-top: 10px;
|
||||
|
||||
@@ -950,10 +950,10 @@
|
||||
<div class="chart-controls">
|
||||
<div class="time-range-group">
|
||||
<div class="time-range-selector">
|
||||
<button class="time-range-btn active" onclick="loadMetricHistory('${m.key}', '1h', event)">1h</button>
|
||||
<button class="time-range-btn ${m.key !== 'networkTrend' ? 'active' : ''}" onclick="loadMetricHistory('${m.key}', '1h', event)">1h</button>
|
||||
<button class="time-range-btn" onclick="loadMetricHistory('${m.key}', '6h', event)">6h</button>
|
||||
<button class="time-range-btn" onclick="loadMetricHistory('${m.key}', '12h', event)">12h</button>
|
||||
<button class="time-range-btn" onclick="loadMetricHistory('${m.key}', '24h', event)">24h</button>
|
||||
<button class="time-range-btn ${m.key === 'networkTrend' ? 'active' : ''}" onclick="loadMetricHistory('${m.key}', '24h', event)">24h</button>
|
||||
</div>
|
||||
<div class="custom-range-selector">
|
||||
<input type="text" class="custom-range-input" id="custom-range-${m.key}" placeholder="相对范围 (如: 2h)" onkeydown="if(event.key==='Enter') loadCustomMetricHistory('${m.key}', event)">
|
||||
@@ -1015,7 +1015,8 @@
|
||||
if (!wasActive) {
|
||||
el.classList.add('active');
|
||||
// Initial load
|
||||
loadMetricHistory(metricKey, '1h');
|
||||
const defaultRange = metricKey === 'networkTrend' ? '24h' : '1h';
|
||||
loadMetricHistory(metricKey, defaultRange);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user