Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ async function renderMap() {
const world = await ensureWorld();
const countries = topojson.feature(world, world.objects.countries);
const width = $("#worldMap").clientWidth || 800;
const height = 420;
const height = 320;
svg.attr("viewBox", `0 0 ${width} ${height}`);

_proj = d3.geoEqualEarth().fitExtent([[8, 8], [width - 8, height - 8]], countries);
Expand Down Expand Up @@ -425,7 +425,7 @@ function renderTrendPanel(svgSel, tooltipSel, tdata, series, bucket) {
const t = STATE.trend;
const perLbl = bucket === "week" ? "wk" : "d";
const width = (document.querySelector(svgSel).clientWidth) || 520;
const height = 240, m = { t: 14, r: 16, b: 40, l: 40 };
const height = 200, m = { t: 14, r: 16, b: 40, l: 40 };

const totals = series.map((s) => ({ key: s.key, color: s.color, total: d3.sum(s.values, (v) => v.count), peak: d3.max(s.values, (v) => v.count) || 0 }));
totals.sort((a, b) => b.total - a.total);
Expand Down Expand Up @@ -734,14 +734,14 @@ function renderRecentActivity() {
<span class="recent-stats__total"><b>${events.length}</b> events</span>
<span class="recent-stats__since">since ${cutoffLbl}</span>
<span class="recent-stats__breakdown">
<span class="recent-stats__chip recent-badge--new">NEW ${newCt}</span>
<span class="recent-stats__chip recent-badge--new">OPENED ${newCt}</span>
<span class="recent-stats__chip recent-badge--log">LOG ${logCt}</span>
<span class="recent-stats__chip recent-badge--news">NEWS ${newsCt}</span>
<span class="recent-stats__chip recent-badge--news">ARTICLES ${newsCt}</span>
</span>
</div>`;

const BADGE = { NEW: "recent-badge--new", LOG: "recent-badge--log", NEWS: "recent-badge--news" };
const LABEL = { NEW: "NEW", LOG: "LOG", NEWS: "NEWS" };
const LABEL = { NEW: "OPENED", LOG: "LOG", NEWS: "ARTICLES" };
$("#recentFeed").innerHTML = events.map((e) => {
const tsLbl = (e.ts || "").slice(0, 16).replace("T", " ") || "—";
const name = e.incident_name || e.detail;
Expand Down
12 changes: 6 additions & 6 deletions dashboard/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ code { font-family: var(--mono); font-size: .9em; }
display: flex; flex-direction: column; overflow: hidden;
}
.span-full { grid-column: span 12; }
.card--map { grid-column: span 6; }
.card--trend { grid-column: span 6; }
.card--map { grid-column: span 5; }
.card--trend { grid-column: span 7; }
.card--table { grid-column: span 12; }
.card__head {
display: flex; align-items: baseline; justify-content: space-between;
Expand All @@ -283,7 +283,7 @@ code { font-family: var(--mono); font-size: .9em; }
.card__head h2 { font-size: 14px; font-weight: 700; }
.card__hint { font-size: 11px; color: var(--rc-muted); }
.map-wrap { position: relative; padding: 8px; }
.map-wrap svg { width: 100%; height: 420px; display: block; }
.map-wrap svg { width: 100%; height: 320px; display: block; }
.map-legend {
position: absolute; left: 16px; bottom: 14px;
background: rgba(255,255,255,.94); border: 1px solid var(--rc-line);
Expand All @@ -300,15 +300,15 @@ code { font-family: var(--mono); font-size: .9em; }

/* ============ TREND PANELS ============ */
.trend-grid {
display: grid; grid-template-columns: 1fr; gap: 0;
display: grid; grid-template-columns: 1fr 1fr; gap: 0;
border-top: 1px solid var(--rc-line);
}
.trend-panel { position: relative; padding: 12px 18px 16px; min-width: 0; }
.trend-panel + .trend-panel { border-left: none; border-top: 1px solid var(--rc-line); }
.trend-panel + .trend-panel { border-left: 1px solid var(--rc-line); }
.trend-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.trend-panel__head h3 { font-size: 13px; font-weight: 700; color: var(--rc-ink); }
.trend-panel__sub { font-size: 11px; font-weight: 500; color: var(--rc-muted); }
.trend-panel svg { width: 100%; height: 240px; display: block; }
.trend-panel svg { width: 100%; height: 200px; display: block; }

/* ============ TREND TOOLTIP ============ */
.trend-tooltip {
Expand Down
Loading