Skip to content

Commit ecba785

Browse files
committed
Rename to grafana-worldmap-panel-ng to allow side-by-side installation
1 parent f79d2d2 commit ecba785

File tree

10 files changed

+60
-37
lines changed

10 files changed

+60
-37
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22

3-
## v0.3.0-dev
3+
4+
## v0.4.0
5+
- Rename to `grafana-worldmap-panel-ng` to allow side-by-side installation
6+
with upstream *Grafana Worldmap Panel 0.2.0*.
7+
8+
9+
## v0.3.0
410

511
- Add new mapping options `table+json` and `table+jsonp` to retrieve
612
location information from JSON endpoint, even for table data.

Makefile.Homebrew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ grafana-start:
44
grafana-server --config=/usr/local/etc/grafana/grafana.ini --homepath /usr/local/share/grafana cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.data=/usr/local/var/lib/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins
55

66
link-plugin:
7-
ln -s `pwd` /usr/local/var/lib/grafana/plugins/
7+
ln -s `pwd` /usr/local/var/lib/grafana/plugins/grafana-worldmap-panel-ng

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "worldmap-panel",
3-
"version": "1.0.0",
2+
"name": "grafana-worldmap-panel-ng",
3+
"version": "0.4.0",
44
"description": "Worldmap Panel Plugin for Grafana",
55
"main": "src/module.js",
66
"scripts": {

src/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class WorldmapCore {
8787

8888
// Compute URL to builtin JSON resource.
8989
const url =
90-
"public/plugins/grafana-worldmap-panel/data/" +
90+
`public/plugins/${this.ctrl.pluginId}/data/` +
9191
this.settings.locationData +
9292
".json";
9393

src/data_formatter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe('DataFormatter', () => {
105105
* - https://github.com/grafana/worldmap-panel/pull/177
106106
* - https://community.hiveeyes.org/t/erneuerung-der-luftdatenpumpe/1199
107107
* - https://community.hiveeyes.org/t/ldi-data-plane-v2/1412
108-
* - https://community.hiveeyes.org/t/grafana-worldmap-panel-0-3-0-dev-series/1824/2
108+
* - https://community.hiveeyes.org/t/grafana-worldmap-panel-ng/1824/2
109109
*/
110110
beforeEach(() => {
111111
const ctrl = {

src/module.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
/* eslint import/no-extraneous-dependencies: 0 */
2-
import {loadPluginCss} from 'grafana/app/plugins/sdk';
32
import WorldmapCtrl from './worldmap_ctrl';
43

5-
loadPluginCss({
6-
dark: 'plugins/grafana-worldmap-panel/css/worldmap.dark.css',
7-
light: 'plugins/grafana-worldmap-panel/css/worldmap.light.css'
8-
});
9-
104
export {
115
WorldmapCtrl as PanelCtrl
126
};

src/partials/editor.html

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1+
<!-- Development / Beta badge -->
2+
<span>
3+
4+
The
5+
<a href="https://github.com/hiveeyes/grafana-worldmap-panel" class="editor-link-color" target="_blank">
6+
Worldmap Panel NG
7+
</a>
8+
(<a href="https://github.com/hiveeyes/grafana-worldmap-panel/blob/develop/CHANGELOG.md" class="editor-link-color" target="_blank">changes</a>)
9+
is work in progress.
10+
11+
Enjoy
12+
<a href="https://community.hiveeyes.org/t/grafana-worldmap-panel-ng/1824" class="editor-link-color" target="_blank">following the development</a>
13+
and testing it.
14+
15+
We will be happy to receive feedback from the community at
16+
<a href="https://community.grafana.com/t/giving-the-grafana-worldmap-panel-some-love/17210" class="editor-link-color" target="_blank">[1]</a>,
17+
<a href="https://github.com/grafana/worldmap-panel/issues/197" class="editor-link-color" target="_blank">[2]</a>
18+
and
19+
<a href="https://github.com/hiveeyes/grafana-worldmap-panel" class="editor-link-color" target="_blank">[3]</a>.
20+
21+
Please don't use this software in production yet.
22+
23+
</span>
24+
<hr/>
25+
26+
127
<!-- Data mapping -->
228
<div class="editor-row">
329

4-
<h3 class="main-section-heading pull-left">Location source</h3>
5-
6-
<!-- Development / Beta badge -->
7-
<span class="pull-right" style="max-width: 450px; text-align: right">
8-
The
9-
<a href="https://github.com/hiveeyes/grafana-worldmap-panel" class="editor-link-color" target="_blank">
10-
Grafana Worldmap Panel 0.3.0-dev series
11-
</a>
12-
(<a href="https://github.com/hiveeyes/grafana-worldmap-panel/blob/develop/CHANGELOG.md" class="editor-link-color" target="_blank">changes</a>)
13-
is a work in progress, please don't use it in production yet.
14-
We are happy for testing and feedback.
15-
</span>
16-
<div style="clear: both"/>
17-
<br/>
30+
<h3 class="main-section-heading">Location source</h3>
1831

1932
<!-- Data source -->
2033
<div class="section editor-column">

src/plugin.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"type": "panel",
3-
"name": "Worldmap Panel",
4-
"id": "grafana-worldmap-panel",
3+
"name": "Worldmap Panel NG",
4+
"id": "grafana-worldmap-panel-ng",
55

66
"info": {
7-
"description": "World Map panel for Grafana. Displays time series data or geohash data from Elasticsearch overlaid on a world map.",
7+
"description": "World Map panel for Grafana. Displays time series data or geohash data on a world map.",
88
"author": {
99
"name": "Grafana Labs",
1010
"url": "https://grafana.com"
@@ -15,16 +15,16 @@
1515
"large": "images/worldmap_logo.svg"
1616
},
1717
"links": [
18-
{"name": "Project site", "url": "https://github.com/grafana/worldmap-panel"},
19-
{"name": "MIT License", "url": "https://github.com/grafana/worldmap-panel/blob/master/LICENSE"}
18+
{"name": "Project site", "url": "https://github.com/hiveeyes/grafana-worldmap-panel"},
19+
{"name": "MIT License", "url": "https://github.com/hiveeyes/grafana-worldmap-panel/blob/master/LICENSE"}
2020
],
2121
"screenshots": [
2222
{"name": "World", "path": "images/worldmap-world.png"},
2323
{"name": "USA", "path": "images/worldmap-usa.png"},
2424
{"name": "Light Theme", "path": "images/worldmap-light-theme.png"}
2525
],
26-
"version": "0.3.0-dev6",
27-
"updated": "2019-05-06"
26+
"version": "0.4.0",
27+
"updated": "2019-06-08"
2828
},
2929

3030
"dependencies": {

src/worldmap.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ describe('Worldmap', () => {
325325
* options here to proof they actually toggle the visibility
326326
* of the respective control elements.
327327
*
328-
* See also https://community.hiveeyes.org/t/grafana-worldmap-panel-0-3-0-dev-series/1824/3
328+
* See also https://community.hiveeyes.org/t/grafana-worldmap-panel-ng/1824/3
329329
*/
330330
beforeEach(() => {
331331
ctrl.data = new DataBuilder().withThresholdValues([2, 4, 6]).build();
@@ -390,7 +390,7 @@ describe('WorldmapFoundation', () => {
390390
* options here to proof they actually toggle the visibility
391391
* of the respective control elements.
392392
*
393-
* See also https://community.hiveeyes.org/t/grafana-worldmap-panel-0-3-0-dev-series/1824/3
393+
* See also https://community.hiveeyes.org/t/grafana-worldmap-panel-ng/1824/3
394394
*/
395395

396396
let worldMap;

src/worldmap_ctrl.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MetricsPanelCtrl } from "grafana/app/plugins/sdk";
1+
import {loadPluginCss, MetricsPanelCtrl} from "grafana/app/plugins/sdk";
22

33
import * as _ from "lodash";
44
import "./css/worldmap-panel.css";
@@ -107,6 +107,8 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
107107
this.$document = $document;
108108
this.contextSrv = contextSrv;
109109

110+
this.loadCss();
111+
110112
this.initializing = true;
111113

112114
this.errors = new ErrorManager();
@@ -124,6 +126,14 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
124126
this.loadLocationData();
125127
}
126128

129+
loadCss() {
130+
loadPluginCss({
131+
dark: `plugins/${this.pluginId}/css/worldmap.dark.css`,
132+
light: `plugins/${this.pluginId}/css/worldmap.light.css`
133+
});
134+
135+
}
136+
127137
loadSettings() {
128138
/*
129139
* Initialize the plugin setting subsystem to provide `this.settings`.
@@ -358,7 +368,7 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
358368
onInitEditMode() {
359369
this.addEditorTab(
360370
"Worldmap",
361-
"public/plugins/grafana-worldmap-panel/partials/editor.html",
371+
`public/plugins/${this.pluginId}/partials/editor.html`,
362372
2
363373
);
364374
}

0 commit comments

Comments
 (0)