From 2dd99acd4fe98f8847fa747efad50da669be6fec Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 16 Apr 2019 21:28:22 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-14865=20=E6=9B=B4=E6=96=B0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=8E=A8=E9=80=81=3D>=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../update/push/DesignerPushUpdateDialog.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java index 0efa324d7..62e206cf8 100644 --- a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java @@ -4,6 +4,9 @@ import com.fr.design.dialog.UIDialog; import com.fr.design.ui.ModernUIPane; import com.fr.design.utils.BrowseUtils; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.intelli.record.FocusPoint; +import com.fr.intelli.record.MetricRegistry; +import com.fr.intelli.record.Original; import com.fr.stable.StringUtils; import com.fr.web.struct.AssembleComponent; import com.fr.web.struct.Atom; @@ -133,15 +136,18 @@ class DesignerPushUpdateDialog extends UIDialog { public void updateNow() { DesignerPushUpdateManager.getInstance().doUpdate(); + FocusPointManager.submit(FocusPointManager.OperateType.UPDATE); exit(); } public void remindNextTime() { + FocusPointManager.submit(FocusPointManager.OperateType.REMIND_NEXT_TIME); exit(); } public void skipThisVersion() { DesignerPushUpdateManager.getInstance().skipCurrentPushVersion(); + FocusPointManager.submit(FocusPointManager.OperateType.SKIP); exit(); } @@ -153,4 +159,28 @@ class DesignerPushUpdateDialog extends UIDialog { DesignerPushUpdateDialog.this.dialogExit(); } } + + private static class FocusPointManager { + + private static final String ID = "com.fr.update.push"; + private static final int SOURCE = Original.EMBED.toInt(); + private static final String TITLE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Push_Update_Focus_Point"); + + private enum OperateType { + UPDATE(1), REMIND_NEXT_TIME(2), SKIP(3); + private int index; + OperateType(int index) { + this.index = index; + } + private String toText() { + return String.valueOf(this.index); + } + } + + private static void submit(OperateType opType) { + FocusPoint focusPoint = FocusPoint.create(ID, opType.toText(), SOURCE); + focusPoint.setTitle(TITLE); + MetricRegistry.getMetric().submit(focusPoint); + } + } }