Skip to content

Commit 70fa4d3

Browse files
Changed policy object names start with a capital letter.
1 parent 2ee4529 commit 70fa4d3

File tree

1 file changed

+7
-7
lines changed
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Policies/AttachedPolicyForm

1 file changed

+7
-7
lines changed

portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Policies/AttachedPolicyForm/General.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ const General: FC<GeneralProps> = ({
143143
(policyObj && policyObj.name === 'modelWeightedRoundRobin') ||
144144
(policyObj && policyObj.name === 'modelFailover') ||
145145
(policyObj && policyObj.name === 'ContentBasedModelRouter') ||
146-
(policyObj && policyObj.name === 'semanticRouting') ||
147-
(policyObj && policyObj.name === 'intelligentModelRouting')
146+
(policyObj && policyObj.name === 'SemanticRouting') ||
147+
(policyObj && policyObj.name === 'IntelligentModelRouting')
148148
) {
149149
setManual(true);
150150
// Initialize form as invalid for policies that require validation
151-
if (policyObj.name === 'semanticRouting' || policyObj.name === 'intelligentModelRouting') {
151+
if (policyObj.name === 'SemanticRouting' || policyObj.name === 'IntelligentModelRouting') {
152152
setIsManualFormValid(false);
153153
}
154154
}
@@ -219,7 +219,7 @@ const General: FC<GeneralProps> = ({
219219
event.preventDefault();
220220
if (
221221
isManual &&
222-
(policyObj?.name === 'semanticRouting' || policyObj?.name === 'intelligentModelRouting') &&
222+
(policyObj?.name === 'SemanticRouting' || policyObj?.name === 'IntelligentModelRouting') &&
223223
!isManualFormValid
224224
) {
225225
setShowValidationErrors(true);
@@ -271,7 +271,7 @@ const General: FC<GeneralProps> = ({
271271
});
272272

273273
if (policyObj.name === 'modelRoundRobin' || policyObj.name === 'modelWeightedRoundRobin' || policyObj.name === 'modelFailover'
274-
|| policyObj.name === 'ContentBasedModelRouter' || policyObj.name === 'semanticRouting' || policyObj.name === 'intelligentModelRouting'
274+
|| policyObj.name === 'ContentBasedModelRouter' || policyObj.name === 'SemanticRouting' || policyObj.name === 'IntelligentModelRouting'
275275
) {
276276
if (policySpec.policyAttributes?.length) {
277277
updateCandidates[policySpec.policyAttributes[0].name] = manualPolicyConfig;
@@ -514,7 +514,7 @@ const General: FC<GeneralProps> = ({
514514
manualPolicyConfig={getValue(policySpec.policyAttributes[0])}
515515
/>
516516
)}
517-
{(isManual && policyObj.name === 'semanticRouting') && (
517+
{(isManual && policyObj.name === 'SemanticRouting') && (
518518
<SemanticRouting
519519
setManualPolicyConfig={setManualPolicyConfig}
520520
manualPolicyConfig={getValue(policySpec.policyAttributes[0])}
@@ -523,7 +523,7 @@ const General: FC<GeneralProps> = ({
523523
setShowValidationErrors={setShowValidationErrors}
524524
/>
525525
)}
526-
{(isManual && policyObj.name === 'intelligentModelRouting') && (
526+
{(isManual && policyObj.name === 'IntelligentModelRouting') && (
527527
<IntelligentModelRouting
528528
setManualPolicyConfig={setManualPolicyConfig}
529529
manualPolicyConfig={getValue(policySpec.policyAttributes[0])}

0 commit comments

Comments
 (0)