Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues in IntelliJ End game #4455

Merged
merged 3 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ protected void textChanged(@NotNull DocumentEvent documentEvent) {
this.rxSubscription = SpringCloudStateManager.INSTANCE.subscribeSpringAppEvent(event -> {
if (event.isUpdate()) {
this.prepareViewModel(event.getAppInner(), event.getDeploymentInner());
} else if (event.isDelete() && StringUtils.equals(event.getId(), this.appId)) {
} else if (event.isDelete()) {
closeEditor();
}
}, appId, clusterId);
}, appId);
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ private void toggleApplicationInsights(boolean enable) {
pack();
}

private boolean isApplicationInsightsEnabled() {
return rdoEnableAI.isSelected();
}

private boolean isCreateApplicationInsights() {
return applicationInsightsPanel.isCreateNewInsights();
}

private void createFunctionApp() {
ProgressManager.getInstance().run(new Task.Modal(null, "Creating New Function App...", true) {
@Override
Expand Down Expand Up @@ -284,8 +292,11 @@ public void run(ProgressIndicator progressIndicator) {
}

private void bindingApplicationInsights(IntelliJFunctionContext functionConfiguration) throws IOException {
if (!isApplicationInsightsEnabled()) {
return;
}
String instrumentationKey = applicationInsightsPanel.getApplicationInsightsInstrumentKey();
if (applicationInsightsPanel.isCreateNewInsights()) {
if (isCreateApplicationInsights()) {
final String region = appServicePlanPanel.getAppServicePlanRegion();
final String insightsName = applicationInsightsPanel.getNewApplicationInsightsName();
final ApplicationInsightsComponent insights =
Expand All @@ -305,6 +316,8 @@ private void sendTelemetry(boolean success, @Nullable String errorMsg) {
telemetryMap.put("CreateNewSP", String.valueOf(appServicePlanPanel.isNewAppServicePlan()));
telemetryMap.put("CreateNewRGP", String.valueOf(resourceGroupPanel.isNewResourceGroup()));
telemetryMap.put("Success", String.valueOf(success));
telemetryMap.put("EnableApplicationInsights", String.valueOf(isApplicationInsightsEnabled()));
telemetryMap.put("CreateNewApplicationInsights", String.valueOf(isCreateApplicationInsights()));
if (!success) {
telemetryMap.put("ErrorMsg", errorMsg);
}
Expand Down