Browse Source

Pull request #5008: REPORT-51959 【来源于迭代任务】【10.0.18】【V2.2.0】远程环境检测及同步

Merge in DESIGN/design from ~PENGDA/design:release/10.0 to release/10.0

* commit '56911fd39b86a88593624de13d8a4aa649af18e1':
  REPORT-51959 【来源于迭代任务】【10.0.18】【V2.2.0】远程环境检测及同步
zheng-1641779399395
pengda 3 years ago
parent
commit
7dbb45dfcf
  1. 8
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  2. 15
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java

8
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -87,6 +87,11 @@ public class VersionCheckUtils {
public static void showVersionCheckDialog(String envName) {
if (!VersionCheckUtils.versionCheck(envName)) {
showNotificationDialog(envName);
}
}
private static void showNotificationDialog(String envName) {
NotificationDialog notificationDialog = new NotificationDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Sync_Prompt"),
false, NotificationDialog.WARNING_MESSAGE, Toolkit.i18nText("Fine-Design_Basic_Sync_Check_Brief_Info"), new NotificationDialogAction() {
@Override
@ -96,13 +101,12 @@ public class VersionCheckUtils {
@Override
public void doClick() {
CheckServiceDialog checkServiceDialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), GeneralUtils.readFullBuildNO(), getRemoteBranch(envName),getNoExistServiceDescription(envName));
CheckServiceDialog checkServiceDialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), GeneralUtils.readFullBuildNO(), getRemoteBranch(envName), getNoExistServiceDescription(envName));
checkServiceDialog.setVisible(true);
}
});
notificationDialog.setVisible(true);
}
}
public static boolean checkLocalAndRemoteJartime(String envName) {
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();

15
designer-base/src/main/java/com/fr/env/CheckServiceDialog.java vendored

@ -167,13 +167,15 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
centerPanel.add(detailsPane, BorderLayout.CENTER);
JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_M_Pane();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
boolean Sync = false;
if (isOnline() && Sync) {
if (isOnline()) {
ignoreButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_Ignore"));
ignoreButton.addActionListener(this);
syncButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_To_Local"));
syncButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Sync_To_Local_Tip"));
syncButton.addMouseListener(syncButtonClickListener);
if(jarConsistency && differentPlugins.isEmpty()){
syncButton.setEnabled(false);
}
progressBar = new JProgressBar();
progressBar.setUI(new MotifProgressBarUI());
progressBar.setForeground(UpdateConstants.BAR_COLOR);
@ -184,6 +186,8 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
buttonPanel.add(progressBar, BorderLayout.CENTER);
buttonPanel.add(syncButton, BorderLayout.EAST);
} else {
UILabel adviceLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Sync_Suggestion"));
centerPanel.add(adviceLabel, BorderLayout.SOUTH);
UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Button_Confirm"));
okButton.addActionListener(this);
buttonPanel.add(okButton, BorderLayout.EAST);
@ -307,6 +311,11 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
private MouseListener syncButtonClickListener = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
sync();
}
};
private void sync() {
ignoreButton.setEnabled(false);
syncButton.setEnabled(false);
String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")};
@ -379,7 +388,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
}.execute();
}
}
};
private boolean deletePreviousPropertyFile() {
File moveFile = new File(RestartHelper.MOVE_FILE);

Loading…
Cancel
Save