diff --git a/src/datasource/components/ConfigEditor.tsx b/src/datasource/components/ConfigEditor.tsx index 380c708a9..f5eea76f2 100644 --- a/src/datasource/components/ConfigEditor.tsx +++ b/src/datasource/components/ConfigEditor.tsx @@ -28,7 +28,8 @@ import { import { Divider } from './Divider'; import { css } from '@emotion/css'; -const SUPPORTED_SQL_DS = ['mysql', 'postgres', 'influxdb']; +// the postgres-plugin changed it's id, so we list both the old name and the new name +const SUPPORTED_SQL_DS = ['mysql', 'grafana-postgresql-datasource', 'postgres', 'influxdb']; const authOptions: Array> = [ { label: 'User and password', value: ZabbixAuthType.UserLogin }, diff --git a/src/datasource/zabbix/connectors/sql/sqlConnector.ts b/src/datasource/zabbix/connectors/sql/sqlConnector.ts index b375c383e..83b11fc5a 100644 --- a/src/datasource/zabbix/connectors/sql/sqlConnector.ts +++ b/src/datasource/zabbix/connectors/sql/sqlConnector.ts @@ -12,7 +12,8 @@ import dbConnector, { const supportedDatabases = { mysql: 'mysql', - postgres: 'postgres', + postgresOld: 'postgres', + postgresNew: 'grafana-postgresql-datasource', }; export class SQLConnector extends DBConnector { @@ -31,7 +32,10 @@ export class SQLConnector extends DBConnector { } loadSQLDialect() { - if (this.datasourceTypeId === supportedDatabases.postgres) { + if ( + this.datasourceTypeId === supportedDatabases.postgresOld || + this.datasourceTypeId === supportedDatabases.postgresNew + ) { this.sqlDialect = postgres; } else { this.sqlDialect = mysql;