Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
[JBEAP-10415] When redirected to runtime page, some windows remain op…
Browse files Browse the repository at this point in the history
…en in Web Console
  • Loading branch information
xstefank committed May 6, 2017
1 parent 0a8bd10 commit 4c7c087
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public interface MyView extends View {
private final ResourceDescriptionRegistry descriptionRegistry;
private final SecurityFramework securityFramework;
private final StatementContext statementContext;
private final BootstrapContext bootstrapContext;

private DefaultWindow providerDialog;
private ProviderView providerView;
Expand All @@ -111,6 +112,7 @@ public ActivemqFinder(EventBus eventBus,
this.securityFramework = securityFramework;
this.statementContext = statementContext;
this.providerView = new ProviderView(this);
this.bootstrapContext = bootstrapContext;
}

@Override
Expand Down Expand Up @@ -250,7 +252,7 @@ public void onSuccess(DMRResponse dmrResponse) {
Console.info(Console.MESSAGES
.successfullyModifiedMessagingProvider(provider.getName()));
}
loadProvider(provider.getName());
reloadProviderDialog(provider.getName());
}
});
}
Expand Down Expand Up @@ -298,7 +300,7 @@ public void onSuccess(DMRResponse dmrResponse) {
} else {
Console.info(Console.MESSAGES
.successfullyModifiedMessagingProvider(resourceName));
loadProvider(resourceName);
reloadProviderDialog(resourceName);
}
}
});
Expand All @@ -321,7 +323,7 @@ public void onSuccess(DMRResponse dmrResponse) {
Console.error(Console.MESSAGES.failedToModifyMessagingProvider(resourceName), response.getFailureDescription());
} else {
Console.info(Console.MESSAGES.successfullyModifiedMessagingProvider(resourceName));
loadProvider(resourceName); // refresh
reloadProviderDialog(resourceName);
}
}
});
Expand All @@ -338,4 +340,11 @@ public void onLaunchProviderSettings(Property provider) {

providerView.updateFrom(provider);
}

private void reloadProviderDialog(String name) {
loadProvider(name);
if (!bootstrapContext.isStandalone()) {
providerDialog.hide();
}
}
}

0 comments on commit 4c7c087

Please sign in to comment.