api2/node/syslog: use 'real_service_name' here also
for now this only does the 'postfix' -> 'postfix@-' conversion, fixes the issue that we only showed the 'postfix' service syslog (which is rather empty in a default setup) instead of the instance one Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
beb07279b6
commit
1d8f849457
@ -134,12 +134,18 @@ fn get_syslog(
|
||||
mut rpcenv: &mut dyn RpcEnvironment,
|
||||
) -> Result<Value, Error> {
|
||||
|
||||
let service = if let Some(service) = param["service"].as_str() {
|
||||
Some(crate::api2::node::services::real_service_name(service))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let (count, lines) = dump_journal(
|
||||
param["start"].as_u64(),
|
||||
param["limit"].as_u64(),
|
||||
param["since"].as_str(),
|
||||
param["until"].as_str(),
|
||||
param["service"].as_str())?;
|
||||
service)?;
|
||||
|
||||
rpcenv["total"] = Value::from(count);
|
||||
|
||||
|
Reference in New Issue
Block a user