split sidebar home

This commit is contained in:
mbecker20
2024-05-12 12:59:45 -07:00
parent 1ff21d2986
commit 1ba288be79
10 changed files with 108 additions and 40 deletions

View File

@@ -21,7 +21,7 @@ export const RESOURCE_TARGETS: UsableResource[] = [
"Procedure",
"Builder",
"Alerter",
"ServerTemplate"
"ServerTemplate",
];
export function env_to_text(envVars: Types.EnvironmentVar[] | undefined) {
@@ -95,18 +95,18 @@ export const convertTsMsToLocalUnixTsInSecs = (ts: number) =>
ts / 1000 - tzOffset;
export const usableResourcePath = (resource: UsableResource) => {
if (resource === "ServerTemplate") return "server-templates"
return `${resource.toLowerCase()}s`
}
if (resource === "ServerTemplate") return "server-templates";
return `${resource.toLowerCase()}s`;
};
export const sanitizeOnlySpan = (log: string) => {
return sanitizeHtml(log, {
allowedTags: ["span"],
allowedAttributes: {
"span": ["class"]
span: ["class"],
},
});
}
};
const convert = new Convert();
/**
@@ -123,4 +123,4 @@ export const logToHtml = (log: string) => {
allowedAttributes: sanitizeHtml.defaults.allowedAttributes,
});
return convert.toHtml(sanitized);
};
};