1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

feat: ui tweaks for playground (#4058)

This commit is contained in:
Mateusz Kwasniewski 2023-06-22 10:13:17 +02:00 committed by GitHub
parent 566b91e298
commit 374d49f5bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -130,6 +130,7 @@ export const AdvancedPlayground: VFC<{
action?: () => void
) => {
try {
setConfigurationError(undefined);
const parsedContext = JSON.parse(context || '{}');
const response = await evaluateAdvancedPlayground({
environments: resolveEnvironments(environments),
@ -143,7 +144,6 @@ export const AdvancedPlayground: VFC<{
if (action && typeof action === 'function') {
action();
}
setConfigurationError(undefined);
setResults(response);
} catch (error: unknown) {
if (error instanceof BadRequestError) {

View File

@ -11,7 +11,7 @@ export const validateQueryComplexity = (
const totalCount =
environmentsCount * featuresCount * contextCombinationsCount;
const reason = `Rejecting evaluation as it would generate ${totalCount} combinations exceeding ${MAX_COMPLEXITY} limit. `;
const reason = `Rejecting evaluation as it would generate ${totalCount} combinations exceeding ${limit} limit. `;
const action = `Please reduce the number of selected environments (${environmentsCount}), features (${featuresCount}), context field combinations (${contextCombinationsCount}).`;
if (totalCount > limit) {