File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ const { composeEventPayloadByRepetition } = require('../utils/merge');
1212
1313const MAX_DB_READ_BATCH_SIZE = Number ( process . env . MAX_DB_READ_BATCH_SIZE ) ;
1414
15+ /**
16+ * Chart series labels
17+ */
18+ const ChartType = {
19+ Accepted : 'accepted' ,
20+ RateLimited : 'rate-limited' ,
21+ } ;
22+
1523/**
1624 * @typedef {import('mongodb').UpdateWriteOpResult } UpdateWriteOpResult
1725 */
@@ -470,11 +478,11 @@ class EventsFactory extends Factory {
470478
471479 return [
472480 {
473- label : 'accepted' ,
481+ label : ChartType . Accepted ,
474482 data : acceptedSeries ,
475483 } ,
476484 {
477- label : 'rate-limited' ,
485+ label : ChartType . RateLimited ,
478486 data : rateLimitedSeries ,
479487 } ,
480488 ] ;
@@ -485,11 +493,11 @@ class EventsFactory extends Factory {
485493
486494 return [
487495 {
488- label : 'accepted' ,
496+ label : ChartType . Accepted ,
489497 data : fallbackAccepted ,
490498 } ,
491499 {
492- label : 'rate-limited' ,
500+ label : ChartType . RateLimited ,
493501 data : this . _composeZeroSeries ( fallbackAccepted ) ,
494502 } ,
495503 ] ;
@@ -509,7 +517,7 @@ class EventsFactory extends Factory {
509517
510518 return [
511519 {
512- label : 'accepted' ,
520+ label : ChartType . Accepted ,
513521 data,
514522 } ,
515523 ] ;
You can’t perform that action at this time.
0 commit comments