]>
git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/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
);
17 constructor: function(config
) {
21 rootProperty
: config
.root
|| 'data',
25 this.callParent([config
]);
28 Ext
.define('KeyValue', {
29 extend
: "Ext.data.Model",
30 fields
: ['key', 'value'],
34 Ext
.define('KeyValuePendingDelete', {
35 extend
: "Ext.data.Model",
36 fields
: ['key', 'value', 'pending', 'delete'],
40 Ext
.define('proxmox-tasks', {
41 extend
: 'Ext.data.Model',
43 { name
: 'starttime', type
: 'date', dateFormat
: 'timestamp' },
44 { name
: 'endtime', type
: 'date', dateFormat
: 'timestamp' },
45 { name
: 'pid', type
: 'int' },
46 'node', 'upid', 'user', 'status', 'type', 'id',
51 Ext
.define('proxmox-cluster-log', {
52 extend
: 'Ext.data.Model',
54 { name
: 'uid', type
: 'int' },
55 { name
: 'time', type
: 'date', dateFormat
: 'timestamp' },
56 { name
: 'pri', type
: 'int' },
57 { name
: 'pid', type
: 'int' },
58 'node', 'user', 'tag', 'msg',
61 convert: function(value
, record
) {
62 let info
= record
.data
;
68 return info
.uid
+ ':' + info
.node
;