Skip to content

Commit 39f195c

Browse files
authored
[Azure MySQL] switch MySQL SDK to release version (#4838)
* switch MySQL SDK to release version. * refactor codes for MySQL delete action.
1 parent e211075 commit 39f195c

File tree

2 files changed

+17
-10
lines changed
  • Utils
    • azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/mysql
    • azuretools-core

2 files changed

+17
-10
lines changed

Utils/azure-explorer-common/src/com/microsoft/tooling/msservices/serviceexplorer/azure/mysql/MySQLNode.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
2929
import com.microsoft.azuretools.azurecommons.helpers.Nullable;
3030
import com.microsoft.azuretools.core.mvp.model.mysql.MySQLMvpModel;
31+
import com.microsoft.tooling.msservices.components.DefaultLoader;
3132
import com.microsoft.tooling.msservices.serviceexplorer.*;
3233
import com.microsoft.tooling.msservices.serviceexplorer.azure.AzureNodeActionPromptListener;
3334
import lombok.Getter;
@@ -73,7 +74,7 @@ protected void loadActions() {
7374
addAction(new BasicActionListener(new StartAzureMySQLAction(), AzureActionEnum.START));
7475
addAction(new BasicActionListener(new StopAzureMySQLAction(), AzureActionEnum.STOP));
7576
addAction(new BasicActionListener(new RestartAzureMySQLAction(), AzureActionEnum.RESTART));
76-
addAction(new BasicActionListener(new DeleteAzureMySQLAction(), AzureActionEnum.DELETE));
77+
addAction(AzureActionEnum.DELETE.getName(), new DeleteAzureMySQLAction());
7778
addAction(new BasicActionListener(new OpenInBrowserAction(), AzureActionEnum.OPEN_IN_PORTAL));
7879
initActions();
7980
}
@@ -106,6 +107,21 @@ public DeleteAzureMySQLAction() {
106107
String.format(ACTION_DOING + StringUtils.SPACE + MySQLModule.ACTION_PATTERN_SUFFIX, MySQLNode.this.name));
107108
}
108109

110+
@Override
111+
public int getGroup() {
112+
return super.getGroup() + AzureActionEnum.DELETE.getGroup();
113+
}
114+
115+
@Override
116+
public int getPriority() {
117+
return super.getPriority() + AzureActionEnum.DELETE.getPriority();
118+
}
119+
120+
@Override
121+
public Icon getIcon() {
122+
return DefaultLoader.getUIHelper().loadIconByAction(AzureActionEnum.DELETE);
123+
}
124+
109125
@Override
110126
protected void azureNodeAction(NodeActionEvent e) {
111127
MySQLNode.this.serverState = SERVER_UPDATING;

Utils/azuretools-core/pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,8 @@
261261
<artifactId>azure-mgmt-appplatform</artifactId>
262262
</dependency>
263263
<dependency>
264-
<!--<groupId>com.microsoft.azure.mysql.v2020_01_01</groupId>-->
265264
<groupId>com.microsoft.azure.mysql.v2020_01_01</groupId>
266265
<artifactId>azure-mgmt-mysql</artifactId>
267-
<!--<version>1.0.0-beta-4</version>-->
268266
<version>1.0.0-beta</version>
269267
</dependency>
270268
<dependency>
@@ -311,11 +309,4 @@
311309
</dependency>
312310
</dependencies>
313311

314-
<repositories>
315-
<repository>
316-
<id>staging</id>
317-
<name>staging</name>
318-
<url>https://oss.sonatype.org/content/repositories/commicrosoftazure-4389</url>
319-
</repository>
320-
</repositories>
321312
</project>

0 commit comments

Comments
 (0)