Commit 1497f3d7 by Marcus Efraimsson Committed by GitHub

Chore: Remove unused properties in explore (#17359)

This removes unused properties in explore and datasource 
meta data (tables and explore properties in plugin.json).
parent a0bb0110
...@@ -75,9 +75,7 @@ export class DataSourcePlugin< ...@@ -75,9 +75,7 @@ export class DataSourcePlugin<
export interface DataSourcePluginMeta extends PluginMeta { export interface DataSourcePluginMeta extends PluginMeta {
builtIn?: boolean; // Is this for all builtIn?: boolean; // Is this for all
metrics?: boolean; metrics?: boolean;
tables?: boolean;
logs?: boolean; logs?: boolean;
explore?: boolean;
annotations?: boolean; annotations?: boolean;
alerting?: boolean; alerting?: boolean;
mixed?: boolean; mixed?: boolean;
......
...@@ -144,7 +144,6 @@ describe('Explore item reducer', () => { ...@@ -144,7 +144,6 @@ describe('Explore item reducer', () => {
meta: { meta: {
metrics: true, metrics: true,
logs: true, logs: true,
tables: true,
}, },
components: { components: {
ExploreStartPage: StartPage, ExploreStartPage: StartPage,
...@@ -154,9 +153,6 @@ describe('Explore item reducer', () => { ...@@ -154,9 +153,6 @@ describe('Explore item reducer', () => {
const queryKeys: string[] = []; const queryKeys: string[] = [];
const initalState: Partial<ExploreItemState> = { const initalState: Partial<ExploreItemState> = {
datasourceInstance: null, datasourceInstance: null,
supportsGraph: false,
supportsLogs: false,
supportsTable: false,
StartPage: null, StartPage: null,
showingStartPage: false, showingStartPage: false,
queries, queries,
...@@ -164,9 +160,6 @@ describe('Explore item reducer', () => { ...@@ -164,9 +160,6 @@ describe('Explore item reducer', () => {
}; };
const expectedState = { const expectedState = {
datasourceInstance, datasourceInstance,
supportsGraph: true,
supportsLogs: true,
supportsTable: true,
StartPage, StartPage,
showingStartPage: true, showingStartPage: true,
queries, queries,
......
...@@ -103,9 +103,6 @@ export const makeExploreItemState = (): ExploreItemState => ({ ...@@ -103,9 +103,6 @@ export const makeExploreItemState = (): ExploreItemState => ({
graphIsLoading: false, graphIsLoading: false,
logIsLoading: false, logIsLoading: false,
tableIsLoading: false, tableIsLoading: false,
supportsGraph: null,
supportsLogs: null,
supportsTable: null,
queryKeys: [], queryKeys: [],
urlState: null, urlState: null,
update: makeInitialUpdateState(), update: makeInitialUpdateState(),
...@@ -246,7 +243,6 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta ...@@ -246,7 +243,6 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
// Capabilities // Capabilities
const supportsGraph = datasourceInstance.meta.metrics; const supportsGraph = datasourceInstance.meta.metrics;
const supportsLogs = datasourceInstance.meta.logs; const supportsLogs = datasourceInstance.meta.logs;
const supportsTable = datasourceInstance.meta.tables;
let mode = ExploreMode.Metrics; let mode = ExploreMode.Metrics;
const supportedModes: ExploreMode[] = []; const supportedModes: ExploreMode[] = [];
...@@ -274,9 +270,6 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta ...@@ -274,9 +270,6 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
graphIsLoading: false, graphIsLoading: false,
logIsLoading: false, logIsLoading: false,
tableIsLoading: false, tableIsLoading: false,
supportsGraph,
supportsLogs,
supportsTable,
StartPage, StartPage,
showingStartPage: Boolean(StartPage), showingStartPage: Boolean(StartPage),
queryKeys: getQueryKeys(state.queries, datasourceInstance), queryKeys: getQueryKeys(state.queries, datasourceInstance),
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
"metrics": true, "metrics": true,
"alerting": true, "alerting": true,
"annotations": true, "annotations": true,
"tables": false,
"queryOptions": { "queryOptions": {
"maxDataPoints": true, "maxDataPoints": true,
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"metrics": true, "metrics": true,
"annotations": true, "annotations": true,
"alerting": true, "alerting": true,
"tables": true,
"queryOptions": { "queryOptions": {
"minInterval": true "minInterval": true
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"alerting": false, "alerting": false,
"annotations": false, "annotations": false,
"logs": false, "logs": false,
"explore": false,
"info": { "info": {
"description": "Data source that supports manual table & CSV input", "description": "Data source that supports manual table & CSV input",
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
"alerting": false, "alerting": false,
"annotations": false, "annotations": false,
"logs": true, "logs": true,
"explore": true,
"tables": false,
"info": { "info": {
"description": "Like Prometheus but for logs. OSS logging solution from Grafana Labs", "description": "Like Prometheus but for logs. OSS logging solution from Grafana Labs",
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
"alerting": true, "alerting": true,
"annotations": true, "annotations": true,
"metrics": true, "metrics": true,
"tables": true,
"queryOptions": { "queryOptions": {
"minInterval": true "minInterval": true
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
"alerting": true, "alerting": true,
"annotations": true, "annotations": true,
"metrics": true, "metrics": true,
"tables": true,
"queryOptions": { "queryOptions": {
"minInterval": true "minInterval": true
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"defaultMatchFormat": "pipe", "defaultMatchFormat": "pipe",
"annotations": true, "annotations": true,
"alerting": true, "alerting": true,
"tables": false,
"info": { "info": {
"description": "Open source time series database", "description": "Open source time series database",
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
"alerting": true, "alerting": true,
"annotations": true, "annotations": true,
"metrics": true, "metrics": true,
"tables": true,
"queryOptions": { "queryOptions": {
"minInterval": true "minInterval": true
......
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
"metrics": true, "metrics": true,
"alerting": true, "alerting": true,
"annotations": true, "annotations": true,
"explore": true,
"tables": true,
"queryOptions": { "queryOptions": {
"minInterval": true "minInterval": true
}, },
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"metrics": true, "metrics": true,
"alerting": true, "alerting": true,
"annotations": true, "annotations": true,
"tables": false,
"queryOptions": { "queryOptions": {
"maxDataPoints": true, "maxDataPoints": true,
"cacheTimeout": true "cacheTimeout": true
......
...@@ -214,18 +214,6 @@ export interface ExploreItemState { ...@@ -214,18 +214,6 @@ export interface ExploreItemState {
* True if table result viewer is expanded. Query runs will contain table queries. * True if table result viewer is expanded. Query runs will contain table queries.
*/ */
showingTable: boolean; showingTable: boolean;
/**
* True if `datasourceInstance` supports graph queries.
*/
supportsGraph: boolean | null;
/**
* True if `datasourceInstance` supports logs queries.
*/
supportsLogs: boolean | null;
/**
* True if `datasourceInstance` supports table queries.
*/
supportsTable: boolean | null;
graphIsLoading: boolean; graphIsLoading: boolean;
logIsLoading: boolean; logIsLoading: boolean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment