Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
algenty committed Jan 15, 2020
1 parent ac29f90 commit 7cfbf0c
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
13 changes: 5 additions & 8 deletions dist/module.js
Expand Up @@ -104330,11 +104330,7 @@ var FlowchartHandler = function () {
key: "listenMessage",
value: function listenMessage(event) {
if (event.data === 'ready') {
if (event.source) {
if (!(event.source instanceof MessagePort) && !(event.source instanceof ServiceWorker)) {
event.source.postMessage(this.getFlowchart(this.currentFlowchart).data.xml, event.origin);
}
}
event.source.postMessage(this.getFlowchart(this.currentFlowchart).data.xml, event.origin);
} else {
if (this.onEdit && event.data !== undefined && event.data.length > 0) {
this.getFlowchart(this.currentFlowchart).redraw(event.data);
Expand Down Expand Up @@ -105479,7 +105475,8 @@ var grafana = {
getTimeSeries: function getTimeSeries(seriesData) {
return new grafana_app_core_time_series2__WEBPACK_IMPORTED_MODULE_1___default.a({
datapoints: seriesData.datapoints || [],
alias: seriesData.target
alias: seriesData.target,
unit: seriesData.unit
});
}
};
Expand Down Expand Up @@ -109840,8 +109837,8 @@ var Serie = function (_Metric) {

_this = _possibleConstructorReturn(this, _getPrototypeOf(Serie).call(this, dataList));
_this.type = 'serie';
_this.name = dataList.alias;
_this.metrics = _this.seriesHandler(dataList);
_this.name = _this.metrics.alias;
return _this;
}

Expand Down Expand Up @@ -110174,7 +110171,7 @@ _grafana_func__WEBPACK_IMPORTED_MODULE_1__["default"].loadCss();
/*! exports provided: type, name, id, info, dependencies, default */
/***/ (function(module) {

module.exports = {"type":"panel","name":"FlowCharting","id":"agenty-flowcharting-panel","info":{"description":"Flowcharting is a plugin for grafana. It aims to display complexe diagram draws with draw.io like Visio","author":{"name":"Arnaud GENTY","url":"https://github.com/algenty/grafana-flowcharting"},"keywords":["flowchart","panel","diagram","workflow","floorplan","map","organigram","draw.io","visio","mxgraph"],"links":[{"name":"Project site","url":"https://github.com/algenty/grafana-flowcharting"},{"name":"Apache License","url":"https://github.com/algenty/grafana-flowcharting/blob/master/LICENSE"},{"name":"Documentation","url":"https://algenty.github.io/flowcharting-repository/"}],"version":"0.6.0","updated":"2019-12-07","logos":{"small":"img/agenty-flowcharting.svg","large":"img/agenty-flowcharting.svg"}},"dependencies":{"grafanaVersion":"6.x.x","plugins":[]}};
module.exports = {"type":"panel","name":"FlowCharting","id":"agenty-flowcharting-panel","info":{"description":"Flowcharting is a plugin for grafana. It aims to display complexe diagram draws with draw.io like Visio","author":{"name":"Arnaud GENTY","url":"https://github.com/algenty/grafana-flowcharting"},"keywords":["flowchart","panel","diagram","workflow","floorplan","map","organigram","draw.io","visio","mxgraph"],"links":[{"name":"Project site","url":"https://github.com/algenty/grafana-flowcharting"},{"name":"Apache License","url":"https://github.com/algenty/grafana-flowcharting/blob/master/LICENSE"},{"name":"Documentation","url":"https://algenty.github.io/flowcharting-repository/"}],"version":"0.6.1","updated":"2020-01-15","logos":{"small":"img/agenty-flowcharting.svg","large":"img/agenty-flowcharting.svg"}},"dependencies":{"grafanaVersion":"6.x.x","plugins":[]}};

/***/ }),

Expand Down
2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/plugin.json
Expand Up @@ -34,8 +34,8 @@
"url": "https://algenty.github.io/flowcharting-repository/"
}
],
"version": "0.6.0",
"updated": "2019-12-07",
"version": "0.6.1",
"updated": "2020-01-15",
"logos": {
"small": "img/agenty-flowcharting.svg",
"large": "img/agenty-flowcharting.svg"
Expand Down
13 changes: 7 additions & 6 deletions src/flowchartHandler.ts
Expand Up @@ -483,14 +483,15 @@ export default class FlowchartHandler {
return false;
}

private listenMessage(event: MessageEvent) {
listenMessage(event: any) {
if (event.data === 'ready') {
// send xml
if (event.source) {
if (!(event.source instanceof MessagePort) && !(event.source instanceof ServiceWorker)) {
event.source.postMessage(this.getFlowchart(this.currentFlowchart).data.xml, event.origin);
}
}
event.source.postMessage(this.getFlowchart(this.currentFlowchart).data.xml, event.origin);
// if (event.source) {
// if (!(event.source instanceof MessagePort) && !(event.source instanceof ServiceWorker)) {
// event.source.postMessage(this.getFlowchart(this.currentFlowchart).data.xml, event.origin);
// }
// }
} else {
if (this.onEdit && event.data !== undefined && event.data.length > 0) {
this.getFlowchart(this.currentFlowchart).redraw(event.data);
Expand Down
1 change: 1 addition & 0 deletions src/grafana_func.js
Expand Up @@ -30,6 +30,7 @@ var grafana = {
return new TimeSeries({
datapoints: seriesData.datapoints || [],
alias: seriesData.target,
unit: seriesData.unit,
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/metric_class.ts
Expand Up @@ -77,8 +77,8 @@ export class Serie extends Metric {
constructor(dataList: any) {
super(dataList);
this.type = 'serie';
this.name = dataList.alias;
this.metrics = this.seriesHandler(dataList);
this.name = this.metrics.alias;
}

seriesHandler(seriesData) {
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.json
Expand Up @@ -34,8 +34,8 @@
"url": "https://algenty.github.io/flowcharting-repository/"
}
],
"version": "0.6.0",
"updated": "2019-12-07",
"version": "0.6.1",
"updated": "2020-01-15",
"logos": {
"small": "img/agenty-flowcharting.svg",
"large": "img/agenty-flowcharting.svg"
Expand Down

0 comments on commit 7cfbf0c

Please sign in to comment.