Skip to content

Commit bc6b1f8

Browse files
committed
feat(FR-561): add percentage suffix for kernel metric threshold (#3203)
resolves #3204 (FR-561) Added percentage symbol (%) display for kernel-based auto-scaling rule thresholds in both the rule editor modal and endpoint detail page. This provides clearer indication when threshold values represent percentages for kernel metrics. In Form ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/XqC2uNFuj0wg8I60sMUh/9b3e18b7-147f-4329-98dd-d26eed455b70.png) In List ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/XqC2uNFuj0wg8I60sMUh/367f7419-a650-4792-943d-9f3e339dfddc.png) **Checklist:** - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent a777826 commit bc6b1f8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

react/src/components/AutoScalingRuleEditorModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,12 @@ const AutoScalingRuleEditorModal: React.FC<AutoScalingRuleEditorModalProps> = ({
384384
rules={[{ required: true }]}
385385
noStyle
386386
>
387-
<Input placeholder={t('autoScalingRule.Threshold')} />
387+
<Input
388+
suffix={
389+
getFieldValue('metric_source') === 'KERNEL' ? '%' : ''
390+
}
391+
placeholder={t('autoScalingRule.Threshold')}
392+
/>
388393
</Form.Item>
389394
</Space.Compact>
390395
);

react/src/pages/EndpointDetailPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ const EndpointDetailPage: React.FC<EndpointDetailPageProps> = () => {
665665
'-'
666666
)}
667667
{row?.threshold}
668+
{row?.metric_source === 'KERNEL' ? '%' : ''}
668669
</Flex>
669670
),
670671
},

0 commit comments

Comments
 (0)