mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 17:31:34 +00:00
* feat(region-routing): P1 tagging + region_routes primitive + read/write API + preview launcher - config.py: add Coverage.region_tagging (bool=False); add RegionRouteMatrix dataclass (enabled, cells) above NotificationsConfig; add region_routes field to NotificationsConfig; add explicit hydration branch for region_routes in _dict_to_dataclass mirroring destinations pattern. - coverage_area.py: add MonitoringArea.name (str|None=None, frozen); update areas_from_config to preserve name; refactor inline geom extraction from classify_event_areas into shared _event_geom_json helper; add matching_area_names(geom_json, areas)->list[str] (additive, all named matches, config-order, deduped; gate unchanged); add event_region_names convenience wrapper. - coverage_filter.py: add region_tagging ctor kwarg; stamp event.region/ regions before the gate when region_tagging=True and areas non-empty and not event.regions (never clobbers satpass preset). - pipeline/__init__.py: wire region_tagging into CoverageFilter construction. - notification_routes.py: add GET /notifications/regions (named coverage area names, config-order, deduped); GET /notifications/region-routing (matrix as JSON); POST /notifications/region-routing (explicit RMW — only region_routes changes, toggles/rules/destinations survive). - scripts/preview_dashboard.py: mesh-free launcher — dashboard API only, no mesh connector, no broadcast loop; vite runs separately. All 87 coverage tests pass; 300 total pass; 6 pre-existing failures unchanged (adapter config count mismatch + MeshCore EventType.NEW_CONTACT). * feat(region-routing): manual region x family matrix editor page Adds RegionRoutingMatrix.tsx — a plain editor over the region_routes config primitive. Rows = families (via useFamilies()), cols = regions (from GET /api/notifications/regions). Each cell exposes MT channel (ChannelPicker single + includeDisabled), MC channel name (text input), min_severity select (routine/priority/critical/immediate), and an enabled checkbox. Only cells where MT or MC is set are included in the sparse POST payload. Master enable toggle maps to top-level enabled. MT budget guard warns when more than 7 distinct MT indices are in use. Sticky family column; horizontal scroll for wide region sets. Registers route /region-routing in App.tsx and adds "Region Routing" nav entry (Map icon) under the Meshtastic section in Layout.tsx, immediately after Routing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(region-routing): regions endpoint reads saved (disk) coverage so routing columns are dynamic without a bot restart; preview reloads config after writes * feat(routing): unify MT/MC routing into per-family cards; region routing as an in-card expand; remove rules/destinations UI + standalone page * refactor(routing): move Meshtastic Routing from /notifications to /meshtastic/routing (mirror /meshcore/routing); redirect legacy path * feat(region-routing): dispatcher honors region_routes matrix (authoritative-on-match, per-region cooldown, per-channel dedup); non-matrix path unchanged Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(region-routing): matrix dedup key must match boot-restore 2-tuple form (prevents restart re-broadcast flood); regression test --------- Co-authored-by: Matt Johnson <mj@k7zvx.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
262 lines
No EOL
8.4 KiB
JavaScript
262 lines
No EOL
8.4 KiB
JavaScript
|
|
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
|
|
/**
|
|
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
|
*/
|
|
|
|
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
import { use } from './lib/extension.js';
|
|
export * from './lib/export/core.js';
|
|
// ----------------------------------------------
|
|
// All of the modules that are allowed to be
|
|
// imported are listed below.
|
|
//
|
|
// Users MUST NOT import other modules that are
|
|
// not included in this list.
|
|
// ----------------------------------------------
|
|
import { SVGRenderer, CanvasRenderer } from './lib/export/renderers.js';
|
|
import { LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, ChordChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart } from './lib/export/charts.js';
|
|
import { GridComponent, PolarComponent, GeoComponent, SingleAxisComponent, ParallelComponent, CalendarComponent, MatrixComponent, GraphicComponent, ToolboxComponent, TooltipComponent, AxisPointerComponent, BrushComponent, TitleComponent, TimelineComponent, MarkPointComponent, MarkLineComponent, MarkAreaComponent, LegendComponent, DataZoomComponent, DataZoomInsideComponent, DataZoomSliderComponent, VisualMapComponent, VisualMapContinuousComponent, VisualMapPiecewiseComponent, ThumbnailComponent, AriaComponent, DatasetComponent, TransformComponent } from './lib/export/components.js';
|
|
import { UniversalTransition, LabelLayout, AxisBreak, LegacyGridContainLabel, ScatterJitter } from './lib/export/features.js';
|
|
// -----------------
|
|
// Render engines
|
|
// -----------------
|
|
// Render via Canvas.
|
|
// echarts.init(dom, null, { renderer: 'canvas' })
|
|
use([CanvasRenderer]);
|
|
// Render via SVG.
|
|
// echarts.init(dom, null, { renderer: 'svg' })
|
|
use([SVGRenderer]);
|
|
// ----------------
|
|
// Charts (series)
|
|
// ----------------
|
|
// All of the series types, for example:
|
|
// chart.setOption({
|
|
// series: [{
|
|
// type: 'line' // or 'bar', 'pie', ...
|
|
// }]
|
|
// });
|
|
use([LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, ChordChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart]);
|
|
// -------------------
|
|
// Coordinate systems
|
|
// -------------------
|
|
// All of the axis modules have been included in the
|
|
// coordinate system module below, do not need to
|
|
// make extra import.
|
|
// `cartesian` coordinate system. For some historical
|
|
// reasons, it is named as grid, for example:
|
|
// chart.setOption({
|
|
// grid: {...},
|
|
// xAxis: {...},
|
|
// yAxis: {...},
|
|
// series: [{...}]
|
|
// });
|
|
use(GridComponent);
|
|
// `polar` coordinate system, for example:
|
|
// chart.setOption({
|
|
// polar: {...},
|
|
// radiusAxis: {...},
|
|
// angleAxis: {...},
|
|
// series: [{
|
|
// coordinateSystem: 'polar'
|
|
// }]
|
|
// });
|
|
use(PolarComponent);
|
|
// `geo` coordinate system, for example:
|
|
// chart.setOption({
|
|
// geo: {...},
|
|
// series: [{
|
|
// coordinateSystem: 'geo'
|
|
// }]
|
|
// });
|
|
use(GeoComponent);
|
|
// `singleAxis` coordinate system (notice, it is a coordinate system
|
|
// with only one axis, work for chart like theme river), for example:
|
|
// chart.setOption({
|
|
// singleAxis: {...}
|
|
// series: [{type: 'themeRiver', ...}]
|
|
// });
|
|
use(SingleAxisComponent);
|
|
// `parallel` coordinate system, only work for parallel series, for example:
|
|
// chart.setOption({
|
|
// parallel: {...},
|
|
// parallelAxis: [{...}, ...],
|
|
// series: [{
|
|
// type: 'parallel'
|
|
// }]
|
|
// });
|
|
use(ParallelComponent);
|
|
// `calendar` coordinate system. for example,
|
|
// chart.setOption({
|
|
// calendar: {...},
|
|
// series: [{
|
|
// coordinateSystem: 'calendar'
|
|
// }]
|
|
// );
|
|
use(CalendarComponent);
|
|
// `matrix` coordinate system. for example,
|
|
// chart.setOption({
|
|
// matrix: {...},
|
|
// series: [{
|
|
// coordinateSystem: 'matrix'
|
|
// }]
|
|
// );
|
|
use(MatrixComponent);
|
|
// ------------------
|
|
// Other components
|
|
// ------------------
|
|
// `graphic` component, for example:
|
|
// chart.setOption({
|
|
// graphic: {...}
|
|
// });
|
|
use(GraphicComponent);
|
|
// `toolbox` component, for example:
|
|
// chart.setOption({
|
|
// toolbox: {...}
|
|
// });
|
|
use(ToolboxComponent);
|
|
// `tooltip` component, for example:
|
|
// chart.setOption({
|
|
// tooltip: {...}
|
|
// });
|
|
use(TooltipComponent);
|
|
// `axisPointer` component, for example:
|
|
// chart.setOption({
|
|
// tooltip: {axisPointer: {...}, ...}
|
|
// });
|
|
// Or
|
|
// chart.setOption({
|
|
// axisPointer: {...}
|
|
// });
|
|
use(AxisPointerComponent);
|
|
// `brush` component, for example:
|
|
// chart.setOption({
|
|
// brush: {...}
|
|
// });
|
|
// Or
|
|
// chart.setOption({
|
|
// tooltip: {feature: {brush: {...}}
|
|
// })
|
|
use(BrushComponent);
|
|
// `title` component, for example:
|
|
// chart.setOption({
|
|
// title: {...}
|
|
// });
|
|
use(TitleComponent);
|
|
// `timeline` component, for example:
|
|
// chart.setOption({
|
|
// timeline: {...}
|
|
// });
|
|
use(TimelineComponent);
|
|
// `markPoint` component, for example:
|
|
// chart.setOption({
|
|
// series: [{markPoint: {...}}]
|
|
// });
|
|
use(MarkPointComponent);
|
|
// `markLine` component, for example:
|
|
// chart.setOption({
|
|
// series: [{markLine: {...}}]
|
|
// });
|
|
use(MarkLineComponent);
|
|
// `markArea` component, for example:
|
|
// chart.setOption({
|
|
// series: [{markArea: {...}}]
|
|
// });
|
|
use(MarkAreaComponent);
|
|
// `legend` component not scrollable. for example:
|
|
// chart.setOption({
|
|
// legend: {...}
|
|
// });
|
|
use(LegendComponent);
|
|
// `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`.
|
|
use(DataZoomComponent);
|
|
// `dataZoom` component providing drag, pinch, wheel behaviors
|
|
// inside coordinate system, for example:
|
|
// chart.setOption({
|
|
// dataZoom: {type: 'inside'}
|
|
// });
|
|
use(DataZoomInsideComponent);
|
|
// `dataZoom` component providing a slider bar, for example:
|
|
// chart.setOption({
|
|
// dataZoom: {type: 'slider'}
|
|
// });
|
|
use(DataZoomSliderComponent);
|
|
// `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`.
|
|
use(VisualMapComponent);
|
|
// `visualMap` component providing continuous bar, for example:
|
|
// chart.setOption({
|
|
// visualMap: {type: 'continuous'}
|
|
// });
|
|
use(VisualMapContinuousComponent);
|
|
// `visualMap` component providing pieces bar, for example:
|
|
// chart.setOption({
|
|
// visualMap: {type: 'piecewise'}
|
|
// });
|
|
use(VisualMapPiecewiseComponent);
|
|
use(ThumbnailComponent);
|
|
// `aria` component providing aria, for example:
|
|
// chart.setOption({
|
|
// aria: {...}
|
|
// });
|
|
use(AriaComponent);
|
|
// dataset transform
|
|
// chart.setOption({
|
|
// dataset: {
|
|
// transform: []
|
|
// }
|
|
// });
|
|
use(TransformComponent);
|
|
use(DatasetComponent);
|
|
// universal transition
|
|
// chart.setOption({
|
|
// series: {
|
|
// universalTransition: { enabled: true }
|
|
// }
|
|
// })
|
|
use(UniversalTransition);
|
|
// label layout
|
|
// chart.setOption({
|
|
// series: {
|
|
// labelLayout: { hideOverlap: true }
|
|
// }
|
|
// })
|
|
use(LabelLayout);
|
|
use(AxisBreak);
|
|
use(LegacyGridContainLabel);
|
|
use(ScatterJitter); |