Skip to content

Commit

Permalink
Patch 3 0 3 (#115)
Browse files Browse the repository at this point in the history
Fix graph in 3.0.4
  • Loading branch information
pierre-yves-monnet authored May 9, 2023
1 parent abfa565 commit d8f2728
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.camunda.community</groupId>
<artifactId>zeebe-cherry-runtime</artifactId>
<version>3.0.3-SNAPSHOT</version>
<version>3.0.4</version>

<properties>
<java.version>17</java.version>
Expand Down
7 changes: 4 additions & 3 deletions src/main/frontend/src/component/Chart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class Chart extends React.Component {
getOptionsBarChart() {
const chartOptions = {
'maintainAspectRatio': false,
'responsive': false,
'plugins': {
'legend': {
'display': false
Expand All @@ -145,7 +146,7 @@ class Chart extends React.Component {
y: {
ticks: {
beginAtZero: true,
display: false
display: true
},
grid: {
display: false,
Expand All @@ -168,7 +169,6 @@ class Chart extends React.Component {
borderWidth: 2,
},
};
chartOptions.responsive = true;
chartOptions.plugins = {
legend: {
position: 'right',
Expand All @@ -187,6 +187,7 @@ class Chart extends React.Component {
if (this.state.options.width !== undefined || this.state.options.height !== undefined) {
chartOptions.maintainAspectRatio = false;
}
// value is true by default
if (this.state.options.showXLabel === false) {
chartOptions.scales.x.ticks.display = false;
}
Expand Down Expand Up @@ -268,7 +269,7 @@ class Chart extends React.Component {
dataset.data = this.state.data;
}
console.log("Chart: dataChart=" + JSON.stringify(dataChart));

return dataChart;
}

/* ******************************************************************** */
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/src/dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Dashboard extends React.Component {
<td style={{verticalAlign: "top"}}>
<RunnerDashboard runnerDisplay={runner} timestamp={this.state.dashboard.timestamp}/></td>
<td style={{verticalAlign: "top"}}>
<RunnerChart type="Executions" runnerDisplay={runner} title={false}
<RunnerChart type="ExecutionsShort" runnerDisplay={runner} title={false}
timestamp={this.state.dashboard.timestamp}/>
</td>
</tr>
Expand Down
20 changes: 14 additions & 6 deletions src/main/frontend/src/dashboard/RunnerChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,43 +42,51 @@ class RunnerChart extends React.Component {
options={{
title: this.state.title,
showXLabel: false,
showYLabel: false,
showYLabel: true,
width: 200,
height: 100,
showGrid: false
}}
title="execution"/>
}
{this.state.type === "ExecutionsShort" && this.state.runner && this.state.runner.performance &&
<Chart type="HorizontalBar" dataList={this.getExecutions()} oneColor={true}
options={{
showXLabel: false,
showYLabel: false,
showGrid: false
}}/>
}
{this.state.type === "DurationsAvg" && this.state.runner && this.state.runner.performance &&
<Chart type="HorizontalBar" dataList={this.getDurationsAvg()} oneColor={true}
options={{
title: this.state.title,
showXLabel: false,
showYLabel: false,
showYLabel: true,
width: 200,
height: 100,
showGrid: false
}}
title="Duration (average)"/>
title="Duration ms (average)"/>
}
{this.state.type === "DurationsPic" && this.state.runner && this.state.runner.performance &&
<Chart type="HorizontalBar" dataList={this.getDurationsPic()} oneColor={true}
options={{
title: this.state.title,
showXLabel: false,
showYLabel: false,
showYLabel: true,
width: 200,
height: 100,
showGrid: false
}}
title="Duration (pic)"/>
title="Duration ms (pic)"/>
}
{this.state.type === "Errors" && this.state.runner && this.state.runner.performance &&
<Chart type="HorizontalBar" dataList={this.getErrors()} oneColor={true}
options={{
title: this.state.title,
showXLabel: false,
showYLabel: false,
showYLabel: true,
width: 200,
height: 100,
showGrid: false
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/src/parameter/Parameters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class Parameters extends React.Component {
<h4>Workers</h4>
<div className="row">
<div className="col-md-12">
<NumberInput label="Threads"
<NumberInput label="Max job actives"
readonly="true"
min="1"
size="sm"
Expand Down

0 comments on commit d8f2728

Please sign in to comment.