How to use the @grafana/ui.SlatePrism function in @grafana/ui

To help you get started, we’ve selected a few @grafana/ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / plugins / datasource / elasticsearch / components / ElasticsearchQueryField.tsx View on Github external
constructor(props: Props, context: React.Context) {
    super(props, context);

    this.plugins = [
      SlatePrism({
        onlyIn: (node: any) => node.type === 'code_block',
        getSyntax: (node: any) => 'lucene',
      }),
    ];

    this.state = {
      syntaxLoaded: false,
    };
  }
github grafana / grafana / public / app / plugins / datasource / elasticsearch / components / ElasticsearchQueryField.tsx View on Github external
constructor(props: Props, context: React.Context) {
    super(props, context);

    this.plugins = [
      SlatePrism({
        onlyIn: (node: any) => node.type === 'code_block',
        getSyntax: (node: any) => 'lucene',
      }),
    ];

    this.state = {
      syntaxLoaded: false,
    };
  }
github grafana / grafana / public / app / plugins / datasource / loki / components / LokiQueryFieldForm.tsx View on Github external
constructor(props: LokiQueryFieldFormProps, context: React.Context) {
    super(props, context);

    this.plugins = [
      BracesPlugin(),
      SlatePrism({
        onlyIn: (node: Node) => node.object === 'block' && node.type === 'code_block',
        getSyntax: (node: Node) => 'promql',
      }),
    ];
  }
github mtanda / grafana-aws-cloudwatch-logs-datasource / src / components / AwsCloudWatchLogsQueryField.tsx View on Github external
constructor(props: Props, context: React.Context) {
    super(props, context);

    this.plugins = [
      SlatePrism({
        onlyIn: (node: any) => node.type === 'code_block',
        getSyntax: (node: any) => 'lucene',
      }),
    ];

    this.state = {
      syntaxLoaded: false,
    };
  }
github grafana / grafana / public / app / plugins / datasource / prometheus / components / PromQueryField.tsx View on Github external
constructor(props: PromQueryFieldProps, context: React.Context) {
    super(props, context);

    if (props.datasource.languageProvider) {
      this.languageProvider = props.datasource.languageProvider;
    }

    this.plugins = [
      BracesPlugin(),
      SlatePrism({
        onlyIn: (node: any) => node.type === 'code_block',
        getSyntax: (node: any) => 'promql',
      }),
    ];

    this.state = {
      metricsOptions: [],
      syntaxLoaded: false,
      hint: null,
    };
  }
github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / plugins / datasource / loki / components / LokiQueryFieldForm.tsx View on Github external
constructor(props: LokiQueryFieldFormProps, context: React.Context) {
    super(props, context);

    this.plugins = [
      BracesPlugin(),
      SlatePrism({
        onlyIn: (node: Node) => node.object === 'block' && node.type === 'code_block',
        getSyntax: (node: Node) => 'promql',
      }),
    ];
  }
github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / plugins / datasource / prometheus / components / PromQueryField.tsx View on Github external
constructor(props: PromQueryFieldProps, context: React.Context) {
    super(props, context);

    if (props.datasource.languageProvider) {
      this.languageProvider = props.datasource.languageProvider;
    }

    this.plugins = [
      BracesPlugin(),
      SlatePrism({
        onlyIn: (node: any) => node.type === 'code_block',
        getSyntax: (node: any) => 'promql',
      }),
    ];

    this.state = {
      metricsOptions: [],
      syntaxLoaded: false,
      hint: null,
    };
  }