Skip to content

Commit 082cf98

Browse files
author
mbrill-nt
committed
Resolve build errors
1 parent 36fc3fc commit 082cf98

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

src/options/DefaultSettings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const DefaultSettings: PanelSettings = {
2323
showDummyData: false,
2424
},
2525

26-
sumTimings: true,
26+
sumTimings: true,
2727
filterEmptyConnections: true,
2828
showDebugInformation: false,
2929
showConnectionStats: true,
@@ -66,5 +66,5 @@ export const DefaultSettings: PanelSettings = {
6666
],
6767

6868
drillDownLink: '',
69-
timeFormat: 'm',
69+
timeFormat: 'm',
7070
};

src/options/options.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,19 @@ export const optionsBuilder = (builder: PanelOptionsEditorBuilder<PanelSettings>
179179
.addSelect({
180180
path: 'timeFormat',
181181
name: 'Maximum Time Unit to Resolve',
182-
description:
182+
description:
183183
'This setting controls to which time unit time values will be resolved to. ' +
184184
'Each value always includes the smaller units.',
185185
category: ['General Settings'],
186186
settings: {
187-
options: [{value: 'ms', label: 'ms' }, {value: 's', label: 's' }, {value: 'm', label: 'm' }],
187+
options: [
188+
{ value: 'ms', label: 'ms' },
189+
{ value: 's', label: 's' },
190+
{ value: 'm', label: 'm' },
191+
],
188192
},
189-
defaultValue: DefaultSettings.timeFormat
190-
},
191-
)
193+
defaultValue: DefaultSettings.timeFormat,
194+
})
192195

193196
//Appearance
194197
.addColorPicker({

src/panel/canvas/graph_canvas.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import humanFormat from 'human-format';
77
import assetUtils from '../asset_utils';
88

99
const scaleValues = [
10-
{unit: "ms", factor: 1},
11-
{unit: "s", factor: 1000},
12-
{unit: "m", factor: 60000}
13-
]
10+
{ unit: 'ms', factor: 1 },
11+
{ unit: 's', factor: 1000 },
12+
{ unit: 'm', factor: 60000 },
13+
];
1414

1515
export default class CanvasDrawer {
1616
readonly colors = {
@@ -81,10 +81,10 @@ export default class CanvasDrawer {
8181
}
8282

8383
_getTimeScale(timeUnit: any) {
84-
const scale: any = {}
85-
for(const scaleValue of scaleValues) {
84+
const scale: any = {};
85+
for (const scaleValue of scaleValues) {
8686
scale[scaleValue.unit] = scaleValue.factor;
87-
if(scaleValue.unit === timeUnit) {
87+
if (scaleValue.unit === timeUnit) {
8888
return scale;
8989
}
9090
}
@@ -324,7 +324,7 @@ export default class CanvasDrawer {
324324
}
325325

326326
_drawEdgeLabel(ctx: CanvasRenderingContext2D, edge: cytoscape.EdgeSingular) {
327-
const { timeFormat } = this.controller.getSettings();
327+
const { timeFormat } = this.controller.getSettings();
328328

329329
const midpoint = edge.midpoint();
330330
const xMid = midpoint.x;
@@ -510,7 +510,7 @@ export default class CanvasDrawer {
510510
this._drawDonut(ctx, node, 15, 5, 0.5, [errorPct, unknownPct, healthyPct]);
511511

512512
// drawing the baseline status
513-
const {showBaselines} = this.controller.getSettings();
513+
const { showBaselines } = this.controller.getSettings();
514514
if (showBaselines && responseTime >= 0 && threshold >= 0) {
515515
const thresholdViolation = threshold < responseTime;
516516

@@ -552,7 +552,7 @@ export default class CanvasDrawer {
552552
}
553553

554554
_drawNodeStatistics(ctx: CanvasRenderingContext2D, node: cytoscape.NodeSingular) {
555-
const { timeFormat } = this.controller.getSettings()
555+
const { timeFormat } = this.controller.getSettings();
556556
const lines: string[] = [];
557557

558558
const metrics: IntGraphMetrics = node.data('metrics');
@@ -675,7 +675,7 @@ export default class CanvasDrawer {
675675
const xPos = pos.x - labelWidth / 2;
676676
const yPos = pos.y + node.height() * 0.8;
677677

678-
const {showBaselines} = this.controller.getSettings();
678+
const { showBaselines } = this.controller.getSettings();
679679
const metrics: IntGraphMetrics = node.data('metrics');
680680
const responseTime = _.defaultTo(metrics.response_time, -1);
681681
const threshold = _.defaultTo(metrics.threshold, -1);

src/processing/graph_generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class GraphGenerator {
6262
};
6363

6464
const aggregationFunction = sumMetrics ? sum : mean;
65-
65+
6666
if (internalNode) {
6767
metrics.rate = sum(map(dataElements, element => element.data.rate_in));
6868
metrics.error_rate = sum(map(dataElements, element => element.data.error_rate_in));

0 commit comments

Comments
 (0)