@Override public void showError(String message, @Nullable FormField group) { if (Strings.isNullOrEmpty(message)) return; String msg = message; try { ClientErrorDto errorDto = JsonUtils.unsafeEval(message); msg = errorDto.getStatus(); } catch (Exception ignored) { } if (group == null) { dialog.addAlert(msg, AlertType.ERROR); } else { dialog.addAlert(msg, AlertType.ERROR, variableGroup); } }
@Override public void showError( @Nullable IndexConfigurationPresenter.Display.FormField formField, String message) { ControlGroup group = null; if (formField != null) { switch (formField) { case CLUSTER_NAME: group = clusterGroup; break; case SHARDS: group = shardsGroup; break; case REPLICAS: group = replicasGroup; break; } } if (group == null) { dialog.addAlert(message, AlertType.ERROR); } else { dialog.addAlert(message, AlertType.ERROR, group); } }
@Override public void showError(@Nullable FormField formField, String message) { modal.addAlert(message, AlertType.ERROR); }