]> git.proxmox.com Git - pve-manager.git/blame - www/manager/dc/Log.js
disable animation of charts on load
[pve-manager.git] / www / manager / dc / Log.js
CommitLineData
aff192e6
DM
1Ext.define('PVE.dc.Log', {
2 extend: 'Ext.grid.GridPanel',
3
4 alias: ['widget.pveClusterLog'],
5
6 initComponent : function() {
7 var me = this;
8
9 var logstore = new PVE.data.UpdateStore({
10 storeid: 'pve-cluster-log',
11 model: 'pve-cluster-log',
12 proxy: {
13 type: 'pve',
14 url: '/api2/json/cluster/log'
15 }
16 });
17
18 var store = Ext.create('PVE.data.DiffStore', {
19 rstore: logstore,
20 appendAtStart: true
21 });
22
23 Ext.apply(me, {
24 store: store,
25 stateful: false,
26
27 viewConfig: {
28 trackOver: false,
29 stripeRows: false, // does not work with getRowClass()
30
31 getRowClass: function(record, index) {
32 var pri = record.get('pri');
33
34 if (pri && pri <= 3) {
35 return "x-form-invalid-field";
36 }
37 }
38 },
39 sortableColumns: false,
40 columns: [
41 {
a2dca26b 42 header: gettext("Time"),
aff192e6
DM
43 dataIndex: 'time',
44 width: 100,
45 renderer: function(value) {
46 return Ext.Date.format(value, "M d H:i:s");
47 }
48 },
49 {
a2dca26b 50 header: gettext("Node"),
aff192e6
DM
51 dataIndex: 'node',
52 width: 100
53 },
54 {
a2dca26b 55 header: gettext("Service"),
aff192e6
DM
56 dataIndex: 'tag',
57 width: 100
58 },
59 {
60 header: "PID",
61 dataIndex: 'pid',
62 width: 100
63 },
64 {
a2dca26b 65 header: gettext("User name"),
aff192e6
DM
66 dataIndex: 'user',
67 width: 150
68 },
69 {
a2dca26b 70 header: gettext("Severity"),
aff192e6
DM
71 dataIndex: 'pri',
72 renderer: PVE.Utils.render_serverity,
73 width: 100
74 },
75 {
a2dca26b 76 header: gettext("Message"),
aff192e6
DM
77 dataIndex: 'msg',
78 flex: 1
79 }
80 ],
81 listeners: {
82 show: logstore.startUpdate,
83 hide: logstore.stopUpdate,
84 destroy: logstore.stopUpdate
85 }
86 });
87
88 me.callParent();
89 }
90});