Chore: Remove unused properties in explore (#17359)

This removes unused properties in explore and datasource 
meta data (tables and explore properties in plugin.json).
pull/17389/head
Marcus Efraimsson 6 years ago committed by GitHub
parent a0bb01103e
commit 1497f3d79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-ui/src/types/datasource.ts
  2. 7
      public/app/features/explore/state/reducers.test.ts
  3. 7
      public/app/features/explore/state/reducers.ts
  4. 1
      public/app/plugins/datasource/graphite/plugin.json
  5. 1
      public/app/plugins/datasource/influxdb/plugin.json
  6. 1
      public/app/plugins/datasource/input/plugin.json
  7. 2
      public/app/plugins/datasource/loki/plugin.json
  8. 1
      public/app/plugins/datasource/mssql/plugin.json
  9. 1
      public/app/plugins/datasource/mysql/plugin.json
  10. 1
      public/app/plugins/datasource/opentsdb/plugin.json
  11. 1
      public/app/plugins/datasource/postgres/plugin.json
  12. 2
      public/app/plugins/datasource/prometheus/plugin.json
  13. 1
      public/app/plugins/datasource/stackdriver/plugin.json
  14. 12
      public/app/types/explore.ts

@ -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;

@ -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,

@ -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),

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

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

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

@ -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",

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

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

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

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

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

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

@ -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;

Loading…
Cancel
Save