openbmc / phosphor-webui

Web-based user interface for managing OpenBMC systems
Apache License 2.0
37 stars 25 forks source link

System logs export incorrect data to json file #120

Closed JohnChung93 closed 3 years ago

JohnChung93 commented 3 years ago

Using export feature to download the json file in "System Logs" page. The data in the download file as following information is incomplete.

[{"@odata.id":"/redfish/v1/Systems/system/LogServices/EventLog/Entries/1603678143","@odata.type":"

Following data is the dump log form the Redfish log service API.

{ "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of System Event Log Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1603678143", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-10-26T02:09:03+00:00", "EntryType": "Event", "Id": "1603678143", "Message": "Host system DC power is off", "MessageArgs": [], "MessageId": "OpenBMC.0.1.DCPowerOff", "Name": "System Event Log Entry", "Severity": "OK" },

It seems the download string with symbol "#" cause this issue. Is there any suggestions for this issue?

JohnChung93 commented 3 years ago

Replace the symbol '#' to symbol null to fix this issue. It could get the output file without abnormal data now.