@@ -19,21 +19,19 @@ export const DSL_BASE = `${DIRECT_QUERY_BASE}/dsl`;
19
19
// Module for handling EMR states for Dashboards Progress Bar. All of these except "fresh" are
20
20
// directly from the EMR job run states. "ord" is used to approximate progress (eyeballed relative
21
21
// stage times), and "terminal" indicates whether a job is in progress at all.
22
- export const EMR_STATES = new Map < string , { ord : number ; terminal : boolean } > (
23
- Object . entries ( {
24
- submitted : { ord : 0 , terminal : false } ,
25
- queued : { ord : 10 , terminal : false } ,
26
- pending : { ord : 20 , terminal : false } ,
27
- scheduled : { ord : 30 , terminal : false } ,
28
- running : { ord : 70 , terminal : false } ,
29
- cancelling : { ord : 90 , terminal : false } ,
30
- success : { ord : 100 , terminal : true } ,
31
- failed : { ord : 100 , terminal : true } ,
32
- cancelled : { ord : 100 , terminal : true } ,
33
- // The "null state" for a fresh page load, which components conditionally use on load.
34
- fresh : { ord : 100 , terminal : true } ,
35
- } )
36
- ) ;
22
+ export const EMR_STATES = new Map < string , { ord : number ; terminal : boolean } > ( [
23
+ [ 'submitted' , { ord : 0 , terminal : false } ] ,
24
+ [ 'queued' , { ord : 10 , terminal : false } ] ,
25
+ [ 'pending' , { ord : 20 , terminal : false } ] ,
26
+ [ 'scheduled' , { ord : 30 , terminal : false } ] ,
27
+ [ 'running' , { ord : 70 , terminal : false } ] ,
28
+ [ 'cancelling' , { ord : 90 , terminal : false } ] ,
29
+ [ 'success' , { ord : 100 , terminal : true } ] ,
30
+ [ 'failed' , { ord : 100 , terminal : true } ] ,
31
+ [ 'cancelled' , { ord : 100 , terminal : true } ] ,
32
+ // The "null state" for a fresh page load, which components conditionally use on load.
33
+ [ 'fresh' , { ord : 100 , terminal : true } ] ,
34
+ ] ) ;
37
35
38
36
export const MAX_ORD = 100 ;
39
37
0 commit comments