Finished network service configuration GUI and backend
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 27 Jan 2005 23:12:34 +0000 (23:12 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 27 Jan 2005 23:12:34 +0000 (23:12 +0000)
.gitattributes
include/nxclapi.h
sql/schema.in
src/console/win32/NodePropsPolling.cpp [new file with mode: 0644]
src/console/win32/NodePropsPolling.h [new file with mode: 0644]
src/console/win32/ObjectSelDlg.cpp
src/console/win32/ObjectSelDlg.h
src/console/win32/nxcon.clw
src/console/win32/nxcon.cpp
src/console/win32/nxcon.dsp

index b25eac5..3e8e908 100644 (file)
@@ -349,6 +349,8 @@ src/console/win32/NodePoller.cpp -text
 src/console/win32/NodePoller.h -text
 src/console/win32/NodePropsGeneral.cpp -text
 src/console/win32/NodePropsGeneral.h -text
+src/console/win32/NodePropsPolling.cpp -text
+src/console/win32/NodePropsPolling.h -text
 src/console/win32/NodeSummary.cpp -text
 src/console/win32/NodeSummary.h -text
 src/console/win32/ObjectBrowser.cpp -text
index f5b5363..b602b10 100644 (file)
@@ -287,9 +287,10 @@ typedef void * NXC_SESSION;
 #define OBJ_UPDATE_CHECK_REQUEST    ((DWORD)0x1000)
 #define OBJ_UPDATE_CHECK_RESPONCE   ((DWORD)0x2000)
 #define OBJ_UPDATE_POLLER_NODE      ((DWORD)0x4000)
+#define OBJ_UPDATE_IP_ADDR          ((DWORD)0x8000)
 
-#define OBJ_UPDATE_NODE_ALL         ((DWORD)0x01FF)
-#define OBJ_UPDATE_NETSRV_ALL       ((DWORD)0x7EC1)
+#define OBJ_UPDATE_NODE_ALL         ((DWORD)0x41FF)
+#define OBJ_UPDATE_NETSRV_ALL       ((DWORD)0xFEC1)
 
 
 //
@@ -623,6 +624,7 @@ typedef struct
          DWORD dwFlags;
          DWORD dwDiscoveryFlags;
          DWORD dwNodeType;
+         DWORD dwPollerNode;
          TCHAR szSharedSecret[MAX_SECRET_LENGTH];
          TCHAR szCommunityString[MAX_COMMUNITY_LENGTH];
          TCHAR szObjectId[MAX_OID_LENGTH];
@@ -685,6 +687,7 @@ typedef struct
    DWORD dwPollerNode;
    TCHAR *pszRequest;
    TCHAR *pszResponce;
+   DWORD dwIpAddr;
 } NXC_OBJECT_UPDATE;
 
 
index cd0d71a..a9a96b9 100644 (file)
@@ -115,6 +115,7 @@ CREATE TABLE nodes
        node_type integer,
        agent_version varchar(63),
        platform_name varchar(63),
+       poller_node_id integer not null,
        PRIMARY KEY(id)
 ) TABLE_TYPE;
 
