Skip to content

Commit 314c354

Browse files
committed
Force refresh service plan when switch subscription in service plan combo box
1 parent 8287340 commit 314c354

File tree

2 files changed

+4
-2
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/appservice/serviceplan
  • Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/webapp/base

2 files changed

+4
-2
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/appservice/serviceplan/ServicePlanComboBox.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public void setSubscription(Subscription subscription) {
5555
this.clear();
5656
return;
5757
}
58+
// force refresh service plan when switch subscription
59+
Azure.az(AzureAppService.class).subscription(subscription.getId()).appServicePlans(true);
5860
this.refreshItems();
5961
}
6062

@@ -112,7 +114,7 @@ protected List<? extends AppServicePlanEntity> loadItems() throws Exception {
112114
.collect(Collectors.toList()));
113115
}
114116
final List<AppServicePlanEntity> remotePlans = Azure.az(AzureAppService.class)
115-
.subscription(subscription.getId()).appServicePlans().stream().map(IAppServicePlan::entity)
117+
.subscription(subscription.getId()).appServicePlans(true).stream().map(IAppServicePlan::entity)
116118
.collect(Collectors.toList());
117119
plans.addAll(remotePlans);
118120
Stream<AppServicePlanEntity> stream = plans.stream();

Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/webapp/base/WebAppBaseNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import com.azure.resourcemanager.resources.fluentcore.arm.ResourceId;
99
import com.microsoft.azure.toolkit.lib.appservice.model.OperatingSystem;
10-
import com.microsoft.azure.toolkit.lib.appservice.service.IAppService;\
10+
import com.microsoft.azure.toolkit.lib.appservice.service.IAppService;
1111
import com.microsoft.azuretools.telemetry.AppInsightsConstants;
1212
import com.microsoft.azuretools.telemetry.TelemetryProperties;
1313
import com.microsoft.tooling.msservices.components.DefaultLoader;

0 commit comments

Comments
 (0)