diff --git a/scouter.agent.java/src/scouter/agent/trace/TraceSQL.java b/scouter.agent.java/src/scouter/agent/trace/TraceSQL.java index c79a0753f..52748ddbd 100644 --- a/scouter.agent.java/src/scouter/agent/trace/TraceSQL.java +++ b/scouter.agent.java/src/scouter/agent/trace/TraceSQL.java @@ -116,7 +116,7 @@ public static Object start(Object o) { if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } - step.xtype=SqlXType.PREPARED; + step.xtype=SqlXType.DYNA; ctx.sqlActiveArgs = ctx.sql; diff --git a/scouter.client/src/scouter/client/Images.java b/scouter.client/src/scouter/client/Images.java index 20305fec2..3f13bc648 100644 --- a/scouter.client/src/scouter/client/Images.java +++ b/scouter.client/src/scouter/client/Images.java @@ -358,4 +358,5 @@ public static ArrayList getAllCounterImages(int serverId){ public static final Image sum = Activator.getImage("icons/sum.png"); public static final Image pin = Activator.getImage("icons/pin.gif"); public static final Image lock = Activator.getImage("icons/lock.png"); + public static final Image star = Activator.getImage("icons/star.png"); } diff --git a/scouter.client/src/scouter/client/counter/views/CounterPastCountView.java b/scouter.client/src/scouter/client/counter/views/CounterPastCountView.java index c5a0819d6..200da613e 100644 --- a/scouter.client/src/scouter/client/counter/views/CounterPastCountView.java +++ b/scouter.client/src/scouter/client/counter/views/CounterPastCountView.java @@ -31,6 +31,9 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.draw2d.FigureCanvas; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; @@ -43,7 +46,12 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import scouter.client.Images; +import scouter.client.counter.actions.OpenDailyServiceCountAction; import scouter.client.net.TcpProxy; import scouter.client.server.Server; import scouter.client.server.ServerManager; @@ -74,7 +82,7 @@ public class CounterPastCountView extends ScouterViewPart { int xAxisUnitWidth; int lineWidth; - public void setInput(String date, String objType, String counter, int serverId) throws Exception { + public void setInput(final String date, final String objType, final String counter, final int serverId) throws Exception { this.date = date; this.objType = objType; this.counter = counter; @@ -92,6 +100,16 @@ public void setInput(String date, String objType, String counter, int serverId) } desc = "ⓢ"+svrName+ " | (Past) [" + objectDisplay + "][" + date.substring(0, 4) + "-" + date.substring(4, 6) + "-" + date.substring(6, 8) + "] Past-date " + counterDisplay+(!"".equals(counterUnit)?" ("+counterUnit+")":""); setViewTab(objType, counter, serverId); + MenuManager mgr = new MenuManager(); + mgr.setRemoveAllWhenShown(true); + final IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + mgr.addMenuListener(new IMenuListener() { + public void menuAboutToShow(IMenuManager mgr) { + mgr.add(new OpenDailyServiceCountAction(win, "Load", objType, counter, Images.bar, serverId, date)); + } + }); + Menu menu = mgr.createContextMenu(canvas); + canvas.setMenu(menu); new LoadJob("Load_" + counter).schedule(); } diff --git a/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java b/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java index a9233d07c..07e9440cd 100644 --- a/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java +++ b/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java @@ -27,6 +27,9 @@ import org.csstudio.swt.xygraph.figures.Trace.TraceType; import org.csstudio.swt.xygraph.figures.XYGraph; import org.eclipse.draw2d.FigureCanvas; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; @@ -39,9 +42,14 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Menu; import org.eclipse.ui.IViewSite; +import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import scouter.client.Images; +import scouter.client.counter.actions.OpenDailyServiceCountAction; import scouter.client.model.RefreshThread; import scouter.client.model.RefreshThread.Refreshable; import scouter.client.net.TcpProxy; @@ -306,6 +314,19 @@ public void mouseDoubleClick(MouseEvent e) {} } catch (Exception e1) { e1.printStackTrace(); } + + // Add context menu + MenuManager mgr = new MenuManager(); + mgr.setRemoveAllWhenShown(true); + final IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + mgr.addMenuListener(new IMenuListener() { + public void menuAboutToShow(IMenuManager mgr) { + mgr.add(new OpenDailyServiceCountAction(win, "Load", objType, counter, Images.bar, serverId)); + } + }); + Menu menu = mgr.createContextMenu(canvas); + canvas.setMenu(menu); + thread = new RefreshThread(this, 5000); thread.setName(this.toString() + " - " + "objType:"+objType + ", counter:"+counter + ", serverId:"+serverId); thread.start(); diff --git a/scouter.client/src/scouter/client/group/view/GroupNavigationView.java b/scouter.client/src/scouter/client/group/view/GroupNavigationView.java index a79f92f8c..e48cd6a4b 100644 --- a/scouter.client/src/scouter/client/group/view/GroupNavigationView.java +++ b/scouter.client/src/scouter/client/group/view/GroupNavigationView.java @@ -92,7 +92,6 @@ import scouter.client.util.ImageUtil; import scouter.client.util.MenuUtil; import scouter.client.util.ScouterUtil; -import scouter.client.xlog.ImageCache; import scouter.lang.Counter; import scouter.lang.counters.CounterConstants; import scouter.lang.counters.CounterEngine; @@ -214,16 +213,12 @@ public void menuAboutToShow(IMenuManager manager){ manager.add(xLogMenu); if (isActionEnable(objType, CounterConstants.TRANX_REALTIME)) { xLogMenu.add(new OpenRealTimeTranXGroupViewAction(win, MenuStr.REALTIME_XLOG, grpObj)); - } - if (isActionEnable(objType, CounterConstants.TRANX_LOADTIME)) { xLogMenu.add(new OpenPastTimeTranXGroupViewAction(win, MenuStr.PASTTIME_XLOG, grpObj)); } MenuManager scMenu = new MenuManager(MenuStr.HOURLY_CHART, ImageUtil.getImageDescriptor(Images.bar), MenuStr.HOURLY_CHART_ID); manager.add(scMenu); if (isActionEnable(objType, CounterConstants.TODAY_SERVICE_COUNT)) { scMenu.add(new OpenTodayGroupCountViewAction(win, MenuStr.TODAY_SERVICE_COUNT, CounterConstants.WAS_SERVICE_COUNT, grpObj)); - } - if (isActionEnable(objType, CounterConstants.DAILY_SERVICE_COUNT)) { scMenu.add(new OpenPastDateGroupCountViewAction(win, MenuStr.LOAD_SERVICE_COUNT, CounterConstants.WAS_SERVICE_COUNT, grpObj)); } if (isActionEnable(objType, CounterConstants.SERVICE_GROUP)) { diff --git a/scouter.client/src/scouter/client/util/MenuUtil.java b/scouter.client/src/scouter/client/util/MenuUtil.java index c57952834..b70a48b98 100644 --- a/scouter.client/src/scouter/client/util/MenuUtil.java +++ b/scouter.client/src/scouter/client/util/MenuUtil.java @@ -242,44 +242,19 @@ public static HashMap getCounterActionList(IWorkbenchWindow wind objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.TRANX_REALTIME); for (int inx = 0; inx < objTypeList.size(); inx++) { String[] splitedKey = objTypeList.get(inx).split(":"); - String objTypeDisplay = splitedKey[0]; String objType = splitedKey[1]; actions.put( objType + ":" + CounterConstants.TRANX_REALTIME, - new OpenXLogRealTimeAction(window, objTypeDisplay, objType, Images.getObjectIcon( - objType, true, serverId), serverId)); - } - objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.TRANX_LOADTIME); - for (int inx = 0; inx < objTypeList.size(); inx++) { - String[] splitedKey = objTypeList.get(inx).split(":"); - String objTypeDisplay = splitedKey[0]; - String objType = splitedKey[1]; - actions.put( - objType + ":" + CounterConstants.TRANX_LOADTIME, - new OpenXLogLoadTimeAction(window, objTypeDisplay, objType, Images.getObjectIcon( - objType, true, serverId), serverId)); + new OpenXLogRealTimeAction(window, MenuStr.XLOG, objType, Images.star, serverId)); } objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.TODAY_SERVICE_COUNT); for (int inx = 0; inx < objTypeList.size(); inx++) { String[] splitedKey = objTypeList.get(inx).split(":"); - String objTypeDisplay = splitedKey[0]; String objType = splitedKey[1]; actions.put( objType + ":" + CounterConstants.TODAY_SERVICE_COUNT, - new OpenTodayServiceCountAction(window, objTypeDisplay, objType, CounterConstants.WAS_SERVICE_COUNT, Images.getObjectIcon( - objType, true, serverId), serverId)); - } - - objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.DAILY_SERVICE_COUNT); - for (int inx = 0; inx < objTypeList.size(); inx++) { - String[] splitedKey = objTypeList.get(inx).split(":"); - String objTypeDisplay = splitedKey[0]; - String objType = splitedKey[1]; - actions.put( - objType + ":" + CounterConstants.DAILY_SERVICE_COUNT, - new OpenDailyServiceCountAction(window, objTypeDisplay, objType, CounterConstants.WAS_SERVICE_COUNT, Images.getObjectIcon( - objType, true, serverId), serverId)); + new OpenTodayServiceCountAction(window, MenuStr.SERVICE_COUNT, objType, CounterConstants.WAS_SERVICE_COUNT, Images.bar, serverId)); } objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.SERVICE_GROUP); @@ -360,24 +335,24 @@ public static HashMap getPastCounterActionList(IWorkbenchWindow counterName, Images.getCounterImage(objType, counterName, serverId), curdate, curdate, serverId)); } - ArrayList objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.TRANX_LOADTIME); + ArrayList objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.TRANX_REALTIME); for (int inx = 0; inx < objTypeList.size(); inx++) { String[] splitedKey = objTypeList.get(inx).split(":"); String objTypeDisplay = splitedKey[0]; String objType = splitedKey[1]; actions.put( - objType + ":" + CounterConstants.TRANX_LOADTIME, + objType + ":" + CounterConstants.TRANX_REALTIME, new OpenXLogLoadTimeAction(window, objTypeDisplay, objType, Images.getObjectIcon( objType, true, serverId), serverId, st, et)); } - objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.DAILY_SERVICE_COUNT); + objTypeList = counterEngine.getObjTypeListWithDisplay(CounterConstants.TODAY_SERVICE_COUNT); for (int inx = 0; inx < objTypeList.size(); inx++) { String[] splitedKey = objTypeList.get(inx).split(":"); String objTypeDisplay = splitedKey[0]; String objType = splitedKey[1]; actions.put( - objType + ":" + CounterConstants.DAILY_SERVICE_COUNT, + objType + ":" + CounterConstants.TODAY_SERVICE_COUNT, new OpenDailyServiceCountAction(window, objTypeDisplay, objType, CounterConstants.WAS_SERVICE_COUNT, Images.getObjectIcon( objType, true, serverId), serverId, curdate)); } @@ -425,7 +400,7 @@ public static void addObjectContextMenu(IMenuManager mgr, IWorkbenchWindow win, if (server.isAllowAction(GroupPolicyConstants.ALLOW_THREADDUMP)) performanceSnapshot.add(new OpenCxtmenuObjectThreadDumpAction(win, MenuStr.THREAD_DUMP, objHash, serverId)); performanceSnapshot.add(new OpenCxtmenuEnvAction(win, MenuStr.ENV, objHash, serverId)); - performanceSnapshot.add(new OpenCxtmenuFileSocketAction(win, MenuStr.FILE_SOCKET, objHash, serverId)); + //performanceSnapshot.add(new OpenCxtmenuFileSocketAction(win, MenuStr.FILE_SOCKET, objHash, serverId)); if (server.isAllowAction(GroupPolicyConstants.ALLOW_SYSTEMGC)) performanceSnapshot.add(new OpenCxtmenuSystemGcAction(MenuStr.SYSTEM_GC, objHash, serverId)); performanceSnapshot.add(new OpenCxtmenuResetCacheAction("Reset Text Cache", objHash, serverId)); @@ -453,9 +428,6 @@ public static void addObjectContextMenu(IMenuManager mgr, IWorkbenchWindow win, performanceSnapshot.add(new OpenCxtmenuEnvAction(win, MenuStr.ENV, objHash, serverId)); performanceSnapshot.add(new OpenTopAction(win, MenuStr.TOP, objHash, serverId)); performanceSnapshot.add(new OpenDiskUsageAction(win, MenuStr.DISK_USAGE, objHash, serverId)); -// performanceSnapshot.add(new OpenNetStatAction(win, MenuStr.NET_STAT, objHash, serverId)); -// performanceSnapshot.add(new OpenWhoAction(win, MenuStr.WHO, objHash, serverId)); -// performanceSnapshot.add(new OpenMemInfoAction(win, MenuStr.MEM_INFO, objHash, serverId)); mgr.add(new Separator()); if (server.isAllowAction(GroupPolicyConstants.ALLOW_CONFIGURE)) diff --git a/scouter.client/src/scouter/client/views/ObjectDailyListView.java b/scouter.client/src/scouter/client/views/ObjectDailyListView.java index 0c12a5934..616eb6390 100644 --- a/scouter.client/src/scouter/client/views/ObjectDailyListView.java +++ b/scouter.client/src/scouter/client/views/ObjectDailyListView.java @@ -265,13 +265,13 @@ private void fillTreeViewerContextMenu(IMenuManager mgr){ objTitle.add(new Separator()); - Action act = actions.get(objType + ":" + CounterConstants.TRANX_LOADTIME); + Action act = actions.get(objType + ":" + CounterConstants.TRANX_REALTIME); if(act != null){ act.setText(MenuStr.PASTTIME_XLOG); act.setImageDescriptor(ImageUtil.getImageDescriptor(Images.transrealtime)); objTitle.add(act); } - act = actions.get(objType + ":" + CounterConstants.DAILY_SERVICE_COUNT); + act = actions.get(objType + ":" + CounterConstants.TODAY_SERVICE_COUNT); if(act != null){ act.setText(MenuStr.LOAD_SERVICE_COUNT); act.setImageDescriptor(ImageUtil.getImageDescriptor(Images.TYPE_SERVICE_COUNT)); diff --git a/scouter.client/src/scouter/client/views/ObjectNavigationView.java b/scouter.client/src/scouter/client/views/ObjectNavigationView.java index 29148e153..fdd92db8b 100644 --- a/scouter.client/src/scouter/client/views/ObjectNavigationView.java +++ b/scouter.client/src/scouter/client/views/ObjectNavigationView.java @@ -95,7 +95,6 @@ import scouter.client.model.RefreshThread; import scouter.client.model.ServerObject; import scouter.client.popup.ObjectSelectionDialog; -import scouter.client.popup.ServerManagerDialog; import scouter.client.server.GroupPolicyConstants; import scouter.client.server.Server; import scouter.client.server.ServerManager; @@ -512,33 +511,12 @@ private void addObjectTypeMenu(IMenuManager objTitle, CounterEngine counterEngin act = actionMap.get(objType + ":" + CounterConstants.TRANX_REALTIME); if(act != null){ - act.setText(MenuStr.REALTIME_XLOG); - act.setImageDescriptor(ImageUtil.getImageDescriptor(Images.transrealtime)); - xLogMenu.add(act); - } - - act = actionMap.get(objType + ":" + CounterConstants.TRANX_LOADTIME); - if(act != null){ - act.setText(MenuStr.PASTTIME_XLOG); - act.setImageDescriptor(ImageUtil.getImageDescriptor(Images.transrealtime)); - xLogMenu.add(act); + objTitle.add(act); } - MenuManager scMenu = new MenuManager(MenuStr.HOURLY_CHART, ImageUtil.getImageDescriptor(Images.bar), MenuStr.HOURLY_CHART_ID); - objTitle.add(scMenu); - act = actionMap.get(objType + ":" + CounterConstants.TODAY_SERVICE_COUNT); if(act != null){ - act.setText(MenuStr.TODAY_SERVICE_COUNT); - act.setImageDescriptor(ImageUtil.getImageDescriptor(Images.TYPE_SERVICE_COUNT)); - scMenu.add(act); - } - - act = actionMap.get(objType + ":" + CounterConstants.DAILY_SERVICE_COUNT); - if(act != null){ - act.setText(MenuStr.LOAD_SERVICE_COUNT); - act.setImageDescriptor(ImageUtil.getImageDescriptor(Images.TYPE_SERVICE_COUNT)); - scMenu.add(act); + objTitle.add(act); } act = actionMap.get(objType + ":" + CounterConstants.SERVICE_GROUP); diff --git a/scouter.client/src/scouter/client/xlog/views/XLogLoadTimeView.java b/scouter.client/src/scouter/client/xlog/views/XLogLoadTimeView.java index c400b148a..0c5a45e5a 100644 --- a/scouter.client/src/scouter/client/xlog/views/XLogLoadTimeView.java +++ b/scouter.client/src/scouter/client/xlog/views/XLogLoadTimeView.java @@ -32,15 +32,20 @@ import org.eclipse.jface.action.Separator; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IMemento; import org.eclipse.ui.IViewSite; import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; import scouter.client.Images; import scouter.client.model.AgentDailyListProxy; @@ -57,6 +62,7 @@ import scouter.client.util.ExUtil; import scouter.client.util.ImageUtil; import scouter.client.xlog.XLogUtil; +import scouter.client.xlog.actions.OpenXLogLoadTimeAction; import scouter.lang.pack.MapPack; import scouter.lang.pack.Pack; import scouter.lang.pack.XLogPack; @@ -119,26 +125,16 @@ public void run(){ }; showFilters.setImageDescriptor(ImageUtil.getImageDescriptor(Images.filter)); man.add(showFilters); - - // /////////////////////////// - createContextMenu(parent, new IMenuListener() { - public void menuAboutToShow(IMenuManager manager){ - if(viewPainter.isZoomMode() == false){ - manager.add(new Action("Load") { - public void run() { - CalendarDialog dialog = new CalendarDialog(display, XLogLoadTimeView.this); - dialog.showWithEndTime(); - } - }); - manager.add(new Action("Zoom In", ImageDescriptor.createFromImage(Images.zoomin)) { - public void run() { - TimeRangeDialog dialog = new TimeRangeDialog(display, XLogLoadTimeView.this, DateUtil.yyyymmdd(stime)); - dialog.show(stime, etime); - } - }); - } - } - }); + + // Add context menu + new MenuItem(contextMenu, SWT.SEPARATOR); + MenuItem loadXLogItem = new MenuItem(contextMenu, SWT.PUSH); + loadXLogItem.setText("Load"); + loadXLogItem.addListener(SWT.Selection, new Listener() { + public void handleEvent(Event event) { + new OpenXLogLoadTimeAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), "Load XLog", objType, Images.server, serverId, stime, etime).run(); + } + }); sashForm.setWeights(new int[]{2, 1}); sashForm.setMaximizedControl(canvas); diff --git a/scouter.client/src/scouter/client/xlog/views/XLogRealTimeView.java b/scouter.client/src/scouter/client/xlog/views/XLogRealTimeView.java index 125a9dafd..7e199ff07 100644 --- a/scouter.client/src/scouter/client/xlog/views/XLogRealTimeView.java +++ b/scouter.client/src/scouter/client/xlog/views/XLogRealTimeView.java @@ -23,13 +23,18 @@ import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.Separator; +import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.ControlListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IViewSite; import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; import scouter.client.Images; import scouter.client.model.AgentModelThread; @@ -47,12 +52,13 @@ import scouter.client.util.ImageUtil; import scouter.client.util.TimeUtil; import scouter.client.xlog.XLogUtil; +import scouter.client.xlog.actions.OpenXLogLoadTimeAction; +import scouter.io.DataInputX; import scouter.lang.pack.MapPack; import scouter.lang.pack.Pack; import scouter.lang.pack.PackEnum; import scouter.lang.pack.XLogPack; import scouter.lang.value.BooleanValue; -import scouter.io.DataInputX; import scouter.net.RequestCmd; import scouter.util.CastUtil; import scouter.util.DateUtil; @@ -100,7 +106,7 @@ public void run() { canvas.redraw(); } }); - man.add(new Separator()); + man.add(new Separator()); showFilters = new Action("Show Filters", IAction.AS_CHECK_BOX){ public void run(){ @@ -124,6 +130,16 @@ public void controlMoved(ControlEvent e) { } }); + // Add context menu + new MenuItem(contextMenu, SWT.SEPARATOR); + MenuItem loadXLogItem = new MenuItem(contextMenu, SWT.PUSH); + loadXLogItem.setText("Load"); + loadXLogItem.addListener(SWT.Selection, new Listener() { + public void handleEvent(Event event) { + new OpenXLogLoadTimeAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), "Load XLog", objType, Images.server, serverId).run(); + } + }); + setObjType(objType); Server server = ServerManager.getInstance().getServer(serverId); String svrName = ""; diff --git a/scouter.client/src/scouter/client/xlog/views/XLogViewCommon.java b/scouter.client/src/scouter/client/xlog/views/XLogViewCommon.java index 0f91d0fae..fc4b88472 100644 --- a/scouter.client/src/scouter/client/xlog/views/XLogViewCommon.java +++ b/scouter.client/src/scouter/client/xlog/views/XLogViewCommon.java @@ -116,6 +116,7 @@ abstract public class XLogViewCommon extends ViewPart implements ITimeChange, IO TableViewer viewer; XLogSnapshotData selectedItem; + Menu contextMenu; protected Combo objFilter; protected Text serviceFilter, ipFilter; @@ -483,10 +484,10 @@ public void run() { } private void createContextMenu() { - Menu popupMenu = new Menu(canvas); - MenuItem filterItem = new MenuItem(popupMenu, SWT.CASCADE); + contextMenu = new Menu(canvas); + MenuItem filterItem = new MenuItem(contextMenu, SWT.CASCADE); filterItem.setText("Filter"); - Menu filterMenu = new Menu(popupMenu); + Menu filterMenu = new Menu(contextMenu); filterItem.setMenu(filterMenu); onlySqlItem = new MenuItem(filterMenu, SWT.CHECK); @@ -524,9 +525,9 @@ public void widgetSelected(SelectionEvent e) { } }); - MenuItem yAxisItem = new MenuItem(popupMenu, SWT.CASCADE); + MenuItem yAxisItem = new MenuItem(contextMenu, SWT.CASCADE); yAxisItem.setText("Y Axis"); - Menu yAxisMenu = new Menu(popupMenu); + Menu yAxisMenu = new Menu(contextMenu); yAxisItem.setMenu(yAxisMenu); for (final XLogYAxisEnum yaxis : XLogYAxisEnum.values()) { MenuItem item = new MenuItem(yAxisMenu, SWT.RADIO); @@ -543,8 +544,7 @@ public void handleEvent(Event event) { item.notifyListeners(SWT.Selection, new Event()); } } - - canvas.setMenu(popupMenu); + canvas.setMenu(contextMenu); } public int getMaxCount() { diff --git a/scouter.common/src/scouter/lang/counters/CounterConstants.java b/scouter.common/src/scouter/lang/counters/CounterConstants.java index 28f0b798a..b5cd95a84 100644 --- a/scouter.common/src/scouter/lang/counters/CounterConstants.java +++ b/scouter.common/src/scouter/lang/counters/CounterConstants.java @@ -117,10 +117,8 @@ public class CounterConstants { public final static String TOTAL_ACTIVE_SPEED = "totactsp"; public final static String ACTIVE_EQ = "acteq"; public final static String TRANX_REALTIME = "txreal"; - public final static String TRANX_LOADTIME = "txload"; public final static String ACTIVE_THREAD_LIST = "actthrli"; public final static String TODAY_SERVICE_COUNT = "tdservcnt"; - public final static String DAILY_SERVICE_COUNT = "dservcnt"; public final static String SERVICE_GROUP = "svcgrp"; public final static String UNIQUE_VISITOR = "unqvst"; public final static String TAGCNT = "tagcnt"; diff --git a/scouter.common/src/scouter/lang/counters/counters.xml b/scouter.common/src/scouter/lang/counters/counters.xml index e78497b47..700cf7d1b 100644 --- a/scouter.common/src/scouter/lang/counters/counters.xml +++ b/scouter.common/src/scouter/lang/counters/counters.xml @@ -2,13 +2,11 @@