From f990cf1455268899bbf9a801a78dad82b510a2d0 Mon Sep 17 00:00:00 2001 From: pengda Date: Wed, 14 Oct 2020 10:15:42 +0800 Subject: [PATCH 1/9] =?UTF-8?q?REPORT-39629=20=E7=BB=84=E4=BB=B6=E5=9D=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=87=E9=A2=98=E6=97=B6=E9=97=AE=E5=8F=B7?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=82=B9=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/EditingMouseListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index 089bafc592..21b210a3bf 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -384,7 +384,7 @@ public class EditingMouseListener extends MouseInputAdapter { if (component.getCoverPane().getComponentCount() > 1) { JComponent button1 = (JComponent) component.getCoverPane().getComponent(1); int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); - int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); + int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue() + component.getY(); if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + button1.getWidth()) { if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + button1.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); From b2e2c9ab53a3030b513b4f1a25ad5fe4179d1e04 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 14 Oct 2020 11:15:17 +0800 Subject: [PATCH 2/9] =?UTF-8?q?REPORT-39914=20=E5=88=9B=E5=BB=BA=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E5=B7=A5=E4=BD=9C=E7=9B=AE=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/env/RemoteEnvPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index 515ce3690c..4fe69e6a9a 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -332,6 +332,8 @@ public class RemoteEnvPane extends BasicBeanPane { this.remoteWorkspaceURL = RemoteWorkspaceURL.createDefaultURL(); this.usernameInput.setText(StringUtils.EMPTY); this.passwordInput.setText(StringUtils.EMPTY); + this.certPathInput.setText(StringUtils.EMPTY); + this.certSecretKeyInput.setText(StringUtils.EMPTY); this.rememberPwdCheckbox.setSelected(true); } From 34145b97ad0221849918e97f7ab5cff17af920e2 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 14 Oct 2020 11:30:32 +0800 Subject: [PATCH 3/9] =?UTF-8?q?CHART-16171=20=E5=AF=B9=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=86=85=E5=AE=B9=E8=BF=9B=E8=A1=8Cdecode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/com/fr/design/editor/script/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js index f87d8b6c04..26d58f4954 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js @@ -157,7 +157,7 @@ return { isAuto: this.model.isAuto, - content: value + content: BI.NicEditor.htmlDecode(value) }; }, From c6d0f89d021d22cd3e7352857091f992fa8b77bc Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 14 Oct 2020 14:34:58 +0800 Subject: [PATCH 4/9] =?UTF-8?q?CHART-16188=20=E6=9F=B1=E5=BD=A2=E5=9B=BE?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E4=B8=AD=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=96=B9=E5=90=91button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../column/VanChartColumnConditionPane.java | 2 +- .../VanChartColumnLabelConditionPane.java | 17 +++++++++++++ .../VanChartColumnPlotLabelNoCheckPane.java | 25 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java index c4184f3b17..3f9978f75c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java @@ -49,7 +49,7 @@ public class VanChartColumnConditionPane extends DataSeriesConditionPane{ classPaneMap.put(AttrBackground.class, new VanChartColumnSeriesColorConditionPane(this)); classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); classPaneMap.put(AttrBorder.class, new VanChartColumnLabelBorderPane(this)); - classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot)); + classPaneMap.put(AttrLabel.class, new VanChartColumnLabelConditionPane(this, plot)); classPaneMap.put(AttrFloatColor.class, new VanChartFloatColorConditionPane(this)); classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this)); classPaneMap.put(AttrSeriesImageBackground.class, new VanChartSeriesImageBackgroundConditionPane(this)); diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java new file mode 100644 index 0000000000..ec870a98fe --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.van.chart.column; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane; +import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; + +public class VanChartColumnLabelConditionPane extends VanChartLabelConditionPane { + + public VanChartColumnLabelConditionPane(ConditionAttributesPane conditionAttributesPane, Plot plot) { + super(conditionAttributesPane, plot); + } + + protected VanChartPlotLabelPane createLabelPane() { + return new VanChartColumnPlotLabelNoCheckPane(getPlot(),null); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java new file mode 100644 index 0000000000..b08734782a --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java @@ -0,0 +1,25 @@ +package com.fr.van.chart.column; + +import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrLabel; +import com.fr.van.chart.designer.style.VanChartStylePane; + +import java.awt.BorderLayout; + +public class VanChartColumnPlotLabelNoCheckPane extends VanChartColumnPlotLabelPane { + + public VanChartColumnPlotLabelNoCheckPane(Plot plot, VanChartStylePane parent) { + super(plot, parent); + } + + protected void addComponents() { + this.setLayout(new BorderLayout()); + this.add(getLabelPane(), BorderLayout.CENTER); + } + + public void populate(AttrLabel attr) { + super.populate(attr); + getLabelShowCheckBox().setSelected(true); + getLabelPane().setVisible(true); + } +} From 8c9f956d1b506e06216e9a8a4aec133e430f9242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 14 Oct 2020 16:21:59 +0800 Subject: [PATCH 5/9] =?UTF-8?q?CHART-15187=20=E7=AE=B1=E5=9E=8B=E5=9B=BE?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/box/data/table/BoxPlotTableResultDataSeriesPane.java | 3 ++- .../fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java index cfd3ea8d5b..5af1fa4168 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java @@ -15,10 +15,10 @@ import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.JPanel; +import java.util.List; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; -import java.util.List; public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPane { @@ -66,6 +66,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa private JPanel createUIComboBoxPane(UIComboBox comboBox, String title) { UILabel label = new UILabel(title); label.setPreferredSize(new Dimension(80, 20)); + comboBox.setPreferredSize(new Dimension(100, 20)); JPanel panel = new JPanel(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java index 3ba858364a..7b51fc5647 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/UIComboBoxWithEditLabel.java @@ -31,6 +31,7 @@ public abstract class UIComboBoxWithEditLabel extends JPanel implements UIObserv editLabel.setPreferredSize(new Dimension(80, 20)); comboBox = new UIComboBox(); + comboBox.setPreferredSize(new Dimension(100, 20)); this.setLayout(new BorderLayout(4, 0)); this.add(editLabel, BorderLayout.WEST); From 98237ada99b27a8ee5c4a91f5ce724f56d23d741 Mon Sep 17 00:00:00 2001 From: Yyming Date: Wed, 14 Oct 2020 18:18:37 +0800 Subject: [PATCH 6/9] =?UTF-8?q?REPORT-41333=20=E3=80=90=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E5=85=A8=E5=B1=80=E5=8F=82=E6=95=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E5=8F=82=E6=95=B0p1p2=EF=BC=8C=E5=B0=86p2?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=BAp1=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E6=9C=89=E5=8F=82=E6=95=B0=E5=90=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/parameter/ParameterArrayPane.java | 126 +++++++++--------- 1 file changed, 60 insertions(+), 66 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java index d3efcae4aa..3cef4c9d65 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java @@ -18,79 +18,73 @@ import java.util.Arrays; import java.util.List; public class ParameterArrayPane extends JListControlPane { - /** - * Constructor. - */ - public ParameterArrayPane() { - super(); - this.addModNameActionListener(new ModNameActionListener() { - public void nameModed(int index, String oldName, String newName) { - populateSelectedValue(); - } + /** + * Constructor. + */ + public ParameterArrayPane() { + super(); + this.addModNameActionListener((index, oldName, newName) -> populateSelectedValue()); + this.addEditingListener(new PropertyChangeAdapter() { + public void propertyChange() { + String[] allListNames = nameableList.getAllNames(); + allListNames[editingIndex] = StringUtils.EMPTY; + String tempName = getEditingName(); + if (StringUtils.isEmpty(tempName)) { + nameableList.stopEditing(); + FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Empty_Parameter_Name")); + setIllegalIndex(editingIndex); + return; + } + if (!ComparatorUtils.equals(tempName, selectedName) + && isNameRepeated(new List[]{Arrays.asList(allListNames)}, tempName)) { + nameableList.stopEditing(); + FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name")); + setIllegalIndex(editingIndex); + } + } + }); + } - }); - this.addEditingListener(new PropertyChangeAdapter() { - public void propertyChange() { - Parameter[] parameters = ParameterConfig.getInstance().getGlobalParameters(); - String[] allListNames = nameableList.getAllNames(); - allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; - String tempName = getEditingName(); - if (StringUtils.isEmpty(tempName)) { - nameableList.stopEditing(); - FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Empty_Parameter_Name")); - setIllegalIndex(editingIndex); - return; - } - if (!ComparatorUtils.equals(tempName, selectedName) - && isNameRepeated(new List[]{Arrays.asList(parameters), Arrays.asList(allListNames)}, tempName)) { - nameableList.stopEditing(); - FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name")); - setIllegalIndex(editingIndex); - } - } - }); - } + @Override + protected String title4PopupWindow() { + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Schedule_Template_Parameter"); + } - @Override - protected String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Schedule_Template_Parameter"); - } - - /** - * 创建模板参数设置组件 - * - * @return 模板参数设置组件 - */ - public NameableCreator[] createNameableCreators() { - return new NameableCreator[]{ - new NameableSelfCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) { - public Parameter createNameable(UnrepeatedNameHelper helper) { - // 返回参数设置面板. - return new Parameter(helper.createUnrepeatedName("p")); - } + /** + * 创建模板参数设置组件 + * + * @return 模板参数设置组件 + */ + public NameableCreator[] createNameableCreators() { + return new NameableCreator[]{ + new NameableSelfCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) { + public Parameter createNameable(UnrepeatedNameHelper helper) { + // 返回参数设置面板. + return new Parameter(helper.createUnrepeatedName("p")); + } - @Override - public String createTooltip() { - return null; - } - } - }; - } + @Override + public String createTooltip() { + return null; + } + } + }; + } - /** - * 更新参数 + /** + * 更新参数 * * @return 更新后的参数 - */ - public Parameter[] updateParameters() { - // Nameable[]居然不能强转成Parameter[],一定要这么写... - Nameable[] res = this.update(); - Parameter[] res_array = new Parameter[res.length]; - java.util.Arrays.asList(res).toArray(res_array); + */ + public Parameter[] updateParameters() { + // Nameable[]居然不能强转成Parameter[],一定要这么写... + Nameable[] res = this.update(); + Parameter[] res_array = new Parameter[res.length]; + java.util.Arrays.asList(res).toArray(res_array); - return res_array; - } + return res_array; + } } From 9eb3b753972900ca7e58c1a0b355ee771f6fff37 Mon Sep 17 00:00:00 2001 From: Yyming Date: Thu, 15 Oct 2020 09:54:05 +0800 Subject: [PATCH 7/9] =?UTF-8?q?REPORT-41333=20=E3=80=90=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E5=85=A8=E5=B1=80=E5=8F=82=E6=95=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E5=8F=82=E6=95=B0p1p2=EF=BC=8C=E5=B0=86p2?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=BAp1=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E6=9C=89=E5=8F=82=E6=95=B0=E5=90=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/parameter/ParameterArrayPane.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java index 3cef4c9d65..adb0e48472 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java @@ -7,7 +7,7 @@ import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableSelfCreator; import com.fr.design.gui.controlpane.UnrepeatedNameHelper; -import com.fr.design.gui.ilist.ModNameActionListener; +import com.fr.design.i18n.Toolkit; import com.fr.general.ComparatorUtils; import com.fr.stable.Nameable; import com.fr.stable.StringUtils; @@ -26,6 +26,7 @@ public class ParameterArrayPane extends JListControlPane { this.addModNameActionListener((index, oldName, newName) -> populateSelectedValue()); this.addEditingListener(new PropertyChangeAdapter() { public void propertyChange() { + Parameter[] parameters = ParameterConfig.getInstance().getGlobalParameters(); String[] allListNames = nameableList.getAllNames(); allListNames[editingIndex] = StringUtils.EMPTY; String tempName = getEditingName(); @@ -36,10 +37,10 @@ public class ParameterArrayPane extends JListControlPane { return; } if (!ComparatorUtils.equals(tempName, selectedName) - && isNameRepeated(new List[]{Arrays.asList(allListNames)}, tempName)) { + && isNameRepeated(new List[]{Arrays.asList(parameters), Arrays.asList(allListNames)}, tempName)) { nameableList.stopEditing(); FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ParameterArrayPane.this), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name")); + Toolkit.i18nText("Fine-Design_Basic_Duplicate_Parameter_Name")); setIllegalIndex(editingIndex); } } @@ -49,7 +50,7 @@ public class ParameterArrayPane extends JListControlPane { @Override protected String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Schedule_Template_Parameter"); + return Toolkit.i18nText("Fine-Design_Basic_Engine_Schedule_Template_Parameter"); } /** @@ -59,7 +60,7 @@ public class ParameterArrayPane extends JListControlPane { */ public NameableCreator[] createNameableCreators() { return new NameableCreator[]{ - new NameableSelfCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) { + new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) { public Parameter createNameable(UnrepeatedNameHelper helper) { // 返回参数设置面板. return new Parameter(helper.createUnrepeatedName("p")); @@ -83,7 +84,7 @@ public class ParameterArrayPane extends JListControlPane { // Nameable[]居然不能强转成Parameter[],一定要这么写... Nameable[] res = this.update(); Parameter[] res_array = new Parameter[res.length]; - java.util.Arrays.asList(res).toArray(res_array); + Arrays.asList(res).toArray(res_array); return res_array; } From 39c0cfd76df55c16c51b8ac7edb66860a71013bf Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 15 Oct 2020 10:42:04 +0800 Subject: [PATCH 8/9] =?UTF-8?q?REPORT-38872=20=E8=AE=BE=E8=AE=A1=E5=99=A8h?= =?UTF-8?q?ttps=E8=AF=81=E4=B9=A6=E5=AF=86=E7=A0=81=E6=98=8E=E6=96=87?= =?UTF-8?q?=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/DesignerEnvManager.java | 17 ++++------------- .../src/main/java/com/fr/env/RemoteEnvPane.java | 16 +++++++++++----- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 6f1c94eee3..c6488d3300 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -418,21 +418,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.isHttps = isHttps; } - - public String getCertificatePath() { - return certificatePath; - } - - public void setCertificatePath(String certificatePath) { this.certificatePath = certificatePath; } - - public String getCertificatePass() { - return certificatePass; - } - public void setCertificatePass(String certificatePass) { this.certificatePass = certificatePass; } @@ -2015,11 +2004,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { private void writeHttpsParas(XMLPrintWriter writer) { writer.startTAG(CAS_PARAS); + // 这边的密钥path和password没有用处了 当前已经全部储存在对应的WorkspaceConnectionInfo中 + // 把历史遗留保存的全部置为空 防止显示明文密钥 后面删除 todo if (StringUtils.isNotBlank(certificatePath)) { - writer.attr(CAS_CERTIFICATE_PATH, certificatePath); + writer.attr(CAS_CERTIFICATE_PATH, StringUtils.EMPTY); } if (StringUtils.isNotBlank(certificatePass)) { - writer.attr(CAS_CERTIFICATE_PASSWORD, certificatePass); + writer.attr(CAS_CERTIFICATE_PASSWORD, StringUtils.EMPTY); } if (isHttps) { writer.attr("enable", true); diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index 4fe69e6a9a..b76e06912c 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -143,6 +143,12 @@ public class RemoteEnvPane extends BasicBeanPane { * https 证书路径输入框 */ private JPanel httpsCertFileInputPanel; + + /** + * 当前远程工作目录是否为新创建的 + */ + private boolean newCreate; + /** * 主机名,web应用,Servlet,端口监听器 */ @@ -327,7 +333,7 @@ public class RemoteEnvPane extends BasicBeanPane { this.certPathInput.setText(certPath); this.certSecretKeyInput.setText(certSecretKey); this.rememberPwdCheckbox.setSelected(rememberPwd); - + this.newCreate = ob.isNewCreated(); } else { this.remoteWorkspaceURL = RemoteWorkspaceURL.createDefaultURL(); this.usernameInput.setText(StringUtils.EMPTY); @@ -335,6 +341,7 @@ public class RemoteEnvPane extends BasicBeanPane { this.certPathInput.setText(StringUtils.EMPTY); this.certSecretKeyInput.setText(StringUtils.EMPTY); this.rememberPwdCheckbox.setSelected(true); + this.newCreate = true; } fillRemoteEnvURLField(); @@ -366,7 +373,9 @@ public class RemoteEnvPane extends BasicBeanPane { new String(this.certSecretKeyInput.getPassword()), rememberPwd); - return RemoteDesignerWorkspaceInfo.create(connection); + RemoteDesignerWorkspaceInfo info = RemoteDesignerWorkspaceInfo.create(connection); + info.setNewCreated(newCreate); + return info; } @Override @@ -567,9 +576,6 @@ public class RemoteEnvPane extends BasicBeanPane { @Override protected TestConnectionResult doInBackground() throws Exception { - - DesignerEnvManager.getEnvManager().setCertificatePath(connection.getCertPath()); - DesignerEnvManager.getEnvManager().setCertificatePass(connection.getCertSecretKey()); try { return TestConnectionResult.parse(WorkContext.getConnector().testConnection(connection), connection); } catch (WorkspaceAuthException ignored) { From 67497aafeb05577b54e5759de3a052194d3814ab Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 15 Oct 2020 10:47:47 +0800 Subject: [PATCH 9/9] =?UTF-8?q?REPORT-38872=20=E4=BF=AE=E6=94=B9=E4=B8=8B?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/env/RemoteEnvPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index b76e06912c..5257e74f42 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -147,7 +147,7 @@ public class RemoteEnvPane extends BasicBeanPane { /** * 当前远程工作目录是否为新创建的 */ - private boolean newCreate; + private boolean newCreated; /** * 主机名,web应用,Servlet,端口监听器 @@ -333,7 +333,7 @@ public class RemoteEnvPane extends BasicBeanPane { this.certPathInput.setText(certPath); this.certSecretKeyInput.setText(certSecretKey); this.rememberPwdCheckbox.setSelected(rememberPwd); - this.newCreate = ob.isNewCreated(); + this.newCreated = ob.isNewCreated(); } else { this.remoteWorkspaceURL = RemoteWorkspaceURL.createDefaultURL(); this.usernameInput.setText(StringUtils.EMPTY); @@ -341,7 +341,7 @@ public class RemoteEnvPane extends BasicBeanPane { this.certPathInput.setText(StringUtils.EMPTY); this.certSecretKeyInput.setText(StringUtils.EMPTY); this.rememberPwdCheckbox.setSelected(true); - this.newCreate = true; + this.newCreated = true; } fillRemoteEnvURLField(); @@ -374,7 +374,7 @@ public class RemoteEnvPane extends BasicBeanPane { rememberPwd); RemoteDesignerWorkspaceInfo info = RemoteDesignerWorkspaceInfo.create(connection); - info.setNewCreated(newCreate); + info.setNewCreated(newCreated); return info; }