Skip to content

Commit 369809f

Browse files
committed
Adjsuted plugin.json to match panel type
1 parent 7ee3058 commit 369809f

File tree

10 files changed

+38
-37
lines changed

10 files changed

+38
-37
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ To build a production build with minification: `yarn build`
4646
This plugin is using a modified version of the Vizeral library, thus you have to link the customized Vizceral version in order to build the plugin!
4747

4848
1. Ensure that NodeJS and NPM is installed
49-
1. Clone the Vizceral fork
49+
1. Clone the Vizceral fork: `git clone https://github.com/NovatecConsulting/vizceral.git`
50+
1. Checkout the `flowmap` branch: `git checkout -b flowmap`
5051
1. Run inside the repository `npm link`
51-
1. Build it: `npm run dev`
52-
1. Go to the SDG-plugin directory and execute `npm link vizceral`
52+
1. Build it: `npm run build` (or `npm run dev` for development)
53+
1. Go to the flowmap-plugin directory and execute `npm link vizceral`
5354

5455
#### Changelog
5556

File renamed without changes.

src/graph/GraphGenerator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GraphGenerator {
1919
name: "INTERNET",
2020
displayName: "INTERNET",
2121
nodes: nodes,
22-
layout: this.panelCtrl.panel.flowmapSettings.layout,
22+
layout: this.panelCtrl.panel.sdgSettings.layout,
2323
metadata: {},
2424
class: "normal",
2525
maxVolume: 10000,
@@ -249,7 +249,7 @@ class GraphGenerator {
249249
if (!_.has(c, 'metadata')) {
250250
c['metadata'] = {};
251251
}
252-
c.metadata['showStats'] = this.panelCtrl.panel.flowmapSettings.showConnectionStats;
252+
c.metadata['showStats'] = this.panelCtrl.panel.sdgSettings.showConnectionStats;
253253
});
254254

255255
return allConnections;

src/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { FlowmapCtrl } from './flowmap_ctrl';
1+
import { ServiceDependencyGraphCtrl } from './service_dependency_graph_ctrl.ts';
22

33
export {
4-
FlowmapCtrl as PanelCtrl
4+
ServiceDependencyGraphCtrl as PanelCtrl
55
};

src/options_ctrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function optionsTab($q, uiSegmentSrv) {
6161
return {
6262
restrict: 'E',
6363
scope: true,
64-
templateUrl: 'public/plugins/novatec-flowmap-panel/partials/options.html',
64+
templateUrl: 'public/plugins/novatec-service-dependency-graph-panel/partials/options.html',
6565
controller: OptionsCtrl,
6666
};
6767
}

src/partials/module.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="clock-panel" ng-style="{height: ctrl.height}">
22

3-
<div class="vizceral" id="nt-flowmap-container" ng-show="ctrl.dataAvailable()" style="width: 100%; height: 100%"></div>
3+
<div class="vizceral" id="nt-sdg-container" ng-show="ctrl.dataAvailable()" style="width: 100%; height: 100%"></div>
44

55
<div class="noData" ng-show="!ctrl.dataAvailable()">No data to show - the query returned no data.</div>
66

src/partials/options.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,30 +73,30 @@ <h5 class="section-heading">Data Mapping</h5>
7373

7474

7575
<div class="section gf-form-group">
76-
<h5 class="section-heading">Flowmap Settings</h5>
76+
<h5 class="section-heading">SDG Settings</h5>
7777

7878
<div class="gf-form-inline">
79-
<gf-form-switch class="gf-form" label="Show Connection Statistics" label-class="width-16" checked="ctrl.panel.flowmapSettings.showConnectionStats" on-change="ctrl.forceRender()"></gf-form-switch>
79+
<gf-form-switch class="gf-form" label="Show Connection Statistics" label-class="width-16" checked="ctrl.panel.sdgSettings.showConnectionStats" on-change="ctrl.forceRender()"></gf-form-switch>
8080

