Chore: Remove unused properties in explore (#17359)

This removes unused properties in explore and datasource 
meta data (tables and explore properties in plugin.json).
This commit is contained in:
Marcus Efraimsson 2019-05-31 09:45:53 +02:00 committed by GitHub
parent a0bb01103e
commit 1497f3d79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 0 additions and 40 deletions

View File

@ -75,9 +75,7 @@ export class DataSourcePlugin<
export interface DataSourcePluginMeta extends PluginMeta {
builtIn?: boolean; // Is this for all
metrics?: boolean;
tables?: boolean;
logs?: boolean;
explore?: boolean;
annotations?: boolean;
alerting?: boolean;
mixed?: boolean;

View File

@ -144,7 +144,6 @@ describe('Explore item reducer', () => {
meta: {
metrics: true,
logs: true,
tables: true,
},
components: {
ExploreStartPage: StartPage,
@ -154,9 +153,6 @@ describe('Explore item reducer', () => {
const queryKeys: string[] = [];
const initalState: Partial<ExploreItemState> = {
datasourceInstance: null,
supportsGraph: false,
supportsLogs: false,
supportsTable: false,
StartPage: null,
showingStartPage: false,
queries,
@ -164,9 +160,6 @@ describe('Explore item reducer', () => {
};
const expectedState = {
datasourceInstance,
supportsGraph: true,
supportsLogs: true,
supportsTable: true,
StartPage,
showingStartPage: true,
queries,

View File

@ -103,9 +103,6 @@ export const makeExploreItemState = (): ExploreItemState => ({
graphIsLoading: false,
logIsLoading: false,
tableIsLoading: false,
supportsGraph: null,
supportsLogs: null,
supportsTable: null,
queryKeys: [],
urlState: null,
update: makeInitialUpdateState(),
@ -246,7 +243,6 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
// Capabilities
const supportsGraph = datasourceInstance.meta.metrics;
const supportsLogs = datasourceInstance.meta.logs;
const supportsTable = datasourceInstance.meta.tables;
let mode = ExploreMode.Metrics;
const supportedModes: ExploreMode[] = [];
@ -274,9 +270,6 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
graphIsLoading: false,
logIsLoading: false,
tableIsLoading: false,
supportsGraph,
supportsLogs,
supportsTable,
StartPage,
showingStartPage: Boolean(StartPage),
queryKeys: getQueryKeys(state.queries, datasourceInstance),

View File

@ -10,7 +10,6 @@
"metrics": true,
"alerting": true,
"annotations": true,
"tables": false,
"queryOptions": {
"maxDataPoints": true,

View File

@ -8,7 +8,6 @@
"metrics": true,
"annotations": true,
"alerting": true,
"tables": true,
"queryOptions": {
"minInterval": true

View File

@ -8,7 +8,6 @@
"alerting": false,
"annotations": false,
"logs": false,
"explore": false,
"info": {
"description": "Data source that supports manual table & CSV input",

View File

@ -8,8 +8,6 @@
"alerting": false,
"annotations": false,
"logs": true,
"explore": true,
"tables": false,
"info": {
"description": "Like Prometheus but for logs. OSS logging solution from Grafana Labs",

View File

@ -19,7 +19,6 @@
"alerting": true,
"annotations": true,
"metrics": true,
"tables": true,
"queryOptions": {
"minInterval": true

View File

@ -19,7 +19,6 @@
"alerting": true,
"annotations": true,
"metrics": true,
"tables": true,
"queryOptions": {
"minInterval": true

View File

@ -8,7 +8,6 @@
"defaultMatchFormat": "pipe",
"annotations": true,
"alerting": true,
"tables": false,
"info": {
"description": "Open source time series database",

View File

@ -19,7 +19,6 @@
"alerting": true,
"annotations": true,
"metrics": true,
"tables": true,
"queryOptions": {
"minInterval": true

View File

@ -24,8 +24,6 @@
"metrics": true,
"alerting": true,
"annotations": true,
"explore": true,
"tables": true,
"queryOptions": {
"minInterval": true
},

View File

@ -7,7 +7,6 @@
"metrics": true,
"alerting": true,
"annotations": true,
"tables": false,
"queryOptions": {
"maxDataPoints": true,
"cacheTimeout": true

View File

@ -214,18 +214,6 @@ export interface ExploreItemState {
* True if table result viewer is expanded. Query runs will contain table queries.
*/
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;
logIsLoading: boolean;