Graphs: timestamp labels improved
authorVictor Kirhenshtein <victor@netxms.org>
Sat, 25 Feb 2006 22:14:36 +0000 (22:14 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Sat, 25 Feb 2006 22:14:36 +0000 (22:14 +0000)
src/console/win32/Graph.cpp
src/console/win32/Graph.h
src/console/win32/GraphFrame.cpp
src/console/win32/GraphFrame.h
src/console/win32/globals.h
src/console/win32/nxcon.clw
src/console/win32/nxcon.rc
src/console/win32/resource.h
src/console/win32/tools.cpp

index 7ae1278..9285ed0 100644 (file)
 static char THIS_FILE[] = __FILE__;
 #endif
 
+
+//
+// Get month from timestamp
+//
+
+static int MonthFromTS(DWORD dwTimeStamp)
+{
+   time_t t = dwTimeStamp;
+
+   return localtime(&t)->tm_mon; 
+}
+
+
 /////////////////////////////////////////////////////////////////////////////
 // CGraph
 
@@ -180,8 +193,38 @@ void CGraph::OnPaint()
 
 void CGraph::SetTimeFrame(DWORD dwTimeFrom, DWORD dwTimeTo)
 {
-   m_dwTimeFrom = dwTimeFrom;
+   struct tm lt;
+   time_t t = dwTimeFrom;
+
    m_dwTimeTo = dwTimeTo;
+
+   // Round boundaries
+   memcpy(&lt, localtime(&t), sizeof(struct tm));
+   if (dwTimeTo - dwTimeFrom >= 5184000)   // 60 days
+   {
+      // Align to month boundary
+      lt.tm_mday = 1;
+      lt.tm_hour = 0;
+      lt.tm_min = 0;
+      lt.tm_sec = 0;
+   }
+   else if (dwTimeTo - dwTimeFrom >= 432000)   // 5 days
+   {
+      // Align to day boundary
+      lt.tm_hour = 0;
+      lt.tm_min = 0;
+      lt.tm_sec = 0;
+   }
+   else if (dwTimeTo - dwTimeFrom >= 86400)
+   {
+      lt.tm_min = 0;
+      lt.tm_sec = 0;
+   }
+   else
+   {
+      lt.tm_sec = 0;
+   }
+   m_dwTimeFrom = mktime(&lt);
 }
 
 
@@ -346,6 +389,22 @@ void CGraph::OnKillFocus(CWnd* pNewWnd)
       } \
    }
 
