feat: display provider models

This commit is contained in:
jialin
2026-03-16 14:48:46 +08:00
committed by jialin
parent 353ee3a9ae
commit 95070ae382
9 changed files with 217 additions and 75 deletions
@@ -90,26 +90,24 @@ const RouteItem: React.FC<TargetItemProps> = ({
</Col>
<Col span={2}>
<CellContent>
{data.weight > 0 && (
{data.fallback_status_codes &&
data.fallback_status_codes?.length > 0 ? (
<>
{data.weight > 0 && (
<span style={{ marginInline: 8 }}>/</span>
)}
<span>
{intl.formatMessage({
id: 'routes.table.label.fallback'
})}
</span>
</>
) : (
<AutoTooltip ghost>
{intl.formatMessage({ id: 'routes.form.target.weight' })}:{' '}
{data.weight}
{data.weight || 0}
</AutoTooltip>
)}
{data.fallback_status_codes &&
data.fallback_status_codes?.length > 0 && (
<>
{data.weight > 0 && (
<span style={{ marginInline: 8 }}>/</span>
)}
<span>
{intl.formatMessage({
id: 'routes.table.label.fallback'
})}
</span>
</>
)}
</CellContent>
</Col>
<Col span={3}>
-7
View File
@@ -257,13 +257,6 @@ const TargetsForm = forwardRef((props, ref) => {
{
validator(rule, value) {
if (value && value?.length > 0) {
// if (_.some(value, (item: any) => !item.weight)) {
// setValidTriggered(true);
// return Promise.reject(
// getRuleMessage('input', 'routes.form.target.weight')
// );
// }
if (
_.some(
dataList,