sync
[Pman.Admin] / Pman.Tab.CoreNotifyServers.bjs
1 {
2  "items" : [
3   {
4    "$ xns" : "Roo",
5    "Boolean background" : true,
6    "String region" : "center",
7    "String title" : "Notify Servers",
8    "items" : [
9     {
10      "$ xns" : "Roo",
11      "* prop" : "layout",
12      "items" : [
13       {
14        "$ xns" : "Roo",
15        "* prop" : "south",
16        "Boolean split" : true,
17        "Number height" : 200,
18        "xtype" : "LayoutRegion"
19       },
20       {
21        "$ xns" : "Roo",
22        "* prop" : "center",
23        "xtype" : "LayoutRegion"
24       },
25       {
26        "$ xns" : "Roo",
27        "Boolean background" : true,
28        "fitContainer" : true,
29        "fitToframe" : true,
30        "items" : [
31         {
32          "$ xns" : "Roo.grid",
33          "* prop" : "grid",
34          "autoExpandColumn" : "hostname",
35          "items" : [
36           {
37            "$ xns" : "Roo",
38            "* prop" : "toolbar",
39            "items" : [
40             {
41              "$ xns" : "Roo.Toolbar",
42              "String text" : "Add",
43              "listeners" : {
44               "click" : [
45                "function() ",
46                "{",
47                "    Pman.Dialog.CoreNotifyServer.show(",
48                "         {}, function() {",
49                "        _this.sgrid.footer.onClick('first');",
50                "    }); ",
51                "}"
52               ]
53              },
54              "xtype" : "Button"
55             },
56             {
57              "$ xns" : "Roo.Toolbar",
58              "xtype" : "Fill"
59             },
60             {
61              "$ xns" : "Roo.Toolbar",
62              "String text" : "Remove",
63              "listeners" : {
64               "click" : [
65                "function (_self, e)",
66                "{",
67                "       Pman.genericDelete(_this.spanel, 'core_notify_server');",
68                "}"
69               ]
70              },
71              "xtype" : "Button"
72             }
73            ],
74            "xtype" : "Toolbar"
75           },
76           {
77            "$ sortInfo" : "{ field : 'hostname', direction: 'ASC' }",
78            "$ xns" : "Roo.data",
79            "* prop" : "dataSource",
80            "items" : [
81             {
82              "$ url" : "baseURL + '/Roo/core_notify_server'",
83              "$ xns" : "Roo.data",
84              "* prop" : "proxy",
85              "method" : "GET",
86              "xtype" : "HttpProxy"
87             },
88             {
89              "$ xns" : "Roo.data",
90              "* prop" : "reader",
91              "id" : "id",
92              "root" : "data",
93              "totalProperty" : "total",
94              "xtype" : "JsonReader"
95             }
96            ],
97            "listeners" : {
98             "beforeload" : [
99              "function (_self, options)",
100              "{",
101              "   options.params._with_queue_size  =1 ;",
102              "    ",
103              "}"
104             ]
105            },
106            "remoteSort" : true,
107            "xtype" : "Store"
108           },
109           {
110            "$ xns" : "Roo",
111            "* prop" : "footer",
112            "displayInfo" : true,
113            "displayMsg" : "Displaying Servers {0} - {1} of {2}",
114            "emptyMsg" : "No Servers found",
115            "pageSize" : 25,
116            "xtype" : "PagingToolbar"
117           },
118           {
119            "$ renderer" : [
120             "function(v) {",
121             "    var state = v> 0 ?  '-checked' : '';",
122             "",
123             "    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';",
124             "}"
125            ],
126            "$ xns" : "Roo.grid",
127            "* prop" : "colModel[]",
128            "dataIndex" : "is_active",
129            "header" : "Is Active",
130            "width" : 100,
131            "xtype" : "ColumnModel"
132           },
133           {
134            "$ xns" : "Roo.grid",
135            "* prop" : "colModel[]",
136            "dataIndex" : "hostname",
137            "header" : "Hostname",
138            "width" : 150,
139            "xtype" : "ColumnModel"
140           },
141           {
142            "$ xns" : "Roo.grid",
143            "* prop" : "colModel[]",
144            "dataIndex" : "helo",
145            "header" : "Helo",
146            "width" : 150,
147            "xtype" : "ColumnModel"
148           },
149           {
150            "$ xns" : "Roo.grid",
151            "* prop" : "colModel[]",
152            "dataIndex" : "poolname",
153            "header" : "Pool",
154            "width" : 150,
155            "xtype" : "ColumnModel"
156           },
157           {
158            "$ Function renderer" : [
159             "function(v,x,r) {",
160             "",
161             "    return r.data.in_queue || 0;",
162             "}"
163            ],
164            "$ xns" : "Roo.grid",
165            "* prop" : "colModel[]",
166            "dataIndex" : "in_queue",
167            "header" : "In Queue",
168            "width" : 150,
169            "xtype" : "ColumnModel"
170           },
171           {
172            "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y  H:i:s') : ''); }",
173            "$ xns" : "Roo.grid",
174            "* prop" : "colModel[]",
175            "dataIndex" : "last_send",
176            "header" : "Last Sent",
177            "width" : 120,
178            "xtype" : "ColumnModel"
179           }
180          ],
181          "listeners" : {
182           "rowclick" : [
183            "function (_self, rowIndex, e)",
184            "{",
185            "    (function() { ",
186            "        _this.bgrid.footer.onClick('first');",
187            "    }).defer(100);",
188            "}"
189           ],
190           "|render" : [
191            "function() ",
192            "{",
193            "    _this.sgrid = this; ",
194            "    //_this.dialog = Pman.Dialog.FILL_IN",
195            "    if (_this.spanel.active) {",
196            "       this.footer.onClick('first');",
197            "    }",
198            "}"
199           ],
200           "|rowdblclick" : [
201            "function (_self, rowIndex, e)",
202            "{",
203            "    ",
204            "    Pman.Dialog.CoreNotifyServer.show(",
205            "         this.getDataSource().getAt(rowIndex).data, function() {",
206            "        _this.sgrid.footer.onClick('first');",
207            "    }); ",
208            "}",
209            ""
210           ]
211          },
212          "loadMask" : true,
213          "xtype" : "Grid"
214         }
215        ],
216        "listeners" : {
217         "|activate" : [
218          "function() {",
219          "    _this.spanel = this;",
220          "    if (_this.sgrid) {",
221          "        _this.sgrid.footer.onClick('first');",
222          "    }",
223          "}"
224         ]
225        },
226        "region" : "center",
227        "tableName" : "core_notify_server",
228        "title" : "Servers",
229        "xtype" : "GridPanel"
230       },
231       {
232        "$ xns" : "Roo",
233        "Boolean background" : true,
234        "fitContainer" : true,
235        "fitToframe" : true,
236        "items" : [
237         {
238          "$ xns" : "Roo.grid",
239          "* prop" : "grid",
240          "autoExpandColumn" : "error_msg",
241          "items" : [
242           {
243            "$ xns" : "Roo",
244            "* prop" : "toolbar",
245            "items" : [
246             {
247              "$ xns" : "Roo.Toolbar",
248              "xtype" : "Fill"
249             },
250             {
251              "$ xns" : "Roo.Toolbar",
252              "String text" : "Remove",
253              "xtype" : "Button"
254             }
255            ],
256            "xtype" : "Toolbar"
257           },
258           {
259            "$ sortInfo" : "{ field : 'person_id_name', direction: 'ASC' }",
260            "$ xns" : "Roo.data",
261            "* prop" : "dataSource",
262            "items" : [
263             {
264              "$ url" : "baseURL + '/Roo/core_notify_blacklist'",
265              "$ xns" : "Roo.data",
266              "* prop" : "proxy",
267              "method" : "GET",
268              "xtype" : "HttpProxy"
269             },
270             {
271              "$ xns" : "Roo.data",
272              "* prop" : "reader",
273              "id" : "id",
274              "root" : "data",
275              "totalProperty" : "total",
276              "xtype" : "JsonReader"
277             }
278            ],
279            "listeners" : {
280             "beforeload" : [
281              "function (_self, opts)",
282              "{",
283              "    if(!_this.sgrid.getSelectionModel().getSelected()) {",
284              "        return false;",
285              "    }",
286              "    ",
287              "    opts.params.server_id =    _this.sgrid.getSelectionModel().getSelected().data.id;",
288              "}"
289             ]
290            },
291            "remoteSort" : true,
292            "xtype" : "Store"
293           },
294           {
295            "$ xns" : "Roo",
296            "* prop" : "footer",
297            "displayInfo" : true,
298            "displayMsg" : "Displaying Blacklists {0} - {1} of {2}",
299            "emptyMsg" : "No Blacklists found",
300            "pageSize" : 25,
301            "xtype" : "PagingToolbar"
302           },
303           {
304            "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
305            "$ xns" : "Roo.grid",
306            "* prop" : "colModel[]",
307            "dataIndex" : "added_dt",
308            "header" : "Added",
309            "width" : 120,
310            "xtype" : "ColumnModel"
311           },
312           {
313            "$ xns" : "Roo.grid",
314            "* prop" : "colModel[]",
315            "dataIndex" : "domain_id_domain",
316            "header" : "Domain",
317            "width" : 150,
318            "xtype" : "ColumnModel"
319           },
320           {
321            "$ xns" : "Roo.grid",
322            "* prop" : "colModel[]",
323            "dataIndex" : "error_str",
324            "header" : "Error",
325            "width" : 150,
326            "xtype" : "ColumnModel"
327           }
328          ],
329          "listeners" : {
330           "|render" : [
331            "function() ",
332            "{",
333            "    _this.bgrid = this; ",
334            "    //_this.dialog = Pman.Dialog.FILL_IN",
335            "    ",
336            "}"
337           ]
338          },
339          "loadMask" : true,
340          "xtype" : "Grid"
341         }
342        ],
343        "listeners" : {
344         "|activate" : [
345          "function() {",
346          "    _this.bpanel = this;",
347          "   ",
348          "}"
349         ]
350        },
351        "region" : "south",
352        "tableName" : "core_notify_recur",
353        "title" : "Recurrent Notifications",
354        "xtype" : "GridPanel"
355       }
356      ],
357      "xtype" : "BorderLayout"
358     }
359    ],
360    "xtype" : "NestedLayoutPanel"
361   }
362  ],
363  "modOrder" : "900",
364  "name" : "Pman.Tab.CoreNotifyServers",
365  "parent" : "Pman.Tab.AdminWatchNotify",
366  "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.CoreNotifyServers.bjs",
367  "permname" : "",
368  "strings" : {
369   "1063e38cb53d94d386f21227fcd84717" : "Remove",
370   "1203cd27e4d1ab6f1296728c021d9c1a" : "Is Active",
371   "2023301a71db57f37d50da7d045b881a" : "Displaying Servers {0} - {1} of {2}",
372   "2ddb157d4780e8883fbde96f354c57d2" : "Displaying Blacklists {0} - {1} of {2}",
373   "774ff60df30a64fad1d29f6c2daa8691" : "No Servers found",
374   "825bd435c12978e8492330c2a0d823db" : "Helo",
375   "902b0d55fddef6f8d651fe1035b7d4bd" : "Error",
376   "ac659513b2353187192e88c5d1988228" : "Servers",
377   "b26686c0a708faee42861d8b905e882e" : "Last Sent",
378   "be6838286e448ad65c5b55d690e2c38b" : "In Queue",
379   "c348b06d2667edd048ded3c1b1878cc1" : "Recurrent Notifications",
380   "c5dd93dd1011986763b5925e0af25e08" : "No Blacklists found",
381   "c8f4b8c435b3d99a66e1b91bec60737c" : "Hostname",
382   "def36b726efed529b13ba240dd331a12" : "Pool",
383   "e3974584afa867d8619253bc669d6197" : "Notify Servers",
384   "eae639a70006feff484a39363c977e24" : "Domain",
385   "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
386   "f29ddbfb905eb2593fdcdfb243f9af85" : "Added"
387  },
388  "title" : "Pman.Tab.CoreNotifyServers"
389 }