From 7f56ad718413c60f57631df0beff0125d9126337 Mon Sep 17 00:00:00 2001 From: Max Linke Date: Sat, 16 Nov 2024 22:07:25 +0100 Subject: [PATCH] Disallow grafana plugin on the cse --- src/backend/rest.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/rest.ts b/src/backend/rest.ts index ba1ddd5..65cce9c 100644 --- a/src/backend/rest.ts +++ b/src/backend/rest.ts @@ -199,6 +199,11 @@ export default class RestApiBackend implements Backend { 'The data source specified the Checkmk Raw Edition, but a Checkmk commercial edition was detected. Some functionality may not be available. Choose commercial editions in the data source settings to enable all features.' ); } + if (result.data.edition === 'cse') { + throw new Error( + 'The data source specifed is the Checkmk Cloud Edition (hosted). The grafana plugin is currently not supported for that edition.' + ) + } // The REST API would be ok with other users, but the autocompleter are not if (!(await this.isAutomationUser(this.datasource.getUsername()))) { throw new Error('This data source must authenticate against Checkmk using an automation user.');