mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
feat: ui tweaks for playground (#4058)
This commit is contained in:
parent
566b91e298
commit
374d49f5bf
@ -130,6 +130,7 @@ export const AdvancedPlayground: VFC<{
|
|||||||
action?: () => void
|
action?: () => void
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
|
setConfigurationError(undefined);
|
||||||
const parsedContext = JSON.parse(context || '{}');
|
const parsedContext = JSON.parse(context || '{}');
|
||||||
const response = await evaluateAdvancedPlayground({
|
const response = await evaluateAdvancedPlayground({
|
||||||
environments: resolveEnvironments(environments),
|
environments: resolveEnvironments(environments),
|
||||||
@ -143,7 +144,6 @@ export const AdvancedPlayground: VFC<{
|
|||||||
if (action && typeof action === 'function') {
|
if (action && typeof action === 'function') {
|
||||||
action();
|
action();
|
||||||
}
|
}
|
||||||
setConfigurationError(undefined);
|
|
||||||
setResults(response);
|
setResults(response);
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
if (error instanceof BadRequestError) {
|
if (error instanceof BadRequestError) {
|
||||||
|
@ -11,7 +11,7 @@ export const validateQueryComplexity = (
|
|||||||
const totalCount =
|
const totalCount =
|
||||||
environmentsCount * featuresCount * contextCombinationsCount;
|
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}).`;
|
const action = `Please reduce the number of selected environments (${environmentsCount}), features (${featuresCount}), context field combinations (${contextCombinationsCount}).`;
|
||||||
|
|
||||||
if (totalCount > limit) {
|
if (totalCount > limit) {
|
||||||
|
Loading…
Reference in New Issue
Block a user