From 2e32b5d2a6db8089b823e062a77c17de062d4683 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Tue, 2 Feb 2021 16:53:22 -0800 Subject: [PATCH] Serialize fault detail property in CSV to YAML --- lib/ui/api.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ui/api.ts b/lib/ui/api.ts index e06c484..7913869 100644 --- a/lib/ui/api.ts +++ b/lib/ui/api.ts @@ -32,6 +32,7 @@ import Authorizer from "../common/authorizer"; import { ping } from "../ping"; import * as url from "url"; import { decodeTag } from "../common"; +import { stringify as yamlStringify } from "../common/yaml"; const router = new Router(); export default router; @@ -304,6 +305,8 @@ for (const [resource, flags] of Object.entries(resources)) { ) return new Date(p.value[0]).toJSON(); } + } else if (resource === "faults") { + if (e[1] === "detail") return yamlStringify(obj["detail"]); } } else if (e[0] === "FUNC") { if (e[1] === "DATE_STRING") {