+/* Correct next month offset */
+#define CORRECT_MONTH_OFFSET \
+   { \
+      int nMonth; \
+\
+      dwTimeStamp = m_dwTimeFrom + (DWORD)((double)(x - iLeftMargin) * m_dSecondsPerPixel); \
+      nMonth = MonthFromTS(dwTimeStamp); \
+      while(1) \
+      { \
+         dwTimeStamp = m_dwTimeFrom + (DWORD)((double)(x - iLeftMargin - 1) * m_dSecondsPerPixel); \
+         if (MonthFromTS(dwTimeStamp) != nMonth) \
+            break; \
+         x--; \
+      } \
+   }
+
 void CGraph::DrawGraphOnBitmap()
 {
    CDC *pdc, dc;           // Window dc and in-memory dc
@@ -359,10 +418,13 @@ void CGraph::DrawGraphOnBitmap()
    int iLeftMargin, iBottomMargin, iRightMargin = 5, iTopMargin = 5;
    int x, y, iTimeLen, iStep, iGraphLen, nDivider;
    int nGridSizeX, nGridSizeY, nGrids, nDataAreaHeight;
-   int nColSize, nCols, nCurrCol;
+   int nColSize, nCols, nCurrCol, nTimeLabel;
    double dStep, dMark;
    char szBuffer[256], szModifier[4];
    BOOL bIntMarks;
+   static double nSecPerMonth[12] = { 2678400, 2419200, 2678400, 2592000,
+                                      2678400, 2592000, 2678400, 2678400,
+                                      2592000, 2678400, 2592000, 2678400 };
 
    GetClientRect(&rect);
 
@@ -392,7 +454,6 @@ void CGraph::DrawGraphOnBitmap()
 
    // Calculate text size and left margin
    textSize = dc.GetTextExtent("00000.000");
-   iTimeLen = dc.GetTextExtent("00:00:00").cx;
    iLeftMargin = textSize.cx + 10;
    if (m_bShowLegend)
    {
@@ -430,9 +491,6 @@ void CGraph::DrawGraphOnBitmap()
       iBottomMargin = textSize.cy + 8;
    }
 
-   // Draw all parameters
-   ///////////////////////////////////
-
    // Calculate data rectangle
    memcpy(&m_rectGraph, &rect, sizeof(RECT));
    m_rectGraph.left += iLeftMargin;
@@ -440,9 +498,30 @@ void CGraph::DrawGraphOnBitmap()
    m_rectGraph.right -= iRightMargin;
    m_rectGraph.bottom -= iBottomMargin;
    iGraphLen = m_rectGraph.right - m_rectGraph.left + 1;   // Actual data area length in pixels
-   m_dSecondsPerPixel = (double)(m_dwTimeTo - m_dwTimeFrom) / (double)iGraphLen;
    nDataAreaHeight = rect.bottom - iBottomMargin - textSize.cy / 2 - iTopMargin - textSize.cy / 2;
 
+   // Calculate how many seconds represent each pixel
+   // and select time stamp label's style
+   m_dSecondsPerPixel = (double)(m_dwTimeTo - m_dwTimeFrom) / (double)iGraphLen;
+   if (m_dwTimeTo - m_dwTimeFrom >= 10368000)   // 120 days
+   {
+      iTimeLen = dc.GetTextExtent("MMM").cx;
+      nTimeLabel = TS_MONTH;
+//      nGridSizeX = (int)(2592000 / m_dSecondsPerPixel);
+   }
+   else if (m_dwTimeTo - m_dwTimeFrom >= 432000)   // 5 days
+   {
+      iTimeLen = dc.GetTextExtent("MMM/00").cx;
+      nTimeLabel = TS_DAY_AND_MONTH;
+      nGridSizeX = (int)ceil(86400.0 / m_dSecondsPerPixel);
+   }
+   else
+   {
+      iTimeLen = dc.GetTextExtent("00:00:00").cx;
+      nTimeLabel = TS_LONG_TIME;
+      nGridSizeX = 40;
+   }
+
    // Calculate max graph value
    if (m_bAutoScale)
    {
@@ -514,19 +593,33 @@ void CGraph::DrawGraphOnBitmap()
       nGridSizeY = 40;
    }
 
-   // Calculate grid size for X axis
-   //for(nGridSizeX = 25; (nGridSizeX < 50) && (fmod(m_dSecondsPerPixel * nGridSizeX, 15) != 0); nGridSizeX++);
-   nGridSizeX = 40;
-
    // Draw grid
    if (m_bShowGrid)
    {
       pen.CreatePen(PS_ALTERNATE | PS_COSMETIC, 0, m_rgbGridColor);
       pOldPen = dc.SelectObject(&pen);
-      for(x = iLeftMargin + nGridSizeX; x < rect.right - iRightMargin; x += nGridSizeX)
+      if (nTimeLabel == TS_MONTH)
+      {
+         x = iLeftMargin + NextMonthOffset(m_dwTimeFrom);
+      }
+      else
+      {
+         x = iLeftMargin + nGridSizeX;
+      }
+      while(x < rect.right - iRightMargin)
       {
          dc.MoveTo(x, rect.bottom - iBottomMargin);
          dc.LineTo(x, iTopMargin);
+         if (nTimeLabel == TS_MONTH)
+         {
+            dwTimeStamp = m_dwTimeFrom + (DWORD)((double)(x - iLeftMargin) * m_dSecondsPerPixel);
+            x += NextMonthOffset(dwTimeStamp);
+            CORRECT_MONTH_OFFSET;
+         }
+         else
+         {
+            x += nGridSizeX;
+         }
       }
       for(y = rect.bottom - iBottomMargin - nGridSizeY; y > iTopMargin; y -= nGridSizeY)
       {
@@ -572,11 +665,20 @@ void CGraph::DrawGraphOnBitmap()
    // Display absciss marks
    y = rect.bottom - iBottomMargin + 3;
    iStep = iTimeLen / nGridSizeX + 1;    // How many grid lines we should skip
-   for(x = iLeftMargin; x < rect.right - iRightMargin; x += nGridSizeX * iStep)
+   for(x = iLeftMargin; x < rect.right - iRightMargin;)
    {
       dwTimeStamp = m_dwTimeFrom + (DWORD)((double)(x - iLeftMargin) * m_dSecondsPerPixel);
-      FormatTimeStamp(dwTimeStamp, szBuffer, TS_LONG_TIME);
+      FormatTimeStamp(dwTimeStamp, szBuffer, nTimeLabel);
       dc.TextOut(x, y, szBuffer);
+      if (nTimeLabel == TS_MONTH)
+      {
+         x += NextMonthOffset(dwTimeStamp);
+         CORRECT_MONTH_OFFSET;
+      }
+      else
+      {
+         x += nGridSizeX * iStep;
+      }
    }
 
    // Draw legend
@@ -648,3 +750,23 @@ void CGraph::OnSize(UINT nType, int cx, int cy)
    DrawGraphOnBitmap();
        CWnd::OnSize(nType, cx, cy);
 }
+
+
+//
+// Calculate offset (in pixels) of next month start
+//
+
+int CGraph::NextMonthOffset(DWORD dwTimeStamp)
+{
+   static double nSecPerMonth[12] = { 2678400, 2419200, 2678400, 2592000,
+                                      2678400, 2592000, 2678400, 2678400,
+                                      2592000, 2678400, 2592000, 2678400 };
+   struct tm *plt;
+   time_t t = dwTimeStamp;
+
+   plt = localtime(&t);
+   if ((plt->tm_year % 4 == 0) && (plt->tm_mon == 1))
+      return (int)ceil(2505600.0 / m_dSecondsPerPixel) + 1;
+   else
+      return (int)ceil(nSecPerMonth[plt->tm_mon] / m_dSecondsPerPixel) + 1;
+}
index 39460c5..e4411d2 100644 (file)
@@ -54,6 +54,7 @@ public:
 
        // Generated message map functions
 protected:
+       int NextMonthOffset(DWORD dwTimeStamp);
        BOOL m_bIsActive;
        void DrawGraphOnBitmap(void);
        CBitmap m_bmpGraph;
index ed754b6..2e1c12d 100644 (file)
@@ -93,6 +93,8 @@ BEGIN_MESSAGE_MAP(CGraphFrame, CMDIChildWnd)
        ON_WM_GETMINMAXINFO()
        ON_COMMAND(ID_GRAPH_LEGEND, OnGraphLegend)
        ON_UPDATE_COMMAND_UI(ID_GRAPH_LEGEND, OnUpdateGraphLegend)
+       ON_COMMAND(ID_GRAPH_PRESETS_LASTMONTH, OnGraphPresetsLastmonth)
+       ON_COMMAND(ID_GRAPH_PRESETS_LASTYEAR, OnGraphPresetsLastyear)
        //}}AFX_MSG_MAP
    ON_MESSAGE(NXCM_GET_SAVE_INFO, OnGetSaveInfo)
    ON_MESSAGE(NXCM_UPDATE_GRAPH_POINT, OnUpdateGraphPoint)
@@ -555,6 +557,16 @@ void CGraphFrame::OnGraphPresetsLastweek()
    Preset(TIME_UNIT_DAY, 7);
 }
 
+void CGraphFrame::OnGraphPresetsLastmonth() 
+{
+   Preset(TIME_UNIT_DAY, 30);
+}
+
+void CGraphFrame::OnGraphPresetsLastyear() 
+{
+   Preset(TIME_UNIT_DAY, 365);
+}
+
 
 //
 // Set time frame to given preset
index cb437d1..0a78aa9 100644 (file)
@@ -95,6 +95,8 @@ protected:
        afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
        afx_msg void OnGraphLegend();
        afx_msg void OnUpdateGraphLegend(CCmdUI* pCmdUI);
+       afx_msg void OnGraphPresetsLastmonth();
+       afx_msg void OnGraphPresetsLastyear();
        //}}AFX_MSG
    afx_msg LRESULT OnGetSaveInfo(WPARAM wParam, WINDOW_SAVE_INFO *pInfo);
    afx_msg void OnUpdateGraphPoint(DWORD dwTimeStamp, double *pdValue);
index 57f0ede..aa07d98 100644 (file)
@@ -122,6 +122,8 @@ extern CConsoleApp theApp;
 
 #define TS_LONG_DATE_TIME  0
 #define TS_LONG_TIME       1
+#define TS_DAY_AND_MONTH   2
+#define TS_MONTH           3
 
 
 //
index 770b1f4..d488f85 100644 (file)
@@ -16,9 +16,9 @@ Class7=CEventBrowser
 Class9=CMapView
 
 ResourceCount=136
-Resource1=IDD_NEW_USER (English (U.S.))
+Resource1=IDD_OBJTOOL_GENERAL (English (U.S.))
 Resource2=IDD_OBJECT_NODE_GENERAL
-Resource3=IDD_OBJECT_PRESENTATION (English (U.S.))
+Resource3=IDA_EVENT_EDITOR (English (U.S.))
 Resource4=IDD_SELECT_OBJECT
 Resource5=IDD_SELECT_ACTION
 Class2=CChildView
@@ -32,9 +32,9 @@ Resource7=IDD_NEW_USER
 Class12=CObjectBrowser
 Resource8=IDD_CREATE_CONTAINER
 Class13=CObjectPropDlg
-Resource9=IDD_CREATE_NETSRV (English (U.S.))
-Resource10=IDM_VIEW_SPECIFIC (English (U.S.))
-Resource11=IDA_OBJECT_BROWSER (English (U.S.))
+Resource9=IDD_SELECT_USER (English (U.S.))
+Resource10=IDD_DCI_TRANSFORM (English (U.S.))
+Resource11=IDD_CREATE_TEMPLATE (English (U.S.))
 Resource12=IDR_CTRLPANEL (English (U.S.))
 Resource13=IDR_EVENTS (English (U.S.))
 Resource14=IDR_MAPFRAME (English (U.S.))
@@ -42,17 +42,17 @@ Resource15=IDR_OBJECTS (English (U.S.))
 Resource16=IDD_DUMMY (English (U.S.))
 Class14=CEventEditor
 Class15=CEditEventDlg
-Resource17=IDD_DCI_SCHEDULE (English (U.S.))
+Resource17=IDD_EDIT_RULE_ALARM (English (U.S.))
 Class16=CDebugFrame
-Resource18=IDA_ACTION_EDITOR (English (U.S.))
+Resource18=IDD_SELECT_AGENT_PARAM (English (U.S.))
 Resource19=IDD_OBJECT_PROPERTIES (English (U.S.))
 Resource20=IDD_SELECT_EVENT
 Class17=CObjectPreview
-Resource21=IDD_GROUP_PROPERTIES (English (U.S.))
+Resource21=IDD_OBJTOOL_OPTIONS (English (U.S.))
 Class18=CToolBox
 Class19=CObjectInfoBox
 Class20=CObjectSearchBox
-Resource22=IDA_AGENT_CFG_EDITOR (English (U.S.))
+Resource22=IDD_DESKTOP_SAVE_AS (English (U.S.))
 Class21=CEditBox
 Class22=COPGeneral
 Class23=CNodePropsGeneral
@@ -61,14 +61,14 @@ Class24=CObjectPropCaps
 Class25=CObjectPropSheet
 Resource24=IDA_MDI_DEFAULT
 Class26=CRequestProcessingDlg
-Resource25=IDD_SAVE_AGENT_CFG (English (U.S.))
+Resource25=IDD_EDIT_RULE_SEVERITY (English (U.S.))
 Resource26=IDD_PROGRESS (English (U.S.))
 Resource27=IDD_EDIT_RULE_ALARM
-Resource28=IDA_SCRIPT_MANAGER (English (U.S.))
+Resource28=IDD_LASTVAL_PROP (English (U.S.))
 Class27=CObjectPropsGeneral
-Resource29=IDD_CREATE_TG (English (U.S.))
+Resource29=IDA_SCRIPT_MANAGER (English (U.S.))
 Class28=CObjectPropsSecurity
-Resource30=IDD_OBJECT_GENERAL (English (U.S.))
+Resource30=IDD_SAVE_AGENT_CFG (English (U.S.))
 Resource31=IDD_SELECT_USER
 Resource32=IDD_OBJECT_SECURITY
 Class29=CUserSelectDlg
@@ -79,36 +79,36 @@ Class31=CNewUserDlg
 Resource35=IDD_THRESHOLD
 Resource36=IDA_EPP
 Class32=CUserPropDlg
-Resource37=IDD_EDIT_RULE_COMMENT (English (U.S.))
+Resource37=IDA_ALARM_BROWSER (English (U.S.))
 Resource38=IDD_ABOUTBOX
 Class33=CGroupPropDlg
 Resource39=IDD_CP_GENERAL
 Resource40=IDA_TRAP_EDITOR
 Resource41=IDM_VIEW_SPECIFIC
-Resource42=IDD_MIB_BROWSER (English (U.S.))
+Resource42=IDA_OBJECT_BROWSER (English (U.S.))
 Class34=CPasswordChangeDlg
 Class35=CNodeSummary
 Class36=CNetSummaryFrame
 Class37=CDataCollectionEditor
-Resource43=IDD_DCI_COLLECTION (English (U.S.))
+Resource43=IDD_CHANGE_IP (English (U.S.))
 Class38=CDCIPropPage
-Resource44=IDD_SET_PASSWORD (English (U.S.))
+Resource44=IDD_REMOVE_TEMPLATE
 Class39=CDCIDataView
-Resource45=IDD_EDIT_TRAP_ARG (English (U.S.))
+Resource45=IDD_OBJECT_CAPS (English (U.S.))
 Class40=CGraph
 Class41=CGraphFrame
 Class42=CDCIThresholdsPage
-Resource46=IDD_GRAPH_PROP_SETTINGS (English (U.S.))
-Resource47=IDD_OBJTOOL_OPTIONS (English (U.S.))
+Resource46=IDD_DCI_COLLECTION (English (U.S.))
+Resource47=IDD_SELECT_ACTION (English (U.S.))
 Resource48=IDM_CONTEXT
 Class43=CThresholdDlg
-Resource49=IDA_SERVER_CFG_EDITOR (English (U.S.))
+Resource49=IDD_OBJECT_RELATIONS (English (U.S.))
 Resource50=IDD_EDIT_TRAP_ARG
 Class44=CMIBBrowserDlg
 Class45=CEventPolicyEditor
 Class46=CRuleList
 Class47=CRuleHeader
-Resource51=IDD_OBJECT_NODE_GENERAL (English (U.S.))
+Resource51=IDD_CREATE_VPNC (English (U.S.))
 Resource52=IDD_CREATE_NODE
 Class48=CObjectSelDlg
 Resource53=IDD_OBJECT_CAPS
@@ -117,21 +117,21 @@ Class49=CRuleCommentDlg
 Resource55=IDD_DCI_COLLECTION
 Class50=CEventSelDlg
 Resource56=IDD_DATA_QUERY
-Resource57=IDD_CREATE_TEMPLATE (English (U.S.))
+Resource57=IDD_ABOUTBOX (English (U.S.))
 Resource58=IDD_CREATE_TG
-Resource59=IDD_ACTION_PROPERTIES (English (U.S.))
-Resource60=IDA_EVENT_EDITOR (English (U.S.))
+Resource59=IDA_LAST_VALUES (English (U.S.))
+Resource60=IDD_SELECT_INTERNAL_ITEM (English (U.S.))
 Class51=CObjectPropsPresentation
-Resource61=IDD_EDIT_RULE_ALARM (English (U.S.))
+Resource61=IDA_TRAP_EDITOR (English (U.S.))
 Resource62=IDD_EDIT_RULE_COMMENT
 Class52=CRuleSeverityDlg
 Resource63=IDD_ACTION_PROPERTIES
 Class53=CRuleAlarmDlg
 Class54=CAlarmBrowser
-Resource64=IDD_SELECT_OBJECT (English (U.S.))
+Resource64=IDA_EPP (English (U.S.))
 Resource65=IDD_DCI_TRANSFORM
-Resource66=IDD_THRESHOLD (English (U.S.))
-Resource67=IDA_ALARM_BROWSER (English (U.S.))
+Resource66=IDA_MDI_DEFAULT (English (U.S.))
+Resource67=IDD_EDIT_TRAP (English (U.S.))
 Resource68=IDM_CONTEXT (English (U.S.))
 Class55=CConsolePropsGeneral
 Class56=CActionEditor
@@ -143,18 +143,18 @@ Class58=CEditActionDlg
 Resource72=IDA_NETMAP
 Class59=CActionSelDlg
 Resource73=IDD_MIB_BROWSER
-Resource74=IDA_DC_EDITOR (English (U.S.))
-Resource75=IDD_EDIT_RULE_SEVERITY (English (U.S.))
+Resource74=IDD_GRAPH_PROP_SETTINGS (English (U.S.))
+Resource75=IDA_ACTION_EDITOR (English (U.S.))
 Resource76=IDD_USER_PROPERTIES
 Class60=CCreateObjectDlg
 Class61=CCreateContainerDlg
 Resource77=IDR_MAINFRAME
 Class62=CCreateNodeDlg
-Resource78=IDD_CREATE_CONTAINER (English (U.S.))
-Resource79=IDD_SELECT_EVENT (English (U.S.))
-Resource80=IDD_SELECT_ACTION (English (U.S.))
+Resource78=IDA_AGENT_CFG_EDITOR (English (U.S.))
+Resource79=IDA_NETMAP (English (U.S.))
+Resource80=IDA_SERVER_CFG_EDITOR (English (U.S.))
 Class63=CDCITransformPage
-Resource81=IDD_DCI_THRESHOLDS (English (U.S.))
+Resource81=IDR_MAINFRAME (English (U.S.))
 Class64=CPollNodeDlg
 Resource82=IDD_POLL_NODE (English (U.S.))
 Class65=CNodePoller
@@ -171,7 +171,7 @@ Resource89=IDA_ALARM_BROWSER
 Class69=CDataQueryDlg
 Resource90=IDD_EDIT_RULE_SEVERITY
 Class70=CTrapEditDlg
-Resource91=IDD_OBJECT_STATUS (English (U.S.))
+Resource91=IDD_CP_GENERAL (English (U.S.))
 Class71=CTrapParamDlg
 Resource92=IDD_EDIT_EVENT
 Resource93=IDD_CREATE_TEMPLATE
@@ -179,87 +179,87 @@ Class72=CGraphPropDlg
 Class73=CColorSelector
 Class74=CPackageMgr
 Resource94=IDD_GROUP_PROPERTIES
-Resource95=IDD_GRAPH_PROP_DATA (English (U.S.))
-Resource96=IDD_NEW_OBJECT_TOOL (English (U.S.))
-Resource97=IDA_TRAP_EDITOR (English (U.S.))
-Resource98=IDD_DCI_DATA_EXPORT (English (U.S.))
-Resource99=IDD_REQUEST_PROCESSING (English (U.S.))
-Resource100=IDD_OBJECT_RELATIONS (English (U.S.))
-Resource101=IDD_OBJECT_SECURITY (English (U.S.))
-Resource102=IDD_DESKTOP_SAVE_AS (English (U.S.))
-Resource103=IDD_LASTVAL_PROP (English (U.S.))
-Resource104=IDD_OBJECT_VPNC_GENERAL (English (U.S.))
-Resource105=IDR_MAINFRAME (English (U.S.))
-Resource106=IDD_OBJECT_CAPS (English (U.S.))
-Resource107=IDD_SELECT_AGENT_PARAM (English (U.S.))
+Resource95=IDD_DCI_THRESHOLDS (English (U.S.))
+Resource96=IDD_ACTION_PROPERTIES (English (U.S.))
+Resource97=IDD_INPUT_BOX (English (U.S.))
+Resource98=IDD_MIB_BROWSER (English (U.S.))
+Resource99=IDD_EDIT_IP_SUBNET (English (U.S.))
+Resource100=IDD_GROUP_PROPERTIES (English (U.S.))
+Resource101=IDD_DCI_SCHEDULE (English (U.S.))
+Resource102=IDD_SET_PASSWORD (English (U.S.))
+Resource103=IDD_THRESHOLD (English (U.S.))
+Resource104=IDD_SELECT_EVENT (English (U.S.))
+Resource105=IDD_CREATE_TG (English (U.S.))
+Resource106=IDD_OBJECT_VPNC_GENERAL (English (U.S.))
+Resource107=IDD_OBJECT_GENERAL (English (U.S.))
 Class75=CInternalItemSelDlg
-Resource108=IDD_EDIT_VARIABLE (English (U.S.))
+Resource108=IDD_SELECT_OBJECT (English (U.S.))
 Class76=CAgentParamSelDlg
-Resource109=IDD_SELECT_INTERNAL_ITEM (English (U.S.))
+Resource109=IDD_REQUEST_PROCESSING (English (U.S.))
 Class77=CInputBox
-Resource110=IDA_GRAPH (English (U.S.))
+Resource110=IDD_CREATE_NETSRV (English (U.S.))
 Class78=CCreateNetSrvDlg
-Resource111=IDA_PACKAGE_MGR (English (U.S.))
+Resource111=IDD_OBJECT_NETSRV_GENERAL (English (U.S.))
 Class79=CNetSrvPropsGeneral
 Resource112=IDD_LOGIN (English (U.S.))
 Class80=CNodePropsPolling
 Class81=CDeploymentView
 Class82=CLastValuesView
 Class83=CValueList
-Resource113=IDD_CP_GENERAL (English (U.S.))
+Resource113=IDA_GRAPH (English (U.S.))
 Class84=CObjectPropsRelations
-Resource114=IDD_OBJECT_NODE_POLL (English (U.S.))
+Resource114=IDD_USER_PROPERTIES (English (U.S.))
 Class85=CSaveDesktopDlg
-Resource115=IDD_INPUT_BOX (English (U.S.))
+Resource115=IDD_OBJECT_SECURITY (English (U.S.))
 Class86=CGraphSettingsPage
-Resource116=IDD_EDIT_TRAP (English (U.S.))
+Resource116=IDD_OBJECT_NODE_GENERAL (English (U.S.))
 Class87=CGraphDataPage
-Resource117=IDD_ABOUTBOX (English (U.S.))
+Resource117=IDD_DCI_DATA_EXPORT (English (U.S.))
 Class88=CRemoveTemplateDlg
-Resource118=IDD_EDIT_IP_SUBNET (English (U.S.))
+Resource118=IDD_OBJECT_PRESENTATION (English (U.S.))
 Class89=CAddrChangeDlg
-Resource119=IDD_REMOVE_TEMPLATE
+Resource119=IDD_CREATE_CONTAINER (English (U.S.))
 Class90=CLastValuesPropDlg
 Class91=CAgentCfgEditor
-Resource120=IDD_SELECT_USER (English (U.S.))
+Resource120=IDD_OBJECT_STATUS (English (U.S.))
 Class92=CDataExportDlg
 Class93=CServerCfgEditor
-Resource121=IDD_CHANGE_IP (English (U.S.))
-Resource122=IDA_NETMAP (English (U.S.))
+Resource121=IDD_CREATE_NODE (English (U.S.))
+Resource122=IDD_EDIT_TRAP_ARG (English (U.S.))
 Class94=CEditVariableDlg
-Resource123=IDD_NEW_ACTION (English (U.S.))
+Resource123=IDA_PACKAGE_MGR (English (U.S.))
 Class95=CCreateVPNConnDlg
-Resource124=IDD_OBJECT_NETSRV_GENERAL (English (U.S.))
+Resource124=IDD_NEW_USER (English (U.S.))
 Class96=CVPNCPropsGeneral
-Resource125=IDA_EPP (English (U.S.))
+Resource125=IDD_DATA_QUERY (English (U.S.))
 Class97=CEditSubnetDlg
-Resource126=IDD_OBJTOOL_GENERAL (English (U.S.))
-Resource127=IDD_CREATE_VPNC (English (U.S.))
+Resource126=IDD_NEW_ACTION (English (U.S.))
+Resource127=IDD_EDIT_RULE_COMMENT (English (U.S.))
 Class98=CModifiedAgentCfgDlg
 Class99=CSimpleSplitter
 Class100=CAdvSplitter
-Resource128=IDD_EDIT_EVENT (English (U.S.))
+Resource128=IDD_EDIT_VARIABLE (English (U.S.))
 Class101=CTableView
 Class102=CWaitView
 Class103=CWebBrowser
 Class104=CSyslogBrowser
 Class105=CLPPList
-Resource129=IDD_CREATE_NODE (English (U.S.))
+Resource129=IDA_DC_EDITOR (English (U.S.))
 Class106=CDCISchedulePage
-Resource130=IDD_DCI_TRANSFORM (English (U.S.))
+Resource130=IDA_OBJECT_TOOLS_EDITOR (English (U.S.))
 Class107=CObjectPropsStatus
 Class108=CObjectToolsEditor
-Resource131=IDA_MDI_DEFAULT (English (U.S.))
-Resource132=IDA_OBJECT_TOOLS_EDITOR (English (U.S.))
+Resource131=IDM_VIEW_SPECIFIC (English (U.S.))
+Resource132=IDD_GRAPH_PROP_DATA (English (U.S.))
 Class109=CObjToolPropGeneral
-Resource133=IDA_LAST_VALUES (English (U.S.))
+Resource133=IDD_OBJECT_NODE_POLL (English (U.S.))
 Class110=CObjToolPropColumns
-Resource134=IDD_DATA_QUERY (English (U.S.))
+Resource134=IDD_EDIT_EVENT (English (U.S.))
 Class111=CNewObjectToolDlg
 Class112=CObjToolPropOptions
 Class113=CScriptManager
 Class114=CScriptView
-Resource135=IDD_USER_PROPERTIES (English (U.S.))
+Resource135=IDD_NEW_OBJECT_TOOL (English (U.S.))
 Resource136=IDD_OBJTOOL_COLUMNS
 
 [CLS:CConsoleApp]
@@ -878,40 +878,42 @@ Command114=ID_GRAPH_PRESETS_LAST2HOURS
 Command115=ID_GRAPH_PRESETS_LAST4HOURS
 Command116=ID_GRAPH_PRESETS_LASTDAY
 Command117=ID_GRAPH_PRESETS_LASTWEEK
-Command118=ID_GRAPH_AUTOSCALE
-Command119=ID_GRAPH_LEGEND
-Command120=ID_GRAPH_RULER
-Command121=ID_GRAPH_PROPERTIES
-Command122=ID_PACKAGE_INSTALL
-Command123=ID_PACKAGE_REMOVE
-Command124=ID_PACKAGE_DEPLOY
-Command125=ID_ITEM_SHOWDATA
-Command126=ID_ITEM_GRAPH
-Command127=ID_ITEM_EXPORTDATA
-Command128=ID_LASTVALUES_PROPERTIES
-Command129=ID_VARIABLE_NEW
-Command130=ID_VARIABLE_EDIT
-Command131=ID_VARIABLE_DELETE
-Command132=ID_EDIT_UNDO
-Command133=ID_EDIT_REDO
-Command134=ID_EDIT_CUT
-Command135=ID_EDIT_COPY
-Command136=ID_EDIT_PASTE
-Command137=ID_EDIT_DELETE
-Command138=ID_EDIT_SELECT_ALL
-Command139=ID_CONFIG_SAVE
-Command140=ID_CONFIG_SAVEANDAPPLY
-Command141=ID_OBJECTTOOLS_NEW
-Command142=ID_OBJECTTOOLS_EDIT
-Command143=ID_OBJECTTOOLS_DELETE
-Command144=ID_SCRIPT_NEW
-Command145=ID_SCRIPT_EDIT
-Command146=ID_SCRIPT_SAVE
-Command147=ID_SCRIPT_RENAME
-Command148=ID_SCRIPT_DELETE
-Command149=ID_SCRIPT_VIEWASLIST
-Command150=ID_SCRIPT_VIEWASTREE
-CommandCount=150
+Command118=ID_GRAPH_PRESETS_LASTMONTH
+Command119=ID_GRAPH_PRESETS_LASTYEAR
+Command120=ID_GRAPH_AUTOSCALE
+Command121=ID_GRAPH_LEGEND
+Command122=ID_GRAPH_RULER
+Command123=ID_GRAPH_PROPERTIES
+Command124=ID_PACKAGE_INSTALL
+Command125=ID_PACKAGE_REMOVE
+Command126=ID_PACKAGE_DEPLOY
+Command127=ID_ITEM_SHOWDATA
+Command128=ID_ITEM_GRAPH
+Command129=ID_ITEM_EXPORTDATA
+Command130=ID_LASTVALUES_PROPERTIES
+Command131=ID_VARIABLE_NEW
+Command132=ID_VARIABLE_EDIT
+Command133=ID_VARIABLE_DELETE
+Command134=ID_EDIT_UNDO
+Command135=ID_EDIT_REDO
+Command136=ID_EDIT_CUT
+Command137=ID_EDIT_COPY
+Command138=ID_EDIT_PASTE
+Command139=ID_EDIT_DELETE
+Command140=ID_EDIT_SELECT_ALL
+Command141=ID_CONFIG_SAVE
+Command142=ID_CONFIG_SAVEANDAPPLY
+Command143=ID_OBJECTTOOLS_NEW
+Command144=ID_OBJECTTOOLS_EDIT
+Command145=ID_OBJECTTOOLS_DELETE
+Command146=ID_SCRIPT_NEW
+Command147=ID_SCRIPT_EDIT
+Command148=ID_SCRIPT_SAVE
+Command149=ID_SCRIPT_RENAME
+Command150=ID_SCRIPT_DELETE
+Command151=ID_SCRIPT_VIEWASLIST
+Command152=ID_SCRIPT_VIEWASTREE
+CommandCount=152
 
 [ACL:IDA_MDI_DEFAULT (English (U.S.))]
 Type=1
@@ -1603,40 +1605,42 @@ Command96=ID_GRAPH_PRESETS_LAST2HOURS
 Command97=ID_GRAPH_PRESETS_LAST4HOURS
 Command98=ID_GRAPH_PRESETS_LASTDAY
 Command99=ID_GRAPH_PRESETS_LASTWEEK
-Command100=ID_GRAPH_AUTOSCALE
-Command101=ID_GRAPH_LEGEND
-Command102=ID_GRAPH_RULER
-Command103=ID_GRAPH_PROPERTIES
-Command104=ID_PACKAGE_INSTALL
-Command105=ID_PACKAGE_REMOVE
-Command106=ID_PACKAGE_DEPLOY
-Command107=ID_ITEM_SHOWDATA
-Command108=ID_ITEM_GRAPH
-Command109=ID_ITEM_EXPORTDATA
-Command110=ID_LASTVALUES_PROPERTIES
-Command111=ID_VARIABLE_NEW
-Command112=ID_VARIABLE_EDIT
-Command113=ID_VARIABLE_DELETE
-Command114=ID_EDIT_UNDO
-Command115=ID_EDIT_REDO
-Command116=ID_EDIT_CUT
-Command117=ID_EDIT_COPY
-Command118=ID_EDIT_PASTE
-Command119=ID_EDIT_DELETE
-Command120=ID_EDIT_SELECT_ALL
-Command121=ID_CONFIG_SAVE
-Command122=ID_CONFIG_SAVEANDAPPLY
-Command123=ID_OBJECTTOOLS_NEW
-Command124=ID_OBJECTTOOLS_EDIT
-Command125=ID_OBJECTTOOLS_DELETE
-Command126=ID_SCRIPT_NEW
-Command127=ID_SCRIPT_EDIT
-Command128=ID_SCRIPT_SAVE
-Command129=ID_SCRIPT_RENAME
-Command130=ID_SCRIPT_DELETE
-Command131=ID_SCRIPT_VIEWASLIST
-Command132=ID_SCRIPT_VIEWASTREE
-CommandCount=132
+Command100=ID_GRAPH_PRESETS_LASTMONTH
+Command101=ID_GRAPH_PRESETS_LASTYEAR
+Command102=ID_GRAPH_AUTOSCALE
+Command103=ID_GRAPH_LEGEND
+Command104=ID_GRAPH_RULER
+Command105=ID_GRAPH_PROPERTIES
+Command106=ID_PACKAGE_INSTALL
+Command107=ID_PACKAGE_REMOVE
+Command108=ID_PACKAGE_DEPLOY
+Command109=ID_ITEM_SHOWDATA
+Command110=ID_ITEM_GRAPH
+Command111=ID_ITEM_EXPORTDATA
+Command112=ID_LASTVALUES_PROPERTIES
+Command113=ID_VARIABLE_NEW
+Command114=ID_VARIABLE_EDIT
+Command115=ID_VARIABLE_DELETE
+Command116=ID_EDIT_UNDO
+Command117=ID_EDIT_REDO
+Command118=ID_EDIT_CUT
+Command119=ID_EDIT_COPY
+Command120=ID_EDIT_PASTE
+Command121=ID_EDIT_DELETE
+Command122=ID_EDIT_SELECT_ALL
+Command123=ID_CONFIG_SAVE
+Command124=ID_CONFIG_SAVEANDAPPLY
+Command125=ID_OBJECTTOOLS_NEW
+Command126=ID_OBJECTTOOLS_EDIT
+Command127=ID_OBJECTTOOLS_DELETE
+Command128=ID_SCRIPT_NEW
+Command129=ID_SCRIPT_EDIT
+Command130=ID_SCRIPT_SAVE
+Command131=ID_SCRIPT_RENAME
+Command132=ID_SCRIPT_DELETE
+Command133=ID_SCRIPT_VIEWASLIST
+Command134=ID_SCRIPT_VIEWASTREE
+CommandCount=134
 
 [DLG:IDD_SET_PASSWORD (English (U.S.))]
 Type=1
index d314769..9084058 100644 (file)
@@ -440,6 +440,10 @@ BEGIN
             MENUITEM "Last &day",                   ID_GRAPH_PRESETS_LASTDAY
             MENUITEM "Last &week",                  ID_GRAPH_PRESETS_LASTWEEK
 
+            MENUITEM "Last &month",                 ID_GRAPH_PRESETS_LASTMONTH
+
+            MENUITEM "Last &year",                  ID_GRAPH_PRESETS_LASTYEAR
+
         END
         MENUITEM SEPARATOR
         MENUITEM "&Autoscale\tAlt+A",           ID_GRAPH_AUTOSCALE
@@ -719,6 +723,10 @@ BEGIN
             MENUITEM "Last &day",                   ID_GRAPH_PRESETS_LASTDAY
             MENUITEM "Last &week",                  ID_GRAPH_PRESETS_LASTWEEK
 
+            MENUITEM "Last &month",                 ID_GRAPH_PRESETS_LASTMONTH
+
+            MENUITEM "Last &year",                  ID_GRAPH_PRESETS_LASTYEAR
+
         END
         MENUITEM SEPARATOR
         MENUITEM "&Autoscale",                  ID_GRAPH_AUTOSCALE
index e443350..fc213f0 100644 (file)
 #define ID_SCRIPT_DELETE                32977
 #define ID_GRAPH_RULER                  32978
 #define ID_GRAPH_LEGEND                 32980
+#define ID_GRAPH_PRESETS_LASTMONTH      32982
+#define ID_GRAPH_PRESETS_LASTYEAR       32983
 #define IDS_GETFOLDERPATH_FAILED        61216
 #define IDS_WORKDIR_CREATION_FAILED     61217
 #define IDS_SCINTILLA_INIT_FAILED       61218
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        302
-#define _APS_NEXT_COMMAND_VALUE         32982
+#define _APS_NEXT_COMMAND_VALUE         32984
 #define _APS_NEXT_CONTROL_VALUE         1339
 #define _APS_NEXT_SYMED_VALUE           126
 #endif
index 81688ec..d801b95 100644 (file)
@@ -33,7 +33,7 @@
 char *FormatTimeStamp(DWORD dwTimeStamp, char *pszBuffer, int iType)
 {
    struct tm *pTime;
-   static char *pFormat[] = { "%d-%b-%Y %H:%M:%S", "%H:%M:%S" };
+   static char *pFormat[] = { "%d-%b-%Y %H:%M:%S", "%H:%M:%S", "%b/%d", "%b" };
 
    pTime = localtime((const time_t *)&dwTimeStamp);
    strftime(pszBuffer, 32, pFormat[iType], pTime);