mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-12 22:25:51 +00:00
fix diffstore issue with clusterlog
extjs cannot "convert" and id from other fields, so the ids in the diffstore and the realstore are different and we re-add every element on every update to mitigate this, we generate the id (which is "uid:hostname") in the backend, and simply use it in the frontend Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
40342aa6c4
commit
0c8d740228
@ -132,6 +132,10 @@ __PACKAGE__->register_method({
|
||||
|
||||
my $res = decode_json(PVE::Cluster::get_cluster_log($loguser, $max));
|
||||
|
||||
foreach my $entry (@{$res->{data}}) {
|
||||
$entry->{id} = "$entry->{uid}:$entry->{node}";
|
||||
}
|
||||
|
||||
return $res->{data};
|
||||
}});
|
||||
|
||||
|
@ -95,20 +95,7 @@ Ext.define('PVE.RestProxy', {
|
||||
{ name: 'time', type : 'date', dateFormat: 'timestamp' },
|
||||
{ name: 'pri', type: 'int' },
|
||||
{ name: 'pid', type: 'int' },
|
||||
'node', 'user', 'tag', 'msg',
|
||||
{
|
||||
name: 'id',
|
||||
convert: function(value, record) {
|
||||
var info = record.data;
|
||||
var text;
|
||||
|
||||
if (value) {
|
||||
return value;
|
||||
}
|
||||
// compute unique ID
|
||||
return info.uid + ':' + info.node;
|
||||
}
|
||||
}
|
||||
'node', 'user', 'tag', 'msg', 'id'
|
||||
],
|
||||
idProperty: 'id'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user