✨ feat(ratio-sync): support /api/pricing parsing, confidence verification & UI enhancements
Backend - controller/ratio_sync.go • Parse /api/pricing response and convert to ratio / price maps. • Introduce confidence heuristic (model_ratio = 37.5 && completion_ratio = 1) to flag unreliable data. • Include confidence map when building differences and filter “same”/empty entries. - dto/ratio_sync.go • Add `ID` to UpstreamDTO, `upstreams` to UpstreamRequest, and `Confidence` to DifferenceItem. Frontend - ChannelSelectorModal.js • Re-implement with table layout, pagination, search, endpoint-type selector and mobile support. - UpstreamRatioSync.js • Send full upstream objects, add ratio-type filter, confidence badges/tooltips, retain endpoints. • Leverage ChannelSelectorModal’s pagination reset. - ChannelsTable.js – fix tag color for disabled status. - en.json – add translations for new UI labels. Motivation These changes let users sync model ratios / prices from different upstream endpoints and visually identify potentially unreliable data, improving operational safety and flexibility.
This commit is contained in:
@@ -114,7 +114,7 @@ const ChannelsTable = () => {
|
||||
);
|
||||
case 2:
|
||||
return (
|
||||
<Tag size='large' color='yellow' shape='circle' prefixIcon={<XCircle size={14} />}>
|
||||
<Tag size='large' color='red' shape='circle' prefixIcon={<XCircle size={14} />}>
|
||||
{t('已禁用')}
|
||||
</Tag>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user