mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-09-04 10:25:47 +00:00
* Introduced tsconfig.app.json and tsconfig.base.json * yarn.lock * Introduced tsconfig.app.json, tsconfig.base.jsonfig. * Refactored eslint.config.js to latest structure * Returned previous recommended rules. * More rules * Force import rules * Check * Check * Cleanup ESLint configuration and plugins * Cleanup heap: "writable",DD_RUM: "writable" from ESLint configuration * "scripts" moved to the top of package.json
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import hljs from "highlight.js/lib/core";
|
|
import yaml from "highlight.js/lib/languages/yaml";
|
|
|
|
import Spinner from "../../Spinner";
|
|
|
|
hljs.registerLanguage("yaml", yaml);
|
|
|
|
export const ChartValues = ({
|
|
chartValues,
|
|
loading,
|
|
}: {
|
|
chartValues: string;
|
|
loading: boolean;
|
|
}) => {
|
|
return (
|
|
<div className="w-1/2">
|
|
<label
|
|
className="mb-2 block text-xl font-medium tracking-wide text-gray-700"
|
|
htmlFor="grid-user-defined-values"
|
|
>
|
|
Chart Value Reference:
|
|
</label>
|
|
<pre
|
|
className="block max-h-[330px] w-full overflow-y-auto rounded-sm bg-chart-values p-2 font-sf-mono text-base font-medium"
|
|
dangerouslySetInnerHTML={
|
|
chartValues && !loading
|
|
? {
|
|
__html: hljs.highlight(chartValues, {
|
|
language: "yaml",
|
|
}).value,
|
|
}
|
|
: undefined
|
|
}
|
|
>
|
|
{loading ? (
|
|
<Spinner />
|
|
) : !chartValues && !loading ? (
|
|
"No original values information found"
|
|
) : null}
|
|
</pre>
|
|
</div>
|
|
);
|
|
};
|