Commit 80fd0f2
committed
Resolves #6485 (FR-2494) - Sub-task 2
> [!NOTE]
> Translation is handled in #6642
## Summary
- Create new `AutoScalingRuleList.tsx` component that uses the Strawberry API (`ModelDeployment.autoScalingRules` nested connection) for `>=26.4.0` backends
- Display conditions using `minThreshold`/`maxThreshold` with normalized `<` direction:
- `maxThreshold` only: `[metric_name] < [maxThreshold]`
- `minThreshold` only: `[minThreshold] < [metric_name]`
- Both set: `[minThreshold] < [metric_name] < [maxThreshold]`
- Show Prometheus preset name for `PROMETHEUS` metric source rules by matching `prometheusQueryPresetId` (raw UUID) with `toLocalId(presetGlobalId)`
- Wire up `deleteAutoScalingRule` Strawberry mutation
- Update `EndpointDetailPage.tsx` to render the new list when `isSupportPrometheusAutoScalingRule` is true
- Add i18n keys: `TimeWindow`, `PrometheusPreset`
## Changed files
- `react/src/components/AutoScalingRuleList.tsx` (new)
- `react/src/pages/EndpointDetailPage.tsx` (conditional rendering for Strawberry path)
- `resources/i18n/en.json` (new i18n keys)
## Verification
```
=== ALL PASS ===
```
1 parent 4808e68 commit 80fd0f2
3 files changed
Lines changed: 426 additions & 3 deletions
0 commit comments