- Alarm browser added to wx console
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 23 Jul 2007 06:39:13 +0000 (06:39 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 23 Jul 2007 06:39:13 +0000 (06:39 +0000)
- Overview page implemeted in object browser

51 files changed:
.gitattributes
netxms.dsw
src/client/console/include/nxmc_api.h
src/client/console/libnxmc/alarms.cpp [new file with mode: 0644]
src/client/console/libnxmc/heading.cpp [copied from src/client/console/libnxmc/libnxmc.h with 56% similarity]
src/client/console/libnxmc/heading.h [copied from src/client/console/plugins/ObjectBrowser/objview.cpp with 66% similarity]
src/client/console/libnxmc/image.cpp
src/client/console/libnxmc/libnxmc.dsp
src/client/console/libnxmc/libnxmc.h
src/client/console/libnxmc/main.cpp
src/client/console/libnxmc/tools.cpp [new file with mode: 0644]
src/client/console/nxmc/comm.cpp
src/client/console/nxmc/mainfrm.cpp
src/client/console/nxmc/mainfrm.h
src/client/console/nxmc/nxmc.cpp
src/client/console/nxmc/nxmc.h
src/client/console/nxmc/rc/icons/small/Makefile.am
src/client/console/nxmc/rc/icons/small/acknowledged.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/critical.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/disabled.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/information.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/major.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/minor.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/normal.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/outstanding.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/service_root.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/template_group.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/terminated.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/testing.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/unknown.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/unmanaged.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/vpn_connector.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/warning.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/icons/small/zone.xpm [new file with mode: 0644]
src/client/console/nxmc/rc/manual.xrc
src/client/console/plugins/AlarmBrowser/AlarmBrowser.rc [new file with mode: 0644]
src/client/console/plugins/AlarmBrowser/Makefile.am [new file with mode: 0644]
src/client/console/plugins/AlarmBrowser/alarm_browser.h [copied from src/client/console/libnxmc/libnxmc.h with 53% similarity]
src/client/console/plugins/AlarmBrowser/browser.cpp [new file with mode: 0644]
src/client/console/plugins/AlarmBrowser/main.cpp [new file with mode: 0644]
src/client/console/plugins/AlarmBrowser/mcpAlarmBrowser.dsp [copied from src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp with 61% similarity]
src/client/console/plugins/AlarmBrowser/rc/AlarmBrowser.xrc [new file with mode: 0644]
src/client/console/plugins/AlarmBrowser/rc/Makefile.am [copied from src/client/console/nxmc/rc/icons/small/Makefile.am with 72% similarity]
src/client/console/plugins/AlarmBrowser/resource.h [new file with mode: 0644]
src/client/console/plugins/AlarmBrowser/view.cpp [new file with mode: 0644]
src/client/console/plugins/Makefile.am
src/client/console/plugins/ObjectBrowser/browser.cpp
src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp
src/client/console/plugins/ObjectBrowser/object_browser.h
src/client/console/plugins/ObjectBrowser/objview.cpp
src/client/console/plugins/ObjectBrowser/overview.cpp [new file with mode: 0644]

index 05e29e2..822eea2 100644 (file)
@@ -435,12 +435,16 @@ src/client/console/Makefile.am -text
 src/client/console/include/Makefile.am -text
 src/client/console/include/nxmc_api.h -text
 src/client/console/libnxmc/Makefile.am -text
+src/client/console/libnxmc/alarms.cpp -text
+src/client/console/libnxmc/heading.cpp -text
+src/client/console/libnxmc/heading.h -text
 src/client/console/libnxmc/image.cpp -text
 src/client/console/libnxmc/libnxmc.dsp -text
 src/client/console/libnxmc/libnxmc.h -text
 src/client/console/libnxmc/main.cpp -text
 src/client/console/libnxmc/nxview.cpp -text
 src/client/console/libnxmc/nxview.h -text
+src/client/console/libnxmc/tools.cpp -text
 src/client/console/libnxmc/view.cpp -text
 src/client/console/libnxmc/viewtracker.cpp -text
 src/client/console/nxmc/Makefile.am -text
@@ -463,22 +467,49 @@ src/client/console/nxmc/plugins.cpp -text
 src/client/console/nxmc/rc/Makefile.am -text
 src/client/console/nxmc/rc/icons/Makefile.am -text
 src/client/console/nxmc/rc/icons/small/Makefile.am -text
+src/client/console/nxmc/rc/icons/small/acknowledged.xpm -text
 src/client/console/nxmc/rc/icons/small/cluster.xpm -text
 src/client/console/nxmc/rc/icons/small/condition.xpm -text
 src/client/console/nxmc/rc/icons/small/container.xpm -text
+src/client/console/nxmc/rc/icons/small/critical.xpm -text
+src/client/console/nxmc/rc/icons/small/disabled.xpm -text
+src/client/console/nxmc/rc/icons/small/information.xpm -text
 src/client/console/nxmc/rc/icons/small/interface.xpm -text
+src/client/console/nxmc/rc/icons/small/major.xpm -text
+src/client/console/nxmc/rc/icons/small/minor.xpm -text
 src/client/console/nxmc/rc/icons/small/network.xpm -text
 src/client/console/nxmc/rc/icons/small/network_service.xpm -text
 src/client/console/nxmc/rc/icons/small/node.xpm -text
+src/client/console/nxmc/rc/icons/small/normal.xpm -text
+src/client/console/nxmc/rc/icons/small/outstanding.xpm -text
+src/client/console/nxmc/rc/icons/small/service_root.xpm -text
 src/client/console/nxmc/rc/icons/small/subnet.xpm -text
 src/client/console/nxmc/rc/icons/small/template.xpm -text
+src/client/console/nxmc/rc/icons/small/template_group.xpm -text
 src/client/console/nxmc/rc/icons/small/template_root.xpm -text
+src/client/console/nxmc/rc/icons/small/terminated.xpm -text
+src/client/console/nxmc/rc/icons/small/testing.xpm -text
+src/client/console/nxmc/rc/icons/small/unknown.xpm -text
+src/client/console/nxmc/rc/icons/small/unmanaged.xpm -text
+src/client/console/nxmc/rc/icons/small/vpn_connector.xpm -text
+src/client/console/nxmc/rc/icons/small/warning.xpm -text
+src/client/console/nxmc/rc/icons/small/zone.xpm -text
 src/client/console/nxmc/rc/login.png -text
 src/client/console/nxmc/rc/manual.xrc -text
 src/client/console/nxmc/rc/nxmc.fbp -text
 src/client/console/nxmc/rc/processing.png -text
 src/client/console/nxmc/rc/wxfb_code.xrc -text
 src/client/console/nxmc/resource.h -text
+src/client/console/plugins/AlarmBrowser/AlarmBrowser.rc -text
+src/client/console/plugins/AlarmBrowser/Makefile.am -text
+src/client/console/plugins/AlarmBrowser/alarm_browser.h -text
+src/client/console/plugins/AlarmBrowser/browser.cpp -text
+src/client/console/plugins/AlarmBrowser/main.cpp -text
+src/client/console/plugins/AlarmBrowser/mcpAlarmBrowser.dsp -text
+src/client/console/plugins/AlarmBrowser/rc/AlarmBrowser.xrc -text
+src/client/console/plugins/AlarmBrowser/rc/Makefile.am -text
+src/client/console/plugins/AlarmBrowser/resource.h -text
+src/client/console/plugins/AlarmBrowser/view.cpp -text
 src/client/console/plugins/Makefile.am -text
 src/client/console/plugins/ObjectBrowser/Makefile.am -text
 src/client/console/plugins/ObjectBrowser/browser.cpp -text
@@ -486,6 +517,7 @@ src/client/console/plugins/ObjectBrowser/main.cpp -text
 src/client/console/plugins/ObjectBrowser/mcpObjectBrowser.dsp -text
 src/client/console/plugins/ObjectBrowser/object_browser.h -text
 src/client/console/plugins/ObjectBrowser/objview.cpp -text
+src/client/console/plugins/ObjectBrowser/overview.cpp -text
 src/console/Makefile.am -text
 src/console/PocketPC/AlarmView.cpp -text
 src/console/PocketPC/AlarmView.h -text
index 2d2522d..8143009 100644 (file)
@@ -168,6 +168,27 @@ Package=<4>
 
 ###############################################################################
 
+Project: "mcpAlarmBrowser"=.\src\client\console\plugins\AlarmBrowser\mcpAlarmBrowser.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name libnetxms
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxcl
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name libnxmc
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Project: "mcpObjectBrowser"=.\src\client\console\plugins\ObjectBrowser\mcpObjectBrowser.dsp - Package Owner=<4>
 
 Package=<5>
index 43b8aad..4ecceac 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _nxmc_api_h_
 #define _nxmc_api_h_
 
+#pragma warning(disable: 4284)
+
 #define WXUSINGDLL
 
 #ifdef _WIN32
@@ -24,6 +26,7 @@
 #include <wx/dynarray.h>
 #include <wx/splitter.h>
 #include <wx/treectrl.h>
+#include <wx/listctrl.h>
 #include <wx/notebook.h>
 #include <wx/imaglist.h>
 #endif
 //
 
 #define IMAGE_LIST_OBJECTS_SMALL               1
+#define IMAGE_LIST_OBJECTS_NORMAL   2
+#define IMAGE_LIST_STATUS_SMALL     3
+
+
+//
+// Timestamp formats
+//
+
+#define TS_LONG_DATE_TIME  0
+#define TS_LONG_TIME       1
+#define TS_DAY_AND_MONTH   2
+#define TS_MONTH           3
 
 
 //
 #endif
 
 
+//
+// DLL instance
+//
+
+#ifdef _WIN32
+#define NXMC_LIB_INSTANCE                              HINSTANCE
+#define NXMC_LIB_INSTANCE_ARG(x)               (x)
+#else
+#define NXMC_LIB_INSTANCE                              int
+#define NXMC_LIB_INSTANCE_ARG(x)               0
+#endif
+
+
 //
 // Plugin handle
 //
@@ -164,6 +192,7 @@ typedef struct
 
 #define wxID_TREE_CTRL         (wxID_HIGHEST + 500)
 #define wxID_NOTEBOOK_CTRL     (wxID_HIGHEST + 501)
+#define wxID_LIST_CTRL         (wxID_HIGHEST + 502)
 
 
 //
@@ -229,11 +258,30 @@ WX_DECLARE_OBJARRAY(nxmcItemRegistration, nxmcArrayOfRegItems);
 #define VIEWAREA_DETACHED              3
 
 
+//
+// Code translation structure
+//
+
+struct CODE_TO_TEXT
+{
+   int code;
+   TCHAR *text;
+};
+
+
+//
+// Additional array types
+//
+
+WX_DEFINE_ARRAY(NXC_ALARM*, nxArrayOfAlarms);
+
+
 //
 // Classes
 //
 
 #include "../libnxmc/nxview.h"
+#include "../libnxmc/heading.h"
 
 
 //
@@ -245,6 +293,8 @@ void LIBNXMC_EXPORTABLE NXMCInitializationComplete();
 
 nxmcArrayOfRegItems LIBNXMC_EXPORTABLE &NXMCGetRegistrations();
 
+bool LIBNXMC_EXPORTABLE NXMCLoadResources(const TCHAR *name, NXMC_LIB_INSTANCE instance, TCHAR *resName);
+
 bool LIBNXMC_EXPORTABLE NXMCAddControlPanelItem(NXMC_PLUGIN_HANDLE handle, const TCHAR *name, int id);
 bool LIBNXMC_EXPORTABLE NXMCAddViewMenuItem(NXMC_PLUGIN_HANDLE handle, const TCHAR *name, int id);
 
@@ -260,11 +310,23 @@ void LIBNXMC_EXPORTABLE UnregisterUniqueView(const TCHAR *name);
 nxView LIBNXMC_EXPORTABLE *FindUniqueView(const TCHAR *name);
 void LIBNXMC_EXPORTABLE ActivateView(nxView *view);
 
+const TCHAR LIBNXMC_EXPORTABLE *NXMCCodeToText(int code, CODE_TO_TEXT *translator, const TCHAR *defaultText);
 const TCHAR LIBNXMC_EXPORTABLE *NXMCGetStatusText(int status);
 const TCHAR LIBNXMC_EXPORTABLE *NXMCGetStatusTextSmall(int status);
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetAlarmStateName(int state);
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetClassName(int objClass);
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetIfTypeName(int type);
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetNodeTypeName(int type);
 
 void LIBNXMC_EXPORTABLE NXMCInitImageLists();
 wxImageList LIBNXMC_EXPORTABLE *NXMCGetImageList(int list);
+wxImageList LIBNXMC_EXPORTABLE *NXMCGetImageListCopy(int list);
 
-#endif
+void LIBNXMC_EXPORTABLE NXMCInitAlarms(DWORD count, NXC_ALARM *list);
+void LIBNXMC_EXPORTABLE NXMCUpdateAlarms(DWORD code, NXC_ALARM *data);
+nxArrayOfAlarms LIBNXMC_EXPORTABLE *NXMCGetAlarmList();
+void LIBNXMC_EXPORTABLE NXMCUnlockAlarmList();
+
+TCHAR LIBNXMC_EXPORTABLE *NXMCFormatTimeStamp(time_t timeStamp, TCHAR *buffer, int type);
 
+#endif
diff --git a/src/client/console/libnxmc/alarms.cpp b/src/client/console/libnxmc/alarms.cpp
new file mode 100644 (file)
index 0000000..c68873b
--- /dev/null
@@ -0,0 +1,121 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: alarms.cpp
+**
+**/
+
+#include "libnxmc.h"
+
+
+//
+// Static data
+//
+
+static nxArrayOfAlarms s_alarmList;
+static MUTEX s_mutexAlarmAccess = INVALID_MUTEX_HANDLE;
+
+
+//
+// Initialize alarm list
+//
+
+void LIBNXMC_EXPORTABLE NXMCInitAlarms(DWORD count, NXC_ALARM *list)
+{
+       DWORD i;
+
+       s_mutexAlarmAccess = MutexCreate();
+       for(i = 0; i < count; i++)
+               s_alarmList.Add((NXC_ALARM *)nx_memdup(&list[i], sizeof(NXC_ALARM)));
+}
+
+
+//
+// Find alarm in list
+//
+
+static int FindAlarm(DWORD id)
+{
+       int i;
+
+       for(i = 0; i < (int)s_alarmList.GetCount(); i++)
+               if (s_alarmList[i]->dwAlarmId == id)
+                       return i;
+       return wxNOT_FOUND;
+}
+
+
+//
+// Update alarm list
+//
+
+void LIBNXMC_EXPORTABLE NXMCUpdateAlarms(DWORD code, NXC_ALARM *data)
+{
+       int index;
+
+       MutexLock(s_mutexAlarmAccess, INFINITE);
+       switch(code)
+       {
+               case NX_NOTIFY_NEW_ALARM:
+                       s_alarmList.Add((NXC_ALARM *)nx_memdup(data, sizeof(NXC_ALARM)));
+                       break;
+      case NX_NOTIFY_ALARM_DELETED:
+      case NX_NOTIFY_ALARM_TERMINATED:
+                       index = FindAlarm(data->dwAlarmId);
+                       if (index != wxNOT_FOUND)
+                       {
+                               free(s_alarmList[index]);
+                               s_alarmList.RemoveAt(index);
+                       }
+                       break;
+      case NX_NOTIFY_ALARM_CHANGED:
+                       index = FindAlarm(data->dwAlarmId);
+                       if (index != wxNOT_FOUND)
+                       {
+                               memcpy(s_alarmList[index], data, sizeof(NXC_ALARM));
+                       }
+                       else
+                       {
+                               s_alarmList.Add((NXC_ALARM *)nx_memdup(data, sizeof(NXC_ALARM)));
+                       }
+                       break;
+       }
+       MutexUnlock(s_mutexAlarmAccess);
+}
+
+
+//
+// Get alarm list
+//
+
+nxArrayOfAlarms LIBNXMC_EXPORTABLE *NXMCGetAlarmList()
+{
+       MutexLock(s_mutexAlarmAccess, INFINITE);
+       return &s_alarmList;
+}
+
+
+//
+// Unlock alarm list
+//
+
+void LIBNXMC_EXPORTABLE NXMCUnlockAlarmList()
+{
+       MutexUnlock(s_mutexAlarmAccess);
+}
similarity index 56%
copy from src/client/console/libnxmc/libnxmc.h
copy to src/client/console/libnxmc/heading.cpp
index 8b4aac5..13bb541 100644 (file)
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: libnxmc.h
+** File: heading.cpp
 **
 **/
 
-#ifndef _libnxmc_h_
-#define _libnxmc_h_
+#include "libnxmc.h"
 
-#define WXUSINGDLL
 
-#include <nms_common.h>
-#include <nms_util.h>
-#include <nxclapi.h>
-
-#ifdef _WIN32
-#include <wx/msw/winundef.h>
-#endif
-
-#include <wx/wx.h>
-
-#ifndef WX_PRECOMP
-#include <wx/app.h>
-#include <wx/frame.h>
-#include <wx/artprov.h>
-#include <wx/xrc/xmlres.h>
-#include <wx/filesys.h>
-#include <wx/fs_arc.h>
-#include <wx/fs_mem.h>
-#include <wx/aui/aui.h>
-#include <wx/dir.h>
-#endif
+//
+// Event table
+//
 
-#include <nxmc_api.h>
+BEGIN_EVENT_TABLE(nxHeading, wxWindow)
+       EVT_PAINT(nxHeading::OnPaint)
+END_EVENT_TABLE()
 
 
 //
-// Hash map types
+// Constructor
 //
 
-WX_DECLARE_STRING_HASH_MAP(nxView*, nxViewHash);
+nxHeading::nxHeading(wxWindow *parent, const wxString &text, const wxPoint &pos, const wxSize &size)
+          : wxWindow(parent, wxID_ANY, pos, size)
+{
+       m_text = text;
+}
 
 
 //
-// Global variables
+// Paint event handler
 //
 
-extern wxAuiNotebook *g_auiNotebook;
-extern wxAuiManager *g_auiManager;
-
+void nxHeading::OnPaint(wxPaintEvent &event)
+{
+       wxPaintDC dc(this);
+       wxSize size = GetClientSize();
 
-#endif
+       dc.DrawLabel(m_text, wxRect(0, 0, size.x, size.y - 3), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+       dc.GradientFillLinear(wxRect(0, size.y - 3, size.x, size.y), wxColor(0, 0, 255), wxColor(128, 128, 255));
+}
@@ -1,6 +1,6 @@
 /* 
 ** NetXMS - Network Management System
-** Portable management console - Object Browser plugin
+** Portable management console - plugin API library
 ** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: objview.cpp
+** File: heading.h
 **
 **/
 
-#include "object_browser.h"
+#ifndef _heading_h_
+#define _heading_h_
 
+class LIBNXMC_EXPORTABLE nxHeading : public wxWindow
+{
+private:
+       wxString m_text;
 
-//
-// Constructor
-//
+public:
+       nxHeading(wxWindow *parent, const wxString &text, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
 
-nxObjectView::nxObjectView(wxWindow *parent)
-             : wxWindow(parent, wxID_ANY)
-{
-       m_notebook = new wxNotebook(this, wxID_NOTEBOOK_CTRL);
-}
+protected:
+       void OnPaint(wxPaintEvent &event);
+
+       DECLARE_EVENT_TABLE();
+};
 
+#endif
index 6f7a7e0..c205a12 100644 (file)
@@ -29,6 +29,8 @@
 //
 
 static wxImageList s_imgObjectsSmall(16, 16);  // Small object images
+static wxImageList s_imgObjectsNormal(32, 32); // Normal object images
+static wxImageList s_imgStatusSmall(16, 16);           // Small status/severity images
 
 
 //
@@ -37,6 +39,7 @@ static wxImageList s_imgObjectsSmall(16, 16); // Small object images
 
 void LIBNXMC_EXPORTABLE NXMCInitImageLists()
 {
+       // Small object icons
        s_imgObjectsSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallUnknown")));
        s_imgObjectsSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallSubnet")));
        s_imgObjectsSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallNode")));
@@ -52,6 +55,17 @@ void LIBNXMC_EXPORTABLE NXMCInitImageLists()
        s_imgObjectsSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallVPNConnector")));
        s_imgObjectsSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallCondition")));
        s_imgObjectsSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallCluster")));
+
+       // Small status/severity icons
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallNormal")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallWarning")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallMinor")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallMajor")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallCritical")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallUnknown")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallUnmanaged")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallDisabled")));
+       s_imgStatusSmall.Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallTesting")));
 }
 
 