8181
<label class="gf-form-label width-8">Layout</label>
82-
<select class="input-small gf-form-input width-10" ng-model="ctrl.panel.flowmapSettings.layout" ng-change="ctrl.forceRender()">
82+
<select class="input-small gf-form-input width-10" ng-model="ctrl.panel.sdgSettings.layout" ng-change="ctrl.forceRender()">
8383
<option ng-repeat="variable in editor.getLayoutOptions()" value="{{variable}}">{{variable}}</option>
8484
</select>
8585
</div>
8686
</div>
8787

8888
<div class="section gf-form-group">
89-
<h5 class="section-heading">Flowmap Style</h5>
89+
<h5 class="section-heading">SDG Style</h5>
9090

9191
<div class="gf-form-inline">
9292
<label class="gf-form-label width-8">Healthy Color</label>
9393
<span class="gf-form-label">
94-
<spectrum-picker ng-model="ctrl.panel.flowmapStyle.healthyColor" ng-change="ctrl.updateFlowmapStyle()"></spectrum-picker>
94+
<spectrum-picker ng-model="ctrl.panel.sdgStyle.healthyColor" ng-change="ctrl.updateSDGStyle()"></spectrum-picker>
9595
</span>
9696

9797
<label class="gf-form-label width-8">Danger Color</label>
9898
<span class="gf-form-label">
99-
<spectrum-picker ng-model="ctrl.panel.flowmapStyle.dangerColor" ng-change="ctrl.updateFlowmapStyle()"></spectrum-picker>
99+
<spectrum-picker ng-model="ctrl.panel.sdgStyle.dangerColor" ng-change="ctrl.updateSDGStyle()"></spectrum-picker>
100100
</span>
101101
</div>
102102
</div>

