diff --git a/VERSION b/VERSION index 03035cdd..18fb7fec 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.22.5 +0.22.6 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 5750884b..a2aed6dd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,6 +7,25 @@ This project follows the repository versioning rule: - `feature` -> `+0.1.0` - `bugfix` -> `+0.0.1` +## 0.22.6 + +Released: 2026-04-01 + +### Highlights + +- Finished the remaining Earth-side BGP interaction changes that were left out of the previous push, so collector and incident selections now use the intended semantic linking behavior in the globe view. + +### Improved + +- Improved [main.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/main.js) so BGP incident cards synthesize a clearer narrative summary when backend text is sparse, instead of exposing a thin raw summary. +- Improved [main.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/main.js) so incident selection reports impacted region counts and related cable counts directly in the Earth status message. +- Improved [main.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/main.js) so BGP incident-linked cables use a locked visual state, making event-to-cable correlation easier to read on the globe. + +### Fixed + +- Fixed the omitted Earth-side BGP semantic update from the previous push by actually shipping the `incident nearby satellites` wording, incident narrative fallback, and related-cable lock highlighting in [main.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/main.js). +- Fixed collector selection semantics in [main.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/main.js) so selecting a BGP collector no longer triggers the weaker nearby-satellite hint and no longer dims cable and landing-point layers as if it were an incident state. + ## 0.22.5 Released: 2026-03-31 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index c0241678..9671e74f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "planet-frontend", - "version": "0.22.5", + "version": "0.22.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "planet-frontend", - "version": "0.22.5", + "version": "0.22.6", "dependencies": { "@ant-design/icons": "^5.2.6", "antd": "^5.12.5", diff --git a/frontend/package.json b/frontend/package.json index 683b4404..4e4a1963 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "planet-frontend", - "version": "0.22.5", + "version": "0.22.6", "private": true, "dependencies": { "@ant-design/icons": "^5.2.6", diff --git a/frontend/public/earth/js/main.js b/frontend/public/earth/js/main.js index edfea985..0e28a941 100644 --- a/frontend/public/earth/js/main.js +++ b/frontend/public/earth/js/main.js @@ -433,6 +433,15 @@ function showBGPInfo(marker) { country: marker.userData.country, }, ]; + const observedBy = + marker.userData.observed_by || + formatBGPObservedBy(marker.userData.collectors); + const impactedScope = formatBGPImpactedScope(impactedRegions); + const relatedCables = formatBGPRelatedCables(marker.userData.related_cables); + const narrative = + marker.userData.summary && marker.userData.summary !== "-" + ? marker.userData.summary + : buildBGPIncidentNarrative(marker, impactedRegions); showInfoCard("bgp", { anomaly_type: formatBGPAnomalyTypeLabel( marker.userData.incident_type || marker.userData.anomaly_type, @@ -465,20 +474,18 @@ function showBGPInfo(marker) { : marker.userData.new_origin_asn, confidence: formatBGPConfidence(marker.userData.confidence), collector: marker.userData.collector, - observed_by: - marker.userData.observed_by || - formatBGPObservedBy(marker.userData.collectors), - impacted_scope: formatBGPImpactedScope(impactedRegions), - related_cables: formatBGPRelatedCables(marker.userData.related_cables), + observed_by: observedBy, + impacted_scope: impactedScope, + related_cables: relatedCables, related_satellites: marker.userData.related_satellite_count > 0 - ? `${marker.userData.related_satellite_count}颗附近卫星` + ? `${marker.userData.related_satellite_count}颗事件附近卫星` : "-", location: marker.userData.location || formatBGPLocation(marker.userData.city, marker.userData.country), created_at: formatBGPObservedTime(marker.userData.created_at_raw), - summary: marker.userData.summary, + summary: narrative, }); } @@ -495,10 +502,7 @@ function showBGPCollectorInfo(marker) { origin_asn_count: marker.userData.origin_asn_count ?? 0, top_event_types: formatBGPTopEventTypes(marker.userData.top_event_types), coverage_halo: formatBGPCollectorCoverageHalo(marker.userData), - related_satellites: - marker.userData.related_satellite_count > 0 - ? `${marker.userData.related_satellite_count}颗附近卫星` - : "-", + related_satellites: "-", latest_event_type: marker.userData.latest_event_type || "-", latest_observed_at: formatBGPObservedTime(marker.userData.latest_observed_at), baseline_scope: formatBGPScope(marker.userData.baseline_scope), @@ -523,6 +527,35 @@ function getBGPRelatedCableNames(marker) { return names; } +function getBGPInfrastructureSummary(marker) { + return { + cableCount: getBGPRelatedCableNames(marker).length, + regionCount: getBGPRelatedRegions(marker).length, + }; +} + +function buildBGPIncidentNarrative(marker, impactedRegions) { + const eventLabel = formatBGPAnomalyTypeLabel( + marker.userData.incident_type || marker.userData.anomaly_type, + ); + const severityLabel = formatBGPSeverityLabel( + marker.userData.rawSeverity || marker.userData.severity, + ); + const observedBy = + marker.userData.observed_by || + formatBGPObservedBy(marker.userData.collectors); + const routeLabel = + marker.userData.route_change || + formatBGPRouteChange( + marker.userData.origin_asn, + marker.userData.new_origin_asn, + ); + const cableCount = getBGPRelatedCableNames(marker).length; + const regionCount = impactedRegions.length; + + return `${eventLabel},${severityLabel};${observedBy},影响${regionCount}个区域,关联${cableCount}条海缆线索${routeLabel && routeLabel !== "-" ? `,特征 ${routeLabel}` : ""}。`; +} + function getBGPRelatedRegions(marker) { if (Array.isArray(marker?.userData?.impacted_regions) && marker.userData.impacted_regions.length > 0) { return marker.userData.impacted_regions; @@ -572,8 +605,7 @@ function applyCableVisualState() { if ( (lockedObjectType === "cable" && lockedObject) || (lockedObjectType === "satellite" && lockedSatellite) || - (lockedObjectType === "bgp" && lockedObject) || - (lockedObjectType === "bgp_collector" && lockedObject) + (lockedObjectType === "bgp" && lockedObject) ) { cable.material.opacity = CABLE_CONFIG.otherOpacity; const origColor = cable.userData.originalColor; @@ -1344,9 +1376,10 @@ function onClick(event) { clickedMarker.userData.related_satellite_count = relatedSatelliteIndices.length; highlightRelatedSatellites(relatedSatelliteIndices, "#7dd3fc"); } + const incidentSummary = getBGPInfrastructureSummary(clickedMarker); showBGPInfo(clickedMarker); showStatusMessage( - `已选择BGP事件: ${clickedMarker.userData.collector}`, + `已选择BGP事件: ${clickedMarker.userData.collector} · ${incidentSummary.regionCount}个区域 / ${incidentSummary.cableCount}条相关海缆`, "info", ); return; @@ -1366,14 +1399,7 @@ function onClick(event) { lastBGPClickPos = { x: event.clientX, y: event.clientY }; setAutoRotate(false); showBGPCollectorCoverageOverlay(clickedMarker, earth); - { - const relatedSatelliteIndices = getRelatedSatelliteIndicesForRegions( - getBGPRelatedRegions(clickedMarker), - { limit: 4, maxAngleDeg: 18 }, - ); - clickedMarker.userData.related_satellite_count = relatedSatelliteIndices.length; - highlightRelatedSatellites(relatedSatelliteIndices, "#93c5fd"); - } + clickedMarker.userData.related_satellite_count = 0; showBGPCollectorInfo(clickedMarker); showStatusMessage( `已选择观测站: ${clickedMarker.userData.collector}`, @@ -1522,7 +1548,7 @@ function animate() { relatedCableNames.forEach((name) => { getCableLines().forEach((cable) => { if (cable.userData?.name === name) { - setCableState(cable.userData.cableId, CABLE_STATE.HOVERED); + setCableState(cable.userData.cableId, CABLE_STATE.LOCKED); } }); }); @@ -1532,7 +1558,7 @@ function animate() { ); } else if (lockedObjectType === "bgp_collector" && lockedObject) { clearAllCableStates(); - applyLandingPointVisualState(null, true); + resetLandingPointVisualState(); } else { resetLandingPointVisualState(); } diff --git a/pyproject.toml b/pyproject.toml index 877c24df..8c96ddc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "planet" -version = "0.22.5" +version = "0.22.6" description = "智能星球计划 - 态势感知系统" requires-python = ">=3.14" dependencies = [