Skip to content

Commit 4283af1

Browse files
committed
Fix webapp deployment event
1 parent e6605ab commit 4283af1

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/webapp/docker/webapponlinux/WebAppOnLinuxDeployState.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,9 @@ protected Operation createOperation() {
123123
type = AzureOperation.Type.TASK
124124
)
125125
protected void onSuccess(IAppService result, @NotNull RunProcessHandler processHandler) {
126-
processHandler.setText("Updating cache ... ");
127-
AzureWebAppMvpModel.getInstance().listAzureWebApps(true); // todo: replace with cache framework
128-
processHandler.setText("Job done");
129126
processHandler.notifyComplete();
130127
if (deployModel.isCreatingNewWebAppOnLinux() && AzureUIRefreshCore.listeners != null) {
131-
AzureUIRefreshCore.execute(new AzureUIRefreshEvent(AzureUIRefreshEvent.EventType.REFRESH, null));
128+
AzureUIRefreshCore.execute(new AzureUIRefreshEvent(AzureUIRefreshEvent.EventType.REFRESH, result));
132129
}
133130
}
134131

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/webapp/runner/webappconfig/WebAppRunState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected Operation createOperation() {
115115
@AzureOperation(name = "webapp.complete_starting.state", type = AzureOperation.Type.ACTION)
116116
protected void onSuccess(IAppService result, @NotNull RunProcessHandler processHandler) {
117117
if (webAppSettingModel.isCreatingNew() && AzureUIRefreshCore.listeners != null) {
118-
AzureUIRefreshCore.execute(new AzureUIRefreshEvent(AzureUIRefreshEvent.EventType.REFRESH, null));
118+
AzureUIRefreshCore.execute(new AzureUIRefreshEvent(AzureUIRefreshEvent.EventType.REFRESH, result));
119119
}
120120
updateConfigurationDataModel(result);
121121
int indexOfDot = webAppSettingModel.getTargetName().lastIndexOf(".");

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ public void run() {
6565
if (event.opsType == AzureUIRefreshEvent.EventType.SIGNIN || event.opsType == AzureUIRefreshEvent
6666
.EventType.SIGNOUT) {
6767
removeAllChildNodes();
68-
} else if (event.object == null && (event.opsType == AzureUIRefreshEvent.EventType.UPDATE || event
68+
} else if (event.object instanceof IWebApp && (event.opsType == AzureUIRefreshEvent.EventType.UPDATE || event
6969
.opsType == AzureUIRefreshEvent.EventType.REMOVE)) {
7070
if (hasChildNodes()) {
7171
load(true);
7272
}
73-
} else if (event.object == null && event.opsType == AzureUIRefreshEvent.EventType.REFRESH) {
73+
} else if (event.object instanceof IWebApp && event.opsType == AzureUIRefreshEvent.EventType.REFRESH) {
7474
load(true);
7575
}
7676
}
@@ -85,4 +85,5 @@ public void renderChildren(@NotNull final List<IWebApp> resourceExes) {
8585
.map(webApp -> new WebAppNode(this, webApp))
8686
.forEach(this::addChildNode);
8787
}
88+
8889
}

0 commit comments

Comments
 (0)