Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove geomap plugin #5

Open
wants to merge 1 commit into
base: ee-V3.9.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
} from '@grafana/data';
import { DataTopic } from '@grafana/schema';
import { Field, Select, useStyles2 } from '@grafana/ui';
import { FrameSelectionEditor } from 'app/plugins/panel/geomap/editor/FrameSelectionEditor';

import { FrameSelectionEditor } from './FrameSelectionEditor';
import { TransformationData } from './TransformationsEditor';

interface TransformationFilterProps {
Expand Down
2 changes: 0 additions & 2 deletions public/app/features/plugins/built_in_plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import * as welcomeBanner from 'app/plugins/panel/welcome/module';
import * as xyChartPanel from 'app/plugins/panel/xychart/module';

// Async loaded panels
const geomapPanel = async () => await import(/* webpackChunkName: "geomapPanel" */ 'app/plugins/panel/geomap/module');
const canvasPanel = async () => await import(/* webpackChunkName: "canvasPanel" */ 'app/plugins/panel/canvas/module');
const graphPanel = async () => await import(/* webpackChunkName: "graphPlugin" */ 'app/plugins/panel/graph/module');
const heatmapPanel = async () =>
Expand Down Expand Up @@ -113,7 +112,6 @@ const builtInPlugins: Record<string, System.Module | (() => Promise<System.Modul
'core:plugin/candlestick': candlestickPanel,
'core:plugin/graph': graphPanel,
'core:plugin/xychart': xyChartPanel,
'core:plugin/geomap': geomapPanel,
'core:plugin/canvas': canvasPanel,
'core:plugin/dashlist': dashListPanel,
'core:plugin/alertlist': alertListPanel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState } from 'react';

import { CloseButton } from 'app/core/components/CloseButton/CloseButton';
import { GeomapLayerHover } from 'app/plugins/panel/geomap/event';

import { DataHoverRows } from './DataHoverRows';
import { DataHoverTabs } from './DataHoverTabs';
import { GeomapLayerHover } from './types';

export interface Props {
layers?: GeomapLayerHover[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import React, { useState } from 'react';

import { DataFrame, FieldType, getFieldDisplayName, GrafanaTheme2 } from '@grafana/data';
import { Collapse, TabContent, useStyles2 } from '@grafana/ui';
import { GeomapLayerHover } from 'app/plugins/panel/geomap/event';
import { renderValue } from 'app/plugins/panel/geomap/utils/uiUtils';

import { DataHoverRow } from './DataHoverRow';
import { GeomapLayerHover } from './types';
import { renderValue } from './uiUtils';

type Props = {
layers: GeomapLayerHover[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { Dispatch, SetStateAction } from 'react';

import { Tab, TabsBar } from '@grafana/ui';
import { GeomapLayerHover } from 'app/plugins/panel/geomap/event';

import { GeomapLayerHover } from './types';

type Props = {
layers?: GeomapLayerHover[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import {
import { config } from '@grafana/runtime';
import { SortOrder, TooltipDisplayMode } from '@grafana/schema';
import { TextLink, useStyles2 } from '@grafana/ui';
import { renderValue } from 'app/plugins/panel/geomap/utils/uiUtils';

import { ExemplarHoverView } from './ExemplarHoverView';
import { renderValue } from './uiUtils';


export interface Props {
data?: DataFrame; // source data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import React from 'react';
import { GrafanaTheme2, LinkModel } from '@grafana/data';
import { LinkButton, useStyles2 } from '@grafana/ui';
import { VizTooltipRow } from '@grafana/ui/src/components/VizTooltip/VizTooltipRow';
import { renderValue } from 'app/plugins/panel/geomap/utils/uiUtils';

import { DisplayValue } from './DataHoverView';
import { renderValue } from './uiUtils';

export interface Props {
displayValues: DisplayValue[];
Expand Down
20 changes: 20 additions & 0 deletions public/app/features/visualization/data-hover/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { FeatureLike } from 'ol/Feature';
import BaseLayer from 'ol/layer/Base';
import { Subject } from 'rxjs';

import { MapLayerHandler, MapLayerOptions } from '@grafana/data';
import { LayerElement } from 'app/core/components/Layers/types';

interface MapLayerState<TConfig = unknown> extends LayerElement {
options: MapLayerOptions<TConfig>;
handler: MapLayerHandler;
layer: BaseLayer; // the openlayers instance
onChange: (cfg: MapLayerOptions<TConfig>) => void;
isBasemap?: boolean;
mouseEvents: Subject<FeatureLike | undefined>;
}

export interface GeomapLayerHover {
layer: MapLayerState;
features: FeatureLike[];
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { cx } from '@emotion/css';
import React from 'react';

import { isUrl } from './utils';
const isUrl = (url: string) => {
try {
const newUrl = new URL(url);
return newUrl.protocol.includes('http');
} catch (_) {
return false;
}
};

export const renderValue = (value: string): string | React.ReactNode => {
if (isUrl(value)) {
Expand Down
56 changes: 0 additions & 56 deletions public/app/plugins/panel/geomap/GeomapOverlay.tsx

This file was deleted.

Loading