diff --git a/src/console/win32/NodePropsPolling.cpp b/src/console/win32/NodePropsPolling.cpp
new file mode 100644 (file)
index 0000000..4be0881
--- /dev/null
@@ -0,0 +1,118 @@
+// NodePropsPolling.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "nxcon.h"
+#include "NodePropsPolling.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CNodePropsPolling property page
+
+IMPLEMENT_DYNCREATE(CNodePropsPolling, CPropertyPage)
+
+CNodePropsPolling::CNodePropsPolling() : CPropertyPage(CNodePropsPolling::IDD)
+{
+       //{{AFX_DATA_INIT(CNodePropsPolling)
+               // NOTE: the ClassWizard will add member initialization here
+       //}}AFX_DATA_INIT
+}
+
+CNodePropsPolling::~CNodePropsPolling()
+{
+}
+
+void CNodePropsPolling::DoDataExchange(CDataExchange* pDX)
+{
+       CPropertyPage::DoDataExchange(pDX);
+       //{{AFX_DATA_MAP(CNodePropsPolling)
+               // NOTE: the ClassWizard will add DDX and DDV calls here
+       //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CNodePropsPolling, CPropertyPage)
+       //{{AFX_MSG_MAP(CNodePropsPolling)
+       ON_BN_CLICKED(IDC_SELECT_POLLER, OnSelectPoller)
+       //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CNodePropsPolling message handlers
+
+//
+// WM_INITDIALOG message handler
+//
+
+BOOL CNodePropsPolling::OnInitDialog() 
+{
+       CPropertyPage::OnInitDialog();
+       
+   m_pUpdate = ((CObjectPropSheet *)GetParent())->GetUpdateStruct();
+       
+   // Poller node
+   if (m_dwPollerNode != 0)
+   {
+      NXC_OBJECT *pNode;
+
+      pNode = NXCFindObjectById(g_hSession, m_dwPollerNode);
+      if (pNode != NULL)
+      {
+         SetDlgItemText(IDC_EDIT_POLLER, pNode->szName);
+      }
+      else
+      {
+         SetDlgItemText(IDC_EDIT_POLLER, _T("<invalid>"));
+      }
+   }
+   else
+   {
+      SetDlgItemText(IDC_EDIT_POLLER, _T("<server>"));
+   }
+
+   return TRUE;
+}
+
+
+//
+// Handler for "select poller node" button
+//
+
+void CNodePropsPolling::OnSelectPoller() 
+{
+   CObjectSelDlg dlg;
+
+   dlg.m_dwAllowedClasses = SCL_NODE;
+   dlg.m_bSingleSelection = TRUE;
+   dlg.m_bAllowEmptySelection = TRUE;
+   if (dlg.DoModal() == IDOK)
+   {
+      if (dlg.m_dwNumObjects != 0)
+      {
+         NXC_OBJECT *pNode;
+
+         m_dwPollerNode = dlg.m_pdwObjectList[0];
+         pNode = NXCFindObjectById(g_hSession, m_dwPollerNode);
+         if (pNode != NULL)
+         {
+            SetDlgItemText(IDC_EDIT_POLLER, pNode->szName);
+         }
+         else
+         {
+            SetDlgItemText(IDC_EDIT_POLLER, _T("<invalid>"));
+         }
+      }
+      else
+      {
+         m_dwPollerNode = 0;
+         SetDlgItemText(IDC_EDIT_POLLER, _T("<server>"));
+      }
+      m_pUpdate->dwFlags |= OBJ_UPDATE_POLLER_NODE;
+      SetModified();
+   }
+}
diff --git a/src/console/win32/NodePropsPolling.h b/src/console/win32/NodePropsPolling.h
new file mode 100644 (file)
index 0000000..441a3e4
--- /dev/null
@@ -0,0 +1,55 @@
+#if !defined(AFX_NODEPROPSPOLLING_H__EC1C3F19_71F1_43F3_9572_568534EA16FF__INCLUDED_)
+#define AFX_NODEPROPSPOLLING_H__EC1C3F19_71F1_43F3_9572_568534EA16FF__INCLUDED_
+
+#include "..\..\..\INCLUDE\nxclapi.h"  // Added by ClassView
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// NodePropsPolling.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CNodePropsPolling dialog
+
+class CNodePropsPolling : public CPropertyPage
+{
+       DECLARE_DYNCREATE(CNodePropsPolling)
+
+// Construction
+public:
+       DWORD m_dwPollerNode;
+       CNodePropsPolling();
+       ~CNodePropsPolling();
+
+// Dialog Data
+       //{{AFX_DATA(CNodePropsPolling)
+       enum { IDD = IDD_OBJECT_NODE_POLL };
+               // NOTE - ClassWizard will add data members here.
+               //    DO NOT EDIT what you see in these blocks of generated code !
+       //}}AFX_DATA
+
+
+// Overrides
+       // ClassWizard generate virtual function overrides
+       //{{AFX_VIRTUAL(CNodePropsPolling)
+       protected:
+       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+       //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+       // Generated message map functions
+       //{{AFX_MSG(CNodePropsPolling)
+       virtual BOOL OnInitDialog();
+       afx_msg void OnSelectPoller();
+       //}}AFX_MSG
+       DECLARE_MESSAGE_MAP()
+
+private:
+       NXC_OBJECT_UPDATE *m_pUpdate;
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_NODEPROPSPOLLING_H__EC1C3F19_71F1_43F3_9572_568534EA16FF__INCLUDED_)
index 73ff9c0..5522c64 100644 (file)
@@ -25,6 +25,9 @@ CObjectSelDlg::CObjectSelDlg(CWnd* pParent /*=NULL*/)
    m_pdwObjectList = NULL;
    m_dwAllowedClasses = 0xFFFF;  // Allow all classes by default
    m_bSingleSelection = FALSE;
+   m_dwParentObject = 0;   // All objects by default
+   m_bSelectAddress = FALSE;  // Not in address selection mode by default
+   m_bAllowEmptySelection = FALSE;
 }
 
 
@@ -46,6 +49,7 @@ void CObjectSelDlg::DoDataExchange(CDataExchange* pDX)
 BEGIN_MESSAGE_MAP(CObjectSelDlg, CDialog)
        //{{AFX_MSG_MAP(CObjectSelDlg)
        ON_NOTIFY(NM_DBLCLK, IDC_LIST_OBJECTS, OnDblclkListObjects)
+       ON_BN_CLICKED(IDC_BUTTON_NONE, OnButtonNone)
        //}}AFX_MSG_MAP
 END_MESSAGE_MAP()
 
@@ -64,9 +68,10 @@ BOOL CObjectSelDlg::OnInitDialog()
    DWORD i, dwNumObjects;
    int iItem;
    CBitmap bmp;
