diff --git a/backend/pkg/config/resolver.go b/backend/pkg/config/resolver.go
index 33f72290..c3a253c3 100644
--- a/backend/pkg/config/resolver.go
+++ b/backend/pkg/config/resolver.go
@@ -121,7 +121,7 @@ func (r *Resolver) LoadPluginSecret(ctx context.Context, plugin Plugin) (Plugin,
return plugin, nil
}
-func (r *Resolver) Proxies(cluster Cluster) (*httputil.ReverseProxy, error) {
+func (r *Resolver) Proxy(cluster Cluster) (*httputil.ReverseProxy, error) {
if cluster.Host == "" {
return nil, ErrMissingAPI
}
@@ -330,7 +330,7 @@ func (r *Resolver) Server(ctx context.Context) (*server.Server, error) {
continue
}
- proxy, err := r.Proxies(cluster)
+ proxy, err := r.Proxy(cluster)
if err != nil {
zap.L().Error("failed to resolve proxies", zap.Error(err), zap.String("cluser", cluster.Name), zap.String("host", cluster.Host))
continue
diff --git a/charts/ui/Chart.yaml b/charts/ui/Chart.yaml
index 640a5718..3dab218c 100644
--- a/charts/ui/Chart.yaml
+++ b/charts/ui/Chart.yaml
@@ -2,8 +2,8 @@ apiVersion: v2
name: ui
description: Policy Reporter UI
type: application
-version: 0.0.22
-appVersion: "2.0.0-alpha.16"
+version: 0.0.23
+appVersion: "2.0.0-alpha.17"
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
home: https://kyverno.github.io/policy-reporter-ui
diff --git a/charts/ui/README.md b/charts/ui/README.md
index 6329711a..8a19a524 100644
--- a/charts/ui/README.md
+++ b/charts/ui/README.md
@@ -2,7 +2,7 @@
Policy Reporter UI
-![Version: 0.0.20](https://img.shields.io/badge/Version-0.0.20-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0-alpha.14](https://img.shields.io/badge/AppVersion-2.0.0--alpha.14-informational?style=flat-square)
+![Version: 0.0.23](https://img.shields.io/badge/Version-0.0.23-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0-alpha.17](https://img.shields.io/badge/AppVersion-2.0.0--alpha.17-informational?style=flat-square)
## Documentation
diff --git a/frontend/bun.lockb b/frontend/bun.lockb
index 9d000dc4..c00c57a2 100755
Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differ
diff --git a/frontend/components/PageLayout.vue b/frontend/components/PageLayout.vue
index 74ab6e30..a5588f1f 100644
--- a/frontend/components/PageLayout.vue
+++ b/frontend/components/PageLayout.vue
@@ -6,8 +6,8 @@
{{ title }}
-
-
+
+
@@ -19,7 +19,7 @@
diff --git a/frontend/modules/core/components/graph/SourcesStatus.vue b/frontend/modules/core/components/graph/SourcesStatus.vue
index 59e1f0ca..2ea23cab 100644
--- a/frontend/modules/core/components/graph/SourcesStatus.vue
+++ b/frontend/modules/core/components/graph/SourcesStatus.vue
@@ -3,7 +3,7 @@
-
+
-
+
import StatusBtn from "~/components/StatusBtn.vue";
-import { type Dashboard, Status } from "~/modules/core/types";
+import { type Dashboard, Status, Findings } from "~/modules/core/types";
-const props = defineProps<{ data: Dashboard; hideCluster?: boolean }>();
+const props = defineProps<{ data: Dashboard; hideCluster?: boolean }>();
const status1 = ref(Status.PASS);
const status2 = ref(Status.FAIL);
diff --git a/frontend/modules/core/types.ts b/frontend/modules/core/types.ts
index 3ef4a3ef..ec459f74 100644
--- a/frontend/modules/core/types.ts
+++ b/frontend/modules/core/types.ts
@@ -119,6 +119,7 @@ export type Navigation = {
subtitle: string;
path: string;
children?: Navigation[];
+ exact?: boolean;
}
export type LayoutConfig = {
@@ -153,17 +154,17 @@ export type NamespaceScope = {
export type Findings = Chart
-export type Dashboard = {
+export type Dashboard = {
title?: string;
clusterScope: boolean;
filterSources: string[];
- multiSource: T;
+ multiSource: boolean;
showResults: string[];
- singleSource: T extends true ? false : true;
+ singleSource: boolean;
charts: {
clusterScope: ClusterScope;
namespaceScope: NamespaceScope;
- findings: T extends true ? { [key in Status]: Findings } : Findings
+ findings: { [key in Status]: Findings } | Findings
};
namespaces: string[];
sources: string[];
diff --git a/frontend/package.json b/frontend/package.json
index 183c6d36..d7df09e1 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -14,7 +14,7 @@
"@nuxt/devtools": "latest",
"@types/chroma-js": "^2.4.3",
"@types/lodash.debounce": "^4.0.9",
- "nuxt": "^3.10.2",
+ "nuxt": "^3.10.3",
"sass": "^1.69.5",
"vite-plugin-vuetify": "^2.0.1",
"vue": "^3.3.8",
diff --git a/frontend/pages/custom-boards/[id].vue b/frontend/pages/custom-boards/[id].vue
index 69a8f152..e04bcfe6 100644
--- a/frontend/pages/custom-boards/[id].vue
+++ b/frontend/pages/custom-boards/[id].vue
@@ -3,6 +3,9 @@
v-model:cluster-kinds="clusterKinds"
:title="data.title"
v-if="data"
+ :source="data.singleSource ? data.sources[0] : undefined"
+ :ns-scoped="!data.clusterScope"
+ :store="route.params.id"
>
@@ -49,6 +52,14 @@ const filter = computed(() => ({
const { data, refresh } = useAPI((api) => api.customBoard(route.params.id, filter.value))
+const store = useSourceStore(route.params.id)
+
+watchEffect(() => {
+ if (!data.value) return;
+
+ store.load(data.value.sources)
+})
+
watch(filter, onChange(refresh))
provide(APIFilter, computed(() => ({
diff --git a/frontend/pages/source/[source]/[category].vue b/frontend/pages/source/[source]/[category].vue
index d9711afa..d64f8a01 100644
--- a/frontend/pages/source/[source]/[category].vue
+++ b/frontend/pages/source/[source]/[category].vue
@@ -28,7 +28,7 @@ import { onChange } from "~/helper/compare";
const route = useRoute()
const store = useSourceStore(route.params.source)
-await store.load()
+await store.load(route.params.source)
const kinds = ref([])
const clusterKinds = ref([])
diff --git a/frontend/pages/source/[source]/index.vue b/frontend/pages/source/[source]/index.vue
index ee9c397a..5076426f 100644
--- a/frontend/pages/source/[source]/index.vue
+++ b/frontend/pages/source/[source]/index.vue
@@ -25,7 +25,7 @@ import { onChange } from "~/helper/compare";
const route = useRoute()
const store = useSourceStore(route.params.source)
-await store.load()
+await store.load(route.params.source)
const kinds = ref([])
const clusterKinds = ref([])