src/plugin.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"type": "panel",
3-
"name": "Novatec Flowmap",
4-
"id": "novatec-flowmap-panel",
3+
"name": "Service Dependency Graph",
4+
"id": "novatec-service-dependency-graph-panel",
55
"info": {
6-
"description": "Flowmap panel for Grafana",
6+
"description": "Service Dependency Graph panel for Grafana",
77
"author": {
88
"name": "Novatec Consulting GmbH",
99
"url": "https://www.novatec-gmbh.de/"
@@ -13,17 +13,17 @@
1313
"panel"
1414
],
1515
"logos": {
16-
"small": "img/novatec_flowmap_panel_logo.svg",
17-
"large": "img/novatec_flowmap_panel_logo.svg"
16+
"small": "img/novatec_sdg_panel_logo.svg",
17+
"large": "img/novatec_sdg_panel_logo.svg"
1818
},
1919
"links": [
2020
{
2121
"name": "Project site",
22-
"url": "https://github.com/NovatecConsulting/grafana-flowmap-panel"
22+
"url": "https://github.com/NovatecConsulting/novatec-service-dependency-graph-panel.git"
2323
},
2424
{
2525
"name": "Apache License",
26-
"url": "https://github.com/NovatecConsulting/grafana-flowmap-panel/blob/master/LICENSE"
26+
"url": "https://github.com/NovatecConsulting/grafana-service-dependency-graph-panel/blob/master/LICENSE"
2727
}
2828
],
2929
"screenshots": [
@@ -33,7 +33,7 @@
3333
}
3434
],
3535
"version": "0.0.1",
36-
"updated": "2019-03-06"
36+
"updated": "2019-03-20"
3737
},
3838
"dependencies": {
3939
"grafanaVersion": "5.x.x",
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { MetricsPanelCtrl } from 'grafana/app/plugins/sdk';
22
import _ from 'lodash';
33
import { optionsTab } from './options_ctrl';
4-
import './css/novatec-flowmap-panel.css';
4+
import './css/novatec-service-dependency-graph-panel.css';
55
import Vizceral from 'vizceral';
66
import PreProcessor from './data/PreProcessor';
77

88
import GraphGenerator from './graph/GraphGenerator'
99

10-
export class FlowmapCtrl extends MetricsPanelCtrl {
10+
export class ServiceDependencyGraphCtrl extends MetricsPanelCtrl {
1111

1212
static templateUrl = 'partials/module.html';
1313

@@ -24,11 +24,11 @@ export class FlowmapCtrl extends MetricsPanelCtrl {
2424
responseTimeExternalColumn: "response-time-external",
2525
requestRateExternalColumn: "request-rate-external",
2626
},
27-
flowmapStyle: {
27+
sdgStyle: {
2828
healthyColor: 'rgb(87, 148, 242)',
2929
dangerColor: 'rgb(184, 36, 36)'
3030
},
31-
flowmapSettings: {
31+
sdgSettings: {
3232
showConnectionStats: true,
3333
layout: 'ltrTree'
3434
}
@@ -60,17 +60,17 @@ export class FlowmapCtrl extends MetricsPanelCtrl {
6060
return this.currentData != null && _.has(this.currentData, 'data') && this.currentData.data.length > 0;
6161
}
6262

63-
updateFlowmapStyle() {
63+
updateSDGStyle() {
6464
if (this.vizceral) {
6565
this.vizceral.updateStyles({
6666
colorText: 'rgb(214, 214, 214)',
6767
colorTextDisabled: 'rgb(129, 129, 129)',
6868
colorTraffic: {
69-
healthy: this.panel.flowmapStyle.healthyColor,
69+
healthy: this.panel.sdgStyle.healthyColor,
7070
normal: 'rgb(186, 213, 237)',
7171
normalDonut: 'rgb(91, 91, 91)',
7272
warning: 'rgb(268, 185, 73)',
73-
danger: this.panel.flowmapStyle.dangerColor
73+
danger: this.panel.sdgStyle.dangerColor
7474
},
7575
colorNormalDimmed: 'rgb(101, 117, 128)',
7676
colorBackgroundDark: 'rgb(35, 35, 35)',
@@ -100,15 +100,15 @@ export class FlowmapCtrl extends MetricsPanelCtrl {
100100

101101
onRender(payload) {
102102
if (!this.vizceral) {
103-
var flowmapContainer = document.getElementById("nt-flowmap-container");
103+
var sdgContainer = document.getElementById("nt-sdg-container");
104104

105-
if (flowmapContainer != null) {
106-
flowmapContainer.innerHTML = '<canvas id="nt-flowmap-viz"></canvas>';
105+
if (sdgContainer != null) {
106+
sdgContainer.innerHTML = '<canvas id="nt-sdg-viz"></canvas>';
107107
} else {
108-
console.warn("Flowmap container cannot be found!");
108+
console.warn("SDG container cannot be found!");
109109
}
110110

111-
var vizContainer = <HTMLCanvasElement>document.getElementById("nt-flowmap-viz");
111+
var vizContainer = <HTMLCanvasElement>document.getElementById("nt-sdg-viz");
112112

113113
if (vizContainer != null) {
114114

@@ -128,11 +128,11 @@ export class FlowmapCtrl extends MetricsPanelCtrl {
128128
colorText: 'rgb(214, 214, 214)',
129129
colorTextDisabled: 'rgb(129, 129, 129)',
130130
colorTraffic: {
131-
healthy: this.panel.flowmapStyle.healthyColor,
131+
healthy: this.panel.sdgStyle.healthyColor,
132132
normal: 'rgb(186, 213, 237)',
133133
normalDonut: 'rgb(91, 91, 91)',
134134
warning: 'rgb(268, 185, 73)',
135-
danger: this.panel.flowmapStyle.dangerColor
135+
danger: this.panel.sdgStyle.dangerColor
136136
},
137137
colorNormalDimmed: 'rgb(101, 117, 128)',
138138
colorBackgroundDark: 'rgb(35, 35, 35)',

0 commit comments

Comments
 (0)