-   static DWORD dwClassMask[8] = { 0, SCL_SUBNET, SCL_NODE, SCL_INTERFACE,
-                                   SCL_NETWORK, SCL_CONTAINER, SCL_ZONE,
-                                   SCL_SERVICEROOT };
+   static DWORD dwClassMask[12] = { 0, SCL_SUBNET, SCL_NODE, SCL_INTERFACE,
+                                    SCL_NETWORK, SCL_CONTAINER, SCL_ZONE,
+                                    SCL_SERVICEROOT, SCL_TEMPLATE, SCL_TEMPLATEGROUP,
+                                    SCL_TEMPLATEROOT, SCL_NETWORKSERVICE };
 
        CDialog::OnInitDialog();
 
@@ -76,9 +81,18 @@ BOOL CObjectSelDlg::OnInitDialog()
    // Setup list control
    m_wndListCtrl.SetImageList(&m_imageList, LVSIL_SMALL);
    m_wndListCtrl.GetClientRect(&rect);
-   m_wndListCtrl.InsertColumn(0, "Name", LVCFMT_LEFT, 150);
-   m_wndListCtrl.InsertColumn(1, "Class", LVCFMT_LEFT, 
-                              rect.right - 150 - GetSystemMetrics(SM_CXVSCROLL));
+   if (m_bSelectAddress)
+   {
+      m_wndListCtrl.InsertColumn(0, _T("Interface"), LVCFMT_LEFT, 100);
+      m_wndListCtrl.InsertColumn(1, _T("IP Address"), LVCFMT_LEFT, 
+                                 rect.right - 100 - GetSystemMetrics(SM_CXVSCROLL));
+   }
+   else
+   {
+      m_wndListCtrl.InsertColumn(0, _T("Name"), LVCFMT_LEFT, 150);
+      m_wndListCtrl.InsertColumn(1, _T("Class"), LVCFMT_LEFT, 
+                                 rect.right - 150 - GetSystemMetrics(SM_CXVSCROLL));
+   }
    m_wndListCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT);
    if (m_bSingleSelection)
    {
@@ -87,17 +101,64 @@ BOOL CObjectSelDlg::OnInitDialog()
    }
 
    // Fill in object list
-   NXCLockObjectIndex(g_hSession);
-   pIndex = (NXC_OBJECT_INDEX *)NXCGetObjectIndex(g_hSession, &dwNumObjects);
-   for(i = 0; i < dwNumObjects; i++)
-      if (dwClassMask[pIndex[i].pObject->iClass] & m_dwAllowedClasses)
+   if (m_dwParentObject == 0)
+   {
+      NXCLockObjectIndex(g_hSession);
+      pIndex = (NXC_OBJECT_INDEX *)NXCGetObjectIndex(g_hSession, &dwNumObjects);
+      for(i = 0; i < dwNumObjects; i++)
+         if (dwClassMask[pIndex[i].pObject->iClass] & m_dwAllowedClasses)
+         {
+            iItem = m_wndListCtrl.InsertItem(0x7FFFFFFF, pIndex[i].pObject->szName,
+                                             GetObjectImageIndex(pIndex[i].pObject));
+            m_wndListCtrl.SetItemText(iItem, 1, g_szObjectClass[pIndex[i].pObject->iClass]);
+            m_wndListCtrl.SetItemData(iItem, pIndex[i].pObject->dwId);
+         }
+      NXCUnlockObjectIndex(g_hSession);
+   }
+   else
+   {
+      NXC_OBJECT *pObject, *pChild;
+      TCHAR szBuffer[16];
+
+      pObject = NXCFindObjectById(g_hSession, m_dwParentObject);
+      if (pObject != NULL)
       {
-         iItem = m_wndListCtrl.InsertItem(0x7FFFFFFF, pIndex[i].pObject->szName,
-                                          GetObjectImageIndex(pIndex[i].pObject));
-         m_wndListCtrl.SetItemText(iItem, 1, g_szObjectClass[pIndex[i].pObject->iClass]);
-         m_wndListCtrl.SetItemData(iItem, pIndex[i].pObject->dwId);
+         for(i = 0; i < pObject->dwNumChilds; i++)
+         {
+            pChild = NXCFindObjectById(g_hSession, pObject->pdwChildList[i]);
+            if (pChild != NULL)
+            {
+               if (m_bSelectAddress)
+               {
+                  if ((pChild->iClass == OBJECT_INTERFACE) &&
+                      (pChild->dwIpAddr != 0))
+                  {
+                     iItem = m_wndListCtrl.InsertItem(0x7FFFFFFF, pChild->szName,
+                                                      GetObjectImageIndex(pChild));
+                     m_wndListCtrl.SetItemText(iItem, 1, IpToStr(pChild->dwIpAddr, szBuffer));
+                     m_wndListCtrl.SetItemData(iItem, pObject->pdwChildList[i]);
+                  }
+               }
+               else
+               {
+                  if (dwClassMask[pChild->iClass] & m_dwAllowedClasses)
+                  {
+                     iItem = m_wndListCtrl.InsertItem(0x7FFFFFFF, pChild->szName,
+                                                      GetObjectImageIndex(pChild));
+                     m_wndListCtrl.SetItemText(iItem, 1, g_szObjectClass[pChild->iClass]);
+                     m_wndListCtrl.SetItemData(iItem, pObject->pdwChildList[i]);
+                  }
+               }
+            }
+         }
       }
-   NXCUnlockObjectIndex(g_hSession);
+   }
+
+   // Disable "None" button if empty selection is not allowed
+   if (!m_bAllowEmptySelection)
+   {
+      EnableDlgItem(this, IDC_BUTTON_NONE, FALSE);
+   }
 
        return TRUE;
 }
