Browse Source

Merge pull request #4867 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '1dd48647b45f0a816363a3a1d85189b4c5d91bd8':
  REPORT-54844 jar包相同情况下,同步插件时同步按钮一直没灰化
  REPORT-54817 内网环境下该迭代功能应当不生效
  REPORT-53699 更改监听BeforeAllStop事件
  REPORT-54438 单元格属性设置面板 在切换参数面板编辑后 面板未刷新
  REPORT-54716 决策报表中修改组件名为大写,提示重名
  REPORT-54716 决策报表中修改组件名为大写,提示重名
feature/10.0
superman 3 years ago
parent
commit
675eda3016
  1. 4
      designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java
  2. 6
      designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java
  3. 3
      designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java
  4. 19
      designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java
  5. 2
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java
  6. 6
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java
  7. 4
      designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java

4
designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java

@ -20,6 +20,10 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
@Override
public void actionPerformed(ActionEvent event) {
String url = getJumpUrl();
if (!DesignerLoginUtils.isOnline()) {
BrowseUtils.browser(url);
return;
}
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
int uid = manager.getDesignerLoginUid();
if (uid > 0) {

6
designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java

@ -4,9 +4,13 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog;
import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.push.DesignerPushUpdateManager;
import com.fr.general.CloudCenter;
import com.fr.general.CloudCenterConfig;
import com.fr.general.http.HttpToolbox;
import com.fr.stable.StringUtils;
import javax.swing.WindowConstants;
@ -35,7 +39,7 @@ public class DesignerGuideHelper {
public static void prepareShowGuideDialog() {
// 如果存在更新升级的弹窗,则不显示引导页面
if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) {
if (!DesignerLoginUtils.isOnline() || !SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) {
return;
}
if (isActivatedForOneWeek()) {

3
designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java

@ -51,6 +51,9 @@ public class DesignerMessageHelper {
}
public void prepareShowMessage() {
if (!DesignerLoginUtils.isOnline()) {
return;
}
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override
public void designerOpened() {

19
designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java

@ -3,10 +3,13 @@ package com.fr.design.login.utils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.toast.DesignerToastMsgUtil;
import com.fr.general.CloudCenter;
import com.fr.general.CloudCenterConfig;
import com.fr.general.GeneralContext;
import com.fr.general.http.HttpToolbox;
import com.fr.general.log.MessageFormatter;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.org.bouncycastle.util.encoders.Hex;
import java.awt.Window;
import java.security.SecureRandom;
@ -49,6 +52,9 @@ public class DesignerLoginUtils {
}
public static String generateDesignerSSOUrl(String referrer) {
if (!DesignerLoginUtils.isOnline()) {
return referrer;
}
String ssoTemplate = CloudCenter.getInstance().acquireUrlByKind("designer.sso.api", "https://id.fanruan.com/api/app/?code={}&referrer={}");
try {
String code = generateLoginCode();
@ -60,6 +66,19 @@ public class DesignerLoginUtils {
return referrer;
}
public static boolean isOnline() {
if (CloudCenterConfig.getInstance().isOnline()) {
String ping = CloudCenter.getInstance().acquireConf("ping", StringUtils.EMPTY);
if (StringUtils.isNotEmpty(ping)) {
try {
return StringUtils.isEmpty(HttpToolbox.get(ping));
} catch (Exception ignore) {
}
}
}
return false;
}
private static String generateLoginCode() throws Exception {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
JSONObject jo = JSONObject.create();

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

@ -309,6 +309,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
@Override
public void mouseClicked(MouseEvent e) {
ignoreButton.setEnabled(false);
syncButton.setEnabled(false);
String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")};
if (!jarConsistency) {
int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"),
@ -350,6 +351,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
@Override
protected JSONArray doInBackground() {
progressBar.setVisible(true);
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
progressBar.setValue(0);
return VersionCheckUtils.syncPlugins(differentPlugins);

6
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -25,6 +25,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.widget.DataModify;
import com.fr.design.widget.FormWidgetDefinePaneFactoryBase;
import com.fr.design.widget.Operator;
@ -165,7 +166,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane implements Rele
}
private static void freshPropertyMode(XCreator xCreator) {
if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) {
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (!(jTemplate instanceof JForm) && jTemplate.isUpMode()) {
if (xCreator instanceof XWParameterLayout) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA);
} else {
@ -232,7 +234,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane implements Rele
UITextField widgetNameField = widgetPropertyPane.getWidgetNameField();
String toSetWidgetName = widgetNameField.getText();
String currentWidgetName = widget.getWidgetName();
boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
boolean exist = designer.getTarget().isNameExist(toSetWidgetName, widget) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
if (toSetWidgetName.isEmpty()) {
widgetNameField.setText(currentWidgetName);
return;

4
designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java

@ -43,7 +43,7 @@ public class DesignerAppUtils {
private static final int DEFAULT_MAX_CACHE_SIZE = 50;
private static final int DEFAULT_CONCURRENCY_LEVEL = 8;
private static final long DEFAULT_EXPIRE_HOURS = 1;
private static boolean enablePluginTipDialog = true;
private volatile static boolean enablePluginTipDialog = true;
private static final Cache<String, Multimap<String, PluginMarkerAdapter>> ERROR_CACHE = CacheBuilder.newBuilder()
.maximumSize(DEFAULT_MAX_CACHE_SIZE)
@ -52,7 +52,7 @@ public class DesignerAppUtils {
.build();
public static void initPluginAllActiveListener() {
PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllActive, new PluginEventListener() {
PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllStop, new PluginEventListener() {
@Override
public void on(PluginEvent event) {
enablePluginTipDialog = false;

Loading…
Cancel
Save