@@ -452,7 +452,7 @@ describe('PrometheusDatasource', function() {
452
452
interval : '10s' ,
453
453
scopedVars : {
454
454
__interval : { text : '10s' , value : '10s' } ,
455
- __interval_ms : { text : String ( 10 * 1000 ) , value : String ( 10 * 1000 ) } ,
455
+ __interval_ms : { text : 10 * 1000 , value : 10 * 1000 } ,
456
456
} ,
457
457
} ;
458
458
var urlExpected =
@@ -463,8 +463,8 @@ describe('PrometheusDatasource', function() {
463
463
464
464
expect ( query . scopedVars . __interval . text ) . to . be ( '10s' ) ;
465
465
expect ( query . scopedVars . __interval . value ) . to . be ( '10s' ) ;
466
- expect ( query . scopedVars . __interval_ms . text ) . to . be ( String ( 10 * 1000 ) ) ;
467
- expect ( query . scopedVars . __interval_ms . value ) . to . be ( String ( 10 * 1000 ) ) ;
466
+ expect ( query . scopedVars . __interval_ms . text ) . to . be ( 10 * 1000 ) ;
467
+ expect ( query . scopedVars . __interval_ms . value ) . to . be ( 10 * 1000 ) ;
468
468
} ) ;
469
469
it ( 'should be min interval when it is greater than auto interval' , function ( ) {
470
470
var query = {
@@ -479,7 +479,7 @@ describe('PrometheusDatasource', function() {
479
479
interval : '5s' ,
480
480
scopedVars : {
481
481
__interval : { text : '5s' , value : '5s' } ,
482
- __interval_ms : { text : String ( 5 * 1000 ) , value : String ( 5 * 1000 ) } ,
482
+ __interval_ms : { text : 5 * 1000 , value : 5 * 1000 } ,
483
483
} ,
484
484
} ;
485
485
var urlExpected =
@@ -490,8 +490,8 @@ describe('PrometheusDatasource', function() {
490
490
491
491
expect ( query . scopedVars . __interval . text ) . to . be ( '5s' ) ;
492
492
expect ( query . scopedVars . __interval . value ) . to . be ( '5s' ) ;
493
- expect ( query . scopedVars . __interval_ms . text ) . to . be ( String ( 5 * 1000 ) ) ;
494
- expect ( query . scopedVars . __interval_ms . value ) . to . be ( String ( 5 * 1000 ) ) ;
493
+ expect ( query . scopedVars . __interval_ms . text ) . to . be ( 5 * 1000 ) ;
494
+ expect ( query . scopedVars . __interval_ms . value ) . to . be ( 5 * 1000 ) ;
495
495
} ) ;
496
496
it ( 'should account for intervalFactor' , function ( ) {
497
497
var query = {
@@ -507,7 +507,7 @@ describe('PrometheusDatasource', function() {
507
507
interval : '10s' ,
508
508
scopedVars : {
509
509
__interval : { text : '10s' , value : '10s' } ,
510
- __interval_ms : { text : String ( 10 * 1000 ) , value : String ( 10 * 1000 ) } ,
510
+ __interval_ms : { text : 10 * 1000 , value : 10 * 1000 } ,
511
511
} ,
512
512
} ;
513
513
var urlExpected =
@@ -518,8 +518,8 @@ describe('PrometheusDatasource', function() {
518
518
519
519
expect ( query . scopedVars . __interval . text ) . to . be ( '10s' ) ;
520
520
expect ( query . scopedVars . __interval . value ) . to . be ( '10s' ) ;
521
- expect ( query . scopedVars . __interval_ms . text ) . to . be ( String ( 10 * 1000 ) ) ;
522
- expect ( query . scopedVars . __interval_ms . value ) . to . be ( String ( 10 * 1000 ) ) ;
521
+ expect ( query . scopedVars . __interval_ms . text ) . to . be ( 10 * 1000 ) ;
522
+ expect ( query . scopedVars . __interval_ms . value ) . to . be ( 10 * 1000 ) ;
523
523
} ) ;
524
524
it ( 'should be interval * intervalFactor when greater than min interval' , function ( ) {
525
525
var query = {
@@ -535,7 +535,7 @@ describe('PrometheusDatasource', function() {
535
535
interval : '5s' ,
536
536
scopedVars : {
537
537
__interval : { text : '5s' , value : '5s' } ,
538
- __interval_ms : { text : String ( 5 * 1000 ) , value : String ( 5 * 1000 ) } ,
538
+ __interval_ms : { text : 5 * 1000 , value : 5 * 1000 } ,
539
539
} ,
540
540
} ;
541
541
var urlExpected =
@@ -546,8 +546,8 @@ describe('PrometheusDatasource', function() {
546
546
547
547
expect ( query . scopedVars . __interval . text ) . to . be ( '5s' ) ;
548
548
expect ( query . scopedVars . __interval . value ) . to . be ( '5s' ) ;
549
- expect ( query . scopedVars . __interval_ms . text ) . to . be ( String ( 5 * 1000 ) ) ;
550
- expect ( query . scopedVars . __interval_ms . value ) . to . be ( String ( 5 * 1000 ) ) ;
549
+ expect ( query . scopedVars . __interval_ms . text ) . to . be ( 5 * 1000 ) ;
550
+ expect ( query . scopedVars . __interval_ms . value ) . to . be ( 5 * 1000 ) ;
551
551
} ) ;
552
552
it ( 'should be min interval when greater than interval * intervalFactor' , function ( ) {
553
553
var query = {
@@ -563,7 +563,7 @@ describe('PrometheusDatasource', function() {
563
563
interval : '5s' ,
564
564
scopedVars : {
565
565
__interval : { text : '5s' , value : '5s' } ,
566
- __interval_ms : { text : String ( 5 * 1000 ) , value : String ( 5 * 1000 ) } ,
566
+ __interval_ms : { text : 5 * 1000 , value : 5 * 1000 } ,
567
567
} ,
568
568
} ;
569
569
var urlExpected =
@@ -574,8 +574,8 @@ describe('PrometheusDatasource', function() {
574
574
575
575
expect ( query . scopedVars . __interval . text ) . to . be ( '5s' ) ;
576
576
expect ( query . scopedVars . __interval . value ) . to . be ( '5s' ) ;
577
- expect ( query . scopedVars . __interval_ms . text ) . to . be ( String ( 5 * 1000 ) ) ;
578
- expect ( query . scopedVars . __interval_ms . value ) . to . be ( String ( 5 * 1000 ) ) ;
577
+ expect ( query . scopedVars . __interval_ms . text ) . to . be ( 5 * 1000 ) ;
578
+ expect ( query . scopedVars . __interval_ms . value ) . to . be ( 5 * 1000 ) ;
579
579
} ) ;
580
580
it ( 'should be determined by the 11000 data points limit, accounting for intervalFactor' , function ( ) {
581
581
var query = {
@@ -590,7 +590,7 @@ describe('PrometheusDatasource', function() {
590
590
interval : '5s' ,
591
591
scopedVars : {
592
592
__interval : { text : '5s' , value : '5s' } ,
593
- __interval_ms : { text : String ( 5 * 1000 ) , value : String ( 5 * 1000 ) } ,
593
+ __interval_ms : { text : 5 * 1000 , value : 5 * 1000 } ,
594
594
} ,
595
595
} ;
596
596
var end = 7 * 24 * 60 * 60 ;
@@ -609,8 +609,8 @@ describe('PrometheusDatasource', function() {
609
609
610
610
expect ( query . scopedVars . __interval . text ) . to . be ( '5s' ) ;
611
611
expect ( query . scopedVars . __interval . value ) . to . be ( '5s' ) ;
612
- expect ( query . scopedVars . __interval_ms . text ) . to . be ( String ( 5 * 1000 ) ) ;
613
- expect ( query . scopedVars . __interval_ms . value ) . to . be ( String ( 5 * 1000 ) ) ;
612
+ expect ( query . scopedVars . __interval_ms . text ) . to . be ( 5 * 1000 ) ;
613
+ expect ( query . scopedVars . __interval_ms . value ) . to . be ( 5 * 1000 ) ;
614
614
} ) ;
615
615
} ) ;
616
616
} ) ;
0 commit comments