@@ -142,3 +203,17 @@ void CObjectSelDlg::OnDblclkListObjects(NMHDR* pNMHDR, LRESULT* pResult)
       PostMessage(WM_COMMAND, IDOK, 0);
        *pResult = 0;
 }
+
+
+//
+// Empty selection
+//
+
+void CObjectSelDlg::OnButtonNone() 
+{
+   if (m_bAllowEmptySelection)
+   {
+      m_dwNumObjects = 0;
+      CDialog::OnOK();
+   }
+}
index d144581..b23b0d1 100644 (file)
 // Allowed classes
 //
 
-#define SCL_NODE        0x0001
-#define SCL_INTERFACE   0x0002
-#define SCL_CONTAINER   0x0004
-#define SCL_SUBNET      0x0008
-#define SCL_NETWORK     0x0010
-#define SCL_SERVICEROOT 0x0020
-#define SCL_ZONE        0x0040
+#define SCL_NODE              0x0001
+#define SCL_INTERFACE         0x0002
+#define SCL_CONTAINER         0x0004
+#define SCL_SUBNET            0x0008
+#define SCL_NETWORK           0x0010
+#define SCL_SERVICEROOT       0x0020
+#define SCL_ZONE              0x0040
+#define SCL_NETWORKSERVICE    0x0080
+#define SCL_TEMPLATE          0x0100
+#define SCL_TEMPLATEGROUP     0x0200
+#define SCL_TEMPLATEROOT      0x0400
 
 
 /////////////////////////////////////////////////////////////////////////////