@@ -65,6 +79,37 @@ wxImageList LIBNXMC_EXPORTABLE *NXMCGetImageList(int list)
        {
                case IMAGE_LIST_OBJECTS_SMALL:
                        return &s_imgObjectsSmall;
+               case IMAGE_LIST_OBJECTS_NORMAL:
+                       return &s_imgObjectsNormal;
+               case IMAGE_LIST_STATUS_SMALL:
+                       return &s_imgStatusSmall;
        }
        return NULL;
 }
+
+
+//
+// Get copy of image list
+//
+
+wxImageList LIBNXMC_EXPORTABLE *NXMCGetImageListCopy(int list)
+{
+       wxImageList *newList, *origList;
+
+       origList = NXMCGetImageList(list);
+       if (origList != NULL)
+       {
+               int i, w, h, count;
+
+               origList->GetSize(0, w, h);
+               count = origList->GetImageCount();
+               newList = new wxImageList(w, h, true, count);
+               for(i = 0; i < count; i++)
+                       newList->Add(origList->GetIcon(i));
+       }
+       else
+       {
+               newList = NULL;
+       }
+       return newList;
+}
index 3dabd9b..22d9543 100644 (file)
@@ -112,7 +112,7 @@ LINK32=link.exe
 # Begin Special Build Tool
 SOURCE="$(InputPath)"
 PostBuild_Desc=Copy files
-PostBuild_Cmds=copy     Release_UNICODE\libnxmc.dll     C:\NetXMS\bin\ 
+PostBuild_Cmds=copy        Release_UNICODE\libnxmc.dll        C:\NetXMS\bin\ 
 # End Special Build Tool
 
 !ELSEIF  "$(CFG)" == "libnxmc - Win32 Debug UNICODE"
@@ -160,6 +160,14 @@ PostBuild_Cmds=copy Debug_UNICODE\libnxmc.dll ..\..\..\..\bin
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 # Begin Source File
 
+SOURCE=.\alarms.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\heading.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\image.cpp
 # End Source File
 # Begin Source File
@@ -172,6 +180,10 @@ SOURCE=.\nxview.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\tools.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\view.cpp
 # End Source File
 # Begin Source File
@@ -184,6 +196,10 @@ SOURCE=.\viewtracker.cpp
 # PROP Default_Filter "h;hpp;hxx;hm;inl"
 # Begin Source File
 
+SOURCE=.\heading.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\libnxmc.h
 # End Source File
 # Begin Source File
index 8b4aac5..775f68a 100644 (file)
@@ -29,6 +29,7 @@
 #include <nms_common.h>
 #include <nms_util.h>
 #include <nxclapi.h>
+#include <nxnt.h>
 
 #ifdef _WIN32
 #include <wx/msw/winundef.h>
@@ -52,7 +53,7 @@
 
 
 //
-// Hash map types
+// Hash map and array types
 //
 
 WX_DECLARE_STRING_HASH_MAP(nxView*, nxViewHash);
index e468164..1d19f36 100644 (file)
@@ -199,6 +199,126 @@ const TCHAR LIBNXMC_EXPORTABLE *NXMCGetStatusTextSmall(int status)
 }
 
 
+//
+// Get alarm state name
+//
+
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetAlarmStateName(int state)
+{
+       static TCHAR *texts[] =
+       {
+               _T("Outstanding"), _T("Acknowledged"), _T("Terminated")
+       };
+       
+       return ((state >= 0) && (state < 3)) ? texts[state] : _T("Invalid");
+}
+
+
+//
+// Get object class name
+//
+
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetClassName(int objClass)
+{
+       static TCHAR *names[] = { _T("Generic"), _T("Subnet"), _T("Node"), _T("Interface"), _T("Network"), 
+                             _T("Container"), _T("Zone"), _T("ServiceRoot"), _T("Template"), 
+                             _T("TemplateGroup"), _T("TemplateRoot"), _T("NetworkService"),
+                             _T("VPNConnector"), _T("Condition"), _T("Cluster") };
+       
+       return ((objClass >= 0) && (objClass <= OBJECT_CLUSTER)) ? names[objClass] : _T("Unknown");
+}
+
+
+//
+// Get interface type name
+//
+
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetIfTypeName(int type)
+{
+       TCHAR *types[] = 
+       {
+               _T("Unknown"),
+               _T("Other"),
+               _T("Regular 1822"),
+               _T("HDH 1822"),
+               _T("DDN X.25"),
+               _T("RFC877 X.25"),
+               _T("Ethernet CSMA/CD"),
+               _T("ISO 802.3 CSMA/CD"),
+               _T("ISO 802.4 Token Bus"),
+               _T("ISO 802.5 Token Ring"),
+               _T("ISO 802.6 MAN"),
+               _T("StarLan"),
+               _T("PROTEON 10 Mbps"),
+               _T("PROTEON 80 Mbps"),
+               _T("Hyper Channel"),
+               _T("FDDI"),
+               _T("LAPB"),
+               _T("SDLC"),
+               _T("DS1"),
+               _T("E1"),
+               _T("ISDN BRI"),
+               _T("ISDN PRI"),
+               _T("Proprietary Serial Pt-to-Pt"),
+               _T("PPP"),
+               _T("Software Loopback"),
+               _T("EON (CLNP over IP)"),
+               _T("Ethernet 3 Mbps"),
+               _T("NSIP (XNS over IP)"),
+               _T("SLIP"),
+               _T("DS3"),
+               _T("SMDS"),
+               _T("Frame Relay"),
+               _T("RS-232"),
+               _T("PARA"),
+               _T("ArcNet"),
+               _T("ArcNet Plus"),
+               _T("ATM"),
+               _T("MIO X.25"),
+               _T("SONET"),
+               _T("X.25 PLE"),
+               _T("ISO 88022 LLC"),
+               _T("LocalTalk"),
+               _T("SMDS DXI"),
+               _T("Frame Relay Service"),
+               _T("V.35"),
+               _T("HSSI"),
+               _T("HIPPI"),
+               _T("Modem"),
+               _T("AAL5"),
+               _T("SONET PATH"),
+               _T("SONET VT"),
+               _T("SMDS ICIP"),
+               _T("Proprietary Virtual"),
+               _T("Proprietary Multiplexor"),
+               _T("IEEE 802.12"),
+               _T("FibreChannel")
+       };
+       
+       return ((type >= 0) && (type < sizeof(types) / sizeof(TCHAR *))) ? types[type] : _T("Unknown");
+}
+
+
+//
+// Get node type
+//
+
+const TCHAR LIBNXMC_EXPORTABLE *NXMCGetNodeTypeName(int type)
+{
+       CODE_TO_TEXT types[] =
+       {
+               { NODE_TYPE_GENERIC, _T("Generic") },
+               { NODE_TYPE_NORTEL_ACCELAR, _T("Nortel Networks Passport switch") },
+               { NODE_TYPE_NETSCREEN, _T("NetScreen Firewall/VPN") },
+               { NODE_TYPE_NORTEL_BAYSTACK, _T("Nortel Ethernet switch (former BayStack)") },
+               { NODE_TYPE_NORTEL_OPTERA, _T("Nortel Optera Metro switch") },
+               { 0, NULL }    // End of list
+       };
+       
+       return NXMCCodeToText(type, types, _T("Unknown"));
+}
+
+
 //
 // DLL entry point
 //
diff --git a/src/client/console/libnxmc/tools.cpp b/src/client/console/libnxmc/tools.cpp
new file mode 100644 (file)
index 0000000..d38c256
--- /dev/null
@@ -0,0 +1,103 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - plugin API library
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: tools.cpp
+**
+**/
+
+#include "libnxmc.h"
+
+
+//
+// Format time stamp
+//
+
+TCHAR LIBNXMC_EXPORTABLE *NXMCFormatTimeStamp(time_t timeStamp, TCHAR *buffer, int type)
+{
+   struct tm *pt;
+   static TCHAR *format[] = { _T("%d-%b-%Y %H:%M:%S"), _T("%H:%M:%S"), _T("%b/%d"), _T("%b") };
+
+   pt = localtime(&timeStamp);
+       if (pt != NULL)
+               _tcsftime(buffer, 32, format[type], pt);
+       else
+               _tcscpy(buffer, _T("(null)"));
+   return buffer;
+}
+
+
+//
+// Translate given code to text
+//
+
+const TCHAR LIBNXMC_EXPORTABLE *NXMCCodeToText(int code, CODE_TO_TEXT *translator, const TCHAR *defaultText)
+{
+   int i;
+
+   for(i = 0; translator[i].text != NULL; i++)
+      if (translator[i].code == code)
+         return translator[i].text;
+   return defaultText;
+}
+
+
+//
+// Load resource file
+//
+
+bool LIBNXMC_EXPORTABLE NXMCLoadResources(const TCHAR *name, NXMC_LIB_INSTANCE instance, TCHAR *resName)
+{
+       bool success = false;
+#ifdef _WIN32
+       HRSRC hRes;
+       HGLOBAL hMem;
+       void *data;
+
+       hRes = FindResource(instance, resName, _T("XRS"));
+       if (hRes != NULL)
+       {
+               hMem = LoadResource(instance, hRes);
+               if (hMem != NULL)
+               {
+                       data = LockResource(hMem);
+                       if (data != NULL)
+                       {
+                               wxMemoryFSHandler::AddFile(name, data, SizeofResource(instance, hRes));
+                               UnlockResource(hMem);
+                       }
+                       FreeResource(hMem);
+               }
+               else
+               {
+                       wxLogWarning(_T("NXMCLoadResources: cannot load resource %s from executable"), name);
+                       return false;
+               }
+       }
+       else
+       {
+               wxLogWarning(_T("NXMCLoadResources: cannot find resource %s in executable module"), name);
+               return false;
+       }
+       wxString xrsFile = _T("memory:");
+#else
+       wxString xrsFile = wxStandardPaths::Get().GetResourcesDir();
+#endif
+       xrsFile += name;
+       return wxXmlResource::Get()->Load(xrsFile);
+}
index 4688885..f9416e6 100644 (file)
@@ -40,6 +40,33 @@ struct LOGIN_DATA
 };
 
 
+//
+// Client library event handler
+//
+
+static void ClientEventHandler(NXC_SESSION session, DWORD event, DWORD code, void *arg)
+{
+       switch(event)
+       {
+      case NXC_EVENT_NOTIFICATION:
+         switch(code)
+         {
+            case NX_NOTIFY_NEW_ALARM:
+            case NX_NOTIFY_ALARM_DELETED:
+            case NX_NOTIFY_ALARM_CHANGED:
+            case NX_NOTIFY_ALARM_TERMINATED:
+                                       NXMCUpdateAlarms(code, (NXC_ALARM *)arg);
+                                       break;
+                               default:
+                                       break;
+                       }
+                       break;
+               default:
+                       break;
+       }
+}
+
+
 //
 // Login thread
 //
@@ -60,6 +87,8 @@ static THREAD_RESULT THREAD_CALL LoginThread(void *arg)
                TCHAR serverIdAsText[32];
                wxString cacheFile;
 
+      NXCSetEventHandler(g_hSession, ClientEventHandler);
+
       data->dlg->SetStatusText(_T("Synchronizing objects..."));
       if (data->objectCacheMode != 0)
                {
@@ -141,6 +170,29 @@ static THREAD_RESULT THREAD_CALL LoginThread(void *arg)
       rcc = NXCLoadEventDB(g_hSession);
    }
 
+   // Synchronizing alarms
+   if (rcc == RCC_SUCCESS)
+   {
+               NXC_ALARM *list;
+               DWORD count;
+
+      data->dlg->SetStatusText(_T("Synchronizing alarms..."));
+      rcc = NXCLoadAllAlarms(g_hSession, FALSE, &count, &list);
+      if (rcc == RCC_SUCCESS)
+               {
+                       NXMCInitAlarms(count, list);
+                       safe_free(list);
+         rcc = NXCSubscribe(g_hSession, NXC_CHANNEL_ALARMS);
+               }
+   }
+
+   // Disconnect if some of post-login operations was failed
+   if (rcc != RCC_SUCCESS)
+   {
+      NXCDisconnect(g_hSession);
+      g_hSession = NULL;
+   }
+
        data->dlg->ReportCompletion(rcc);
    return THREAD_OK;
 }
