private TextField createTriggerThreshold() { final TextField thresholdField = createIntegerTextField("prompt.tigger.threshold", UIComponentIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID); thresholdField.addValidator(new ThresholdFieldValidator()); thresholdField.setValue(defaultRolloutGroupConditions.getSuccessConditionExp()); return thresholdField; }
private TextField createTriggerThreshold() { final TextField thresholdField = createIntegerTextField("prompt.tigger.threshold", UIComponentIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID); thresholdField.addValidator(new ThresholdFieldValidator()); thresholdField.setValue(defaultRolloutGroupConditions.getSuccessConditionExp()); return thresholdField; }
private void resetFields() { rolloutName.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); noOfGroups.clear(); noOfGroups.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); triggerThreshold.setValue(defaultRolloutGroupConditions.getSuccessConditionExp()); triggerThreshold.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); errorThreshold.setValue(defaultRolloutGroupConditions.getErrorConditionExp()); errorThreshold.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); description.clear(); description.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); }
successCondition.put("expression", conditions.getSuccessConditionExp());
private void resetFields() { rolloutName.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); noOfGroups.clear(); noOfGroups.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); triggerThreshold.setValue(defaultRolloutGroupConditions.getSuccessConditionExp()); triggerThreshold.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); errorThreshold.setValue(defaultRolloutGroupConditions.getErrorConditionExp()); errorThreshold.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); description.clear(); description.removeStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR); }
@SuppressWarnings("squid:S00107") AddUpdateRolloutWindowLayout(final RolloutManagement rolloutManagement, final TargetManagement targetManagement, final UINotification uiNotification, final UiProperties uiProperties, final EntityFactory entityFactory, final VaadinMessageSource i18n, final UIEventBus eventBus, final TargetFilterQueryManagement targetFilterQueryManagement, final RolloutGroupManagement rolloutGroupManagement, final QuotaManagement quotaManagement) { actionTypeOptionGroupLayout = new ActionTypeOptionGroupLayout(i18n); autoStartOptionGroupLayout = new AutoStartOptionGroupLayout(i18n); this.rolloutManagement = rolloutManagement; this.rolloutGroupManagement = rolloutGroupManagement; this.quotaManagement = quotaManagement; this.targetManagement = targetManagement; this.uiNotification = uiNotification; this.uiProperties = uiProperties; this.entityFactory = entityFactory; this.i18n = i18n; this.eventBus = eventBus; this.targetFilterQueryManagement = targetFilterQueryManagement; defineGroupsLayout = new DefineGroupsLayout(i18n, entityFactory, rolloutManagement, targetFilterQueryManagement, rolloutGroupManagement, quotaManagement); defaultRolloutGroupConditions = new RolloutGroupConditionBuilder().withDefaults().build(); setSizeUndefined(); createRequiredComponents(); buildLayout(); defineGroupsLayout.setValidationListener(this::displayValidationStatus); defineGroupsLayout.setDefaultErrorThreshold(defaultRolloutGroupConditions.getErrorConditionExp()); defineGroupsLayout.setDefaultTriggerThreshold(defaultRolloutGroupConditions.getSuccessConditionExp()); }
@SuppressWarnings("squid:S00107") AddUpdateRolloutWindowLayout(final RolloutManagement rolloutManagement, final TargetManagement targetManagement, final UINotification uiNotification, final UiProperties uiProperties, final EntityFactory entityFactory, final VaadinMessageSource i18n, final UIEventBus eventBus, final TargetFilterQueryManagement targetFilterQueryManagement, final RolloutGroupManagement rolloutGroupManagement, final QuotaManagement quotaManagement) { actionTypeOptionGroupLayout = new ActionTypeOptionGroupLayout(i18n); autoStartOptionGroupLayout = new AutoStartOptionGroupLayout(i18n); this.rolloutManagement = rolloutManagement; this.rolloutGroupManagement = rolloutGroupManagement; this.quotaManagement = quotaManagement; this.targetManagement = targetManagement; this.uiNotification = uiNotification; this.uiProperties = uiProperties; this.entityFactory = entityFactory; this.i18n = i18n; this.eventBus = eventBus; this.targetFilterQueryManagement = targetFilterQueryManagement; defineGroupsLayout = new DefineGroupsLayout(i18n, entityFactory, rolloutManagement, targetFilterQueryManagement, rolloutGroupManagement, quotaManagement); defaultRolloutGroupConditions = new RolloutGroupConditionBuilder().withDefaults().build(); setSizeUndefined(); createRequiredComponents(); buildLayout(); defineGroupsLayout.setValidationListener(this::displayValidationStatus); defineGroupsLayout.setDefaultErrorThreshold(defaultRolloutGroupConditions.getErrorConditionExp()); defineGroupsLayout.setDefaultTriggerThreshold(defaultRolloutGroupConditions.getSuccessConditionExp()); }
@Override public JpaRolloutGroup build() { final JpaRolloutGroup group = new JpaRolloutGroup(); group.setName(name); group.setDescription(description); group.setTargetFilterQuery(targetFilterQuery); if (targetPercentage == null) { targetPercentage = 100F; } group.setTargetPercentage(targetPercentage); if (conditions != null) { group.setSuccessCondition(conditions.getSuccessCondition()); group.setSuccessConditionExp(conditions.getSuccessConditionExp()); group.setSuccessAction(conditions.getSuccessAction()); group.setSuccessActionExp(conditions.getSuccessActionExp()); group.setErrorCondition(conditions.getErrorCondition()); group.setErrorConditionExp(conditions.getErrorConditionExp()); group.setErrorAction(conditions.getErrorAction()); group.setErrorActionExp(conditions.getErrorActionExp()); } return group; }
@Override public JpaRolloutGroup build() { final JpaRolloutGroup group = new JpaRolloutGroup(); group.setName(name); group.setDescription(description); group.setTargetFilterQuery(targetFilterQuery); if (targetPercentage == null) { targetPercentage = 100F; } group.setTargetPercentage(targetPercentage); if (conditions != null) { group.setSuccessCondition(conditions.getSuccessCondition()); group.setSuccessConditionExp(conditions.getSuccessConditionExp()); group.setSuccessAction(conditions.getSuccessAction()); group.setSuccessActionExp(conditions.getSuccessActionExp()); group.setErrorCondition(conditions.getErrorCondition()); group.setErrorConditionExp(conditions.getErrorConditionExp()); group.setErrorAction(conditions.getErrorAction()); group.setErrorActionExp(conditions.getErrorActionExp()); } return group; }
group.setSuccessConditionExp(conditions.getSuccessConditionExp());
group.setSuccessConditionExp(conditions.getSuccessConditionExp());
group.setSuccessConditionExp(conditions.getSuccessConditionExp());
group.setSuccessConditionExp(conditions.getSuccessConditionExp());