(chart)
| 963 | } |
| 964 | |
| 965 | testQuery(chart) { |
| 966 | return this.connectionController.findById(chart.connection_id) |
| 967 | .then((connection) => { |
| 968 | const source = findSourceForConnection(connection); |
| 969 | if (source?.backend?.runChartQuery) { |
| 970 | assertSourceServerEnabled(source); |
| 971 | return source.backend.runChartQuery({ connection, query: chart.query }); |
| 972 | } |
| 973 | |
| 974 | return new Promise((resolve, reject) => reject("The connection type is not supported")); |
| 975 | }) |
| 976 | .catch((error) => { |
| 977 | return new Promise((resolve, reject) => reject(error)); |
| 978 | }); |
| 979 | } |
| 980 | |
| 981 | getPreviewData(chart, projectId, user, noSource) { |
| 982 | return this.chartCache.findLast(user.id, chart.id) |
no test coverage detected