From 48ddb89c7593a4fddbd035ac7127dcc150f393cb Mon Sep 17 00:00:00 2001 From: Witold Duranek Date: Wed, 30 Apr 2025 10:51:08 +0200 Subject: [PATCH 1/2] fix: minimal grafana version --- src/plugin.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugin.json b/src/plugin.json index 6257556..1ed2cbf 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -51,8 +51,6 @@ } ], "dependencies": { - "grafanaDependency": ">=7.1.0", - "grafanaVersion": "7.1.x", - "plugins": [] + "grafanaDependency": ">=10.0.0" } } From 25160a01cae5f15d12a42d9176d13f6fa9c4b438 Mon Sep 17 00:00:00 2001 From: John Kapantzakis Date: Wed, 30 Apr 2025 12:20:45 +0300 Subject: [PATCH 2/2] Remove console logs --- src/datasource.ts | 3 +-- src/shared/hooks/useFetchContexts.ts | 1 - src/shared/hooks/useFetchNodes.ts | 1 - src/shared/hooks/useFetchRooms.ts | 1 - src/shared/hooks/useFetchSpaces.ts | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/datasource.ts b/src/datasource.ts index 3dad058..abde297 100644 --- a/src/datasource.ts +++ b/src/datasource.ts @@ -78,8 +78,7 @@ export class DataSource extends DataSourceApi { return frame; }) - .catch((error) => { - console.log('ERROR (useGetChartData): ', error); + .catch(() => { return []; }); } diff --git a/src/shared/hooks/useFetchContexts.ts b/src/shared/hooks/useFetchContexts.ts index 432a2d9..3eac314 100644 --- a/src/shared/hooks/useFetchContexts.ts +++ b/src/shared/hooks/useFetchContexts.ts @@ -38,7 +38,6 @@ export const useFetchContexts = (baseUrl: string) => { setContexts(result.map((c) => ({ label: c, value: c }))); } catch (error) { setIsError(true); - console.log('ERROR (useFetchContexts): ', error); } }, [baseUrl] diff --git a/src/shared/hooks/useFetchNodes.ts b/src/shared/hooks/useFetchNodes.ts index 14dbc68..91f6c72 100644 --- a/src/shared/hooks/useFetchNodes.ts +++ b/src/shared/hooks/useFetchNodes.ts @@ -37,7 +37,6 @@ export const useFetchNodes = (baseUrl: string) => { const result = await getNodes(spaceId, roomId, baseUrl); setNodes(result); } catch (error) { - console.log('ERROR (useFetchNodes): ', error); setIsError(true); } }, diff --git a/src/shared/hooks/useFetchRooms.ts b/src/shared/hooks/useFetchRooms.ts index efad94a..027746a 100644 --- a/src/shared/hooks/useFetchRooms.ts +++ b/src/shared/hooks/useFetchRooms.ts @@ -19,7 +19,6 @@ export const useFetchRooms = (baseUrl: string) => { const result = await getRooms(spaceId, baseUrl); setRooms(result?.map((r: any) => ({ label: r.name, value: r.id }))); } catch (error) { - console.log('ERROR (useFetchRooms): ', error); setIsError(true); } }, diff --git a/src/shared/hooks/useFetchSpaces.ts b/src/shared/hooks/useFetchSpaces.ts index b375a87..4ffb799 100644 --- a/src/shared/hooks/useFetchSpaces.ts +++ b/src/shared/hooks/useFetchSpaces.ts @@ -27,7 +27,6 @@ export const useFetchSpaces = (baseUrl: string) => { fetchData(); } catch (error) { - console.log('ERROR (useFetchSpaces): ', error); setIsError(true); } }, [baseUrl]);