]>
git.proxmox.com Git - proxmox-widget-toolkit.git/blob - data/ProxmoxProxy.js
1 Ext
.define('Proxmox.RestProxy', {
2 extend
: 'Ext.data.RestProxy',
3 alias
: 'proxy.proxmox',
13 afterRequest: function(request
, success
) {
14 this.fireEvent('afterload', this, request
, success
);
18 constructor: function(config
) {
23 rootProperty
: config
.root
|| 'data'
27 this.callParent([config
]);
31 Ext
.define('KeyValue', {
32 extend
: "Ext.data.Model",
33 fields
: [ 'key', 'value' ],
37 Ext
.define('KeyValuePendingDelete', {
38 extend
: "Ext.data.Model",
39 fields
: [ 'key', 'value', 'pending', 'delete' ],
43 Ext
.define('proxmox-tasks', {
44 extend
: 'Ext.data.Model',
46 { name
: 'starttime', type
: 'date', dateFormat
: 'timestamp' },
47 { name
: 'endtime', type
: 'date', dateFormat
: 'timestamp' },
48 { name
: 'pid', type
: 'int' },
49 'node', 'upid', 'user', 'status', 'type', 'id'
54 Ext
.define('proxmox-cluster-log', {
55 extend
: 'Ext.data.Model',
57 { name
: 'uid' , type
: 'int' },
58 { name
: 'time', type
: 'date', dateFormat
: 'timestamp' },
59 { name
: 'pri', type
: 'int' },
60 { name
: 'pid', type
: 'int' },
61 'node', 'user', 'tag', 'msg',
64 convert: function(value
, record
) {
65 var info
= record
.data
;
72 return info
.uid
+ ':' + info
.node
;