Skip to content

Commit 6ebf2f9

Browse files
committed
change graph heigth
1 parent b1ac7e4 commit 6ebf2f9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

app/charts/GrafanaEventChart.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
7474
<option value="gauge">Gauge</option>
7575
<option value="table">Table</option>
7676
<option value="histogram">Histogram</option>
77+
<option value="piechart">Pie Chart</option>
78+
<option value="alertlist">Alert</option>
7779
</select>
7880

7981
<label htmlFor="graphType" style={{
@@ -99,7 +101,9 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
99101
graphType === "gauge" ? Gauge(uid, parsedName, graphType, timeFrame) :
100102
graphType === "table" ? Table(uid, parsedName, graphType, timeFrame) :
101103
graphType === "histogram" ? Histogram(uid, parsedName, graphType, timeFrame) :
102-
null}
104+
graphType === "piechart" ? PieChart(uid, parsedName, graphType, timeFrame) :
105+
graphType === "alertlist" ? AlertList(uid, parsedName, graphType, timeFrame) :
106+
null}
103107

104108
</div>
105109
);
@@ -131,4 +135,12 @@ const Table = (uid, parsedName, graphType, timeFrame) => {
131135
const Histogram = (uid, parsedName, graphType, timeFrame) => {
132136
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
133137
}
138+
139+
const PieChart = (uid, parsedName, graphType, timeFrame) => {
140+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
141+
}
142+
143+
const AlertList = (uid, parsedName, graphType, timeFrame) => {
144+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
145+
}
134146
export default GrafanaEventChart;

chronos_npm_package/controllers/GrafanaPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function createGrafanaPanelObject(
2525
"tooltip": false,
2626
"viz": false
2727
},
28-
"lineInterpolation": "linear",
28+
"lineInterpolation": "smooth",
2929
"lineWidth": 1,
3030
"pointSize": 5,
3131
"scaleDistribution": {

0 commit comments

Comments
 (0)