@@ -27,6 +31,9 @@ class CObjectSelDlg : public CDialog
 {
 // Construction
 public:
+       BOOL m_bAllowEmptySelection;
+       BOOL m_bSelectAddress;
+       DWORD m_dwParentObject;
        BOOL m_bSingleSelection;
        DWORD m_dwAllowedClasses;
        DWORD m_dwNumObjects;
@@ -56,6 +63,7 @@ protected:
        virtual BOOL OnInitDialog();
        virtual void OnOK();
        afx_msg void OnDblclkListObjects(NMHDR* pNMHDR, LRESULT* pResult);
+       afx_msg void OnButtonNone();
        //}}AFX_MSG
        DECLARE_MESSAGE_MAP()
 private:
index af08fdb..23e6d52 100644 (file)
@@ -2,23 +2,23 @@
 
 [General Info]
 Version=1
-LastClass=CCreateNetSrvDlg
-LastTemplate=CDialog
+LastClass=CNodePropsPolling
+LastTemplate=CPropertyPage
 NewFileInclude1=#include "stdafx.h"
 NewFileInclude2=#include "nxcon.h"
 LastPage=0
 
-ClassCount=78
+ClassCount=80
 Class1=CConsoleApp
 Class3=CMainFrame
 Class4=CChildFrame
 Class7=CEventBrowser
 Class9=CMapView
 
-ResourceCount=111
-Resource1=IDD_SELECT_USER (English (U.S.))
+ResourceCount=113
+Resource1=IDD_DATA_QUERY (English (U.S.))
 Resource2=IDD_OBJECT_NODE_GENERAL
-Resource3=IDD_CREATE_NODE (English (U.S.))
+Resource3=IDD_ABOUTBOX (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_MIB_BROWSER (English (U.S.))
-Resource10=IDD_DATA_QUERY (English (U.S.))
-Resource11=IDA_NETMAP (English (U.S.))
+Resource9=IDD_OBJECT_NETSRV_GENERAL (English (U.S.))
+Resource10=IDD_OBJECT_CAPS (English (U.S.))
+Resource11=IDD_SELECT_OBJECT (English (U.S.))
 Resource12=IDR_CTRLPANEL (English (U.S.))
 Resource13=IDR_EVENTS (English (U.S.))
 Resource14=IDR_MAPFRAME (English (U.S.))
@@ -42,33 +42,33 @@ Resource15=IDR_OBJECTS (English (U.S.))
 Resource16=IDD_DUMMY (English (U.S.))
 Class14=CEventEditor
 Class15=CEditEventDlg
-Resource17=IDD_REQUEST_PROCESSING (English (U.S.))
+Resource17=IDD_NEW_ACTION (English (U.S.))
 Class16=CDebugFrame
-Resource18=IDD_ABOUTBOX (English (U.S.))
+Resource18=IDD_DCI_COLLECTION (English (U.S.))
 Resource19=IDD_OBJECT_PROPERTIES (English (U.S.))
 Resource20=IDD_SELECT_EVENT
 Class17=CObjectPreview
-Resource21=IDD_CP_GENERAL (English (U.S.))
+Resource21=IDA_EVENT_EDITOR (English (U.S.))
 Class18=CToolBox
 Class19=CObjectInfoBox
 Class20=CObjectSearchBox
-Resource22=IDD_DCI_THRESHOLDS (English (U.S.))
+Resource22=IDD_SELECT_AGENT_PARAM (English (U.S.))
 Class21=CEditBox
 Class22=COPGeneral
 Class23=CNodePropsGeneral
-Resource23=IDA_EPP (English (U.S.))
+Resource23=IDD_THRESHOLD (English (U.S.))
 Class24=CObjectPropCaps
 Class25=CObjectPropSheet
 Resource24=IDA_MDI_DEFAULT
 Class26=CRequestProcessingDlg
-Resource25=IDA_ALARM_BROWSER (English (U.S.))
+Resource25=IDD_MIB_BROWSER (English (U.S.))
 Resource26=IDD_PROGRESS (English (U.S.))
 Resource27=IDD_EDIT_RULE_ALARM
-Resource28=IDD_OBJECT_NODE_GENERAL (English (U.S.))
+Resource28=IDD_GROUP_PROPERTIES (English (U.S.))
 Class27=CObjectPropsGeneral
-Resource29=IDD_EDIT_TRAP_ARG (English (U.S.))
+Resource29=IDD_OBJECT_GENERAL (English (U.S.))
 Class28=CObjectPropsSecurity
-Resource30=IDD_EDIT_RULE_SEVERITY (English (U.S.))
+Resource30=IDA_ALARM_BROWSER (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_DCI_TRANSFORM (English (U.S.))
+Resource37=IDD_LOGIN (English (U.S.))
 Resource38=IDD_ABOUTBOX
 Class33=CGroupPropDlg
 Resource39=IDD_CP_GENERAL
 Resource40=IDA_TRAP_EDITOR
 Resource41=IDM_VIEW_SPECIFIC
-Resource42=IDD_USER_PROPERTIES (English (U.S.))
+Resource42=IDD_ACTION_PROPERTIES (English (U.S.))
 Class34=CPasswordChangeDlg
 Class35=CNodeSummary
 Class36=CNetSummaryFrame
 Class37=CDataCollectionEditor
-Resource43=IDD_SELECT_EVENT (English (U.S.))
+Resource43=IDA_OBJECT_BROWSER (English (U.S.))
 Class38=CDCIPropPage
-Resource44=IDD_OBJECT_CAPS (English (U.S.))
+Resource44=IDD_CP_GENERAL (English (U.S.))
 Class39=CDCIDataView
-Resource45=IDD_OBJECT_SECURITY (English (U.S.))
+Resource45=IDA_GRAPH (English (U.S.))
 Class40=CGraph
 Class41=CGraphFrame
 Class42=CDCIThresholdsPage
-Resource46=IDD_CREATE_TEMPLATE (English (U.S.))
-Resource47=IDA_TRAP_EDITOR (English (U.S.))
+Resource46=IDD_OBJECT_NODE_GENERAL (English (U.S.))
+Resource47=IDD_OBJECT_PRESENTATION (English (U.S.))
 Resource48=IDM_CONTEXT
 Class43=CThresholdDlg
-Resource49=IDD_LOGIN (English (U.S.))
+Resource49=IDD_SELECT_ACTION (English (U.S.))
 Resource50=IDD_EDIT_TRAP_ARG
 Class44=CMIBBrowserDlg
 Class45=CEventPolicyEditor
 Class46=CRuleList
 Class47=CRuleHeader
-Resource51=IDD_CREATE_TG (English (U.S.))
+Resource51=IDD_EDIT_EVENT (English (U.S.))
 Resource52=IDD_CREATE_NODE
 Class48=CObjectSelDlg
 Resource53=IDD_OBJECT_CAPS
@@ -117,22 +117,22 @@ Class49=CRuleCommentDlg
 Resource55=IDD_DCI_COLLECTION
 Class50=CEventSelDlg
 Resource56=IDD_DATA_QUERY
-Resource57=IDA_GRAPH (English (U.S.))
+Resource57=IDD_EDIT_RULE_SEVERITY (English (U.S.))
 Resource58=IDD_CREATE_TG
-Resource59=IDA_OBJECT_BROWSER (English (U.S.))
-Resource60=IDD_NEW_USER (English (U.S.))
+Resource59=IDD_CREATE_CONTAINER (English (U.S.))
+Resource60=IDD_EDIT_TRAP_ARG (English (U.S.))
 Class51=CObjectPropsPresentation
-Resource61=IDD_DCI_COLLECTION (English (U.S.))
+Resource61=IDD_SELECT_INTERNAL_ITEM (English (U.S.))
 Resource62=IDD_EDIT_RULE_COMMENT
 Class52=CRuleSeverityDlg
 Resource63=IDD_ACTION_PROPERTIES
 Class53=CRuleAlarmDlg
 Class54=CAlarmBrowser
-Resource64=IDA_MDI_DEFAULT (English (U.S.))
+Resource64=IDD_SET_PASSWORD (English (U.S.))
 Resource65=IDD_DCI_TRANSFORM
-Resource66=IDD_SELECT_OBJECT (English (U.S.))
-Resource67=IDD_OBJECT_GENERAL (English (U.S.))
-Resource68=IDD_EDIT_EVENT (English (U.S.))
+Resource66=IDR_MAINFRAME (English (U.S.))
+Resource67=IDD_EDIT_TRAP (English (U.S.))
+Resource68=IDD_DCI_TRANSFORM (English (U.S.))
 Class55=CConsolePropsGeneral
 Class56=CActionEditor
 Resource69=IDA_ACTION_EDITOR
@@ -143,18 +143,18 @@ Class58=CEditActionDlg
 Resource72=IDA_NETMAP
 Class59=CActionSelDlg
 Resource73=IDD_MIB_BROWSER
-Resource74=IDD_GROUP_PROPERTIES (English (U.S.))
-Resource75=IDD_THRESHOLD (English (U.S.))
+Resource74=IDD_CREATE_TG (English (U.S.))
+Resource75=IDD_CREATE_NETSRV (English (U.S.))
 Resource76=IDD_USER_PROPERTIES
 Class60=CCreateObjectDlg
 Class61=CCreateContainerDlg
 Resource77=IDR_MAINFRAME
 Class62=CCreateNodeDlg
-Resource78=IDD_EDIT_TRAP (English (U.S.))
-Resource79=IDD_OBJECT_PRESENTATION (English (U.S.))
-Resource80=IDA_PACKAGE_MGR (English (U.S.))
+Resource78=IDD_REQUEST_PROCESSING (English (U.S.))
+Resource79=IDA_EPP (English (U.S.))
+Resource80=IDD_EDIT_RULE_ALARM (English (U.S.))
 Class63=CDCITransformPage
-Resource81=IDD_EDIT_RULE_COMMENT (English (U.S.))
+Resource81=IDA_MDI_DEFAULT (English (U.S.))
 Class64=CPollNodeDlg
 Resource82=IDD_POLL_NODE (English (U.S.))
 Class65=CNodePoller
@@ -180,26 +180,30 @@ Class73=CColorSelector
 Class74=CPackageMgr
 Resource94=IDD_GROUP_PROPERTIES
 Resource95=IDD_GRAPH_PROPERTIES
-Resource96=IDD_GRAPH_PROPERTIES (English (U.S.))
-Resource97=IDD_SELECT_INTERNAL_ITEM (English (U.S.))
-Resource98=IDD_SELECT_AGENT_PARAM (English (U.S.))
-Resource99=IDD_INPUT_BOX (English (U.S.))
-Resource100=IDR_MAINFRAME (English (U.S.))
-Resource101=IDD_SET_PASSWORD (English (U.S.))
-Resource102=IDD_NEW_ACTION (English (U.S.))
-Resource103=IDD_ACTION_PROPERTIES (English (U.S.))
-Resource104=IDD_CREATE_CONTAINER (English (U.S.))
+Resource96=IDD_OBJECT_SECURITY (English (U.S.))
+Resource97=IDD_SELECT_USER (English (U.S.))
+Resource98=IDD_NEW_USER (English (U.S.))
+Resource99=IDD_USER_PROPERTIES (English (U.S.))
+Resource100=IDD_CREATE_NODE (English (U.S.))
+Resource101=IDD_CREATE_TEMPLATE (English (U.S.))
+Resource102=IDA_ACTION_EDITOR (English (U.S.))
+Resource103=IDA_TRAP_EDITOR (English (U.S.))
+Resource104=IDA_PACKAGE_MGR (English (U.S.))
 Resource105=IDM_CONTEXT (English (U.S.))
 Resource106=IDM_VIEW_SPECIFIC (English (U.S.))
-Resource107=IDA_ACTION_EDITOR (English (U.S.))
+Resource107=IDD_SELECT_EVENT (English (U.S.))
 Class75=CInternalItemSelDlg
-Resource108=IDD_SELECT_ACTION (English (U.S.))
+Resource108=IDD_GRAPH_PROPERTIES (English (U.S.))
 Class76=CAgentParamSelDlg
-Resource109=IDA_EVENT_EDITOR (English (U.S.))
+Resource109=IDD_EDIT_RULE_COMMENT (English (U.S.))
 Class77=CInputBox
-Resource110=IDD_EDIT_RULE_ALARM (English (U.S.))
+Resource110=IDA_NETMAP (English (U.S.))
 Class78=CCreateNetSrvDlg
-Resource111=IDD_CREATE_NETSRV (English (U.S.))
+Resource111=IDD_DCI_THRESHOLDS (English (U.S.))
+Class79=CNetSrvPropsGeneral
+Resource112=IDD_INPUT_BOX (English (U.S.))
+Class80=CNodePropsPolling
+Resource113=IDD_OBJECT_NODE_POLL (English (U.S.))
 
 [CLS:CConsoleApp]
 Type=0
@@ -2909,3 +2913,62 @@ Filter=D
 LastObject=CCreateNetSrvDlg
 VirtualFilter=dWC
 
+[DLG:IDD_OBJECT_NETSRV_GENERAL (English (U.S.))]
+Type=1
+Class=CNetSrvPropsGeneral
+ControlCount=26
+Control1=IDC_EDIT_NAME,edit,1350631552
+Control2=IDC_EDIT_ID,edit,1350633600
+Control3=IDC_COMBO_TYPE,combobox,1344340227
+Control4=IDC_EDIT_PORT,edit,1350639744
+Control5=IDC_EDIT_IPADDR,edit,1350633600
+Control6=IDC_SELECT_IP,button,1342242816
+Control7=IDC_RADIO_TCP,button,1342373897
+Control8=IDC_RADIO_UDP,button,1342177289
+Control9=IDC_RADIO_ICMP,button,1342177289
+Control10=IDC_RADIO_OTHER,button,1342177289
+Control11=IDC_EDIT_PROTO,edit,1350639744
+Control12=IDC_EDIT_POLLER,edit,1350633600
+Control13=IDC_SELECT_POLLER,button,1342242816
+Control14=IDC_EDIT_REQUEST,edit,1350631552
+Control15=IDC_EDIT_RESPONCE,edit,1350631552
+Control16=IDC_STATIC,static,1342308352
+Control17=IDC_STATIC,static,1342308352
+Control18=IDC_STATIC,static,1342308352
+Control19=IDC_STATIC,button,1342177287
+Control20=IDC_STATIC,static,1342308352
+Control21=IDC_STATIC,static,1342308352
+Control22=IDC_STATIC,button,1342177287
+Control23=IDC_STATIC,button,1342177287
+Control24=IDC_STATIC,static,1342308352
+Control25=IDC_STATIC,static,1342308352
+Control26=IDC_STATIC,button,1342177287
+
+[CLS:CNetSrvPropsGeneral]
+Type=0
+HeaderFile=NetSrvPropsGeneral.h
+ImplementationFile=NetSrvPropsGeneral.cpp
+BaseClass=CPropertyPage
+Filter=D
+VirtualFilter=idWC
+LastObject=CNetSrvPropsGeneral
+
+[DLG:IDD_OBJECT_NODE_POLL (English (U.S.))]
+Type=1
+Class=CNodePropsPolling
+ControlCount=5
+Control1=IDC_EDIT_POLLER,edit,1350633600
+Control2=IDC_SELECT_POLLER,button,1342242816
+Control3=IDC_STATIC,button,1342177287
+Control4=IDC_STATIC,static,1342308352
+Control5=IDC_STATIC,static,1342308352
+
+[CLS:CNodePropsPolling]
+Type=0
+HeaderFile=NodePropsPolling.h
+ImplementationFile=NodePropsPolling.cpp
+BaseClass=CPropertyPage
+Filter=D
+LastObject=CNodePropsPolling
+VirtualFilter=idWC
+
index 9c18d7e..50fad9e 100644 (file)
@@ -13,6 +13,8 @@
 #include "CreateNetSrvDlg.h"
 #include "NodePoller.h"
 #include "MIBBrowserDlg.h"
+#include "NetSrvPropsGeneral.h"
+#include "NodePropsPolling.h"
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -813,44 +815,60 @@ void CConsoleApp::ObjectProperties(DWORD dwObjectId)
 {
        CObjectPropSheet wndPropSheet("Object Properties", GetMainWnd(), 0);
    CNodePropsGeneral wndNodeGeneral;
+   CNetSrvPropsGeneral wndNetSrvGeneral;
    CObjectPropsGeneral wndObjectGeneral;
    CObjectPropCaps wndObjectCaps;
    CObjectPropsSecurity wndObjectSecurity;
    CObjectPropsPresentation wndObjectPresentation;
+   CNodePropsPolling wndNodePolling;
    NXC_OBJECT *pObject;
    char szBuffer[32];
 
    pObject = NXCFindObjectById(g_hSession, dwObjectId);
    if (pObject != NULL)
    {
-      // Create "General" tab
-      if (pObject->iClass == OBJECT_NODE)
+      // Create "General" tab and class-specific tabs
+      switch(pObject->iClass)
       {
-         wndNodeGeneral.m_dwObjectId = dwObjectId;
-         wndNodeGeneral.m_strName = pObject->szName;
-         wndNodeGeneral.m_strOID = pObject->node.szObjectId;
-         wndNodeGeneral.m_strPrimaryIp = IpToStr(pObject->dwIpAddr, szBuffer);
-         wndNodeGeneral.m_iAgentPort = (int)pObject->node.wAgentPort;
-         wndNodeGeneral.m_strCommunity = pObject->node.szCommunityString;
-         wndNodeGeneral.m_iAuthType = pObject->node.wAuthMethod;
-         wndNodeGeneral.m_strSecret = pObject->node.szSharedSecret;
-         wndNodeGeneral.m_iSNMPVersion = (pObject->node.wSNMPVersion == SNMP_VERSION_1) ? 0 : 1;
-         wndPropSheet.AddPage(&wndNodeGeneral);
-      }
-      else
-      {
-         wndObjectGeneral.m_dwObjectId = dwObjectId;
-         wndObjectGeneral.m_strClass = g_szObjectClass[pObject->iClass];
-         wndObjectGeneral.m_strName = pObject->szName;
-         wndPropSheet.AddPage(&wndObjectGeneral);
-      }
-
-      // Create tabs specific for node objects
-      if (pObject->iClass == OBJECT_NODE)
-      {
-         // Create "Capabilities" tab
-         wndObjectCaps.m_pObject = pObject;
-         wndPropSheet.AddPage(&wndObjectCaps);
+         case OBJECT_NODE:
+            wndNodeGeneral.m_dwObjectId = dwObjectId;
+            wndNodeGeneral.m_strName = pObject->szName;
+            wndNodeGeneral.m_strOID = pObject->node.szObjectId;
+            wndNodeGeneral.m_strPrimaryIp = IpToStr(pObject->dwIpAddr, szBuffer);
+            wndNodeGeneral.m_iAgentPort = (int)pObject->node.wAgentPort;
+            wndNodeGeneral.m_strCommunity = pObject->node.szCommunityString;
+            wndNodeGeneral.m_iAuthType = pObject->node.wAuthMethod;
+            wndNodeGeneral.m_strSecret = pObject->node.szSharedSecret;
+            wndNodeGeneral.m_iSNMPVersion = (pObject->node.wSNMPVersion == SNMP_VERSION_1) ? 0 : 1;
+            wndPropSheet.AddPage(&wndNodeGeneral);
+
+            // Create "Polling" tab
+            wndNodePolling.m_dwPollerNode = pObject->node.dwPollerNode;
+            wndPropSheet.AddPage(&wndNodePolling);
+
+            // Create "Capabilities" tab
+            wndObjectCaps.m_pObject = pObject;
+            wndPropSheet.AddPage(&wndObjectCaps);
+            break;
+         case OBJECT_NETWORKSERVICE:
+            wndNetSrvGeneral.m_pObject = pObject;
+            wndNetSrvGeneral.m_dwObjectId = dwObjectId;
+            wndNetSrvGeneral.m_strName = pObject->szName;
+            wndNetSrvGeneral.m_iServiceType = pObject->netsrv.iServiceType;
+            wndNetSrvGeneral.m_iPort = pObject->netsrv.wPort;
+            wndNetSrvGeneral.m_iProto = pObject->netsrv.wProto;
+            wndNetSrvGeneral.m_strRequest = pObject->netsrv.pszRequest;
+            wndNetSrvGeneral.m_strResponce = pObject->netsrv.pszResponce;
+            wndNetSrvGeneral.m_dwIpAddr = pObject->dwIpAddr;
+            wndNetSrvGeneral.m_dwPollerNode = pObject->netsrv.dwPollerNode;
+            wndPropSheet.AddPage(&wndNetSrvGeneral);
+            break;
+         default:
+            wndObjectGeneral.m_dwObjectId = dwObjectId;
+            wndObjectGeneral.m_strClass = g_szObjectClass[pObject->iClass];
+            wndObjectGeneral.m_strName = pObject->szName;
+            wndPropSheet.AddPage(&wndObjectGeneral);
+            break;
       }
 
       // Create "Security" tab
index fe7c895..49cd022 100644 (file)
@@ -265,6 +265,10 @@ SOURCE=.\MIBBrowserDlg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\NetSrvPropsGeneral.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\NetSummaryFrame.cpp
 # End Source File
 # Begin Source File
@@ -570,6 +574,10 @@ SOURCE=.\MIBBrowserDlg.h
 # End Source File
 # Begin Source File
 
+SOURCE=.\NetSrvPropsGeneral.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\NetSummaryFrame.h
 # End Source File
 # Begin Source File