index c810f06..f8729d7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: mainfrm.cpp,v 1.5 2007-07-15 14:18:38 victor Exp $ */
+/* $Id: mainfrm.cpp,v 1.6 2007-07-23 06:39:12 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
 ** Portable management console
@@ -42,6 +42,10 @@ BEGIN_EVENT_TABLE(nxMainFrame, wxFrame)
        EVT_MENU(wxID_PANE_DETACH, nxMainFrame::OnPaneDetach)
        EVT_MENU(wxID_PANE_FLOAT, nxMainFrame::OnPaneFloat)
        EVT_MENU(wxID_PANE_MOVE_TO_NOTEBOOK, nxMainFrame::OnPaneMoveToNotebook)
+       EVT_MENU(wxID_TAB_CLOSE, nxMainFrame::OnTabClose)
+       EVT_MENU(wxID_TAB_DETACH, nxMainFrame::OnTabDetach)
+       EVT_MENU(wxID_TAB_FLOAT, nxMainFrame::OnTabFloat)
+       EVT_MENU(wxID_TAB_DOCK, nxMainFrame::OnTabDock)
        EVT_MENU_RANGE(wxID_PLUGIN_RANGE_START, wxID_PLUGIN_RANGE_END, nxMainFrame::OnPluginCommand)
 END_EVENT_TABLE()
 
@@ -53,6 +57,9 @@ END_EVENT_TABLE()
 nxMainFrame::nxMainFrame(const wxPoint &pos, const wxSize &size)
             :wxFrame((wxWindow *)NULL, wxID_ANY, _T("NetXMS Management Console"), pos, size)
 {
+       m_currPane = NULL;
+       m_currTab = NULL;
+
        m_mgr.SetManagedWindow(this);
 
        m_mgr.AddPane(CreateNotebook(), wxAuiPaneInfo().Name(_T("notebook")).CenterPane().PaneBorder(false));
@@ -87,10 +94,9 @@ wxAuiNotebook *nxMainFrame::CreateNotebook()
    // create the notebook off-window to avoid flicker
    wxSize clientSize = GetClientSize();
    
-   m_notebook = new wxAuiNotebook(this, wxID_ANY,
+   m_notebook = new nxAuiNotebook(this,
                                   wxPoint(clientSize.x, clientSize.y),
-                                  wxSize(430,200),
-                                  wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER);
+                                  wxSize(430,200));
    
    wxBitmap bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
    m_notebook->AddPage(new wxTextCtrl(m_notebook, wxID_ANY, wxT("Some text"),
@@ -200,6 +206,16 @@ void nxMainFrame::OnContextMenu(wxContextMenuEvent &event)
                menu.Append(wxID_PANE_CLOSE, _T("&Close"));
                PopupMenu(&menu);
        }
+       else if ((m_currTab = m_notebook->TabFromPoint(event.GetPosition())) != NULL)
+       {
+               wxMenu menu;
+
+               menu.Append(wxID_TAB_DETACH, _T("&Detach"));
+               menu.Append(wxID_TAB_FLOAT, _T("&Float"));
+               menu.Append(wxID_TAB_DOCK, _T("D&ock"));
+               menu.Append(wxID_TAB_CLOSE, _T("&Close"));
+               PopupMenu(&menu);
+       }
        else
        {
                event.Skip();
@@ -275,6 +291,69 @@ void nxMainFrame::OnPaneMoveToNotebook(wxCommandEvent &event)
 }
 
 
+//
+// Close pane on request from context menu
+//
+
+void nxMainFrame::OnTabClose(wxCommandEvent &event)
+{
+       if (m_currTab != NULL)
+       {
+               m_notebook->DeletePage(m_notebook->GetPageIndex(m_currTab));
+       }
+}
+
+
+//
+// Detach pane on request from context menu
+//
+
+void nxMainFrame::OnTabDetach(wxCommandEvent &event)
+{
+       nxFrame *frame;
+
+       if (m_currTab != NULL)
+       {
+               wxString caption = _T("NetXMS Console - ") + m_currTab->GetLabel();
+               m_notebook->RemovePage(m_notebook->GetPageIndex(m_currTab));
+               frame = new nxFrame(caption, m_currTab);
+               frame->Show(true);
+       }
+}
+
+
+//
+// Float tab on request from context menu
+//
+
+void nxMainFrame::OnTabFloat(wxCommandEvent &event)
+{
+       if (m_currTab != NULL)
+       {
+               m_notebook->RemovePage(m_notebook->GetPageIndex(m_currTab));
+               m_currTab->Reparent(this);
+               m_mgr.AddPane(m_currTab, wxAuiPaneInfo().Name(m_currTab->GetName()).Caption(m_currTab->GetLabel()).Float());
+               m_mgr.Update();
+       }
+}
+
+
+//
+// Move tab from notebook to dock area on request from context menu
+//
+
+void nxMainFrame::OnTabDock(wxCommandEvent &event)
+{
+       if (m_currTab != NULL)
+       {
+               m_notebook->RemovePage(m_notebook->GetPageIndex(m_currTab));
+               m_currTab->Reparent(this);
+               m_mgr.AddPane(m_currTab, wxAuiPaneInfo().Name(m_currTab->GetName()).Caption(m_currTab->GetLabel()).Left().BestSize(200, 300));
+               m_mgr.Update();
+       }
+}
+
+
 //
 // Handler for menu items added by plugins
 //
@@ -300,4 +379,3 @@ void nxMainFrame::OnViewRefresh(wxCommandEvent &event)
                page->AddPendingEvent(event);
        }
 }
-
index 1848db8..8a37d3b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: mainfrm.h,v 1.3 2007-07-15 14:18:38 victor Exp $ */
+/* $Id: mainfrm.h,v 1.4 2007-07-23 06:39:12 victor Exp $ */
 /* 
 ** NetXMS - Network Management System
 ** Portable management console
@@ -43,6 +43,29 @@ public:
 };
 
 
+//
+// Customized wxAuiNotebook class
+//
+
+class nxAuiNotebook : public wxAuiNotebook
+{
+public:
+       nxAuiNotebook(wxWindow *parent, const wxPoint& pos, const wxSize& size) : wxAuiNotebook(parent, wxID_ANY, pos, size, wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER) { }
+       nxView *TabFromPoint(const wxPoint &point)
+       {
+               wxWindow *wnd = NULL;
+               wxPoint pt = ScreenToClient(point);
+               wxAuiTabCtrl *tabs = GetTabCtrlFromPoint(pt);
+               if (tabs != NULL)
+               {
+                       pt = tabs->ScreenToClient(point);
+                       tabs->TabHitTest(pt.x, pt.y, &wnd);
+               }
+               return (nxView *)wnd;
+       }
+};
+
+
 //
 // Main frame class
 //
@@ -51,8 +74,9 @@ class nxMainFrame : public wxFrame
 {
 protected:
        nxAuiManager m_mgr;
-       wxAuiNotebook *m_notebook;
+       nxAuiNotebook *m_notebook;
        wxAuiPaneInfo *m_currPane;      // Current pane for context menu operation
+       wxWindow *m_currTab;                    // Current tab for context menu operation
 
        wxAuiNotebook *CreateNotebook(void);
 
@@ -73,6 +97,10 @@ protected:
        void OnPaneDetach(wxCommandEvent &event);
        void OnPaneFloat(wxCommandEvent &event);
        void OnPaneMoveToNotebook(wxCommandEvent &event);
+       void OnTabClose(wxCommandEvent &event);
+       void OnTabDetach(wxCommandEvent &event);
+       void OnTabFloat(wxCommandEvent &event);
+       void OnTabDock(wxCommandEvent &event);
        void OnPluginCommand(wxCommandEvent &event);
        void OnContextMenu(wxContextMenuEvent &event);
 
index 235b4e7..118cc8f 100644 (file)
@@ -74,39 +74,15 @@ bool nxApp::OnInit()
        nxConsoleLogger::Init();
 
        wxFileSystem::AddHandler(new wxArchiveFSHandler);
-       wxImage::AddHandler(new wxPNGHandler);
-       wxImage::AddHandler(new wxICOHandler);
-
-       wxXmlResource::Get()->InitAllHandlers();
 #ifdef _WIN32
-       HRSRC hRes;
-       HGLOBAL hMem;
-       void *data;
-
        wxFileSystem::AddHandler(new wxMemoryFSHandler);
-       hRes = FindResource(wxGetInstance(), MAKEINTRESOURCE(IDR_XRS), _T("XRS"));
-       if (hRes != NULL)
-       {
-               hMem = LoadResource(NULL, hRes);
-               if (hMem != NULL)
-               {
-                       data = LockResource(hMem);
-                       if (data != NULL)
-                       {
-                               wxMemoryFSHandler::AddFile(_T("resource.xrs"), data, SizeofResource(NULL, hRes));
-                               UnlockResource(hMem);
-                       }
-                       FreeResource(hMem);
-               }
-       }
-       if (!wxXmlResource::Get()->Load(_T("memory:resource.xrs")))
-         return false;
-#else
-       wxString xrsFile = wxStandardPaths::Get().GetResourcesDir();
-       xrsFile += _T("/nxmc.xrs");
-       if (!wxXmlResource::Get()->Load(xrsFile))
-         return false;
 #endif
+       wxImage::AddHandler(new wxPNGHandler);
+       wxImage::AddHandler(new wxXPMHandler);
+
+       wxXmlResource::Get()->InitAllHandlers();
+       if (!NXMCLoadResources(_T("nxmc.xrs"), NXMC_LIB_INSTANCE_ARG(wxGetInstance()), MAKEINTRESOURCE(IDR_XRS)))
+               return false;
 
        // Create application directories if needed
        wxFileName::Mkdir(wxStandardPaths::Get().GetUserDataDir(), 0700, wxPATH_MKDIR_FULL);
index 0b000c2..f535937 100644 (file)
@@ -54,6 +54,10 @@ END_DECLARE_EVENT_TYPES()
 #define wxID_PANE_CLOSE                                        (wxID_HIGHEST + 2)
 #define wxID_PANE_FLOAT                                        (wxID_HIGHEST + 3)
 #define wxID_PANE_MOVE_TO_NOTEBOOK     (wxID_HIGHEST + 4)
+#define wxID_TAB_DETACH             (wxID_HIGHEST + 5)
+#define wxID_TAB_CLOSE              (wxID_HIGHEST + 6)
+#define wxID_TAB_FLOAT              (wxID_HIGHEST + 7)
+#define wxID_TAB_DOCK               (wxID_HIGHEST + 8)
 
 #define wxID_PLUGIN_RANGE_START                (wxID_HIGHEST + 1000)
 #define wxID_PLUGIN_RANGE_END                  (wxID_HIGHEST + NXMC_PLUGIN_ID_LIMIT * NXMC_MAX_PLUGINS - 1)
index 56ec6b1..634dfa0 100644 (file)
@@ -9,13 +9,30 @@
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 EXTRA_DIST = \
+       acknowledged.xpm \
        cluster.xpm \
        condition.xpm \
        container.xpm \
+       critical.xpm \
+       disabled.xpm \
+       information.xpm \
        interface.xpm \
+       major.xpm \
+       minor.xpm \
        network.xpm \
        network_service.xpm \
        node.xpm \
+       normal.xpm \
+       outstanding.xpm \
+       service_root.xpm \
        subnet.xpm \
        template.xpm \
-       template_root.xpm
+       template_group.xpm \
+       template_root.xpm \
+       terminated.xpm \
+       testing.xpm \
+       unknown.xpm \
+       unmanaged.xpm \
+       vpn_connector.xpm \
+       warning.xpm \
+       zone.xpm
diff --git a/src/client/console/nxmc/rc/icons/small/acknowledged.xpm b/src/client/console/nxmc/rc/icons/small/acknowledged.xpm
new file mode 100644 (file)
index 0000000..b7b0b8f
--- /dev/null
@@ -0,0 +1,24 @@
+/* XPM */
+static char *ack__[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 2 1",
+"  c #008000",
+". c None",
+/* pixels */
+"................",
+"................",
+"................",
+"............ ...",
+"...........  ...",
+"..........  ....",
+"..........  ....",
+".........  .....",
+"........  ......",
+"..   ..   ......",
+"...   .  .......",
+"....     .......",
+".....   ........",
+"......  ........",
+"................",
+"................"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/critical.xpm b/src/client/console/nxmc/rc/icons/small/critical.xpm
new file mode 100644 (file)
index 0000000..cab28dd
--- /dev/null
@@ -0,0 +1,126 @@
+/* XPM */
+static char *critical[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 104 2",
+"   c #ED0000",
+".  c #EF0000",
+"X  c #F10000",
+"o  c #F30000",
+"O  c #F50000",
+"+  c #F70000",
+"@  c #F90000",
+"#  c #FB0000",
+"$  c #FD0000",
+"%  c red",
+"&  c #F50909",
+"*  c #F50B0B",
+"=  c #F50C0C",
+"-  c #F60F0F",
+";  c #F61010",
+":  c #F71212",
+">  c #F71313",
+",  c #F81616",
+"<  c #F81717",
+"1  c #F11B14",
+"2  c #F21B14",
+"3  c #F51B16",
+"4  c #F61D18",
+"5  c #F5201A",
+"6  c #F9231D",
+"7  c #FA251F",
+"8  c #FC2722",
+"9  c #F92924",
+"0  c #FF2B26",
+"q  c #FC2828",
+"w  c #FC2929",
+"e  c #FA2F2A",
+"r  c #FD2C2C",
+"t  c #FD2D2D",
+"y  c #FD2F2F",
+"u  c #F73333",
+"i  c #F73530",
+"p  c #F73434",
+"a  c #FD3030",
+"s  c #FE3232",
+"d  c #FE3333",
+"f  c #FB3732",
+"g  c #FE3434",
+"h  c #F83939",
+"j  c #F93A3A",
+"k  c #F93B3B",
+"l  c #FC3C38",
+"z  c #F93D3D",
+"x  c #FA3E3E",
+"c  c #F74232",
+"v  c #F74333",
+"b  c #F74334",
+"n  c #F74434",
+"m  c #F84535",
+"M  c #F84738",
+"N  c #F84838",
+"B  c #F8493A",
+"V  c #F84B3C",
+"C  c #F94C3C",
+"Z  c #F94E3F",
+"A  c #FB4742",
+"S  c #FE4743",
+"D  c #FF4743",
+"F  c #FC4747",
+"G  c #FC4848",
+"H  c #FC4A4A",
+"J  c #FC4B4B",
+"K  c #FB4C48",
+"L  c #FC4C4C",
+"P  c #FA5142",
+"I  c #FA5344",
+"U  c #FB5749",
+"Y  c #FB584A",
+"T  c #FC5D4F",
+"R  c #FD5D4F",
+"E  c #FD5050",
+"W  c #FE5252",
+"Q  c #FD5F52",
+"!  c #FF5B58",
+"~  c #FE6154",
+"^  c #FE6255",
+"/  c #FE6356",
+"(  c #FE6457",
+")  c #FE6558",
+"_  c #FE675A",
+"`  c #FF685B",
+"'  c #FF695C",
+"]  c #FF6A5D",
+"[  c #FDC5C5",
+"{  c #FDC9C9",
+"}  c #FECACA",
+"|  c #FECBCB",
+" . c #FECCCC",
+".. c #FFCFCF",
+"X. c #FEEAEA",
+"o. c #FEEBEB",
+"O. c #FEECEC",
+"+. c #FFECEC",
+"@. c #FFEDED",
+"#. c #FEF1F1",
+"$. c #FFF1F1",
+"%. c #FFF2F2",
+"&. c #FFF3F3",
+"*. c None",
+/* pixels */
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.",
+"*.*.*.*.% % % % $ $ $ $ *.*.*.*.",
+"*.*.*.% 0 ' ` _ ) / ~ 8 # *.*.*.",
+"*.*.% 0 ] D g s a t l T 7 + *.*.",
+"*.% 0 ] ! ..W y r J  .K U 6 O *.",
+"*.% ` S ..&.@.L H +.%.} e P o *.",
+"*.% _ d E @.&.@.@.%.O.x < Z X *.",
+"*.$ ( a t J @.%.%.+.z , > V X *.",
+"*.$ ^ r w G @.%.%.O.j : - N X *.",
+"*.$ Q q F +.%.+.O.$.X.p * m . *.",
+"*.# R f | %.o.k h X.#.[ 4 v . *.",
+"*.@ 7 Y A { k > ; u [ i n 2   *.",
+"*.*.+ 6 I 9 : - = & 3 v 1   *.*.",
+"*.*.*.O 5 C B M m b c 1   *.*.*.",
+"*.*.*.*.X X X X . .     *.*.*.*.",
+"*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*."
+};
diff --git a/src/client/console/nxmc/rc/icons/small/disabled.xpm b/src/client/console/nxmc/rc/icons/small/disabled.xpm
new file mode 100644 (file)
index 0000000..8ea1b9e
--- /dev/null
@@ -0,0 +1,83 @@
+/* XPM */
+static char *disabled[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 61 1",
+"  c #323232",
+". c #414141",
+"X c #464646",
+"o c gray29",
+"O c #4B4B4B",
+"+ c #4C4C4C",
+"@ c gray30",
+"# c #515151",
+"$ c gray32",
+"% c #585858",
+"& c #646464",
+"* c #656565",
+"= c #676767",
+"- c #60636D",
+"; c #62676F",
+": c gray42",
+"> c #6F6F6F",
+", c #717171",
+"< c gray45",
+"1 c gray47",
+"2 c #7B7B7B",
+"3 c #7C7C7C",
+"4 c #3259CD",
+"5 c #3259CF",
+"6 c #3A67D1",
+"7 c #406ED4",
+"8 c #4270D5",
+"9 c #497BD8",
+"0 c #4B86DC",
+"q c #4C86DD",
+"w c #5080D9",
+"e c #5083DA",
+"r c #5586DA",
+"t c #508ADD",
+"y c #518ADE",
+"u c #5F91DE",
+"i c #6192DE",
+"p c #5591E0",
+"a c #5494E1",
+"s c #6CA2E5",
+"d c #74A9E6",
+"f c #79AAE6",
+"g c #7BABE7",
+"h c #79ACE7",
+"j c #818181",
+"k c gray51",
+"l c gray52",
+"z c #8D8D8D",
+"x c gray57",
+"c c #979797",
+"v c gray62",
+"b c gray66",
+"n c #AAAAAA",
+"m c #AEAEAE",
+"M c #C1C1C1",
+"N c gray77",
+"B c #D5D5D5",
+"V c gray85",
+"C c #DDDDDD",
+"Z c gray91",
+"A c None",
+/* pixels */
+"AAAAAAAAAAAAAAAA",
+"AAAAAAAAAAAAAAAA",
+"AAAAaAAhAAgqAAAA",
+"AAAAAdA0AftAAAAA",
+"AAAAAAsAypAAAAAA",
+"AAAlv3;AA3vlAAAA",
+"A+xZCMjA2VCNx+AA",
+"A<B%O*AA>*O%b<AA",
+" kA*AAAAAAA*Ak A",
+"A=A$.X#AAX.$A=AA",
+"A@znmc,A1cmnz@AA",
+"AAo&::AA-::&oAAA",
+"AAAAA97AeAAAAAAA",
+"AAAA8iA5AwAAAAAA",
+"AAA6uAArAA4AAAAA",
+"AAAAAAAAAAAAAAAA"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/information.xpm b/src/client/console/nxmc/rc/icons/small/information.xpm
new file mode 100644 (file)
index 0000000..62d0924
--- /dev/null
@@ -0,0 +1,27 @@
+/* XPM */
+static char *information__[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 5 1",
+"  c black",
+". c blue",
+"X c #808080",
+"o c gray100",
+"O c None",
+/* pixels */
+"OOOOOOOOOOOOOOOO",
+"OOOOXXXXXXXOOOOO",
+"OOOXoooooooXOOOO",
+"OOXoooo..oooXOOO",
+"OXooooo..oooo OO",
+"OXooooooooooo OO",
+"OXoooo...oooo OO",
+"OXooooo..oooo OO",
+"OXooooo..oooo OO",
+"OOXooo....oo OOO",
+"OO ooooooooo OOO",
+"OOO   ooooo OOOO",
+"OOOOOO oo  OOOOO",
+"OOOOOOO o OOOOOO",
+"OOOOOOOO  OOOOOO",
+"OOOOOOOOOOOOOOOO"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/major.xpm b/src/client/console/nxmc/rc/icons/small/major.xpm
new file mode 100644 (file)
index 0000000..798ab1e
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char *major__[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 3 1",
+"  c black",
+". c #FF8000",
+"X c None",
+/* pixels */
+"XXXXXXXXXXXXXXXX",
+"XXXXXXX  XXXXXXX",
+"XXXXXX .. XXXXXX",
+"XXXXXX .. XXXXXX",
+"XXXXX .... XXXXX",
+"XXXXX .  . XXXXX",
+"XXXX ..  .. XXXX",
+"XXXX ..  .. XXXX",
+"XXX ...  ... XXX",
+"XXX ...  ... XXX",
+"XX .......... XX",
+"XX ....  .... XX",
+"X .....  ..... X",
+"X ............ X",
+"XX            XX",
+"XXXXXXXXXXXXXXXX"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/minor.xpm b/src/client/console/nxmc/rc/icons/small/minor.xpm
new file mode 100644 (file)
index 0000000..5a37b02
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char *minor[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 3 1",
+"  c black",
+". c yellow",
+"X c None",
+/* pixels */
+"XXXXXXXXXXXXXXXX",
+"XXXXXXX  XXXXXXX",
+"XXXXXX .. XXXXXX",
+"XXXXXX .. XXXXXX",
+"XXXXX .... XXXXX",
+"XXXXX .  . XXXXX",
+"XXXX ..  .. XXXX",
+"XXXX ..  .. XXXX",
+"XXX ...  ... XXX",
+"XXX ...  ... XXX",
+"XX .......... XX",
+"XX ....  .... XX",
+"X .....  ..... X",
+"X ............ X",
+"X              X",
+"XXXXXXXXXXXXXXXX"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/normal.xpm b/src/client/console/nxmc/rc/icons/small/normal.xpm
new file mode 100644 (file)
index 0000000..b7febe7
--- /dev/null
@@ -0,0 +1,158 @@
+/* XPM */
+static char *normal[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 136 2",
+"   c #1D6C1A",
+".  c #1E6E1A",
+"X  c #1E701A",
+"o  c #1E711A",
+"O  c #1F711B",
+"+  c #1E731A",
+"@  c #1F781B",
+"#  c #1E7A1B",
+"$  c #1F7A1B",
+"%  c #1E7F1B",
+"&  c #1F831B",
+"*  c #208A1B",
+"=  c #20881C",
+"-  c #2D961C",
+";  c #2F961C",
+":  c #329D1D",
+">  c #42A91F",
+",  c #42AB1F",
+"<  c #42AD1F",
+"1  c #4C973D",
+"2  c #4BB426",
+"3  c #52B92B",
+"4  c #52BB2D",
+"5  c #54BB2D",
+"6  c #54BD31",
+"7  c #55BE34",
+"8  c #55C034",
+"9  c #59C236",
+"0  c #5BC239",
+"q  c #4E9B41",
+"w  c #52A042",
+"e  c #5EA948",
+"r  c #64B04C",
+"t  c #6CB656",
+"y  c #6DB757",
+"u  c #6AB950",
+"i  c #6EB558",
+"p  c #6FB558",
+"a  c #6FB559",
+"s  c #70BF57",
+"d  c #74B75B",
+"f  c #74B75C",
+"g  c #70B859",
+"h  c #71B95B",
+"j  c #72B95B",
+"k  c #73BA5C",
+"l  c #71BE5F",
+"z  c #7DB766",
+"x  c #77BC60",
+"c  c #7CBA64",
+"v  c #7DBC66",
+"b  c #7DBE67",
+"n  c #7FB869",
+"m  c #74C259",
+"M  c #6FC261",
+"N  c #6FC361",
+"B  c #6EC461",
+"V  c #6EC462",
+"C  c #6EC563",
+"Z  c #6FC664",
+"A  c #70C163",
+"S  c #71C463",
+"D  c #74C364",
+"F  c #70C765",
+"G  c #73C766",
+"H  c #79C164",
+"J  c #7EC169",
+"K  c #7EC76F",
+"L  c #72C868",
+"P  c #74C868",
+"I  c #75C868",
+"U  c #76C969",
+"Y  c #76CA6A",
+"T  c #79C96B",
+"R  c #7ACC6D",
+"E  c #7FCA70",
+"W  c #83BE6D",
+"Q  c #87C272",
+"!  c #85C575",
+"~  c #89C476",
+"^  c #80CA73",
+"/  c #80CC72",
+"(  c #83CE77",
+")  c #87C979",
+"_  c #8BC878",
+"`  c #90CE7F",
+"'  c #96C783",
+"]  c #9AC787",
+"[  c #96CB86",
+"{  c #97CC85",
+"}  c #98CB86",
+"|  c #9ACA87",
+" . c #98CC87",
+".. c #96CD88",
+"X. c #99CD8A",
+"o. c #9DCE8B",
+"O. c #99D18B",
+"+. c #99D08C",
+"@. c #9AD48D",
+"#. c #9FD291",
+"$. c #9BD791",
+"%. c #9DD892",
+"&. c #A1D695",
+"*. c #A1D795",
+"=. c #A3D796",
+"-. c #ABD29B",
+";. c #ABD39B",
+":. c #AFD7A0",
+">. c #AED7A1",
+",. c #AEDCA5",
+"<. c #AFDCA6",
+"1. c #B3D9A5",
+"2. c #B4D9A5",
+"3. c #B4DAA6",
+"4. c #B1DDA7",
+"5. c #B2DBA8",
+"6. c #B5DBA8",
+"7. c #B4DDAA",
+"8. c #B4DFAC",
+"9. c #B5DFAC",
+"0. c #B5E1AE",
+"q. c #B7E1AF",
+"w. c #B7E1B0",
+"e. c #BEE3B6",
+"r. c #BFE3B8",
+"t. c #C0E4B9",
+"y. c #D6EED2",
+"u. c #D9ECD4",
+"i. c #E6F4E3",
+"p. c #EDF7EB",
+"a. c #F1F9F0",
+"s. c #F4FAF2",
+"d. c #FCFDFB",
+"f. c #FDFEFD",
+"g. c gray100",
+"h. c None",
+/* pixels */
+"h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.",
+"h.h.h.h.h.h.0 6 4 3 h.h.h.h.h.h.",
+"h.h.h.h.9 m =.,.,.&.u , h.h.h.h.",
+"h.h.h.8 ` q.%.( ( %.0._ : h.h.h.",
+"h.h.7 ` 0.R Y L P I T 8.~ - h.h.",
+"h.h.s q.R L F C V S e.K 9.e h.h.",
+"h.5 *.$.U Z B N M t.g.i.O.o.= h.",
+"h.2 4./ G w.y.A r.g.d.+.J >.% h.",
+"h.< <.E ^ a.g.p.g.d...h b :.# h.",
+"h.> #.@.D ) s.g.f.[ y j { ] @ h.",
+"h.h.r 7.H l ! u.X.t i f 3.q h.h.",
+"h.h.; Q 5.x k g a p d 1.n o h.h.",
+"h.h.h.* W 6. .v c } 2.z   h.h.h.",
+"h.h.h.h.& w | ;.-.' 1 . h.h.h.h.",
+"h.h.h.h.h.h.$ + X O h.h.h.h.h.h.",
+"h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h."
+};
diff --git a/src/client/console/nxmc/rc/icons/small/outstanding.xpm b/src/client/console/nxmc/rc/icons/small/outstanding.xpm
new file mode 100644 (file)
index 0000000..ed427dd
--- /dev/null
@@ -0,0 +1,59 @@
+/* XPM */
+static char *outstanding[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 37 1",
+"  c #45392D",
+". c #494440",
+"X c #476078",
+"o c #C54B00",
+"O c #D84B00",
+"+ c #DD6F00",
+"@ c #E67400",
+"# c #EA7B01",
+"$ c #D58007",
+"% c #FF8B04",
+"& c #FF9415",
+"* c #FF9416",
+"= c #CF8937",
+"- c #FFB449",
+"; c #FFB84E",
+": c #FEE167",
+"> c #FBED72",
+", c #FDED7B",
+"< c #FDF677",
+"1 c #627288",
+"2 c #B2B2B2",
+"3 c #F9E48F",
+"4 c #FDF88E",
+"5 c #FCF794",
+"6 c #FFF995",
+"7 c #FCE9A9",
+"8 c #FEF3BE",
+"9 c #FFFFBD",
+"0 c #AEC8E2",
+"q c #BCD6F2",
+"w c #FEFFD1",
+"e c #FEFFE6",
+"r c #FEFFE9",
+"t c #FEFEF3",
+"y c #FEFFF7",
+"u c #FEFEFE",
+"i c None",
+/* pixels */
+"iiiiiiiiiiiiiiii",
+"iiiiiiiiiiiiiiii",
+"iiiiiiiiiiiiiiii",
+"iiiiii=$$=iiiiii",
+"iiiii*6996*iiiii",
+"iiii*7ryyr7*iiii",
+"iiii*8tuut8*iiii",
+"iiii*3weew3*iiii",
+"iiii2*,54:*2iiii",
+"iiiii2&<>*2iiiii",
+"iiiiii#;-%iiiiii",
+"iiiiiio+@Oiiiiii",
+"iiiiii1q0Xiiiiii",
+"iiiiiii .iiiiiii",
+"iiiiiiiiiiiiiiii",
+"iiiiiiiiiiiiiiii"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/service_root.xpm b/src/client/console/nxmc/rc/icons/small/service_root.xpm
new file mode 100644 (file)
index 0000000..01ff368
--- /dev/null
@@ -0,0 +1,50 @@
+/* XPM */
+static char *network[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 28 1",
+"  c #3E3E3E",
+". c gray29",
+"X c #626262",
+"o c gray43",
+"O c gray48",
+"+ c #629600",
+"@ c #808000",
+"# c #969600",
+"$ c navy",
+"% c #000096",
+"& c #003196",
+"* c #0000B9",
+"= c #003DB9",
+"- c #006296",
+"; c #007AB9",
+": c #0000DC",
+"> c blue",
+", c #0092DC",
+"< c #25AAFF",
+"1 c #808080",
+"2 c #868686",
+"3 c #929292",
+"4 c gray62",
+"5 c #A0A0A4",
+"6 c #AAAAAA",
+"7 c #B6B6B6",
+"8 c #C0C0C0",
+"9 c None",
+/* pixels */
+"999911+<<<O99999",
+"999<<+<+++++9999",
+"99<<<+++++++,999",
+"9<<<++++++++,-99",
+"1<<<+;;<;,,++=.9",
+"1<<+<<,,,@,++==9",
+"<<<<+###-#@=;=&9",
+"<<<+@####-#;=&=9",
+"<<,@######=====9",
+"o,,---#888888111",
+"X@,;;;#8>>>:6119",
+"9;;;;;#8>>>*4119",
+"99;;==#8**%$2879",
+"999===&999999759",
+"9999 &&999999639",
+"9999999999999999"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/template_group.xpm b/src/client/console/nxmc/rc/icons/small/template_group.xpm
new file mode 100644 (file)
index 0000000..e6838e4
--- /dev/null
@@ -0,0 +1,137 @@
+/* XPM */
+static char *template_group[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 115 2",
+"   c #2C322C322C32",
+".  c #3DA33DA33DA3",
+"X  c #3DC53DC53DC5",
+"o  c #4FA64FA64FA6",
+"O  c #4FF04FF04FF0",
+"+  c #50F150F150F1",
+"@  c #549954995499",
+"#  c #5BC65BC65BC6",
+"$  c #60AD60AD60AD",
+"%  c #703870387038",
+"&  c #71C271C271C2",
+"*  c #73DF73DF73DF",
+"=  c #743674367436",
+"-  c #758175817581",
+";  c #7DA77DA77DA7",
+":  c #7E867E867E86",
+">  c #7F217F217F21",
+",  c #B8536EF06EF0",
+"<  c #8BFB8BFB8BFB",
+"1  c #8F988F988F98",
+"2  c #925692569256",
+"3  c #9B9D9B9D9B9D",
+"4  c #9E129FE19FE1",
+"5  c #9EB09EB09EB0",
+"6  c #AC7189CF89CF",
+"7  c #BCD988AE88AE",
+"8  c #AC9CAC9CAC9C",
+"9  c #AD93AD91AD91",
+"0  c #B1D3B1D3B1D3",
+"q  c #B4BDB4BDB4BD",
+"w  c #BE37B640B640",
+"e  c #B8ADB8ADB8AD",
+"r  c #BB48BB48BB48",
+"t  c #BDBABDBABDBA",
+"y  c #BE51BE51BE51",
+"u  c #BF5DBFAFBFAF",
+"i  c #C96C94999499",
+"p  c #CFE39CAC9CAC",
+"a  c #CEA2A1D1A1D1",
+"s  c #C609BDB0BDB0",
+"d  c #DCC1B8FFB8FF",
+"f  c #DF7EBDEFBDEF",
+"g  c #C07AC07AC07A",
+"h  c #C203C203C203",
+"j  c #C38FC38FC38F",
+"k  c #C494C420C420",
+"l  c #C5DAC5DAC5DA",
+"z  c #C7C9C7C5C7C5",
+"x  c #CA65C4BFC4BF",
+"c  c #C89AC89AC89A",
+"v  c #C8E3C9BEC9BE",
+"b  c #C9B7C9B5C9B5",
+"n  c #CA22CA51CA51",
+"m  c #C9F6CBEACBEA",
+"M  c #CA93CAAECAAE",
+"N  c #CB80CB80CB80",
+"B  c #CA9DCC5ACC5A",
+"V  c #CC10CCD1CCD1",
+"C  c #CC8FCC8FCC8F",
+"Z  c #CD7ACD7ACD7A",
+"A  c #D000D1E8D1E8",
+"S  c #D096D132D132",
+"D  c #D0A0D179D179",
+"F  c #D1C4D21ED21E",
+"G  c #D449D449D449",
+"H  c #D4E1D540D540",
+"J  c #D7D9D7D9D7D9",
+"K  c #D8FCD8FCD8FC",
+"L  c #DBF4DBF4DBF4",
+"P  c #DDE1DDE1DDE1",
+"I  c #DE01DE5FDE5F",
+"U  c #DE7ADE7ADE7A",
+"Y  c #DFF4DFF4DFF4",
+"T  c #E32CD483D483",
+"R  c #E940D0A5D0A5",
+"E  c #EA08D0B9D0B9",
+"W  c #E69CDD6BDD6B",
+"Q  c #E2F7E2F7E2F7",
+"!  c #E3B8E3B8E3B8",
+"~  c #E4F5E4F5E4F5",
+"^  c #E74EE74EE74E",
+"/  c #E7FEE7FEE7FE",
+"(  c #E919E18AE18A",
+")  c #E990E22FE22F",
+"_  c #EB20E3BEE3BE",
+"`  c #E9C0E4E3E4E3",
+"'  c #EB78E5FFE5FF",
+"]  c #E8D7E8D7E8D7",
+"[  c #E9EEE9EEE9EE",
+"{  c #EAB5EAB5EAB5",
+"}  c #EB89EB89EB89",
+"|  c #ED1CED1CED1C",
+" . c #EE0BEE0AEE0A",
+".. c #EF86EE05EE05",
+"X. c #EE2EEE75EE75",
+"o. c #EF34EFAFEFAF",
+"O. c #F02BF02BF02B",
+"+. c #F4F0EF2BEF2B",
+"@. c #EF55F0E8F0E8",
+"#. c #F0F9F0F9F0F9",
+"$. c #F1F2F1F2F1F2",
+"%. c #F2CBF2CBF2CB",
+"&. c #F40FF40EF40E",
+"*. c #F5A9F53AF53A",
+"=. c #F6D8F6D8F6D8",
+"-. c #F9E8F9E5F9E5",
+";. c #F9E9FB14FB14",
+":. c #FB16FB16FB16",
+">. c #FBBEFBC3FBC3",
+",. c #FCF6FCF6FCF6",
+"<. c #FDE7FDE7FDE7",
+"1. c #FE7AFEA3FEA3",
+"2. c #FEDBFEDBFEDB",
+"3. c #FFEFFFF7FFF7",
+"4. c None",
+/* pixels */
+"4.4.4.u B n b b N 5 4.4.4.4.4.4.",
+"4.4.4.( a x D S F 9 & < 4.4.4.4.",
+"4.4.4 T 7 k ) W ` X.&.~ * 4.4.4.",
+"u _ w ..' A p , i *.>.{ q ; 4.4.",
+"m p 6 @.I V R d f +.H j e l # 4.",
+"v E s o.! C 3.;.;.1.-.%.q 3 1 X ",
+"z 3.M  .I N 2.{ { ,.3.3.3.3.:.- ",
+"c =.h X.U N 2.{ / / ^ ^ { <.:.* ",
+"c =.h | J M 3.$.O.#.=.&.$.2.:.* ",
+"c :.l | J M <.! Y ! ,.O.Q ,.:.* ",
+"c %.t  .Z z 1.! Y ! ,.O.! ,.:.* ",
+"c %.y #.[ C ,.L K ] <.| U >.:.* ",
+"c $.8 r t c ,.G G :.3.{ P :.:.* ",
+"c &.0 2 1 g <.,.,.>.>.>.>.>.=.= ",
+"l ,.<.3.} ; : > > > = & = * = . ",
+"$ = * = % @ o O O +   4.4.4.4.4."
+};
diff --git a/src/client/console/nxmc/rc/icons/small/terminated.xpm b/src/client/console/nxmc/rc/icons/small/terminated.xpm
new file mode 100644 (file)
index 0000000..d0ba22b
--- /dev/null
@@ -0,0 +1,47 @@
+/* XPM */
+static char *terminated[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 25 1",
+"  c #7F0000",
+". c #870000",
+"X c #880000",
+"o c #900000",
+"O c #910000",
+"+ c #980000",
+"@ c #9A0000",
+"# c #A10000",
+"$ c #A40000",
+"% c #A90000",
+"& c #AD0000",
+"* c #B20000",
+"= c #B60000",
+"- c #BA0000",
+"; c #BF0000",
+": c #C30000",
+"> c #C90000",
+", c #CB0000",
+"< c #D20000",
+"1 c #D40000",
+"2 c #DB0000",
+"3 c #DC0000",
+"4 c #E50000",
+"5 c #808080",
+"z c None",
+/* pixels */
+"zzzzzzzzzzzzzzzz",
+"z54zzzzzzzzzzzzz",
+"z 43zzzzzzzz445z",
+"z  21zzzzzz4* 5z",
+"zz  <,zzzz4*  zz",
+"zzz  >:zz4*  zzz",
+"zzzz* ;-4*  zzzz",
+"zzzzz* =*  zzzzz",
+"zzzzzz4*&%zzzzzz",
+"zzzzz4*  $#zzzzz",
+"zzzz4* zz @+zzzz",
+"zzz4* zzzz Oozzz",
+"zzz  zzzzzz X.zz",
+"zzzzzzzzzzzz5  z",
+"zzzzzzzzzzzzz555",
+"zzzzzzzzzzzzzzzz"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/testing.xpm b/src/client/console/nxmc/rc/icons/small/testing.xpm
new file mode 100644 (file)
index 0000000..e03fcdf
--- /dev/null
@@ -0,0 +1,110 @@
+/* XPM */
+static char *testing[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 88 1",
+"  c #23611F",
+". c #246320",
+"X c #256522",
+"o c #276623",
+"O c #296824",
+"+ c #2A6B26",
+"@ c #2C6D27",
+"# c #32742C",
+"$ c #33762E",
+"% c #377B32",
+"& c #3A7E34",
+"* c #3C8035",
+"= c #3E8337",
+"- c #408639",
+"; c #42883B",
+": c #448B3D",
+"> c #4A8B45",
+", c #4C8D47",
+"< c #499141",
+"1 c #4D9645",
+"2 c #4F9947",
+"3 c #4F9049",
+"4 c #51924B",
+"5 c #54954E",
+"6 c #519B49",
+"7 c #539E4B",
+"8 c #569750",
+"9 c #55A14D",
+"0 c #57A34E",
+"q c #5AA650",
+"w c #5EAB54",
+"e c #5FAD56",
+"r c #62A25B",
+"t c #63A45D",
+"y c #65A75E",
+"u c #65B45B",
+"i c #67B65C",
+"p c #68B95E",
+"a c #6ABB5F",
+"s c #68A860",
+"d c #68AA61",
+"f c #6BAC63",
+"g c #6CAD65",
+"h c #6EB066",
+"j c #6CBC60",
+"k c #6DBE62",
+"l c #76B36F",
+"z c #7CBD73",
+"x c #7EBF75",
+"c c #6EC063",
+"v c #7FC179",
+"b c #81BE7A",
+"n c #81C277",
+"m c #83C379",
+"M c #82C27A",
+"N c #83C479",
+"B c #85C77B",
+"V c #85C47E",
+"C c #87C480",
+"Z c #89C380",
+"A c #8BC383",
+"S c #8AC483",
+"D c #89C682",
+"F c #8BC683",
+"G c #8BC785",
+"H c #8DC786",
+"J c #8EC686",
+"K c #8EC985",
+"L c #8FC987",
+"P c #8FC988",
+"I c #90CA88",
+"U c #92CA89",
+"Y c #91CA8A",
+"T c #94CB8C",
+"R c #95CC8D",
+"E c #96CD8F",
+"W c #98CE8F",
+"Q c #99CF90",
+"! c #9ACF92",
+"~ c #9CCF94",
+"^ c #9CD094",
+"/ c #9ED195",
+"( c #9FD196",
+") c #9FD297",
+"_ c #A1D298",
+"` c #A4D49B",
+"' c #A7D79E",
+"] c None",
+/* pixels */
+"]]]]]]]]]]]]]]]]",
+"]]]]]]]]]2<]]]]]",
+"]]]]ueq71sr&]]]]",
+"]]pmU^/QTLC5@]]]",
+"]iK`W!RIFVv,X]]]",
+"]x_~Hy-&$3>.]]]]",
+"wZRS:=]]]o ]]]]]",
+"92<;*]]]]]]]]]]]",
+"]]]]]]]]]]]92<;*",
+"]]]]]ca]]]71JPl$",
+"]]]]kBnw06fALD8]",
+"]]]jN'`)!RIMVt+]",
+"]]]uz(~EYGbg4O]]",
+"]]]]0hd:=%#@]]]]",
+"]]]]]<;]]]]]]]]]",
+"]]]]]]]]]]]]]]]]"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/unknown.xpm b/src/client/console/nxmc/rc/icons/small/unknown.xpm
new file mode 100644 (file)
index 0000000..4c54bde
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char *unknown[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 3 1",
+"  c blue",
+". c gray100",
+"X c None",
+/* pixels */
+"XXXXXXXXXXXXXXXX",
+"XXXXX     XXXXXX",
+"XXX  .....  XXXX",
+"XX  ... ...  XXX",
+"XX  ..   ..  XXX",
+"X   ..   ..   XX",
+"X       ...   XX",
+"X      ...    XX",
+"X      ..     XX",
+"X      ..     XX",
+"XX           XXX",
+"XX     ..    XXX",
+"XXX    ..   XXXX",
+"XXXXX     XXXXXX",
+"XXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXX"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/unmanaged.xpm b/src/client/console/nxmc/rc/icons/small/unmanaged.xpm
new file mode 100644 (file)
index 0000000..1cdf73b
--- /dev/null
@@ -0,0 +1,137 @@
+/* XPM */
+static char *unmanaged[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 115 2",
+"   c #4E4E4E",
+".  c #555555",
+"X  c #676767",
+"o  c #717171",
+"O  c #28418B",
+"+  c #29418E",
+"@  c #2B438F",
+"#  c #3C5183",
+"$  c #2C4491",
+"%  c #335099",
+"&  c #35529C",
+"*  c #34579F",
+"=  c #3D5EA3",
+"-  c #3F5FA2",
+";  c #385DA4",
+":  c #3A62A7",
+">  c #3E63A6",
+",  c #3C66AB",
+"<  c #586C89",
+"1  c #4569A8",
+"2  c #466AAB",
+"3  c #406DAE",
+"4  c #4C72AD",
+"5  c #5878A3",
+"6  c #4476B5",
+"7  c #4A72B2",
+"8  c #4A7CBA",
+"9  c #537BB6",
+"0  c #567EB9",
+"q  c #5C83BB",
+"w  c #5985BC",
+"e  c #5C86BE",
+"r  c #5C87BF",
+"t  c #5C88BD",
+"y  c #608ABB",
+"u  c #6188BC",
+"i  c #658DBE",
+"p  c #718DB4",
+"a  c #5786C3",
+"s  c #5A88C4",
+"d  c #648CC0",
+"f  c #678FC0",
+"g  c #668FC3",
+"h  c #608CC6",
+"j  c #6B92C3",
+"k  c #6C92C3",
+"l  c #6890C4",
+"z  c #6892C6",
+"x  c #6F97C9",
+"c  c #7096C5",
+"v  c #7499C7",
+"b  c #7299CB",
+"n  c #739ACB",
+"m  c #779DCE",
+"M  c #789CC8",
+"N  c #7B9ECB",
+"B  c #7C9FCB",
+"V  c #7B9FCC",
+"C  c #7A9FCF",
+"Z  c #769ED3",
+"A  c #7CA1D0",
+"S  c #7DA1D0",
+"D  c #838383",
+"F  c gray53",
+"G  c gray55",
+"H  c #939393",
+"J  c gray60",
+"K  c gray62",
+"L  c #8A9DB5",
+"P  c #A9A9A9",
+"I  c #AEAEAE",
+"U  c #B7B7B7",
+"Y  c #BCBCBC",
+"T  c #80A2CD",
+"R  c #82A4CF",
+"E  c #9AAFCE",
+"W  c #82A4D0",
+"Q  c #83A6D1",
+"!  c #82A5D2",
+"~  c #84A6D1",
+"^  c #82A6D7",
+"/  c #8AABD5",
+"(  c #8FAED7",
+")  c #81A7D9",
+"_  c #89ABD8",
+"`  c #88ABD9",
+"'  c #8BACD8",
+"]  c #8FAEDA",
+"[  c #8CAEDD",
+"{  c #8FB0DB",
+"}  c #92B0D8",
+"|  c #94B3D9",
+" . c #94B2DA",
+".. c #98B5DC",
+"X. c #99B6DC",
+"o. c #8FB1E2",
+"O. c #92B2E0",
+"+. c #93B4E3",
+"@. c #97B6E4",
+"#. c #9FBAE0",
+"$. c #9CBBE7",
+"%. c #9DBBE7",
+"&. c #9FBEEA",
+"*. c #A2BDE1",
+"=. c #A4BEE2",
+"-. c #A3BFE5",
+";. c #A1BEEC",
+":. c #A6C0E3",
+">. c #A9C3E5",
+",. c #A8C1E7",
+"<. c #A3C0E8",
+"1. c #A4C0E8",
+"2. c #ADC6E8",
+"3. c #B0C8E9",
+"4. c None",
+/* pixels */
+"4.4.4.4.4.4.4.4.4.4.4.4.4.) Z 4.",
+"4.4.4.4.4.4.4.4.;.%.@.O.] ..C a ",
+"4.4.4.4.4.4.4.4.1.3.>.*.X./ W 6 ",
+"4.4.4.4.4.4.4.o.,.#.' ! m ~ e 4.",
+"4.4.4.4.4.4.4.) `  .} b l M 7 4.",
+"4.4.4.4.4.K J 4.4.a x B w j > 4.",
+"4.4.4.&.E U Y G 4.4.3 q f y % 4.",
+"4.4.$.<.-.L I D 4.4.4.* 4 - + 4.",
+"4.4.+.2.:.{ p 4.o X 4.4.@ O 4.4.",
+"4.4.[ =._ | C 5 H P . 4.4.4.4.4.",
+"4.4.^ X.S n R v < F   4.4.4.4.4.",
+"4.4.A ( x g t d u # 4.4.4.4.4.4.",
+"4.h Q V N v k i 1 4.4.4.4.4.4.4.",
+"s z T c 9 2 = & $ 4.4.4.4.4.4.4.",
+"8 r 0 : 4.4.4.4.4.4.4.4.4.4.4.4.",
+"4., ; 4.4.4.4.4.4.4.4.4.4.4.4.4."
+};
diff --git a/src/client/console/nxmc/rc/icons/small/vpn_connector.xpm b/src/client/console/nxmc/rc/icons/small/vpn_connector.xpm
new file mode 100644 (file)
index 0000000..325fc64
--- /dev/null
@@ -0,0 +1,190 @@
+/* XPM */
+static char *vpnc[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 168 2",
+"   c #137913790000",
+".  c #0BCE3EDB0000",
+"X  c #088D38F00C56",
+"o  c #16813F8B16B2",
+"O  c #265626560384",
+"+  c #2A232A230000",
+"@  c #349234920000",
+"#  c #34C834C80000",
+"$  c #3E733D940C26",
+"%  c #2EC42BBC2EC4",
+"&  c #2F5D38782F84",
+"*  c #0EAB49940EA6",
+"=  c #0C124E530C0F",
+"-  c #0D284D2B0D91",
+";  c #0424548E0455",
+":  c #0674573B0706",
+">  c #0E995EDF0E99",
+",  c #16714BE418E3",
+"<  c #19C9499819C9",
+"1  c #151B55F11635",
+"2  c #16FD57ED16FD",
+"3  c #170F5AFC1707",
+"4  c #181D5474193B",
+"5  c #1967544619C9",
+"6  c #1EBD55B81EBD",
+"7  c #1E2E55F61E2E",
+"8  c #031F78EA031B",
+"9  c #1A8663EA1A86",
+"0  c #1C4860561C48",
+"q  c #1DFE69691DFE",
+"w  c #1B6B711F1C7C",
+"e  c #1F1E7E1E18A9",
+"r  c #2A0662130E22",
+"t  c #26E665691753",
+"y  c #28D565B9174A",
+"u  c #26E46AEA17F2",
+"i  c #21246CC317F2",
+"p  c #26F67CF21A3D",
+"a  c #3F3870C91A41",
+"s  c #2AAE459F2B45",
+"d  c #2F084BA82F08",
+"f  c #2229528E2211",
+"g  c #231559D32315",
+"h  c #22BC5B5222BC",
+"j  c #2AAE53032B45",
+"k  c #30214CC73021",
+"l  c #337C4C50346C",
+"z  c #2E53604B2E53",
+"x  c #265674C82656",
+"c  c #39F67922213F",
+"v  c #2FF86AEE2FF8",
+"b  c #30A16BFB30A1",
+"n  c #38F7622238F7",
+"m  c #3D01623F3D01",
+"M  c #3D0D65353D0D",
+"N  c #2C227DBD3106",
+"B  c #399275EA398D",
+"V  c #480348030000",
+"C  c #4D8F4D050000",
+"Z  c #4F904F900000",
+"A  c #4C024C150C02",
+"S  c #5E8D5E8D0000",
+"D  c #5F595F590000",
+"F  c #603260320000",
+"G  c #6AD66AD60000",
+"H  c #6C1A6C1A0000",
+"J  c #6E476E470000",
+"K  c #71256E070000",
+"L  c #7C0D7C0D0000",
+"P  c #5F525F5232FE",
+"I  c #475D742121AB",
+"U  c #42015E494201",
+"Y  c #51784F8E5178",
+"T  c #53DC517553DC",
+"R  c #559452D55594",
+"E  c #554C516557C7",
+"W  c #56E1552C56E1",
+"Q  c #524852485B79",
+"!  c #540F5E8E5879",
+"~  c #59765B5C5976",
+"^  c #536D653E536D",
+"/  c #54E260755476",
+"(  c #570263D55702",
+")  c #576A65BE576A",
+"_  c #56FF66EF56FF",
+"`  c #592D6590592D",
+"'  c #59DB66985A65",
+"]  c #5D7367175D73",
+"[  c #5E4869BA5E48",
+"{  c #5EE869D15EE8",
+"}  c #579B732E579B",
+"|  c #573074535853",
+" . c #632862514F6F",
+".. c #6CDA747B4F5B",
+"X. c #7B7D7E034C48",
+"o. c #5F7E74C6603D",
+"O. c #128285E81635",
+"+. c #12DA881012DA",
+"@. c #21A2870121A2",
+"#. c #2E008BE72E00",
+"$. c #2F258A8F2F25",
+"%. c #293491AD2934",
+"&. c #36E79F0E36E7",
+"*. c #386F93023A53",
+"=. c #3F39A0823F39",
+"-. c #3D7DA4AB3D7D",
+";. c #594B84A33371",
+":. c #41699C3E4169",
+">. c #4A4F9ACB4A4F",
+",. c #59B08D375E0B",
+"<. c #4173A5314173",
+"1. c #596AA0C359A7",
+"2. c #5AF6A1B35AF6",
+"3. c #6357915767B1",
+"4. c #79E582FB732F",
+"5. c #6445A4736445",
+"6. c #64ABA56265CF",
+"7. c #6EB5A8BB6EB5",
+"8. c #6F1DA8EB6F1D",
+"9. c #6E70ADEE6E70",
+"0. c #708FA70C708F",
+"q. c #83BB882502B0",
+"w. c #821F8D900220",
+"e. c #8C358C350000",
+"r. c #8DC18DC10000",
+"t. c #8EB18EB10000",
+"y. c #8F658F4601A2",
+"u. c #85B5903D0461",
+"i. c #8982934807F6",
+"p. c #8B0B943F080A",
+"a. c #8FA891320D45",
+"s. c #92D192D10000",
+"d. c #940E940E0000",
+"f. c #9FB29FB20AF3",
+"g. c #997999790D81",
+"h. c #9A1E99810D0C",
+"j. c #9B429A4E0E2B",
+"k. c #91F593BA106C",
+"l. c #A93EA8CA0000",
+"z. c #A9F7A9BF0000",
+"x. c #AB7BAB3F0000",
+"c. c #BE5EBE5E0787",
+"v. c #BF07BE8B0799",
+"b. c #E03BE0400000",
+"n. c #E23EE1F80000",
+"m. c #E3B5E1A40000",
+"M. c #EA4CE9F20172",
+"N. c #EB68EB680000",
+"B. c #E9B3E9B3019E",
+"V. c yellow",
+"C. c #B3B5B5EF4AE5",
+"Z. c #B122B78A4B60",
+"A. c #B4E5B73B4B50",
+"S. c #A593B432534E",
+"D. c #8C2D9CE68C2D",
+"F. c #951F97C98BF9",
+"G. c #9A2095D18C2C",
+"H. c #9A6C963D8CBD",
+"J. c #91739ABE8CBD",
+"K. c #91809FEF9180",
+"L. c #91FA9E339764",
+"P. c #A2869B7E9484",
+"I. c #A0F3A396A16F",
+"U. c #AA7EBAA9ABCC",
+"Y. c #ACEEBBC9AF0E",
+"T. c #B17BBBA4B171",
+"R. c #B46EBEE2B46E",
+"E. c None",
+/* pixels */
+"E.E.E.E.E.E.S J J G E.E.E.E.E.E.",
+"E.E.E.E.E.S D E.E.V H E.E.E.E.E.",
+"E.E.E.E.E.F @ E.E.E.F # E.E.E.E.",
+"E.E.E.E.E.L e.s.d.t.r.Z E.E.E.E.",
+"E.E.E.E.$ b.V.c.g.B.V.y.E.E.E.E.",
+"I.U.T.Y...n.N.P Q f.V.k.L.R.] E.",
+"P.;.6.*.r m.V.v.h.M.V.w.N 9.6 E.",
+"F.c o.l . K q.i.p.u.a.A , 7.n Y ",
+"H.a 4 * : X 1 3.,.w ! E f 8.M W ",
+"G.I | k b ` h 5.%.+.0 7 x 2.h T ",
+"J.p 5 * > < 9 0.:.-.&.=.<.$.2 R ",
+"D.@.} d v ( g >.8 j o 3 s ; = % ",
+"K.#.z m q U B 1.O.t i u y e - E.",
+"~ ) _ { ^ [ ' 4.S.C.Z.A.X./ & E.",
+"E.E.E.E.E.E.E. .j.z.l.x.C E.E.E.",
+"E.E.E.E.E.E.E.E.O + + +   E.E.E."
+};
diff --git a/src/client/console/nxmc/rc/icons/small/warning.xpm b/src/client/console/nxmc/rc/icons/small/warning.xpm
new file mode 100644 (file)
index 0000000..f73ea2f
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char *warning[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 3 1",
+"  c black",
+". c cyan",
+"X c None",
+/* pixels */
+"XXXXXXXXXXXXXXXX",
+"XXXXXXX  XXXXXXX",
+"XXXXXX .. XXXXXX",
+"XXXXXX .. XXXXXX",
+"XXXXX .... XXXXX",
+"XXXXX .  . XXXXX",
+"XXXX ..  .. XXXX",
+"XXXX ..  .. XXXX",
+"XXX ...  ... XXX",
+"XXX ...  ... XXX",
+"XX .......... XX",
+"XX ....  .... XX",
+"X .....  ..... X",
+"X ............ X",
+"X              X",
+"XXXXXXXXXXXXXXXX"
+};
diff --git a/src/client/console/nxmc/rc/icons/small/zone.xpm b/src/client/console/nxmc/rc/icons/small/zone.xpm
new file mode 100644 (file)
index 0000000..fb01076
--- /dev/null
@@ -0,0 +1,26 @@
+/* XPM */
+static char *zone[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 4 1",
+"  c black",
+". c #808080",
+"X c gray100",
+"o c None",
+/* pixels */
+"oooooooooooooooo",
+".............ooo",
+".XXXXXXXXXXX..oo",
+".X...XX.XXXX.X.o",
+".XXXXXX.XXXX.   ",
+".XXX.......XXXX ",
+".XXX.XXXXX.XXXX ",
+".XXX.XXXXX.XXXX ",
+".X.....X.....XX ",
+".X.XXX.X.XXX.XX ",
+".X.XXX.X.XXX.XX ",
+".XXXXXXXXXXXXXX ",
+".XXXXXXXXXXXXXX ",
+"                ",
+"oooooooooooooooo",
+"oooooooooooooooo"
+};
index 68b9dae..94d60c7 100644 (file)
@@ -1,18 +1,42 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
 
-       <-- Small icons -->
+       <!-- Small object icons -->
        <object class="wxIcon" name="icoSmallNetwork">icons/small/network.xpm</object>
        <object class="wxIcon" name="icoSmallSubnet">icons/small/subnet.xpm</object>
        <object class="wxIcon" name="icoSmallNode">icons/small/node.xpm</object>
        <object class="wxIcon" name="icoSmallCluster">icons/small/cluster.xpm</object>
        <object class="wxIcon" name="icoSmallInterface">icons/small/interface.xpm</object>
        <object class="wxIcon" name="icoSmallNetworkService">icons/small/network_service.xpm</object>
+       <object class="wxIcon" name="icoSmallVPNConnector">icons/small/vpn_connector.xpm</object>
        <object class="wxIcon" name="icoSmallTemplate">icons/small/template.xpm</object>
        <object class="wxIcon" name="icoSmallTemplateGroup">icons/small/template_group.xpm</object>
        <object class="wxIcon" name="icoSmallTemplateRoot">icons/small/template_root.xpm</object>
+       <object class="wxIcon" name="icoSmallServiceRoot">icons/small/service_root.xpm</object>
+       <object class="wxIcon" name="icoSmallContainer">icons/small/container.xpm</object>
+       <object class="wxIcon" name="icoSmallCondition">icons/small/condition.xpm</object>
+       <object class="wxIcon" name="icoSmallZone">icons/small/zone.xpm</object>
 
-       <-- Busy dialog -->
+       <!-- Small status/severity icons -->
+       <object class="wxIcon" name="icoSmallNormal">icons/small/normal.xpm</object>
+       <object class="wxIcon" name="icoSmallWarning">icons/small/warning.xpm</object>
+       <object class="wxIcon" name="icoSmallMinor">icons/small/minor.xpm</object>
+       <object class="wxIcon" name="icoSmallMajor">icons/small/major.xpm</object>
+       <object class="wxIcon" name="icoSmallCritical">icons/small/critical.xpm</object>
+       <object class="wxIcon" name="icoSmallUnknown">icons/small/unknown.xpm</object>
+       <object class="wxIcon" name="icoSmallUnmanaged">icons/small/unmanaged.xpm</object>
+       <object class="wxIcon" name="icoSmallDisabled">icons/small/disabled.xpm</object>
+       <object class="wxIcon" name="icoSmallTesting">icons/small/testing.xpm</object>
+
+       <!-- Small alarm states icons -->
+       <object class="wxIcon" name="icoSmallOutstanding">icons/small/outstanding.xpm</object>
+       <object class="wxIcon" name="icoSmallAcknowledged">icons/small/acknowledged.xpm</object>
+       <object class="wxIcon" name="icoSmallTerminated">icons/small/terminated.xpm</object>
+
+       <!-- Miscellanious small icons -->
+       <object class="wxIcon" name="icoSmallInformation">icons/small/information.xpm</object>
+
+       <!-- Busy dialog -->
        <object class="wxDialog" name="nxBusyDialog">
                <size>436,63</size>
                <title>NetXMS Console - Processing</title>
diff --git a/src/client/console/plugins/AlarmBrowser/AlarmBrowser.rc b/src/client/console/plugins/AlarmBrowser/AlarmBrowser.rc
new file mode 100644 (file)
index 0000000..82cbb47
--- /dev/null
@@ -0,0 +1,70 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// XRS
+//
+
+IDR_XRS                 XRS     DISCARDABLE     "rc\\AlarmBrowser.xrs"
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/src/client/console/plugins/AlarmBrowser/Makefile.am b/src/client/console/plugins/AlarmBrowser/Makefile.am
new file mode 100644 (file)
index 0000000..8d6441e
--- /dev/null
@@ -0,0 +1,21 @@
+INCLUDES=-I@top_srcdir@/include -I@top_srcdir@/src/client/console/include
+
+SUBDIRS = rc
+
+lib_LTLIBRARIES = libnxmcp_AlarmBrowser.la
+libnxmcp_AlarmBrowser_la_SOURCES = browser.cpp main.cpp view.cpp
+libnxmcp_AlarmBrowser_la_LDFLAGS = ../../../../libnetxms/libnetxms.la ../../../../libnxcl/libnxcl.la ../../libnxmc/libnxmc.la
+
+EXTRA_DIST = alarm_browser.h mcpAlarmBrowser.dsp AlarmBrowser.rc resource.h
+
+install-exec-hook:
+       if test ! -e $(libdir)/nxmc ; then \
+               mkdir $(libdir)/nxmc ; \
+       fi ; \
+       if test "x`uname -s`" = "xAIX" ; then \
+               rm -f $(libdir)/nxmc/libnxmcp_AlarmBrowser.so.0 ; \
+               $(AR) x $(libdir)/libnxmcp_AlarmBrowser.a $(libdir)/nxmc/libnxmcp_AlarmBrowser.so.0 ; \
+               mv $(libdir)/nxmc/libnxmcp_AlarmBrowser.so.0 $(libdir)/nxmc/libnxmcp_AlarmBrowser.so ; \
+       else \
+               mv $(libdir)/libnxmcp_AlarmBrowser.* $(libdir)/nxmc/ ; \
+       fi
@@ -1,6 +1,6 @@
 /* 
 ** NetXMS - Network Management System
-** Portable management console - plugin API library
+** Portable management console - Alarm Browser plugin
 ** Copyright (C) 2007 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: libnxmc.h
+** File: alarm_browser.h
 **
 **/
 
-#ifndef _libnxmc_h_
-#define _libnxmc_h_
-
-#define WXUSINGDLL
+#ifndef _alarm_browser_h_
+#define _alarm_browser_h_
 
 #include <nms_common.h>
 #include <nms_util.h>
 #include <nxclapi.h>
-
-#ifdef _WIN32
-#include <wx/msw/winundef.h>
-#endif
-
-#include <wx/wx.h>
-
-#ifndef WX_PRECOMP
-#include <wx/app.h>
-#include <wx/frame.h>
-#include <wx/artprov.h>
-#include <wx/xrc/xmlres.h>
-#include <wx/filesys.h>
-#include <wx/fs_arc.h>
-#include <wx/fs_mem.h>
-#include <wx/aui/aui.h>
-#include <wx/dir.h>
-#endif
-
 #include <nxmc_api.h>
 
 
 //
-// Hash map types
+// Alarm view class
 //
 
-WX_DECLARE_STRING_HASH_MAP(nxView*, nxViewHash);
+class nxAlarmView : public wxWindow
+{
+private:
+       wxListCtrl *m_wndListCtrl;
+
+       void AddAlarm(NXC_ALARM *alarm);
+       void UpdateAlarm(long item, NXC_ALARM *alarm);
+
+public:
+       nxAlarmView(wxWindow *parent);
+
+       void RefreshView();
+
+       // Event handlers
+protected:
+       void OnSize(wxSizeEvent &event);
+       void OnListItemRightClick(wxListEvent &event);
+
+       DECLARE_EVENT_TABLE()
+};
 
 
 //
-// Global variables
+// Alarm browser class
 //
 
-extern wxAuiNotebook *g_auiNotebook;
-extern wxAuiManager *g_auiManager;
+class nxAlarmBrowser : public nxView
+{
+private:
+       nxAlarmView *m_view;
+       
+public:
+       nxAlarmBrowser();
+       virtual ~nxAlarmBrowser();
+
+       // Event handlers
+protected:
+       void OnSize(wxSizeEvent &event);
+       void OnViewRefresh(wxCommandEvent &event);
 
+       DECLARE_EVENT_TABLE()
+};
 
 #endif
diff --git a/src/client/console/plugins/AlarmBrowser/browser.cpp b/src/client/console/plugins/AlarmBrowser/browser.cpp
new file mode 100644 (file)
index 0000000..c805d0f
--- /dev/null
@@ -0,0 +1,83 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - Alarm Browser plugin
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: browser.cpp
+**
+**/
+
+#include "alarm_browser.h"
+
+
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxAlarmBrowser, nxView)
+       EVT_SIZE(nxAlarmBrowser::OnSize)
+       EVT_NX_REFRESH_VIEW(nxAlarmBrowser::OnViewRefresh)
+END_EVENT_TABLE()
+
+
+//
+// Constructor
+//
+
+nxAlarmBrowser::nxAlarmBrowser()
+               : nxView(NXMCGetDefaultParent())
+{
+       SetName(_T("alarmbrowser"));
+       SetLabel(_T("Alarm Browser"));
+       RegisterUniqueView(_T("alarmbrowser"), this);
+
+       m_view = new nxAlarmView(this);
+
+       wxCommandEvent event(nxEVT_REFRESH_VIEW);
+       AddPendingEvent(event);
+}
+
+
+//
+// Destructor
+//
+
+nxAlarmBrowser::~nxAlarmBrowser()
+{
+       UnregisterUniqueView(_T("alarmbrowser"));
+}
+
+
+//
+// Resize handler
+//
+
+void nxAlarmBrowser::OnSize(wxSizeEvent &event)
+{
+       wxSize size = GetClientSize();
+       m_view->SetSize(0, 0, size.x, size.y);
+}
+
+
+//
+// View->Refresh menu handler
+//
+
+void nxAlarmBrowser::OnViewRefresh(wxCommandEvent &event)
+{
+       m_view->RefreshView();
+}
diff --git a/src/client/console/plugins/AlarmBrowser/main.cpp b/src/client/console/plugins/AlarmBrowser/main.cpp
new file mode 100644 (file)
index 0000000..2923874
--- /dev/null
@@ -0,0 +1,93 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - Alarm Browser plugin
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: main.cpp
+**
+**/
+
+#include "alarm_browser.h"
+
+#ifdef _WIN32
+#include "resource.h"
+#endif
+
+
+//
+// Static data
+//
+
+#ifdef _WIN32
+static HINSTANCE s_libInstance;
+#endif
+
+
+//
+// Create object browser
+//
+
+extern "C" void NXMC_PLUGIN_EXPORT nxmcCommandHandler(int cmd)
+{
+       nxView *view;
+       
+       if ((view = FindUniqueView(_T("alarmbrowser"))) == NULL)
+       {
+               NXMCCreateView(new nxAlarmBrowser, VIEWAREA_MAIN);
+       }
+       else
+       {
+               ActivateView(view);
+       }
+}
+
+
+//
+// Registration function
+//
+
+NXMC_IMPLEMENT_PLUGIN_REGISTRATION(_T("AlarmBrowser"), NETXMS_VERSION_STRING, NXMC_IP_MAIN_MENU)
+
+
+//
+// Initialization function
+//
+
+extern "C" bool NXMC_PLUGIN_EXPORT nxmcInitializePlugin(NXMC_PLUGIN_HANDLE handle)
+{
+       if (!NXMCLoadResources(_T("AlarmBrowser.xrs"), NXMC_LIB_INSTANCE_ARG(s_libInstance), MAKEINTRESOURCE(IDR_XRS)))
+               wxLogWarning(_T("AlarmBrowser: cannot load resource file"));
+       NXMCAddViewMenuItem(handle, _T("&Alarm Browser\tF8"), 0);
+       return true;
+}
+
+
+//
+// DLL entry point
+//
+
+#ifdef _WIN32
+
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+       if (dwReason == DLL_PROCESS_ATTACH)
+               DisableThreadLibraryCalls(hInstance);
+       s_libInstance = hInstance;
+       return TRUE;
+}
+
+#endif
@@ -1,26 +1,26 @@
-# Microsoft Developer Studio Project File - Name="mcpObjectBrowser" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="mcpAlarmBrowser" - Package Owner=<4>
 # Microsoft Developer Studio Generated Build File, Format Version 6.00
 # ** DO NOT EDIT **
 
 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
 
-CFG=mcpObjectBrowser - Win32 Debug UNICODE
+CFG=mcpAlarmBrowser - Win32 Debug UNICODE
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,
 !MESSAGE use the Export Makefile command and run
 !MESSAGE 
-!MESSAGE NMAKE /f "mcpObjectBrowser.mak".
+!MESSAGE NMAKE /f "mcpAlarmBrowser.mak".
 !MESSAGE 
 !MESSAGE You can specify a configuration when running NMAKE
 !MESSAGE by defining the macro CFG on the command line. For example:
 !MESSAGE 
-!MESSAGE NMAKE /f "mcpObjectBrowser.mak" CFG="mcpObjectBrowser - Win32 Debug UNICODE"
+!MESSAGE NMAKE /f "mcpAlarmBrowser.mak" CFG="mcpAlarmBrowser - Win32 Debug UNICODE"
 !MESSAGE 
 !MESSAGE Possible choices for configuration are:
 !MESSAGE 
-!MESSAGE "mcpObjectBrowser - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "mcpObjectBrowser - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "mcpObjectBrowser - Win32 Release UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "mcpObjectBrowser - Win32 Debug UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpAlarmBrowser - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpAlarmBrowser - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpAlarmBrowser - Win32 Release UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "mcpAlarmBrowser - Win32 Debug UNICODE" (based on "Win32 (x86) Dynamic-Link Library")
 !MESSAGE 
 
 # Begin Project
@@ -31,7 +31,7 @@ CPP=cl.exe
 MTL=midl.exe
 RSC=rc.exe
 
-!IF  "$(CFG)" == "mcpObjectBrowser - Win32 Release"
+!IF  "$(CFG)" == "mcpAlarmBrowser - Win32 Release"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 0
@@ -44,8 +44,8 @@ RSC=rc.exe
 # PROP Intermediate_Dir "Release"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "__WXMSW__" /YX /FD /c
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /D "__WXMSW__" /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -55,9 +55,9 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"Release/ObjectBrowser.so"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"Release/AlarmBrowser.so"
 
-!ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Debug"
+!ELSEIF  "$(CFG)" == "mcpAlarmBrowser - Win32 Debug"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 1
@@ -70,8 +70,8 @@ LINK32=link.exe
 # PROP Intermediate_Dir "Debug"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\include" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\include" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -81,14 +81,14 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/ObjectBrowser.so" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/AlarmBrowser.so" /pdbtype:sept
 
-!ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Release UNICODE"
+!ELSEIF  "$(CFG)" == "mcpAlarmBrowser - Win32 Release UNICODE"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "mcpObjectBrowser___Win32_Release_UNICODE"
-# PROP BASE Intermediate_Dir "mcpObjectBrowser___Win32_Release_UNICODE"
+# PROP BASE Output_Dir "mcpAlarmBrowser___Win32_Release_UNICODE"
+# PROP BASE Intermediate_Dir "mcpAlarmBrowser___Win32_Release_UNICODE"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 0
@@ -96,8 +96,8 @@ LINK32=link.exe
 # PROP Intermediate_Dir "Release_UNICODE"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "UNICODE" /D "__WXMSW__" /YX /FD /c
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /D "UNICODE" /D "__WXMSW__" /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -107,19 +107,19 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib libnxmc.lib /nologo /dll /machine:I386 /out:"Release_UNICODE/ObjectBrowser.so" /libpath:"..\..\..\..\libnetxms\Release_UNICODE" /libpath:"..\..\..\..\libnxcl\Release_UNICODE" /libpath:"..\..\libnxmc\Release_UNICODE"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib libnxmc.lib /nologo /dll /machine:I386 /out:"Release_UNICODE/AlarmBrowser.so" /libpath:"..\..\..\..\libnetxms\Release_UNICODE" /libpath:"..\..\..\..\libnxcl\Release_UNICODE" /libpath:"..\..\libnxmc\Release_UNICODE"
 # Begin Special Build Tool
 SOURCE="$(InputPath)"
 PostBuild_Desc=Copy files
-PostBuild_Cmds=copy     Release_UNICODE\ObjectBrowser.so     C:\NetXMS\lib\nxmc\ 
+PostBuild_Cmds=copy        Release_UNICODE\AlarmBrowser.so        C:\NetXMS\lib\nxmc\ 
 # End Special Build Tool
 
-!ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Debug UNICODE"
+!ELSEIF  "$(CFG)" == "mcpAlarmBrowser - Win32 Debug UNICODE"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "mcpObjectBrowser___Win32_Debug_UNICODE"
-# PROP BASE Intermediate_Dir "mcpObjectBrowser___Win32_Debug_UNICODE"
+# PROP BASE Output_Dir "mcpAlarmBrowser___Win32_Debug_UNICODE"
+# PROP BASE Intermediate_Dir "mcpAlarmBrowser___Win32_Debug_UNICODE"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 1
@@ -127,8 +127,8 @@ PostBuild_Cmds=copy     Release_UNICODE\ObjectBrowser.so     C:\NetXMS\lib\nxmc\
 # PROP Intermediate_Dir "Debug_UNICODE"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPOBJECTBROWSER_EXPORTS" /D "UNICODE" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCPALARMBROWSER_EXPORTS" /D "UNICODE" /D "__WXMSW__" /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -138,21 +138,21 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib libnxmc.lib /nologo /dll /debug /machine:I386 /out:"Debug_UNICODE/ObjectBrowser.so" /pdbtype:sept /libpath:"..\..\..\..\libnetxms\Debug_UNICODE" /libpath:"..\..\..\..\libnxcl\Debug_UNICODE" /libpath:"..\..\libnxmc\Debug_UNICODE"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib libnetxmsw.lib libnxclw.lib libnxmc.lib /nologo /dll /debug /machine:I386 /out:"Debug_UNICODE/AlarmBrowser.so" /pdbtype:sept /libpath:"..\..\..\..\libnetxms\Debug_UNICODE" /libpath:"..\..\..\..\libnxcl\Debug_UNICODE" /libpath:"..\..\libnxmc\Debug_UNICODE"
 # Begin Special Build Tool
 SOURCE="$(InputPath)"
 PostBuild_Desc=Copy files
-PostBuild_Cmds=copy Debug_UNICODE\ObjectBrowser.so ..\..\..\..\..\lib\nxmc
+PostBuild_Cmds=copy Debug_UNICODE\AlarmBrowser.so ..\..\..\..\..\lib\nxmc
 # End Special Build Tool
 
 !ENDIF 
 
 # Begin Target
 
-# Name "mcpObjectBrowser - Win32 Release"
-# Name "mcpObjectBrowser - Win32 Debug"
-# Name "mcpObjectBrowser - Win32 Release UNICODE"
-# Name "mcpObjectBrowser - Win32 Debug UNICODE"
+# Name "mcpAlarmBrowser - Win32 Release"
+# Name "mcpAlarmBrowser - Win32 Debug"
+# Name "mcpAlarmBrowser - Win32 Release UNICODE"
+# Name "mcpAlarmBrowser - Win32 Debug UNICODE"
 # Begin Group "Source Files"
 
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -166,7 +166,7 @@ SOURCE=.\main.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=.\objview.cpp
+SOURCE=.\view.cpp
 # End Source File
 # End Group
 # Begin Group "Header Files"
@@ -174,6 +174,10 @@ SOURCE=.\objview.cpp
 # PROP Default_Filter "h;hpp;hxx;hm;inl"
 # Begin Source File
 
+SOURCE=.\alarm_browser.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\..\..\..\include\nms_common.h
 # End Source File
 # Begin Source File
@@ -194,16 +198,71 @@ SOURCE=..\..\include\nxmc_api.h
 # End Source File
 # Begin Source File
 
-SOURCE=.\object_browser.h
-# End Source File
-# Begin Source File
-
 SOURCE=..\..\..\..\..\include\unicode.h
 # End Source File
 # End Group
 # Begin Group "Resource Files"
 
 # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\AlarmBrowser.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\rc\AlarmBrowser.xrc
+
+!IF  "$(CFG)" == "mcpAlarmBrowser - Win32 Release"
+
+# Begin Custom Build
+ProjDir=.
+InputPath=.\rc\AlarmBrowser.xrc
+
+"rc\AlarmBrowser.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       wxrc $(ProjDir)\rc\AlarmBrowser.xrc -o $(ProjDir)\rc\AlarmBrowser.xrs
+
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "mcpAlarmBrowser - Win32 Debug"
+
+# Begin Custom Build
+ProjDir=.
+InputPath=.\rc\AlarmBrowser.xrc
+
+"rc\AlarmBrowser.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       wxrc $(ProjDir)\rc\AlarmBrowser.xrc -o $(ProjDir)\rc\AlarmBrowser.xrs
+
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "mcpAlarmBrowser - Win32 Release UNICODE"
+
+# Begin Custom Build
+ProjDir=.
+InputPath=.\rc\AlarmBrowser.xrc
+
+"rc\AlarmBrowser.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       wxrc $(ProjDir)\rc\AlarmBrowser.xrc -o $(ProjDir)\rc\AlarmBrowser.xrs
+
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "mcpAlarmBrowser - Win32 Debug UNICODE"
+
+# Begin Custom Build
+ProjDir=.
+InputPath=.\rc\AlarmBrowser.xrc
+
+"rc\AlarmBrowser.xrs" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+       wxrc $(ProjDir)\rc\AlarmBrowser.xrc -o $(ProjDir)\rc\AlarmBrowser.xrs
+
+# End Custom Build
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\rc\AlarmBrowser.xrs
+# End Source File
 # End Group
 # End Target
 # End Project
diff --git a/src/client/console/plugins/AlarmBrowser/rc/AlarmBrowser.xrc b/src/client/console/plugins/AlarmBrowser/rc/AlarmBrowser.xrc
new file mode 100644 (file)
index 0000000..c470eac
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
+       <object class="wxMenu" name="menuCtxAlarm">
+               <label>Alarm</label>
+               <object class="wxMenuItem" name="menuAlarmAck">
+                       <label>&amp;Acknowledge</label>
+                       <help></help>
+               </object>
+               <object class="wxMenuItem" name="menuAlarmTerminate">
+                       <label>&amp;Terminate</label>
+                       <help></help>
+               </object>
+               <object class="wxMenuItem" name="menuAlarmDelete">
+                       <label>&amp;Delete</label>
+                       <help></help>
+               </object>
+       </object>
+</resource>
@@ -8,14 +8,12 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
+resourcedir = $(datadir)/nxmc
+resource_DATA = AlarmBrowser.xrs
+
 EXTRA_DIST = \
-       cluster.xpm \
-       condition.xpm \
-       container.xpm \
-       interface.xpm \
-       network.xpm \
-       network_service.xpm \
-       node.xpm \
-       subnet.xpm \
-       template.xpm \
-       template_root.xpm
+       AlarmBrowser.xrc \
+       AlarmBrowser.xrs
+
+AlarmBrowser.xrs: AlarmBrowser.xrc
+       wxrc AlarmBrowser.xrc -o AlarmBrowser.xrs
diff --git a/src/client/console/plugins/AlarmBrowser/resource.h b/src/client/console/plugins/AlarmBrowser/resource.h
new file mode 100644 (file)
index 0000000..be77a6b
--- /dev/null
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by AlarmBrowser.rc
+//
+#define IDR_XRS                         101
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/src/client/console/plugins/AlarmBrowser/view.cpp b/src/client/console/plugins/AlarmBrowser/view.cpp
new file mode 100644 (file)
index 0000000..72eda28
--- /dev/null
@@ -0,0 +1,156 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - Alarm Browser plugin
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: view.cpp
+**
+**/
+
+#include "alarm_browser.h"
+
+
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxAlarmView, wxWindow)
+       EVT_SIZE(nxAlarmView::OnSize)
+       EVT_LIST_ITEM_RIGHT_CLICK(wxID_LIST_CTRL, nxAlarmView::OnListItemRightClick)
+END_EVENT_TABLE()
+
+
+//
+// Constructor
+//
+
+nxAlarmView::nxAlarmView(wxWindow *parent)
+            : wxWindow(parent, wxID_ANY)
+{
+       m_wndListCtrl = new wxListCtrl(this, wxID_LIST_CTRL, wxDefaultPosition, wxDefaultSize,
+                                      wxLC_REPORT | wxLC_HRULES | wxLC_VRULES);
+       m_wndListCtrl->InsertColumn(0, _T("Severity"), wxLIST_FORMAT_LEFT, 70);
+       m_wndListCtrl->InsertColumn(1, _T("State"), wxLIST_FORMAT_LEFT, 70);
+       m_wndListCtrl->InsertColumn(2, _T("Source"), wxLIST_FORMAT_LEFT, 120);
+       m_wndListCtrl->InsertColumn(3, _T("Message"), wxLIST_FORMAT_LEFT, 200);
+       m_wndListCtrl->InsertColumn(4, _T("Count"), wxLIST_FORMAT_LEFT, 40);
+       m_wndListCtrl->InsertColumn(5, _T("Created"), wxLIST_FORMAT_LEFT, 70);
+       m_wndListCtrl->InsertColumn(6, _T("Last Change"), wxLIST_FORMAT_LEFT, 70);
+       wxImageList *imgList = NXMCGetImageListCopy(IMAGE_LIST_STATUS_SMALL);
+       imgList->Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallOutstanding")));
+       imgList->Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallAcknowledged")));
+       imgList->Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallTerminated")));
+       m_wndListCtrl->AssignImageList(imgList, wxIMAGE_LIST_SMALL);
+}
+
+
+//
+// Resize handler
+//
+
+void nxAlarmView::OnSize(wxSizeEvent &event)
+{
+       wxSize size = GetClientSize();
+       m_wndListCtrl->SetSize(0, 0, size.x, size.y);
+}
+
+
+//
+// Refresh view
+//
+
+void nxAlarmView::RefreshView()
+{
+       nxArrayOfAlarms *list;
+       size_t i;
+
+       m_wndListCtrl->DeleteAllItems();
+       list = NXMCGetAlarmList();
+
+       for(i = 0; i < list->GetCount(); i++)
+       {
+               AddAlarm((*list)[i]);
+       }
+
+       NXMCUnlockAlarmList();
+}
+
+
+//
+// Add alarm to view
+//
+
+void nxAlarmView::AddAlarm(NXC_ALARM *alarm)
+{
+       long item;
+
+       item = m_wndListCtrl->InsertItem(0x7FFFFFFF, NXMCGetStatusTextSmall(alarm->nCurrentSeverity), alarm->nCurrentSeverity);
+       if (item != -1)
+       {
+               m_wndListCtrl->SetItemData(item, alarm->dwAlarmId);
+               UpdateAlarm(item, alarm);
+       }
+}
+
+
+//
+// Update alarm in view
+//
+
+void nxAlarmView::UpdateAlarm(long item, NXC_ALARM *alarm)
+{
+       NXC_OBJECT *object;
+       TCHAR temp[64];
+
+       m_wndListCtrl->SetItem(item, 0, NXMCGetStatusTextSmall(alarm->nCurrentSeverity), alarm->nCurrentSeverity);
+       m_wndListCtrl->SetItem(item, 1, NXMCGetAlarmStateName(alarm->nState), alarm->nState + STATUS_TESTING + 1);
+       
+       object = NXCFindObjectById(NXMCGetSession(), alarm->dwSourceObject);
+       if (object != NULL)
+       {
+               m_wndListCtrl->SetItem(item, 2, object->szName);
+       }
+       else
+       {
+               m_wndListCtrl->SetItem(item, 2, _T("<unknown>"));
+       }
+
+       m_wndListCtrl->SetItem(item, 3, alarm->szMessage);
+
+       _stprintf(temp, _T("%d"), alarm->dwRepeatCount);
+       m_wndListCtrl->SetItem(item, 4, temp);
+
+       m_wndListCtrl->SetItem(item, 5, NXMCFormatTimeStamp(alarm->dwCreationTime, temp, TS_LONG_DATE_TIME));
+       m_wndListCtrl->SetItem(item, 6, NXMCFormatTimeStamp(alarm->dwLastChangeTime, temp, TS_LONG_DATE_TIME));
+}
+
+
+//
+// Handler for right click on item
+//
+
+void nxAlarmView::OnListItemRightClick(wxListEvent &event)
+{
+       wxMenu *menu;
+
+       menu = wxXmlResource::Get()->LoadMenu(_T("menuCtxAlarm"));
+       if (menu != NULL)
+       {
+               PopupMenu(menu);
+               delete menu;
+       }
+}
index 2fb299e..baa71f5 100644 (file)
@@ -8,4 +8,4 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-SUBDIRS = ObjectBrowser
+SUBDIRS = AlarmBrowser ObjectBrowser
index 3fc7e35..eb6bff8 100644 (file)
@@ -32,6 +32,7 @@ BEGIN_EVENT_TABLE(nxObjectBrowser, nxView)
        EVT_SIZE(nxObjectBrowser::OnSize)
        EVT_NX_REFRESH_VIEW(nxObjectBrowser::OnViewRefresh)
        EVT_TREE_ITEM_EXPANDING(wxID_TREE_CTRL, nxObjectBrowser::OnTreeItemExpanding)
+       EVT_TREE_SEL_CHANGED(wxID_TREE_CTRL, nxObjectBrowser::OnTreeSelChanged)
 END_EVENT_TABLE()
 
 
@@ -53,6 +54,9 @@ nxObjectBrowser::nxObjectBrowser()
        m_wndSplitter->SplitVertically(m_wndTreeCtrl, m_wndObjectView, 250);
        RegisterUniqueView(_T("objectbrowser"), this);
        m_isFirstResize = true;
+
+       wxCommandEvent event(nxEVT_REFRESH_VIEW);
+       AddPendingEvent(event);
 }
 
 
@@ -133,7 +137,7 @@ void nxObjectBrowser::AddObjectToTree(NXC_OBJECT *object, wxTreeItemId &root)
        wxTreeItemId item;
        
    CreateTreeItemText(object, itemText);
-       item = m_wndTreeCtrl->AppendItem(root, itemText, object->iClass, object->iClass, new nxObjectTreeItemData(object));
+       item = m_wndTreeCtrl->AppendItem(root, itemText, object->iClass, -1, new nxObjectTreeItemData(object));
 
    // Don't add childs immediatelly to
    // prevent adding millions of items if node has thousands of interfaces in
@@ -195,3 +199,16 @@ void nxObjectBrowser::OnTreeItemExpanding(wxTreeEvent &event)
       }
        }
 }
+
+
+//
+// Handler for object tree selection change
+//
+
+void nxObjectBrowser::OnTreeSelChanged(wxTreeEvent &event)
+{
+       wxTreeItemId item;
+
+       item = event.GetItem();
+       m_wndObjectView->SetObject(((nxObjectTreeItemData *)m_wndTreeCtrl->GetItemData(item))->GetObject());
+}
index 7ed93ef..9b67e2c 100644 (file)
@@ -111,7 +111,7 @@ LINK32=link.exe
 # Begin Special Build Tool
 SOURCE="$(InputPath)"
 PostBuild_Desc=Copy files
-PostBuild_Cmds=copy     Release_UNICODE\ObjectBrowser.so     C:\NetXMS\lib\nxmc\ 
+PostBuild_Cmds=copy      Release_UNICODE\ObjectBrowser.so      C:\NetXMS\lib\nxmc\ 
 # End Special Build Tool
 
 !ELSEIF  "$(CFG)" == "mcpObjectBrowser - Win32 Debug UNICODE"
@@ -168,6 +168,10 @@ SOURCE=.\main.cpp
 
 SOURCE=.\objview.cpp
 # End Source File
+# Begin Source File
+
+SOURCE=.\overview.cpp
+# End Source File
 # End Group
 # Begin Group "Header Files"
 
index 86b9313..b6ba460 100644 (file)
@@ -41,6 +41,48 @@ struct NXC_OBJECT_INDEX
 };
 
 
+//
+// Header for object overview
+//
+
+class nxObjOverviewHeader : public wxWindow
+{
+private:
+       NXC_OBJECT *m_object;
+
+public:
+       nxObjOverviewHeader(wxWindow *parent);
+
+       void SetObject(NXC_OBJECT *object);
+
+protected:
+       void OnPaint(wxPaintEvent &event);
+
+       DECLARE_EVENT_TABLE()
+};
+
+
+//
+// Object overview
+//
+
+class nxObjectOverview : public wxPanel
+{
+private:
+       nxObjOverviewHeader *m_header;
+       wxListCtrl *m_attrList;
+       NXC_OBJECT *m_object;
+
+       void InsertItem(const TCHAR *name, const TCHAR *value);
+       void InsertItem(const TCHAR *name, DWORD value);
+
+public:
+       nxObjectOverview(wxWindow *parent);
+
+       void SetObject(NXC_OBJECT *object);
+};
+
+
 //
 // Object view class
 //
@@ -49,9 +91,24 @@ class nxObjectView : public wxWindow
 {
 private:
        wxNotebook *m_notebook;
+       int m_headerOffset;
+       NXC_OBJECT *m_object;
+
+       nxObjectOverview *m_pageOverview;
+
+       void RemoveAllPages();
        
 public:
        nxObjectView(wxWindow *parent);
+
+       void SetObject(NXC_OBJECT *object);
+
+       // Event handlers
+protected:
+       void OnSize(wxSizeEvent &event);
+       void OnPaint(wxPaintEvent &event);
+
+       DECLARE_EVENT_TABLE()
 };
 
 
@@ -95,6 +152,7 @@ protected:
        void OnSize(wxSizeEvent &event);
        void OnViewRefresh(wxCommandEvent &event);
        void OnTreeItemExpanding(wxTreeEvent &event);
+       void OnTreeSelChanged(wxTreeEvent &event);
 
        DECLARE_EVENT_TABLE()
 };
index 01c7eb2..09e2752 100644 (file)
 #include "object_browser.h"
 
 
+//
+// Event table
+//
+
+BEGIN_EVENT_TABLE(nxObjectView, wxWindow)
+       EVT_SIZE(nxObjectView::OnSize)
+       EVT_PAINT(nxObjectView::OnPaint)
+END_EVENT_TABLE()
+
+
 //
 // Constructor
 //
 nxObjectView::nxObjectView(wxWindow *parent)
              : wxWindow(parent, wxID_ANY)
 {
+       wxImageList *imgList;
+
+       m_object = NULL;
        m_notebook = new wxNotebook(this, wxID_NOTEBOOK_CTRL);
+       m_headerOffset = 33;
+
+       imgList = new wxImageList(16, 16);
+       imgList->Add(wxXmlResource::Get()->LoadIcon(_T("icoSmallInformation")));
+       m_notebook->AssignImageList(imgList);
+
+       m_pageOverview = new nxObjectOverview(m_notebook);
+}
+
+
+//
+// Resize handler
+//
+
+void nxObjectView::OnSize(wxSizeEvent &event)
+{
+       wxSize size = GetClientSize();
+       m_notebook->SetSize(0, m_headerOffset, size.x, size.y - m_headerOffset);
+}
+
+
+//
+// Paint event handler
+//
+
+void nxObjectView::OnPaint(wxPaintEvent &event)
+{
+       wxPaintDC dc(this);
+       wxSize size = GetClientSize();
+       wxBrush *brush;
+
+       brush = wxTheBrushList->FindOrCreateBrush(wxColour(0, 0, 128));
+       dc.SetBrush(*brush);
+
+       dc.DrawRectangle(0, 0, size.x, m_headerOffset);
+       if (m_object != NULL)
+       {
+               dc.SetTextForeground(*wxWHITE);
+               dc.DrawLabel(m_object->szName, wxRect(5, 0, size.x - 10, m_headerOffset), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+       }
+}
+
+
+//
+// Remove all pages
+//
+
+void nxObjectView::RemoveAllPages()
+{
+       size_t i, count;
+
+       count = m_notebook->GetPageCount();
+       for(i = 0; i < count; i++)
+               m_notebook->RemovePage(0);
 }
 
+
+//
+// Set current object
+//
+
+void nxObjectView::SetObject(NXC_OBJECT *object)
+{
+       m_object = object;
+       RefreshRect(wxRect(0, 0, GetClientSize().x, m_headerOffset), false);
+
+       Freeze();
+       RemoveAllPages();
+
+       m_notebook->AddPage(m_pageOverview, _T("Overview"), false, 0);
+
+       m_pageOverview->SetObject(object);
+
+       Thaw();
+}
diff --git a/src/client/console/plugins/ObjectBrowser/overview.cpp b/src/client/console/plugins/ObjectBrowser/overview.cpp
new file mode 100644 (file)
index 0000000..778bfbd
--- /dev/null
@@ -0,0 +1,177 @@
+/* 
+** NetXMS - Network Management System
+** Portable management console - Object Browser plugin
+** Copyright (C) 2007 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: overview.cpp
+**
+**/
+
+#include "object_browser.h"
+
+
+//
+// Header's event table
+//
+
+BEGIN_EVENT_TABLE(nxObjOverviewHeader, wxWindow)
+       EVT_PAINT(nxObjOverviewHeader::OnPaint)
+END_EVENT_TABLE()
+
+
+//
+// Header's constructor
+//
+
+nxObjOverviewHeader::nxObjOverviewHeader(wxWindow *parent)
+                    : wxWindow(parent, wxID_ANY, wxDefaultPosition, wxSize(100, 40))
+{
+       m_object = NULL;
+}
+
+
+//
+// Set current object
+//
+
+void nxObjOverviewHeader::SetObject(NXC_OBJECT *object)
+{
+       m_object = object;
+       Refresh();
+}
+
+
+//
+// Paint header
+//
+
+void nxObjOverviewHeader::OnPaint(wxPaintEvent &event)
+{
+       wxPaintDC dc(this);
+
+       dc.DrawText(m_object->szName, 40, 3);
+}
+
+
+//
+// Constructor
+//
+
+nxObjectOverview::nxObjectOverview(wxWindow *parent)
+                 : wxPanel(parent, wxID_ANY)
+{
+       wxBoxSizer *sizer;
+
+       Hide();
+       SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+
+       m_object = NULL;
+
+       m_header = new nxObjOverviewHeader(this);
+
+       sizer = new wxBoxSizer(wxVERTICAL);
+       sizer->Add(m_header, 0, wxALL | wxEXPAND, 7);
+       sizer->Add(new nxHeading(this, _T("Attributes"), wxDefaultPosition, wxSize(500, 20)), 0, wxALL | wxEXPAND, 7);
+
+       m_attrList = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER);
+       m_attrList->InsertColumn(0, _T("Name"), wxLIST_FORMAT_LEFT, 100);
+       m_attrList->InsertColumn(1, _T("Value"), wxLIST_FORMAT_LEFT, -1);
+       sizer->Add(m_attrList, 1, wxALL | wxEXPAND, 7);
+
+       SetSizer(sizer);
+       sizer->SetSizeHints(this);
+}
+
+
+//
+// Set current object
+//
+
+void nxObjectOverview::SetObject(NXC_OBJECT *object)
+{
+       TCHAR temp[32];
+
+       m_object = object;
+       m_header->SetObject(object);
+
+       m_attrList->DeleteAllItems();
+       InsertItem(_T("ID"), m_object->dwId);
+       InsertItem(_T("Class"), NXMCGetClassName(m_object->iClass));
+       if (m_object->dwIpAddr != 0)
+               InsertItem(_T("IP Address"), IpToStr(m_object->dwIpAddr, temp));
+
+       // Class-specific information
+       switch(m_object->iClass)
+       {
+               case OBJECT_SUBNET:
+                       InsertItem(_T("Network Mask"), IpToStr(m_object->subnet.dwIpNetMask, temp));
+                       break;
+               case OBJECT_NODE:
+                       if (m_object->node.dwFlags & NF_IS_NATIVE_AGENT)
+                       {
+                               InsertItem(_T("NetXMS Agent"), _T("Active"));
+                               InsertItem(_T("Agent Version"), m_object->node.szAgentVersion);
+                               InsertItem(_T("Platform Name"), m_object->node.szPlatformName);
+                       }
+                       else
+                       {
+                               InsertItem(_T("NetXMS Agent"), _T("Inactive"));
+                       }
+                       if (m_object->node.dwFlags & NF_IS_SNMP)
+                       {
+                               InsertItem(_T("SNMP Agent"), _T("Active"));
+                               InsertItem(_T("SNMP OID"), m_object->node.szObjectId);
+                       }
+                       else
+                       {
+                               InsertItem(_T("SNMP Agent"), _T("Inactive"));
+                       }
+                       InsertItem(_T("Node Type"), NXMCGetNodeTypeName(m_object->node.dwNodeType));
+                       break;
+               case OBJECT_INTERFACE:
+                       if (m_object->dwIpAddr != 0)
+                               InsertItem(_T("IP Netmask"), IpToStr(m_object->iface.dwIpNetMask, temp));
+                       InsertItem(_T("Index"), m_object->iface.dwIfIndex);
+                       InsertItem(_T("Type"), NXMCGetIfTypeName((int)m_object->iface.dwIfType));
+                       BinToStr(m_object->iface.bMacAddr, MAC_ADDR_LENGTH, temp);
+                       InsertItem(_T("MAC Address"), temp);
+                       break;
+               default:
+                       break;
+       }
+}
+
+
+//
+// Insert item into attributes list
+//
+
+void nxObjectOverview::InsertItem(const TCHAR *name, const TCHAR *value)
+{
+       long item;
+
+       item = m_attrList->InsertItem(0x7FFFFFFF, name);
+       m_attrList->SetItem(item, 1, value);
+}
+
+void nxObjectOverview::InsertItem(const TCHAR *name, DWORD value)
+{
+       TCHAR buffer[32];
+
+       _stprintf(buffer, _T("%d"), value);
+       InsertItem(name, buffer);
+}