zenoss_client 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -1
- data/.travis.yml +9 -0
- data/Gemfile +1 -1
- data/README.textile +6 -1
- data/Rakefile +5 -4
- data/VERSION +1 -1
- data/lib/zenoss.rb +2 -2
- data/lib/zenoss/connection.rb +3 -2
- data/lib/zenoss/jsonapi/events_router.rb +0 -1
- data/lib/zenoss/model/devices/device.rb +9 -0
- data/test/docker/3.2.1/Dockerfile +11 -0
- data/test/docker/3.2.1/remote_start.sh +3 -0
- data/test/docker/3.2.1/start.sh +2 -0
- data/test/docker/4.2.5/Dockerfile +10 -0
- data/test/docker/4.2.5/remote_start.sh +12 -0
- data/test/docker/4.2.5/start.sh +2 -0
- data/test/fixtures/.gitkeep +0 -0
- data/test/fixtures/vcr_cassettes/3_2_1_initial_connection.yml +437 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +85 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0002_returns_device_uptime_when_asked.yml +110 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml +80 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +80 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +251 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml +86 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0007_fetches_the_report_tree.yml +181 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +82 -0
- data/test/fixtures/vcr_cassettes/3_2_1_test_0009_renames_the_device.yml +151 -0
- data/test/fixtures/vcr_cassettes/4_2_5_initial_connection.yml +594 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +93 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0002_returns_device_uptime_when_asked.yml +114 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0003_returns_an_Array_of_events_for_a_device.yml +99 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +99 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +234 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0006_returns_an_Array_of_events_for_all_devices.yml +203 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0007_fetches_the_report_tree.yml +203 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +86 -0
- data/test/fixtures/vcr_cassettes/4_2_5_test_0009_renames_the_device.yml +160 -0
- data/test/test_helper.rb +20 -11
- data/test/zenoss_client_test.rb +140 -114
- data/zenoss_client.gemspec +13 -9
- metadata +104 -37
@@ -0,0 +1,594 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://192.168.56.2:8080/zport/dmd/zport/acl_users/cookieAuthHelper/login
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=http%3A%2F%2F192.168.56.2%3A8080%2Fzport%2Fdmd%2Fzport%2Fdmd
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Fri, 22 May 2015 12:14:20 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 302
|
21
|
+
message: Moved Temporarily
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
|
25
|
+
Date:
|
26
|
+
- Fri, 22 May 2015 12:14:20 GMT
|
27
|
+
Content-Length:
|
28
|
+
- '59'
|
29
|
+
Content-Type:
|
30
|
+
- text/plain; charset=utf-8
|
31
|
+
Location:
|
32
|
+
- http://192.168.56.2:8080/zport/dmd/zport/dmd?submitted=true
|
33
|
+
Set-Cookie:
|
34
|
+
- _ZopeId="47495875A68v.lkNK6o"; Path=/; HTTPOnly
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: http://192.168.56.2:8080/zport/dmd/zport/dmd?submitted=true
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 22 May 2015 12:14:20 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: http://192.168.56.2:8080/zport/dmd/http://192.168.56.2:8080/zport/dmd/zport/dmd?submitted=true
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=http%3A%2F%2F192.168.56.2%3A8080%2Fzport%2Fdmd%2Fzport%2Fdmd
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
|
49
|
+
Accept:
|
50
|
+
- "*/*"
|
51
|
+
Date:
|
52
|
+
- Fri, 22 May 2015 12:14:20 GMT
|
53
|
+
Content-Type:
|
54
|
+
- application/x-www-form-urlencoded
|
55
|
+
Cookie:
|
56
|
+
- _ZopeId=47495875A68v.lkNK6o
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
|
64
|
+
Date:
|
65
|
+
- Fri, 22 May 2015 12:14:21 GMT
|
66
|
+
Content-Length:
|
67
|
+
- '31717'
|
68
|
+
Content-Type:
|
69
|
+
- text/html; charset=utf-8
|
70
|
+
body:
|
71
|
+
encoding: UTF-8
|
72
|
+
string: "\n<html>\n <head>\n<base href=\"http://192.168.56.2:8080/zport/dmd/zport/dmd/\"
|
73
|
+
/>\n \n <title>\n Zenoss:\n \n Dashboard\n\n
|
74
|
+
\ </title>\n <link rel=\"icon\" href=\"/zport/dmd/favicon.ico\"
|
75
|
+
type=\"image/x-icon\" />\n <link rel=\"shortcut icon\" href=\"/zport/dmd/favicon.ico\"
|
76
|
+
type=\"image/x-icon\" />\n\n <link rel=\"stylesheet\" type=\"text/css\"
|
77
|
+
href=\"/++resource++zenui/css/xtheme-zenoss.css?v=1394581109.0\" />\n <link
|
78
|
+
rel=\"stylesheet\" type=\"text/css\" href=\"/++resource++zenui/css/zenoss.css?v=1394581109.0\"
|
79
|
+
/>\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/++resource++zenui/css/zenui3.css?v=1394581109.0\"
|
80
|
+
/>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/++resource++extjs/examples/ux/css/CheckHeader.css?v=1336168855.0\"
|
81
|
+
/>\n \n<script type=\"text/javascript\">\n function _global_permissions(){\n
|
82
|
+
\ return {\"modify cookie crumblers\": true, \"add ram cache managers\":
|
83
|
+
true, \"reply to item\": true, \"zproperties edit\": true, \"maintenance windows
|
84
|
+
view\": true, \"maintenance windows edit\": true, \"define commands edit\":
|
85
|
+
true, \"add folders\": true, \"set own password\": true, \"add portal content\":
|
86
|
+
true, \"edit user groups\": true, \"manage notification subscriptions\": true,
|
87
|
+
\"review portal content\": true, \"manage relations\": true, \"change cache
|
88
|
+
managers\": true, \"add ofolders\": true, \"create transient objects\": true,
|
89
|
+
\"list undoable changes\": true, \"webdav unlock items\": true, \"manage portal\":
|
90
|
+
true, \"change bindings\": true, \"delete device\": true, \"access transient
|
91
|
+
objects\": true, \"add dmd objects\": true, \"manage site\": true, \"gensummary\":
|
92
|
+
true, \"add restructuredtext documents\": true, \"zencommon\": true, \"manage
|
93
|
+
transient object container\": true, \"zproperties view\": true, \"request
|
94
|
+
review\": true, \"mail forgotten password\": true, \"view trigger\": true,
|
95
|
+
\"change cache settings\": true, \"add page templates\": true, \"change session
|
96
|
+
data manager\": true, \"change external methods\": true, \"managableindex:
|
97
|
+
manage\": true, \"administrators view\": true, \"add external methods\": true,
|
98
|
+
\"define commands view\": true, \"change device production state\": true,
|
99
|
+
\"add site roots\": true, \"add zentablemanager\": true, \"set own properties\":
|
100
|
+
true, \"add plugin registrys\": true, \"webdav lock items\": true, \"update
|
101
|
+
trigger\": true, \"manage trigger\": true, \"search zcatalog\": true, \"access
|
102
|
+
contents information\": true, \"add browser id manager\": true, \"change dtml
|
103
|
+
documents\": true, \"use mailhost services\": true, \"change dtml methods\":
|
104
|
+
true, \"view history\": true, \"add content type registrys\": true, \"ftp
|
105
|
+
access\": true, \"add vocabularies\": true, \"edit local templates\": true,
|
106
|
+
\"manage groups\": true, \"manage webdav locks\": true, \"add toonerelationships\":
|
107
|
+
true, \"add user folders\": true, \"add cmf caching policy managers\": true,
|
108
|
+
\"add temporary folder\": true, \"add btreefolder2s\": true, \"administrators
|
109
|
+
edit\": true, \"admin device\": true, \"change python scripts\": true, \"private,
|
110
|
+
only accessible from trusted code\": true, \"change images and files\": true,
|
111
|
+
\"change database methods\": true, \"add python scripts\": true, \"change
|
112
|
+
configuration\": true, \"view\": true, \"access inactive portal content\":
|
113
|
+
true, \"undo changes\": true, \"run commands\": true, \"change admin objects\":
|
114
|
+
true, \"webdav access\": true, \"view management screens\": true, \"add session
|
115
|
+
data manager\": true, \"add mailhost objects\": true, \"add cmf core tools\":
|
116
|
+
true, \"add database methods\": true, \"change network\": true, \"import/export
|
117
|
+
objects\": true, \"change lock information\": true, \"manage vocabulary\":
|
118
|
+
true, \"access arbitrary user session data\": true, \"open/close database
|
119
|
+
connections\": true, \"delete objects\": true, \"update notification\": true,
|
120
|
+
\"change settings\": true, \"change page templates\": true, \"change device\":
|
121
|
+
true, \"add portal member\": true, \"change browser id manager\": true, \"manage
|
122
|
+
zcatalog entries\": true, \"send events\": true, \"manage eventmanager\":
|
123
|
+
true, \"access session data\": true, \"view notification\": true, \"copy or
|
124
|
+
move\": true, \"add filesystem directory views\": true, \"add cookie crumblers\":
|
125
|
+
true, \"add virtual host monsters\": true, \"define permissions\": true, \"change
|
126
|
+
event views\": true, \"add tomanycontrelationships\": true, \"add documents,
|
127
|
+
images, and files\": true, \"manage access rules\": true, \"change alerting
|
128
|
+
rules\": true, \"query vocabulary\": true, \"modify portal content\": true,
|
129
|
+
\"edit restructuredtext\": true, \"public, everyone can access\": true, \"manage
|
130
|
+
dmd\": true, \"add generic setup tools\": true, \"zenupdate\": true, \"add
|
131
|
+
pluggable index\": true, \"add zcatalogs\": true, \"add portal folders\":
|
132
|
+
true, \"manage device status\": true, \"change local roles\": true, \"add
|
133
|
+
transient object container\": true, \"manage five local sites\": true, \"add
|
134
|
+
tomanyrelationships\": true, \"list portal members\": true, \"edit users\":
|
135
|
+
true, \"access future portal content\": true, \"manage users\": true, \"change
|
136
|
+
permissions\": true, \"use database methods\": true, \"add accelerated http
|
137
|
+
cache managers\": true, \"manage zcatalogindex entries\": true, \"search for
|
138
|
+
principals\": true, \"log to the event log\": true, \"manage events\": true,
|
139
|
+
\"log site errors\": true, \"list folder contents\": true, \"add relationship
|
140
|
+
managers\": true, \"change proxy roles\": true, \"manage properties\": true,
|
141
|
+
\"add zodb mount points\": true, \"manage device\": true};\n }\n\n function
|
142
|
+
_managed_objects(){\n return [];\n }\n\n function _has_global_roles()
|
143
|
+
{\n return true\n }\n</script>\n \n \n<script type=\"text/javascript\">\n\n
|
144
|
+
\ (function() {\n var ua = navigator.userAgent.toLowerCase();\n
|
145
|
+
\ if (ua.indexOf(\"firefox/3.6\") > -1) {\n Ext.toArray
|
146
|
+
= function(a, i, j, res) {\n res = [];\n Ext.each(a,
|
147
|
+
function(v) { res.push(v); });\n return res.slice(i ||
|
148
|
+
0, j || res.length);\n }\n }\n })();\n \n</script>\n\n<script
|
149
|
+
type=\"text/javascript\" src=\"/++resource++extjs/ext-all.js?v=1336168855.0\"></script>\n\n<script
|
150
|
+
type=\"text/javascript\" src=\"/++resource++extjs/examples/ux/form/MultiSelect.js?v=1336168855.0\"></script>\n<script
|
151
|
+
type=\"text/javascript\" src=\"/++resource++extjs/examples/ux/form/ItemSelector.js?v=1336168855.0\"></script>\n<script
|
152
|
+
type=\"text/javascript\" src=\"/++resource++extjs/examples/ux/IFrame.js?v=1336168855.0\"></script>\n<script
|
153
|
+
type=\"text/javascript\" src=\"/++resource++extjs/examples/ux/RowExpander.js?v=1336168855.0\"></script>\n<script
|
154
|
+
type=\"text/javascript\" src=\"/++resource++extjs/examples/ux/CheckColumn.js?v=1336168855.0\"></script>\n\n<script
|
155
|
+
type=\"text/javascript\" src=\"/++resource++search/zenoss-search.js?v=1394581109.0\"></script>\n\n<script
|
156
|
+
type=\"text/javascript\" src=\"/++resource++zenui/js/swfobject/2.2/swfobject.js?v=1394581110.0\"></script>\n\n<script
|
157
|
+
type=\"text/javascript\" src=\"extdirect.js?v=4.2.5\"></script>\n\n<script
|
158
|
+
type=\"text/javascript\" src=\"zenoss-all.js?v=1394581211.0\"></script>\n\n<script
|
159
|
+
type=\"text/javascript\" src=\"i18n.js?v=4.2.5\"></script>\n\n<script type=\"text/javascript\"
|
160
|
+
src=\"/++resource++mswindows/js/global.js?v=1432284586.0\"></script>\n\n<script
|
161
|
+
type=\"text/javascript\" src=\"/++resource++ZenPacks_zenoss_MySqlMonitor/js/mysql.js?v=1432284526.0\"></script>\n\n
|
162
|
+
\ <script></script>\n <script type=\"text/javascript\" src=\"/++resource++esxtop/js/VirtualMachine.js?v=1432284570.0\"></script>\n\n\n
|
163
|
+
\ \n \n \n <meta http-equiv=\"Content-Type\" content=\"text/html;
|
164
|
+
charset=utf-8\" />\n <link rel=\"shortcut icon\" href=\"/zport/dmd/favicon.ico\"
|
165
|
+
type=\"image/x-icon\" />\n <link rel=\"stylesheet\" href=\"yui/reset-fonts-grids/reset-fonts-grids.css\"
|
166
|
+
/>\n\n <link rel=\"stylesheet\" href=\"/zport/portal_skins/zenoss.css\">\n
|
167
|
+
\ <!--[if IE 7]>\n <link rel=\"stylesheet\" type=\"text/css\" title=\"zenoss\"\n
|
168
|
+
\ href=\"zenoss_ie.css\" >\n <![endif]-->\n <!--[if IE 6]>\n
|
169
|
+
\ <link rel=\"stylesheet\" type=\"text/css\" title=\"zenoss\"\n href=\"zenoss_ie6.css\"
|
170
|
+
>\n <![endif]-->\n <script>\n var DEBUG_MODE = false;\n var
|
171
|
+
VERSION_ID = '425';\n </script>\n <script type=\"text/javascript\" src=\"js/MochiKit.js\"></script>\n
|
172
|
+
\ <script type=\"text/javascript\" language=\"javascript\" src=\"/zport/dmd/yui/yahoo/yahoo-min.js\"></script>\n
|
173
|
+
\ <script type=\"text/javascript\" language=\"javascript\" src=\"/zport/dmd/yui/yuiloader/yuiloader-min.js\"></script>\n
|
174
|
+
\ <script type=\"text/javascript\" src=\"javascript/zenoss-core.js\"></script>\n
|
175
|
+
\ <script>\n var loader = YAHOO.zenoss.getLoader();\n loader.require(['zenossutils']);\n
|
176
|
+
\ loader.insert({onSuccess:function(){\n removeElementAutoCompletes();\n
|
177
|
+
\ applyBrowserSpecificStyles();\n addSelectionBar();\n checkForCollapsed();\n
|
178
|
+
\ connectCheckboxListeners();\n notifyParentOfNewUrl();\n zenPageInit();\n
|
179
|
+
\ }});\n </script>\n\n\n \n<script>\n\nvar submitFormToMethod = function(formname,
|
180
|
+
method) {\n//Basically for use in menu items, to obviate creating dummy forms\n//or
|
181
|
+
menu items that are actually buttons.\n f = document.forms[formname];\n
|
182
|
+
\ f.action = '/zport/dmd/' + method;\n f.submit();\n}\n\naddLoadEvent(function()
|
183
|
+
{\n\n YAHOO.zenoss.templateFreeURL = '/zport/dmd';\n YAHOO.zenoss.ZENOSS_VERSION
|
184
|
+
= '4.2.5';\n YAHOO.zenoss.ZENOSS_PRODUCT = 'core';\n\n});\n\n\n\n</script>\n\n
|
185
|
+
\ <link rel=\"stylesheet\" type=\"text/css\" href=\"/++resource++zenui/css/backcompat.css?v=1394581109.0\"
|
186
|
+
/>\n\n \n\n \n<script type=\"text/javascript\">\nExt.state.Manager.getProvider().setState('{}');\n\n
|
187
|
+
\ Ext.onReady(function(){\n Zenoss.env.EVENT_CLASSES = ['/App',
|
188
|
+
'/App/Apache', '/App/Citrix', '/App/Conn', '/App/Conn/Max', '/App/Email',
|
189
|
+
'/App/Email/Loop', '/App/Failed', '/App/Info', '/App/Install', '/App/Job',
|
190
|
+
'/App/Job/Fail', '/App/Log', '/App/MySQL', '/App/Print', '/App/Reload', '/App/Start',
|
191
|
+
'/App/Stop', '/App/VNC', '/App/Zenoss', '/Archive', '/Capacity', '/Change',
|
192
|
+
'/Change/Add', '/Change/Add/Blocked', '/Change/Remove', '/Change/Remove/Blocked',
|
193
|
+
'/Change/Set', '/Change/Set/Blocked', '/Cisco', '/Cisco/FW', '/Cluster', '/Cluster/Heartbeat',
|
194
|
+
'/Cmd', '/Cmd/Fail', '/Cmd/Ok', '/Config', '/Conn', '/Conn/Fail', '/DB', '/DB/Filemaker',
|
195
|
+
'/Environ', '/HW', '/HW/Backup', '/HW/Backup/Robot', '/HW/Backup/SCSI', '/HW/Backup/Tape
|
196
|
+
Drive', '/HW/Backup/Tape Media', '/HW/Blade', '/HW/Management', '/HW/Memory',
|
197
|
+
'/HW/Network', '/HW/Network/AdapterDown', '/HW/Network/TeamDown', '/HW/Power',
|
198
|
+
'/HW/Power/PowerLoss', '/HW/Power/UPS', '/HW/Power/UPS/SmartBoost', '/HW/Store',
|
199
|
+
'/HW/Store/FiberChannel', '/HW/Temperature', '/HW/Temperature/Fan', '/Heartbeat',
|
200
|
+
'/Ignore', '/Ignore/Win', '/License', '/Net', '/Net/Conflict', '/Net/Dhcp',
|
201
|
+
'/Net/Dhcp/Ack', '/Net/Dhcp/Inform', '/Net/Dhcp/Obtained', '/Net/Dhcp/Request',
|
202
|
+
'/Net/Link', '/Net/NS', '/Net/SpanTree', '/Net/Time', '/OS', '/OS/Pagefile',
|
203
|
+
'/OS/Reboot', '/Perf', '/Perf/CPU', '/Perf/Filesystem', '/Perf/Interface',
|
204
|
+
'/Perf/Memory', '/Perf/Snmp', '/Perf/XmlRpc', '/Security', '/Security/Auth',
|
205
|
+
'/Security/Conn', '/Security/Conn/Close', '/Security/Conn/Open', '/Security/Login',
|
206
|
+
'/Security/Login/BadPass', '/Security/Login/Fail', '/Security/Sudo', '/Security/Virus',
|
207
|
+
'/Status', '/Status/DNS', '/Status/Flapping', '/Status/Ftp', '/Status/HTTP',
|
208
|
+
'/Status/Heartbeat', '/Status/IRCD', '/Status/IpService', '/Status/JMX', '/Status/JMX/Connection',
|
209
|
+
'/Status/Jabber', '/Status/LDAP', '/Status/Nagios', '/Status/Ntp', '/Status/OSProcess',
|
210
|
+
'/Status/Perf', '/Status/Ping', '/Status/Snmp', '/Status/Update', '/Status/Web',
|
211
|
+
'/Status/WinService', '/Status/Wmi', '/Status/Wmi/Conn', '/Status/XmlRpc',
|
212
|
+
'/Status/zenwinmodeler', '/Storage', '/Storage/Full', '/Storage/SAN', '/Unknown',
|
213
|
+
'/Users', '/Win', '/Win/AD', '/Win/DCOM', '/Win/Exchange', '/Win/NetBios',
|
214
|
+
'/Win/PWMgr', '/Win/SharePoint', '/Win/Shell', '/Win/Userenv', '/Win/WindowsUpdate',
|
215
|
+
'/Win/WindowsUpdate/Failure', '/Win/WindowsUpdate/Pending', '/Win/WindowsUpdate/Success',
|
216
|
+
'/Win/evtsys'];\n })\n \nExt.onReady(function(){\nZenoss.env.COLUMN_DEFINITIONS=[\n{\"sortable\":
|
217
|
+
true, \"filterKey\": \"evid\", \"filter\": {\"xtype\": \"textfield\"}, \"header\":
|
218
|
+
\"Event ID\", \"dataIndex\": \"evid\", \"hidden\": true, \"id\": \"evid\"},\n{\"sortable\":
|
219
|
+
true, \"filterKey\": \"dedupid\", \"filter\": {\"xtype\": \"textfield\"},
|
220
|
+
\"header\": \"Fingerprint\", \"dataIndex\": \"dedupid\", \"hidden\": true,
|
221
|
+
\"id\": \"dedupid\"},\n{\"sortable\": true, \"header\": \"Status\", \"filterKey\":
|
222
|
+
\"eventState\", \"filter\": {\"source\": [{\"name\": \"New\", \"value\": 0},
|
223
|
+
{\"name\": \"Acknowledged\", \"value\": 1}, {\"checked\": false, \"name\":
|
224
|
+
\"Suppressed\", \"value\": 2}, {\"checked\": false, \"name\": \"Closed\",
|
225
|
+
\"value\": 3}, {\"checked\": false, \"name\": \"Cleared\", \"value\": 4},
|
226
|
+
{\"checked\": false, \"name\": \"Aged\", \"value\": 6}], \"text\": \"...\",
|
227
|
+
\"xtype\": \"multiselectmenu\", \"cls\": \"x-btn x-btn-default-toolbar-small\"},
|
228
|
+
\"width\": 60, \"renderer\": Zenoss.util.render_status, \"hidden\": false,
|
229
|
+
\"id\": \"eventState\", \"dataIndex\": \"eventState\"},\n{\"filter\": {\"source\":
|
230
|
+
[{\"name\": \"Critical\", \"value\": 5}, {\"name\": \"Error\", \"value\":
|
231
|
+
4}, {\"name\": \"Warning\", \"value\": 3}, {\"name\": \"Info\", \"value\":
|
232
|
+
2}, {\"checked\": false, \"name\": \"Debug\", \"value\": 1}, {\"checked\":
|
233
|
+
false, \"name\": \"Clear\", \"value\": 0}], \"text\": \"...\", \"xtype\":
|
234
|
+
\"multiselectmenu\", \"cls\": \"x-btn x-btn-default-toolbar-small\"}, \"width\":
|
235
|
+
60, \"hidden\": false, \"sortable\": true, \"renderer\": Zenoss.util.render_severity,
|
236
|
+
\"header\": \"Severity\", \"field_definition\": \"{name:'severity',type:'int'}\",
|
237
|
+
\"filterKey\": \"severity\", \"id\": \"severity\", \"dataIndex\": \"severity\"},\n{\"sortable\":
|
238
|
+
true, \"filterKey\": \"device\", \"filter\": {\"xtype\": \"textfield\"}, \"header\":
|
239
|
+
\"Resource\", \"dataIndex\": \"device\", \"hidden\": false, \"id\": \"device\",
|
240
|
+
\"renderer\": Zenoss.render.linkFromGrid},\n{\"sortable\": true, \"header\":
|
241
|
+
\"Component\", \"filterKey\": \"component\", \"filter\": {\"xtype\": \"textfield\"},
|
242
|
+
\"width\": 80, \"renderer\": Zenoss.render.linkFromGrid, \"hidden\": false,
|
243
|
+
\"id\": \"component\", \"dataIndex\": \"component\"},\n{\"sortable\": true,
|
244
|
+
\"header\": \"Event Class\", \"filterKey\": \"eventClass\", \"filter\": {\"xtype\":
|
245
|
+
\"textfield\"}, \"width\": 80, \"renderer\": Zenoss.render.linkFromGrid, \"hidden\":
|
246
|
+
false, \"id\": \"eventClass\", \"dataIndex\": \"eventClass\"},\n{\"flex\":
|
247
|
+
1, \"sortable\": true, \"filterKey\": \"summary\", \"filter\": {\"xtype\":
|
248
|
+
\"textfield\"}, \"header\": \"Summary\", \"renderer\": Zenoss.render.eventSummaryRow,
|
249
|
+
\"hidden\": false, \"id\": \"summary\", \"dataIndex\": \"summary\"},\n{\"filter\":
|
250
|
+
{\"altFormats\": \"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j|Y-m-d
|
251
|
+
H:i:s \\\\T\\\\O Y-m-d H:i:s\", \"xtype\": \"daterange\", \"format\": \"Y-m-d
|
252
|
+
H:i:s\"}, \"header\": \"First Seen\", \"hidden\": false, \"sortable\": true,
|
253
|
+
\"renderer\": Ext.util.Format.dateRenderer(Zenoss.date.ISO8601Long), \"width\":
|
254
|
+
120, \"field_definition\": \"{name:'firstTime',type:'date', dateFormat: Zenoss.date.ISO8601Long}\",
|
255
|
+
\"filterKey\": \"firstTime\", \"id\": \"firstTime\", \"dataIndex\": \"firstTime\"},\n{\"filter\":
|
256
|
+
{\"altFormats\": \"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j|Y-m-d
|
257
|
+
H:i:s \\\\T\\\\O Y-m-d H:i:s\", \"xtype\": \"daterange\", \"format\": \"Y-m-d
|
258
|
+
H:i:s\"}, \"header\": \"Last Seen\", \"hidden\": false, \"sortable\": true,
|
259
|
+
\"renderer\": Ext.util.Format.dateRenderer(Zenoss.date.ISO8601Long), \"width\":
|
260
|
+
120, \"field_definition\": \"{name:'lastTime', type:'date', dateFormat: Zenoss.date.ISO8601Long}\",
|
261
|
+
\"filterKey\": \"lastTime\", \"id\": \"lastTime\", \"dataIndex\": \"lastTime\"},\n{\"filter\":
|
262
|
+
{\"vtype\": \"numrange\", \"xtype\": \"textfield\"}, \"header\": \"Count\",
|
263
|
+
\"hidden\": false, \"sortable\": true, \"dataIndex\": \"count\", \"width\":
|
264
|
+
60, \"field_definition\": \"{name:'count',type:'int'}\", \"align\": \"right\",
|
265
|
+
\"id\": \"count\", \"filterKey\": \"count\"},\n{\"sortable\": true, \"filterKey\":
|
266
|
+
\"prodState\", \"filter\": {\"xtype\": \"multiselect-prodstate\"}, \"header\":
|
267
|
+
\"Production State\", \"dataIndex\": \"prodState\", \"hidden\": true, \"id\":
|
268
|
+
\"prodState\"},\n{\"sortable\": true, \"filterKey\": \"DevicePriority\", \"filter\":
|
269
|
+
{\"xtype\": \"multiselect-devicepriority\"}, \"header\": \"Device Priority\",
|
270
|
+
\"dataIndex\": \"DevicePriority\", \"hidden\": true, \"id\": \"DevicePriority\"},\n{\"filter\":
|
271
|
+
{\"xtype\": \"datefield\", \"format\": \"Y-m-d H:i:s\"}, \"header\": \"State
|
272
|
+
Change\", \"hidden\": true, \"sortable\": true, \"renderer\": Ext.util.Format.dateRenderer(Zenoss.date.ISO8601Long),
|
273
|
+
\"width\": 120, \"field_definition\": \"{name:'stateChange', type:'date',
|
274
|
+
dateFormat: Zenoss.date.ISO8601Long}\", \"filterKey\": \"stateChange\", \"id\":
|
275
|
+
\"stateChange\", \"dataIndex\": \"stateChange\"},\n{\"sortable\": true, \"filterKey\":
|
276
|
+
\"eventClassKey\", \"filter\": {\"xtype\": \"textfield\"}, \"header\": \"Event
|
277
|
+
Class Key\", \"dataIndex\": \"eventClassKey\", \"hidden\": true, \"id\": \"eventClassKey\"},\n{\"sortable\":
|
278
|
+
true, \"filterKey\": \"eventGroup\", \"filter\": {\"xtype\": \"textfield\"},
|
279
|
+
\"header\": \"Event Group\", \"dataIndex\": \"eventGroup\", \"hidden\": true,
|
280
|
+
\"id\": \"eventGroup\"},\n{\"sortable\": true, \"filterKey\": \"eventKey\",
|
281
|
+
\"filter\": {\"xtype\": \"textfield\"}, \"header\": \"Event Key\", \"dataIndex\":
|
282
|
+
\"eventKey\", \"hidden\": true, \"id\": \"eventKey\"},\n{\"sortable\": true,
|
283
|
+
\"filterKey\": \"agent\", \"filter\": {\"xtype\": \"textfield\"}, \"header\":
|
284
|
+
\"Agent\", \"dataIndex\": \"agent\", \"hidden\": true, \"id\": \"agent\"},\n{\"sortable\":
|
285
|
+
true, \"filterKey\": \"monitor\", \"filter\": {\"xtype\": \"textfield\"},
|
286
|
+
\"header\": \"Collector\", \"dataIndex\": \"monitor\", \"hidden\": true, \"id\":
|
287
|
+
\"monitor\"},\n{\"sortable\": true, \"filterKey\": \"ownerid\", \"filter\":
|
288
|
+
{\"xtype\": \"textfield\"}, \"header\": \"Owner\", \"dataIndex\": \"ownerid\",
|
289
|
+
\"hidden\": true, \"id\": \"ownerid\"},\n{\"sortable\": false, \"filterKey\":
|
290
|
+
\"facility\", \"filter\": false, \"header\": \"Syslog Facility\", \"dataIndex\":
|
291
|
+
\"facility\", \"hidden\": true, \"id\": \"facility\"},\n{\"sortable\": false,
|
292
|
+
\"filterKey\": \"priority\", \"filter\": false, \"header\": \"Syslog Priority\",
|
293
|
+
\"dataIndex\": \"priority\", \"hidden\": true, \"id\": \"priority\"},\n{\"sortable\":
|
294
|
+
false, \"filterKey\": \"eventClassMapping\", \"filter\": false, \"header\":
|
295
|
+
\"Event Class Mapping\", \"dataIndex\": \"eventClassMapping\", \"hidden\":
|
296
|
+
true, \"id\": \"eventClassMapping\", \"renderer\": Zenoss.render.LinkFromGridGuidGroup},\n{\"sortable\":
|
297
|
+
false, \"filterKey\": \"clearid\", \"filter\": false, \"header\": \"Cleared
|
298
|
+
by Event ID\", \"dataIndex\": \"clearid\", \"hidden\": true, \"id\": \"clearid\"},\n{\"sortable\":
|
299
|
+
false, \"filterKey\": \"ntevid\", \"filter\": false, \"header\": \"NT Event
|
300
|
+
Code\", \"dataIndex\": \"ntevid\", \"hidden\": true, \"id\": \"ntevid\"},\n{\"sortable\":
|
301
|
+
true, \"filterKey\": \"ipAddress\", \"filter\": {\"xtype\": \"textfield\"},
|
302
|
+
\"header\": \"IP Address\", \"dataIndex\": \"ipAddress\", \"hidden\": true,
|
303
|
+
\"id\": \"ipAddress\"},\n{\"sortable\": false, \"filterKey\": \"message\",
|
304
|
+
\"filter\": {\"xtype\": \"textfield\"}, \"header\": \"Message\", \"dataIndex\":
|
305
|
+
\"message\", \"hidden\": true, \"id\": \"message\", \"renderer\": Zenoss.render.eventSummaryRow},\n{\"sortable\":
|
306
|
+
true, \"filterKey\": \"Location\", \"filter\": {\"xtype\": \"textfield\"},
|
307
|
+
\"header\": \"Location\", \"dataIndex\": \"Location\", \"hidden\": true, \"id\":
|
308
|
+
\"Location\", \"renderer\": Zenoss.render.LinkFromGridUidGroup},\n{\"sortable\":
|
309
|
+
false, \"filterKey\": \"DeviceGroups\", \"filter\": {\"xtype\": \"textfield\"},
|
310
|
+
\"header\": \"Groups\", \"dataIndex\": \"DeviceGroups\", \"hidden\": true,
|
311
|
+
\"id\": \"DeviceGroups\", \"renderer\": Zenoss.render.LinkFromGridUidGroup},\n{\"sortable\":
|
312
|
+
false, \"filterKey\": \"Systems\", \"filter\": {\"xtype\": \"textfield\"},
|
313
|
+
\"header\": \"Systems\", \"dataIndex\": \"Systems\", \"hidden\": true, \"id\":
|
314
|
+
\"Systems\", \"renderer\": Zenoss.render.LinkFromGridUidGroup},\n{\"sortable\":
|
315
|
+
true, \"filterKey\": \"DeviceClass\", \"filter\": {\"xtype\": \"textfield\"},
|
316
|
+
\"header\": \"Device Class\", \"dataIndex\": \"DeviceClass\", \"hidden\":
|
317
|
+
true, \"id\": \"DeviceClass\", \"renderer\": Zenoss.render.LinkFromGridUidGroup}\n];\nZenoss.env.READER_DEFINITIONS=[\n{\"name\":
|
318
|
+
\"evid\"},\n{\"name\": \"dedupid\"},\n{\"name\": \"eventState\"},\n{name:'severity',type:'int'},\n{\"name\":
|
319
|
+
\"device\"},\n{\"name\": \"component\"},\n{\"name\": \"eventClass\"},\n{\"name\":
|
320
|
+
\"summary\"},\n{name:'firstTime',type:'date', dateFormat: Zenoss.date.ISO8601Long},\n{name:'lastTime',
|
321
|
+
type:'date', dateFormat: Zenoss.date.ISO8601Long},\n{name:'count',type:'int'},\n{\"name\":
|
322
|
+
\"prodState\"},\n{\"name\": \"DevicePriority\"},\n{name:'stateChange', type:'date',
|
323
|
+
dateFormat: Zenoss.date.ISO8601Long},\n{\"name\": \"eventClassKey\"},\n{\"name\":
|
324
|
+
\"eventGroup\"},\n{\"name\": \"eventKey\"},\n{\"name\": \"agent\"},\n{\"name\":
|
325
|
+
\"monitor\"},\n{\"name\": \"ownerid\"},\n{\"name\": \"facility\"},\n{\"name\":
|
326
|
+
\"priority\"},\n{\"name\": \"eventClassMapping\"},\n{\"name\": \"clearid\"},\n{\"name\":
|
327
|
+
\"ntevid\"},\n{\"name\": \"ipAddress\"},\n{\"name\": \"message\"},\n{\"name\":
|
328
|
+
\"Location\"},\n{\"name\": \"DeviceGroups\"},\n{\"name\": \"Systems\"},\n{\"name\":
|
329
|
+
\"DeviceClass\"}\n];\nZenoss.env.ZP_DETAILS=[\n\n];\nZenoss.env.EVENT_AUTO_EXPAND_COLUMN='summary';\n\n\n
|
330
|
+
\ Ext.define('Zenoss.events.Model', {\n extend: 'Ext.data.Model',\n
|
331
|
+
\ idProperty: 'evid',\n fields: Zenoss.env.READER_DEFINITIONS\n
|
332
|
+
\ });\n\n\n});\n\n Zenoss.env.COLLECTORS = [['localhost']];\n
|
333
|
+
\ Zenoss.env.priorities = [{'name': 'Highest', 'value': 5}, {'name':
|
334
|
+
'High', 'value': 4}, {'name': 'Normal', 'value': 3}, {'name': 'Low', 'value':
|
335
|
+
2}, {'name': 'Lowest', 'value': 1}, {'name': 'Trivial', 'value': 0}, {'name':
|
336
|
+
'None', 'value': '\"\"'}];\n Zenoss.env.productionStates = [{'name':
|
337
|
+
'Production', 'value': 1000}, {'name': 'Pre-Production', 'value': 500}, {'name':
|
338
|
+
'Test', 'value': 400}, {'name': 'Maintenance', 'value': 300}, {'name': 'Decommissioned',
|
339
|
+
'value': -1}, {'name': 'None', 'value': '\"\"'}];\n \nExt.namespace('Zenoss.settings');\nZenoss.settings.showEventSeverityIcons
|
340
|
+
= true;\nZenoss.settings.zenjobsRefreshInterval = 10;\nZenoss.settings.showPageStatistics
|
341
|
+
= false;\nZenoss.settings.enableLiveSearch = true;\nZenoss.settings.deviceMoveJobThreshold
|
342
|
+
= 5;\nZenoss.settings.incrementalTreeLoad = true;\nZenoss.settings.componentGridBufferSize
|
343
|
+
= 50;\nZenoss.settings.deviceGridBufferSize = 100;\nZenoss.settings.eventConsoleBufferSize
|
344
|
+
= 200;\nZenoss.settings.enableTreeFilters = true;\n</script>\n\n \n
|
345
|
+
\ </head>\n\n <body>\n <div id=\"header\">\n <div class=\"bg\">\n
|
346
|
+
\ <div class=\"bg-leftcap\">\n <div class=\"bg-tile\">\n
|
347
|
+
\ <div class=\"bg-logo\"></div>\n <div
|
348
|
+
id=\"primarynav\">\n <ul><li class=\"nav-item-active\">\n<div
|
349
|
+
class=\"sd-left\">\n <div class=\"sd-right\">\n <a href=\"/zport/dmd/Dashboard\"
|
350
|
+
target=\"_self\" id=\"Dashboard-nav-button\">Dashboard</a>\n </div>\n</div>\n</li>\n\n<li
|
351
|
+
class=\"nav-item-inactive\">\n<div class=\"sd-left\">\n <div class=\"sd-right\">\n
|
352
|
+
\ <a href=\"/zport/dmd/Events/evconsole\" target=\"_self\" id=\"Events-nav-button\">Events</a>\n
|
353
|
+
\ </div>\n</div>\n</li>\n\n<li class=\"nav-item-inactive\">\n<div class=\"sd-left\">\n
|
354
|
+
\ <div class=\"sd-right\">\n <a href=\"/zport/dmd/itinfrastructure\"
|
355
|
+
target=\"_self\" id=\"Infrastructure-nav-button\">Infrastructure</a>\n </div>\n</div>\n</li>\n\n<li
|
356
|
+
class=\"nav-item-inactive\">\n<div class=\"sd-left\">\n <div class=\"sd-right\">\n
|
357
|
+
\ <a href=\"/zport/dmd/reports\" target=\"_self\" id=\"Reports-nav-button\">Reports</a>\n
|
358
|
+
\ </div>\n</div>\n</li>\n\n<li class=\"nav-item-inactive\">\n<div class=\"sd-left\">\n
|
359
|
+
\ <div class=\"sd-right\">\n <a href=\"/zport/dmd/editSettings\"
|
360
|
+
target=\"_self\" id=\"Advanced-nav-button\">Advanced</a>\n </div>\n</div>\n</li>\n</ul>\n
|
361
|
+
\ <div id=\"header-extra\">\n <div
|
362
|
+
id=\"searchbox-container\"></div>\n <div id=\"saved-search-container\"></div>\n
|
363
|
+
\ <div id=\"user-link-container\">\n <a
|
364
|
+
href=\"/zport/dmd/ZenUsers/admin\">\n admin\n
|
365
|
+
\ </a>\n </div>\n
|
366
|
+
\ <div id=\"sign-out-link\">\n <a
|
367
|
+
href=\"/zport/dmd/logoutUser\">sign out</a>\n </div>\n
|
368
|
+
\ <div>\n <div
|
369
|
+
id=\"help-icon-container\">\n <span></span><!--
|
370
|
+
ie needs empty span tags in some versions -->\n \n
|
371
|
+
\ <a target=\"_blank\" alt=\"Help\"
|
372
|
+
href=\"http://www.zenoss.com/help?version=4.2.5\"> </a>\n </div>\n
|
373
|
+
\ </div>\n </div>\n
|
374
|
+
\ </div>\n <div id=\"secondarynav\">\n
|
375
|
+
\ <ul></ul>\n \n\n </div>\n
|
376
|
+
\ </div>\n </div>\n </div>\n </div>\n\n
|
377
|
+
\ <div id=\"center\">\n \n \n<form name=\"proxy_form\"
|
378
|
+
id=\"proxy_form\" style=\"position:absolute;visibility:hidden\" action=\"/zport/dmd\"></form>\n<form
|
379
|
+
method=\"post\" name=\"proxyForm\" action=\"here/absolute_url\"> \n <input
|
380
|
+
type=\"hidden\" name=\"zenScreenName\" value=\"Dashboard.pt\" /> \n</form>\n\n
|
381
|
+
\ \n\n<div id=\"dialog\" class=\"dialog\" style=\"visibility:hidden;position:absolute\">
|
382
|
+
\n<div id=\"dialog_innercontent\">\n \n\n<div style=\"text-align:center\">\n<h2>Loading...</h2>\n<br
|
383
|
+
/>\n<img src=\"img/spinning_wheel_throbber.gif\" />\n</div>\n\n\n</div>\n<img
|
384
|
+
id=\"dialog_close\" src=\"/++resource++zenui/img/xtheme-zenoss/window/close-button.png\"
|
385
|
+
class=\"dialog_close\" />\n</div>\n<script>\nloader = YAHOO.zenoss.getLoader();\nloader.require(['zenossutils']);\nloader.insert({\n
|
386
|
+
\ onSuccess: function(){\n mydialog = new Dialog.Box($('dialog'));\n
|
387
|
+
\ connect('dialog_close','onclick', mydialog.box.hide);\n $('dialog').style.visibility
|
388
|
+
= '';\n }\n});\n</script>\n\n\n \n <div id=\"contentPaneContainer\">\n
|
389
|
+
\ \n<div id=\"portletContainer\"></div>\n<script>\n var start_time
|
390
|
+
= '2015-05-22 12:14:21';\n var state = '';\n if(state) var dashboardState
|
391
|
+
= evalJSON(state);\n</script>\n<script>\nvar server_time = isoTimestamp(start_time).getTime();\nvar
|
392
|
+
updateTime = {\n run: function () {\n server_time += 1000;\n },\n
|
393
|
+
\ interval: 1000\n}\nExt.TaskManager.start(updateTime);\nif (Ext.isIE) {\n
|
394
|
+
\ var reloadLaterTask = new Ext.util.DelayedTask(function () {\n window.top.location.reload();\n
|
395
|
+
\ });\n reloadLaterTask.delay(1000*60*60); // one hour\n}\n\nfunction
|
396
|
+
getServerTimestamp() {\n var server_now = new Date(server_time);\n return
|
397
|
+
toISOTimestamp(server_now);\n}\n\n// Initialization of dashboard portlets\nvar
|
398
|
+
ContainerObject;\nfunction initDashboardPortlets() {\n ContainerObject
|
399
|
+
= new YAHOO.zenoss.portlet.PortletContainer(\n 'portletContainer');\n
|
400
|
+
\ YAHOO.zenoss.globalPortletContainer = ContainerObject;\n if (dashboardState)
|
401
|
+
{\n ContainerObject.restore(dashboardState);\n } else {\n //
|
402
|
+
Create a default dashboard\n ContainerObject.setLayout('2coleq', false);\n
|
403
|
+
\ ContainerObject.restoreDefaults();\n }\n}\nvar loader = YAHOO.zenoss.getLoader();\nloader.require(['portletsource']);\nloader.insert({
|
404
|
+
'onSuccess':initDashboardPortlets });\n\n</script>\n<style>\n .z-bc .z-bc-content-pane
|
405
|
+
{\n background-color: #888;\n }\n</style>\n\n </div>\n \n\n
|
406
|
+
\ </div>\n <div id=\"footer\">\n </div>\n <div
|
407
|
+
id=\"footer_extra\">\n </div>\n\n\n<form id=\"exportform\" method=\"post\"
|
408
|
+
action=\"/zport/dmd/Events/export\">\n <input type=\"hidden\" id=\"export_body\"
|
409
|
+
name=\"body\" />\n</form>\n<script type=\"text/javascript\">\nExt.onReady(function(){\n//
|
410
|
+
record when we first started rendering things on the client\nZenoss._pageStartTime
|
411
|
+
= new Date().getTime() / 1000.00;\n\nvar viewport = new Ext.Viewport({\n id:
|
412
|
+
'viewport',\n layout: 'border',\n cls: 'zenui3',\n defaults: {\n
|
413
|
+
\ 'border': false\n },\n items: [\n {\n region:
|
414
|
+
'north',\n renderTo: 'header',\n height: 75,\n id:
|
415
|
+
'header_panel',\n xtype: 'component',\n style: {\n display:
|
416
|
+
\"none\"\n }\n },{\n id: 'footer_panel',\n region:
|
417
|
+
'south',\n height: 30,\n renderTo: 'footer',\n items:
|
418
|
+
[\n new Ext.Toolbar({\n border: false,\n
|
419
|
+
\ id: 'footer_bar',\n items: ['->', {\n
|
420
|
+
\ xtype: 'jobswidget',\n id:
|
421
|
+
'jobswidget'\n }],\n listeners: {\n
|
422
|
+
\ beforeadd: function(bar, item, index) {\n if
|
423
|
+
(bar instanceof Ext.toolbar.Toolbar) {\n var
|
424
|
+
numitems = bar.items.length,\n lastitem
|
425
|
+
= bar.items.items[numitems - 1];\n if (lastitem
|
426
|
+
&& lastitem.xtype == 'jobswidget'\n &&
|
427
|
+
index == numitems) {\n // We have the jobs
|
428
|
+
widget already, so\n // change the index
|
429
|
+
passed in by 2 (one for\n // widget, one
|
430
|
+
for filler) so that the jobs\n // widget
|
431
|
+
stays on the right\n bar.insert(index-2,
|
432
|
+
item);\n return false;\n }\n
|
433
|
+
\ }\n },\n render:
|
434
|
+
function(bar){\n Ext.get('footer_extra').appendTo(bar.getEl());\n
|
435
|
+
\ }\n }\n })\n ],\n
|
436
|
+
\ border: false\n },{\n id: 'center_panel',\n
|
437
|
+
\ region: 'center',\n renderTo: 'center',\n layout:
|
438
|
+
'fit',\n border: false,\n defaults: {\n 'border':
|
439
|
+
false\n }\n }\n ]\n});\n\n});\n</script>\n\n\n<script>\n//
|
440
|
+
A little pre-javascript layout hackery to prevent appearance of re-layout.\n//
|
441
|
+
If there are breadcrumbs the tabs pane needs to be bumped up.\nif (Zenoss.env.pageHasBreadCrumbs)
|
442
|
+
{\n try {\n Ext.get('newTabsPane').setStyle({\n top:
|
443
|
+
-23,\n position: 'relative'\n });\n } catch(e) {}\n}\nExt.onReady(function(){\n
|
444
|
+
\ var outerItems = [],\n innerItems = [{\n region: 'center',\n
|
445
|
+
\ autoScroll: true,\n bodyCls: 'z-bc-content-pane',\n contentEl:
|
446
|
+
'contentPaneContainer',\n split: true\n }];\n if (Zenoss.env.pageHasTabs)
|
447
|
+
{\n outerItems.push({\n region: 'west',\n width:
|
448
|
+
200,\n bodyCls: 'z-bc-tab-pane',\n contentEl: 'newTabsPane',\n
|
449
|
+
\ split: true\n });\n }\n if (Zenoss.env.pageHasBreadCrumbs)
|
450
|
+
{\n innerItems.push({\n region: 'north',\n height:
|
451
|
+
24,\n bodyCls: 'z-bc-bread-crumb-pane',\n contentEl:
|
452
|
+
'breadCrumbPane'\n });\n }\n outerItems.push({\n region:
|
453
|
+
'center',\n layout: 'border',\n defaults: {\n border:
|
454
|
+
false\n },\n items: innerItems\n });\n\n // Undo all the
|
455
|
+
pre-layout css\n try {\n Ext.get('contentPaneContainer').setStyle({\n
|
456
|
+
\ marginLeft: 0\n });\n } catch(e) {}\n try {\n Ext.get('newTabsPane').setStyle({\n
|
457
|
+
\ top: 0,\n position: 'static'\n });\n } catch(e)
|
458
|
+
{}\n try {\n if (Ext.get('breadCrumbPane')) {\n Ext.get('breadCrumbPane').setStyle({\n
|
459
|
+
\ marginLeft: 0,\n position: 'static'\n });\n
|
460
|
+
\ }\n } catch(e) {}\n\n\n Zenoss.util.callWhenReady('center_panel',
|
461
|
+
function(){\n Ext.getCmp('center_panel').add({\n layout:
|
462
|
+
'border',\n id: 'backcompat-layout-panel',\n defaults:
|
463
|
+
{\n border: false\n },\n bodyCls: 'z-bc',
|
464
|
+
// Zenoss back compat\n items: outerItems\n });\n Ext.getCmp('center_panel').doLayout();\n
|
465
|
+
\ });\n});\n</script>\n\n\n<!-- Make sure everything on the page gets laid
|
466
|
+
out -->\n\n\n \n\n\n<!-- Load tooltips for this screen -->\n<script type=\"text/javascript\"
|
467
|
+
src=\"tooltips.js\"></script>\n\n<!-- Fields required for history management
|
468
|
+
-->\n<form id=\"history-form\" class=\"x-hidden\" action=\"\">\n <input
|
469
|
+
type=\"hidden\" id=\"x-history-field\" />\n <iframe id=\"x-history-frame\"></iframe>\n</form>\n<script
|
470
|
+
type=\"text/javascript\">\nExt.History.init(function(mgr){\n Ext.History.selectByToken(mgr.getToken());\n});\n</script>\n</body>\n</html>
|
471
|
+
<!-- metal:use-macro=\"context/page_macros/base-new\" -->\n\n\n"
|
472
|
+
http_version:
|
473
|
+
recorded_at: Fri, 22 May 2015 12:14:21 GMT
|
474
|
+
- request:
|
475
|
+
method: post
|
476
|
+
uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/device_router
|
477
|
+
body:
|
478
|
+
encoding: UTF-8
|
479
|
+
string: '[{"action":"DeviceRouter","method":"addDevice","data":[{"deviceName":"UnitTestDevice","deviceClass":"/Devices/Server"}],"type":"rpc","tid":1}]'
|
480
|
+
headers:
|
481
|
+
User-Agent:
|
482
|
+
- HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
|
483
|
+
Accept:
|
484
|
+
- "*/*"
|
485
|
+
Date:
|
486
|
+
- Fri, 22 May 2015 12:14:21 GMT
|
487
|
+
Content-Type:
|
488
|
+
- application/json; charset=utf-8
|
489
|
+
Cookie:
|
490
|
+
- _ZopeId=47495875A68v.lkNK6o
|
491
|
+
response:
|
492
|
+
status:
|
493
|
+
code: 200
|
494
|
+
message: OK
|
495
|
+
headers:
|
496
|
+
Server:
|
497
|
+
- Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
|
498
|
+
Date:
|
499
|
+
- Fri, 22 May 2015 12:14:21 GMT
|
500
|
+
Content-Length:
|
501
|
+
- '291'
|
502
|
+
Content-Type:
|
503
|
+
- application/json
|
504
|
+
body:
|
505
|
+
encoding: UTF-8
|
506
|
+
string: '{"uuid": "837df1fc-de1d-4462-8d87-dc639dd4c1d9", "action": "DeviceRouter",
|
507
|
+
"result": {"new_jobs": [{"uuid": "816000e0-f95e-4c1f-8f79-0213e4653af3", "description":
|
508
|
+
"Add device UnitTestDevice", "uid": "/zport/dmd/JobManager"}], "success":
|
509
|
+
true}, "tid": 1, "type": "rpc", "method": "addDevice"}'
|
510
|
+
http_version:
|
511
|
+
recorded_at: Fri, 22 May 2015 12:14:21 GMT
|
512
|
+
- request:
|
513
|
+
method: post
|
514
|
+
uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/device_router
|
515
|
+
body:
|
516
|
+
encoding: UTF-8
|
517
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":2}]'
|
518
|
+
headers:
|
519
|
+
User-Agent:
|
520
|
+
- HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
|
521
|
+
Accept:
|
522
|
+
- "*/*"
|
523
|
+
Date:
|
524
|
+
- Fri, 22 May 2015 12:14:21 GMT
|
525
|
+
Content-Type:
|
526
|
+
- application/json; charset=utf-8
|
527
|
+
Cookie:
|
528
|
+
- _ZopeId=47495875A68v.lkNK6o
|
529
|
+
response:
|
530
|
+
status:
|
531
|
+
code: 200
|
532
|
+
message: OK
|
533
|
+
headers:
|
534
|
+
Server:
|
535
|
+
- Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
|
536
|
+
Date:
|
537
|
+
- Fri, 22 May 2015 12:14:21 GMT
|
538
|
+
Content-Length:
|
539
|
+
- '197'
|
540
|
+
Content-Type:
|
541
|
+
- application/json
|
542
|
+
body:
|
543
|
+
encoding: UTF-8
|
544
|
+
string: '{"uuid": "45e97034-3550-42db-8ba9-ba931a812e9d", "action": "DeviceRouter",
|
545
|
+
"result": {"totalCount": 0, "hash": "0", "success": true, "devices": []},
|
546
|
+
"tid": 2, "type": "rpc", "method": "getDevices"}'
|
547
|
+
http_version:
|
548
|
+
recorded_at: Fri, 22 May 2015 12:14:21 GMT
|
549
|
+
- request:
|
550
|
+
method: post
|
551
|
+
uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/device_router
|
552
|
+
body:
|
553
|
+
encoding: UTF-8
|
554
|
+
string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":3}]'
|
555
|
+
headers:
|
556
|
+
User-Agent:
|
557
|
+
- HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
|
558
|
+
Accept:
|
559
|
+
- "*/*"
|
560
|
+
Date:
|
561
|
+
- Fri, 22 May 2015 12:14:36 GMT
|
562
|
+
Content-Type:
|
563
|
+
- application/json; charset=utf-8
|
564
|
+
Cookie:
|
565
|
+
- _ZopeId=47495875A68v.lkNK6o
|
566
|
+
response:
|
567
|
+
status:
|
568
|
+
code: 200
|
569
|
+
message: OK
|
570
|
+
headers:
|
571
|
+
Server:
|
572
|
+
- Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
|
573
|
+
Date:
|
574
|
+
- Fri, 22 May 2015 12:14:36 GMT
|
575
|
+
Content-Length:
|
576
|
+
- '905'
|
577
|
+
Content-Type:
|
578
|
+
- application/json
|
579
|
+
body:
|
580
|
+
encoding: UTF-8
|
581
|
+
string: '{"uuid": "4aa9dc77-6347-4f63-84fd-8d8c908c889b", "action": "DeviceRouter",
|
582
|
+
"result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
|
583
|
+
null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
|
584
|
+
null, "collector": "localhost", "osModel": null, "productionState": 1000,
|
585
|
+
"systems": [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer":
|
586
|
+
null, "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
|
587
|
+
"ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
|
588
|
+
"clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
|
589
|
+
0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
|
590
|
+
0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
|
591
|
+
"name": "UnitTestDevice"}]}, "tid": 3, "type": "rpc", "method": "getDevices"}'
|
592
|
+
http_version:
|
593
|
+
recorded_at: Fri, 22 May 2015 12:14:36 GMT
|
594
|
+
recorded_with: VCR 2.9.3
|