From 107b6a88b4091fcf04d6005132af5d975f6af7a4 Mon Sep 17 00:00:00 2001 From: Mike Burgess Date: Mon, 11 Mar 2024 14:10:47 +0000 Subject: [PATCH] Ensure dashboard components that can display as Table ensure it is a registered component first. Fixes #259. --- ui/dashboard/src/components/dashboards/Card/index.tsx | 2 ++ ui/dashboard/src/components/dashboards/Image/index.tsx | 2 ++ ui/dashboard/src/components/dashboards/charts/index.ts | 2 ++ .../src/components/dashboards/check/Benchmark/index.tsx | 2 ++ ui/dashboard/src/components/dashboards/flows/index.ts | 2 ++ ui/dashboard/src/components/dashboards/graphs/index.ts | 2 ++ ui/dashboard/src/components/dashboards/hierarchies/index.ts | 2 ++ ui/dashboard/src/components/dashboards/inputs/index.ts | 2 ++ ui/dashboard/src/components/dashboards/layout/Child/index.tsx | 2 ++ .../dashboards/layout/PanelDetail/PanelDetailData.tsx | 2 ++ 10 files changed, 20 insertions(+) diff --git a/ui/dashboard/src/components/dashboards/Card/index.tsx b/ui/dashboard/src/components/dashboards/Card/index.tsx index 1dc6b385..a14fe05e 100644 --- a/ui/dashboard/src/components/dashboards/Card/index.tsx +++ b/ui/dashboard/src/components/dashboards/Card/index.tsx @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import DashboardIcon from "../common/DashboardIcon"; import has from "lodash/has"; import IntegerDisplay from "@powerpipe/components/IntegerDisplay"; diff --git a/ui/dashboard/src/components/dashboards/Image/index.tsx b/ui/dashboard/src/components/dashboards/Image/index.tsx index fa3a2937..f42ef351 100644 --- a/ui/dashboard/src/components/dashboards/Image/index.tsx +++ b/ui/dashboard/src/components/dashboards/Image/index.tsx @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import get from "lodash/get"; import Img from "react-cool-img"; import { diff --git a/ui/dashboard/src/components/dashboards/charts/index.ts b/ui/dashboard/src/components/dashboards/charts/index.ts index cc3d7aff..5baa0e5a 100644 --- a/ui/dashboard/src/components/dashboards/charts/index.ts +++ b/ui/dashboard/src/components/dashboards/charts/index.ts @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import { getComponent } from "../index"; import { IChart } from "./types"; const Table = getComponent("table"); diff --git a/ui/dashboard/src/components/dashboards/check/Benchmark/index.tsx b/ui/dashboard/src/components/dashboards/check/Benchmark/index.tsx index 05e8017b..d08abbc8 100644 --- a/ui/dashboard/src/components/dashboards/check/Benchmark/index.tsx +++ b/ui/dashboard/src/components/dashboards/check/Benchmark/index.tsx @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import Card, { CardProps } from "@powerpipe/components/dashboards/Card"; import CheckGrouping from "../CheckGrouping"; import CustomizeViewSummary from "../CustomizeViewSummary"; diff --git a/ui/dashboard/src/components/dashboards/flows/index.ts b/ui/dashboard/src/components/dashboards/flows/index.ts index 7e3236d0..bb6c341a 100644 --- a/ui/dashboard/src/components/dashboards/flows/index.ts +++ b/ui/dashboard/src/components/dashboards/flows/index.ts @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import { getComponent } from "../index"; import { IFlow } from "./types"; const Table = getComponent("table"); diff --git a/ui/dashboard/src/components/dashboards/graphs/index.ts b/ui/dashboard/src/components/dashboards/graphs/index.ts index 7e36af95..65928e88 100644 --- a/ui/dashboard/src/components/dashboards/graphs/index.ts +++ b/ui/dashboard/src/components/dashboards/graphs/index.ts @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import { getComponent } from "../index"; import { IGraph } from "./types"; const Table = getComponent("table"); diff --git a/ui/dashboard/src/components/dashboards/hierarchies/index.ts b/ui/dashboard/src/components/dashboards/hierarchies/index.ts index 2b15a3b7..36f2737a 100644 --- a/ui/dashboard/src/components/dashboards/hierarchies/index.ts +++ b/ui/dashboard/src/components/dashboards/hierarchies/index.ts @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import { getComponent } from "../index"; import { IHierarchy } from "./types"; const Table = getComponent("table"); diff --git a/ui/dashboard/src/components/dashboards/inputs/index.ts b/ui/dashboard/src/components/dashboards/inputs/index.ts index bf8e559d..d9a2edc7 100644 --- a/ui/dashboard/src/components/dashboards/inputs/index.ts +++ b/ui/dashboard/src/components/dashboards/inputs/index.ts @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import { getComponent } from "../index"; import { IInput } from "./types"; const Table = getComponent("table"); diff --git a/ui/dashboard/src/components/dashboards/layout/Child/index.tsx b/ui/dashboard/src/components/dashboards/layout/Child/index.tsx index bc01f3a4..5125a1d5 100644 --- a/ui/dashboard/src/components/dashboards/layout/Child/index.tsx +++ b/ui/dashboard/src/components/dashboards/layout/Child/index.tsx @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import { DashboardLayoutNode, DashboardPanelType, diff --git a/ui/dashboard/src/components/dashboards/layout/PanelDetail/PanelDetailData.tsx b/ui/dashboard/src/components/dashboards/layout/PanelDetail/PanelDetailData.tsx index 7aa8644f..c1d52b45 100644 --- a/ui/dashboard/src/components/dashboards/layout/PanelDetail/PanelDetailData.tsx +++ b/ui/dashboard/src/components/dashboards/layout/PanelDetail/PanelDetailData.tsx @@ -1,3 +1,5 @@ +// Ensure Table is loaded & registered first +import "@powerpipe/components/dashboards/Table"; import Panel from "../Panel"; import { getComponent } from "../../index"; import { PanelDetailProps } from "./index";