System logs
This commit is contained in:
parent
f63ec55a06
commit
c8e48c0d4a
|
|
@ -40,6 +40,13 @@ class _SystemLogViewerState extends State<SystemLogViewer> {
|
||||||
.where((systemLog) => systemLog.isVisible)
|
.where((systemLog) => systemLog.isVisible)
|
||||||
.map((systemLog) {
|
.map((systemLog) {
|
||||||
final client = state.clientState.get(systemLog.clientId);
|
final client = state.clientState.get(systemLog.clientId);
|
||||||
|
Map<String, dynamic> logs;
|
||||||
|
if (systemLog.log.isNotEmpty) {
|
||||||
|
try {
|
||||||
|
logs = json.decode(systemLog.log);
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
return ExpansionPanel(
|
return ExpansionPanel(
|
||||||
headerBuilder: (BuildContext context, bool isExpanded) {
|
headerBuilder: (BuildContext context, bool isExpanded) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
|
@ -69,9 +76,7 @@ class _SystemLogViewerState extends State<SystemLogViewer> {
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
child: systemLog.log.isEmpty
|
child: logs == null ? SizedBox() : JsonViewerWidget(logs),
|
||||||
? SizedBox()
|
|
||||||
: JsonViewerWidget(jsonDecode(systemLog.log)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue