Skip to content

Commit 7eede27

Browse files
Merge pull request #6348 from microsoft/endgame-202201
merge endgame-202201 to endgame-202201.next
2 parents cc55873 + bf7db00 commit 7eede27

File tree

150 files changed

+946
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+946
-418
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in this file.
44

55
- [Change Log](#change-log)
6+
- [3.61.0](#3610)
7+
- [3.60.2](#3602)
8+
- [3.60.1](#3601)
69
- [3.60.0](#3600)
710
- [3.59.0](#3590)
811
- [3.58.0](#3580)
@@ -76,6 +79,37 @@ All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in t
7679
- [3.0.7](#307)
7780
- [3.0.6](#306)
7881

82+
## 3.61.0
83+
### Added
84+
- Add a placeholder tree node in Azure Explorer for resource that is being created.
85+
- Show the status of resources explicitly on Azure Explorer node(right after the name).
86+
87+
### Changed
88+
- Details of items in combo box are now loaded lazily, so that user needn't to wait too long.
89+
for the items to be ready to be selected when deploy a WebApp/Function App.
90+
- Nodes in Azure Explorer are now ordered alphabetically.
91+
92+
### Fixed
93+
- NPE when connecting storage account/redis cache if there is no such resources in the selected subscription.
94+
- No default Offer/Sku/Image are selected in "Select VM Image" dialog.
95+
- Validation passed in Create VM dialog even Maximum price per hour is empty.
96+
- Some modified values will be changed to default when switch back to "More settings" in "Create App Service" dialog.
97+
- Can't create new security group from "Create VM" dialog.
98+
- Validation message is not right when selected subscription has no spring cloud service.
99+
- Tooltips on nodes in azure explorer are not correct.
100+
- Error occurs when Docker Run.
101+
- Error occurs when run or deploy after docker support is added.
102+
- Icon of action "Open by Database Tools" for PostgreSQL is missing.
103+
104+
## 3.60.2
105+
### Changed
106+
- upgrade log4j to the latest v2.17.1
107+
108+
## 3.60.1
109+
### Fixed
110+
- [#6294](https://github.com/microsoft/azure-tools-for-java/issues/6294): Uncaught Exception cannot create configurable component java.lang.NullPointerException
111+
- Signin status will not keep after restarting if user signed in with Service Principal
112+
79113
## 3.60.0
80114
### Added
81115
- Add dependency support for Azure Functions related libs, so that our plugin can be recommended.

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/AppServiceInfoBasicPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public T getValue() {
102102

103103
@Override
104104
public void setValue(final T config) {
105+
this.config = config;
105106
this.textName.setValue(config.getName());
106107
this.selectorRuntime.setValue(config.getRuntime());
107108
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/AppServiceStreamingLogManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public Flux<String> getStreamingLogContent() throws IOException {
181181
// Refers https://github.com/microsoft/vscode-azurefunctions/blob/v0.22.0/src/
182182
// commands/logstream/startStreamingLogs.ts#L53
183183
private void openLiveMetricsStream() throws IOException {
184-
final String aiKey = functionApp.entity().getAppSettings().get(APPINSIGHTS_INSTRUMENTATIONKEY);
184+
final String aiKey = functionApp.getAppSettings().get(APPINSIGHTS_INSTRUMENTATIONKEY);
185185
if (StringUtils.isEmpty(aiKey)) {
186186
throw new IOException(MUST_CONFIGURE_APPLICATION_INSIGHTS);
187187
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/action/SSHIntoWebAppAction.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
package com.microsoft.azure.toolkit.intellij.legacy.appservice.action;
77

88
import com.intellij.openapi.project.Project;
9+
import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem;
910
import com.microsoft.azure.toolkit.lib.appservice.service.impl.WebApp;
1011
import com.microsoft.azure.toolkit.lib.common.action.Action;
1112
import com.microsoft.azure.toolkit.lib.common.bundle.AzureString;
1213
import com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException;
14+
import com.microsoft.azure.toolkit.lib.common.messager.AzureMessager;
1315
import com.microsoft.azure.toolkit.lib.common.task.AzureTask;
1416
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
1517
import com.microsoft.azure.toolkit.lib.legacy.appservice.TunnelProxy;
@@ -57,6 +59,10 @@ public void execute() {
5759
final AzureString title = title("webapp.connect_ssh.app", webAppName);
5860
AzureTaskManager.getInstance().runInBackground(new AzureTask(project, title, false,
5961
() -> {
62+
if (webApp.getRuntime().getOperatingSystem() == OperatingSystem.WINDOWS) {
63+
AzureMessager.getMessager().warning(message("webapp.ssh.windowsNotSupport"));
64+
return;
65+
}
6066
final TunnelProxy proxy = new TunnelProxy(webApp);
6167

6268
int localPort;

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/FunctionAppCreationDialog.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
package com.microsoft.azure.toolkit.intellij.legacy.function;
77

88
import com.intellij.openapi.project.Project;
9-
import com.microsoft.azure.toolkit.ide.appservice.model.ApplicationInsightsConfig;
9+
import com.microsoft.azure.toolkit.ide.appservice.function.FunctionAppConfig;
1010
import com.microsoft.azure.toolkit.ide.appservice.model.MonitorConfig;
11-
import com.microsoft.azure.toolkit.intellij.legacy.appservice.AppServiceInfoBasicPanel;
1211
import com.microsoft.azure.toolkit.intellij.common.AzureFormPanel;
1312
import com.microsoft.azure.toolkit.intellij.common.ConfigDialog;
13+
import com.microsoft.azure.toolkit.intellij.legacy.appservice.AppServiceInfoBasicPanel;
1414
import com.microsoft.azure.toolkit.lib.appservice.model.Runtime;
15-
import com.microsoft.azure.toolkit.ide.appservice.function.FunctionAppConfig;
15+
import org.apache.commons.lang3.StringUtils;
1616

1717
import javax.annotation.Nullable;
1818
import javax.swing.*;
19+
import java.util.Optional;
1920

2021
import static com.microsoft.azure.toolkit.intellij.common.AzureBundle.message;
2122

@@ -54,14 +55,16 @@ protected JComponent createCenterPanel() {
5455

5556
private void createUIComponents() {
5657
// TODO: place custom component creation code here
57-
basicPanel = new AppServiceInfoBasicPanel<FunctionAppConfig>(project, () -> FunctionAppConfig.getFunctionAppDefaultConfig(project.getName())) {
58+
basicPanel = new AppServiceInfoBasicPanel<>(project, () -> FunctionAppConfig.getFunctionAppDefaultConfig(project.getName())) {
5859
@Override
5960
public FunctionAppConfig getValue() {
6061
// Create AI instance with same name by default
6162
final FunctionAppConfig config = super.getValue();
62-
final MonitorConfig monitorConfig = MonitorConfig.builder().build();
63-
monitorConfig.setApplicationInsightsConfig(ApplicationInsightsConfig.builder().name(config.getName()).newCreate(true).build());
64-
config.setMonitorConfig(monitorConfig);
63+
Optional.ofNullable(config.getMonitorConfig()).map(MonitorConfig::getApplicationInsightsConfig).ifPresent(insightConfig -> {
64+
if (insightConfig.isNewCreate() && !StringUtils.equals(insightConfig.getName(), config.getName())) {
65+
insightConfig.setName(config.getName());
66+
}
67+
});
6568
return config;
6669
}
6770
};

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/component/table/AppSettingsDialogPresenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void onLoadFunctionApps() {
3131
public void onLoadFunctionAppSettings(FunctionApp functionApp) {
3232
Observable.fromCallable(() -> {
3333
getMvpView().beforeFillAppSettings();
34-
return functionApp.entity().getAppSettings();
34+
return functionApp.getAppSettings();
3535
}).subscribeOn(getSchedulerProvider().io())
3636
.subscribe(appSettings -> AzureTaskManager.getInstance().runLater(() -> {
3737
if (isViewDetached()) {

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/ui/FunctionDeployViewPresenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void loadAppSettings(FunctionApp functionApp) {
2929
}
3030
RxJavaUtils.unsubscribeSubscription(loadAppSettingsSubscription);
3131
loadAppSettingsSubscription =
32-
Observable.fromCallable(() -> functionApp.entity().getAppSettings()).subscribeOn(getSchedulerProvider().io())
32+
Observable.fromCallable(() -> functionApp.getAppSettings()).subscribeOn(getSchedulerProvider().io())
3333
.subscribe(appSettings -> AzureTaskManager.getInstance().runLater(() -> {
3434
if (isViewDetached()) {
3535
return;

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/ui/FunctionDeploymentPanel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.intellij.ui.HyperlinkLabel;
1414
import com.intellij.ui.ListCellRendererWrapper;
1515
import com.microsoft.azure.toolkit.ide.appservice.function.FunctionAppConfig;
16+
import com.microsoft.azure.toolkit.intellij.common.AzureComboBox;
1617
import com.microsoft.azure.toolkit.intellij.legacy.common.AzureSettingPanel;
1718
import com.microsoft.azure.toolkit.intellij.legacy.function.FunctionAppComboBox;
1819
import com.microsoft.azure.toolkit.intellij.legacy.function.runner.component.table.AppSettingsTable;
@@ -136,6 +137,7 @@ protected void resetFromConfig(@NotNull FunctionDeployConfiguration configuratio
136137
}
137138
if (!StringUtils.isAllEmpty(configuration.getFunctionId(), configuration.getAppName())) {
138139
appSettingsFunctionApp = configuration.getConfig();
140+
functionAppComboBox.setValue(new AzureComboBox.ItemReference<>(item -> FunctionAppConfig.isSameApp(item, configuration.getConfig())));
139141
functionAppComboBox.setConfigModel(configuration.getConfig());
140142
}
141143
final Module previousModule = configuration.getModule();

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/library/logging/Log.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,53 @@
55

66
package com.microsoft.azure.toolkit.intellij.legacy.function.runner.library.logging;
77

8-
import org.slf4j.Logger;
9-
import org.slf4j.LoggerFactory;
8+
import lombok.extern.log4j.Log4j2;
109

1110
import java.io.IOException;
1211
import java.io.PrintWriter;
1312
import java.io.StringWriter;
1413

15-
14+
@Log4j2
1615
public final class Log {
17-
private static Logger logger = LoggerFactory.getLogger(com.microsoft.azure.toolkit.lib.common.logging.Log.class);
18-
1916
public static void error(String message) {
20-
logger.error(message);
17+
log.error(message);
2118
}
2219

2320
public static void error(Exception error) {
24-
logger.error(getErrorDetail(error));
21+
log.error(getErrorDetail(error));
2522
}
2623

2724
public static void info(String message) {
28-
logger.info(message);
25+
log.info(message);
2926
}
3027

3128
public static void info(Exception error) {
32-
logger.info(getErrorDetail(error));
29+
log.info(getErrorDetail(error));
3330
}
3431

3532
public static void debug(String message) {
36-
logger.debug(message);
33+
log.debug(message);
3734
}
3835

3936
public static void debug(Exception error) {
40-
logger.debug(getErrorDetail(error));
37+
log.debug(getErrorDetail(error));
4138
}
4239

4340
public static void warn(String message) {
44-
logger.warn(message);
41+
log.warn(message);
4542
}
4643

4744
public static void warn(Exception error) {
48-
logger.warn(getErrorDetail(error));
45+
log.warn(getErrorDetail(error));
4946
}
5047

5148
public static boolean isDebugEnabled() {
52-
return logger.isDebugEnabled();
49+
return log.isDebugEnabled();
5350
}
5451

5552
public static void prompt(String message) {
56-
if (logger.isInfoEnabled()) {
57-
logger.info(message);
53+
if (log.isInfoEnabled()) {
54+
log.info(message);
5855
System.out.println(message);
5956
} else {
6057
System.out.println(message);

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/wizard/module/FunctionsModuleInfoStep.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
import com.intellij.util.ui.FormBuilder;
1717
import com.microsoft.intellij.util.ValidationUtils;
1818
import com.microsoft.azure.toolkit.intellij.legacy.function.wizard.AzureFunctionsConstants;
19+
import lombok.extern.log4j.Log4j2;
1920
import org.apache.commons.lang3.StringUtils;
20-
import org.slf4j.Logger;
21-
import org.slf4j.LoggerFactory;
2221

2322
import javax.swing.*;
2423
import java.awt.*;
2524
import java.util.Arrays;
2625
import java.util.function.Predicate;
2726

27+
@Log4j2
2828
public class FunctionsModuleInfoStep extends ModuleWizardStep implements Disposable {
29-
private static final Logger LOGGER = LoggerFactory.getLogger(FunctionsModuleInfoStep.class);
3029
private static final String MAVEN_TOOL = "Maven";
3130
private static final String GRADLE_TOOL = "Gradle";
3231

@@ -93,7 +92,7 @@ public void _init() {
9392

9493
panel.add(ScrollPaneFactory.createScrollPane(formBuilder.getPanel(), true), "North");
9594
} catch (final RuntimeException e) {
96-
LOGGER.error(e.getLocalizedMessage(), e);
95+
log.error(e.getLocalizedMessage(), e);
9796
throw e;
9897
}
9998
}

0 commit comments

Comments
 (0)