Geomap: make the geomap panel beta and label alpha layers (#36894)

This commit is contained in:
Ryan McKinley
2021-07-19 08:07:28 -07:00
committed by GitHub
parent ecd2c320ba
commit d4fa2529c8
8 changed files with 46 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { DataFrame, DataTransformerInfo, PluginState } from '../types';
import { DataFrame, DataTransformerInfo } from '../types';
import { Registry, RegistryItem } from '../utils/Registry';
export interface TransformerUIProps<T> {
@@ -20,11 +20,6 @@ export interface TransformerRegistryItem<TOptions> extends RegistryItem {
*/
transformation: DataTransformerInfo<TOptions>;
/**
* Optional feature state
*/
state?: PluginState;
/** Markdown with more detailed description and help */
help?: string;

View File

@@ -1,3 +1,4 @@
import { PluginState } from '../types';
import { SelectableValue } from '../types/select';
export interface RegistryItem {
@@ -11,6 +12,11 @@ export interface RegistryItem {
* like: 'all' and 'any' matchers;
*/
excludeFromPicker?: boolean;
/**
* Optional feature state
*/
state?: PluginState;
}
export interface RegistryItemWithOptions<TOptions = any> extends RegistryItem {
@@ -105,6 +111,10 @@ export class Registry<T extends RegistryItem> {
description: ext.description,
};
if (ext.state === PluginState.alpha) {
option.label += ' (alpha)';
}
select.options.push(option);
if (currentOptions[ext.id]) {
currentOptions[ext.id] = option;