Skip to content

Commit

Permalink
Merge pull request #94 from el-psycho/master
Browse files Browse the repository at this point in the history
Fix duplicate rows for each alert on grafana table panel
  • Loading branch information
cryptobioz authored Feb 12, 2021
2 parents aed6dac + 0d98ebf commit a3da86b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/module.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"url": "https://camptocamp.com"
},
"logos": {
"small": "img/simpleJson_logo.svg",
"large": "img/simpleJson_logo.svg"
"small": "img/json-logo.svg",
"large": "img/json-logo.svg"
},
"links": [
{"name": "GitHub", "url": "https://github.com/camptocamp/grafana-prometheus-alertmanager-datasource"},
{"name": "MIT License", "url": "https://github.com/camptocamp/grafana-prometheus-alertmanager-datasource/blob/master/LICENSE"}
],
"version": "1.0.0",
"updated": "2021-01-29"
"updated": "2021-02-12"
},

"dependencies": {
Expand Down
4 changes: 1 addition & 3 deletions src/DataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ export class AlertmanagerDataSource extends DataSourceApi<CustomQuery, GenericOp
const frame = this.buildDataFrame(query.refId, data.data);
data.data.forEach((alert: any) => {
const row: string[] = this.parseAlertAttributes(alert, frame.fields);
frame.fields.forEach((element: any) => {
frame.appendRow(row);
});
frame.appendRow(row);
});
return Promise.resolve(frame);
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"url": "https://camptocamp.com"
},
"logos": {
"small": "img/simpleJson_logo.svg",
"large": "img/simpleJson_logo.svg"
"small": "img/json-logo.svg",
"large": "img/json-logo.svg"
},
"links": [
{"name": "GitHub", "url": "https://github.com/camptocamp/grafana-prometheus-alertmanager-datasource"},
Expand Down

0 comments on commit a3da86b

Please sign in to comment.