@@ -78,11 +78,11 @@ export class CircularHeatmapComponent implements OnInit {
7878
7979 private LoadMaturityDataFromGeneratedYaml ( ) {
8080 return new Promise < void > ( ( resolve , reject ) => {
81- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadMaturityDataFromGeneratedYaml Fetch' ) ;
81+ console . log ( ` ${ this . perfNow ( ) } s: LoadMaturityDataFromGeneratedYaml Fetch` ) ;
8282 this . yaml . setURI ( './assets/YAML/generated/generated.yaml' ) ;
8383
8484 this . yaml . getJson ( ) . subscribe ( data => {
85- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadMaturityDataFromGeneratedYaml Downloaded' ) ;
85+ console . log ( ` ${ this . perfNow ( ) } s: LoadMaturityDataFromGeneratedYaml Downloaded` ) ;
8686 this . YamlObject = data ;
8787 var allDimensionNames = Object . keys ( this . YamlObject ) ;
8888 var totalTeamsImplemented : number = 0 ;
@@ -118,7 +118,8 @@ export class CircularHeatmapComponent implements OnInit {
118118 ] [ allActivityInThisSubDimension [ a ] ] [ 'level' ] ;
119119
120120 if ( lvlOfCurrentActivity == l + 1 ) {
121- var nameOfActivity : string = allActivityInThisSubDimension [ a ] ;
121+ var nameOfActivity : string =
122+ allActivityInThisSubDimension [ a ] ;
122123 var teamStatus : { [ key : string ] : boolean } = { } ;
123124 const teams = this . teamList ;
124125
@@ -139,7 +140,10 @@ export class CircularHeatmapComponent implements OnInit {
139140
140141 var localStorageData = this . getFromBrowserState ( ) ;
141142
142- if ( localStorageData != null && localStorageData . length > 0 ) {
143+ if (
144+ localStorageData != null &&
145+ localStorageData . length > 0
146+ ) {
143147 this . YamlObject [ allDimensionNames [ d ] ] [
144148 allSubDimensionInThisDimension [ s ]
145149 ] [ allActivityInThisSubDimension [ a ] ] [ 'teamsImplemented' ] =
@@ -196,7 +200,7 @@ export class CircularHeatmapComponent implements OnInit {
196200 this . segment_labels
197201 ) ;
198202 this . noActivitytoGrey ( ) ;
199- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadMaturityDataFromGeneratedYaml End' ) ;
203+ console . log ( ` ${ this . perfNow ( ) } s: LoadMaturityDataFromGeneratedYaml End` ) ;
200204 resolve ( ) ;
201205 } ) ;
202206 } ) ;
@@ -234,28 +238,28 @@ export class CircularHeatmapComponent implements OnInit {
234238
235239 private LoadTeamsFromMetaYaml ( ) {
236240 return new Promise < void > ( ( resolve , reject ) => {
237- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadTeamsFromMetaYaml Fetch' ) ;
241+ console . log ( ` ${ this . perfNow ( ) } s: LoadTeamsFromMetaYaml Fetch` ) ;
238242 this . yaml . setURI ( './assets/YAML/meta.yaml' ) ;
239243 this . yaml . getJson ( ) . subscribe ( data => {
240- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadTeamsFromMetaYaml Downloaded' ) ;
244+ console . log ( ` ${ this . perfNow ( ) } s: LoadTeamsFromMetaYaml Downloaded` ) ;
241245 this . YamlObject = data ;
242246
243247 this . teamList = this . YamlObject [ 'teams' ] ;
244248 this . teamGroups = this . YamlObject [ 'teamGroups' ] ;
245249 this . teamVisible = [ ...this . teamList ] ;
246- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadTeamsFromMetaYaml End' ) ;
250+ console . log ( ` ${ this . perfNow ( ) } s: LoadTeamsFromMetaYaml End` ) ;
247251 resolve ( ) ; // Resolve the promise, and allow the next Load to run
248252 } ) ;
249253 } ) ;
250254 }
251255
252256 private LoadMaturityLevels ( ) {
253257 return new Promise < void > ( ( resolve , reject ) => {
254- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadMaturityLevels Fetch' ) ;
258+ console . log ( ` ${ this . perfNow ( ) } s: LoadMaturityLevels Fetch` ) ;
255259 this . yaml . setURI ( './assets/YAML/meta.yaml' ) ;
256260 // Function sets column header
257- this . yaml . getJson ( ) . subscribe ( data => {
258- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadMaturityLevels Downloaded' ) ;
261+ this . yaml . getJson ( ) . subscribe ( data => {
262+ console . log ( ` ${ this . perfNow ( ) } s: LoadMaturityLevels Downloaded` ) ;
259263 this . YamlObject = data ;
260264
261265 // Levels header
@@ -264,9 +268,9 @@ export class CircularHeatmapComponent implements OnInit {
264268 this . radial_labels . push ( 'Level ' + y ) ;
265269 this . maxLevelOfActivities = y ;
266270 }
267- console . log ( ( performance . now ( ) / 1000 ) . toFixed ( 3 ) + ' s: LoadMaturityLevels End' ) ;
271+ console . log ( ` ${ this . perfNow ( ) } s: LoadMaturityLevels End` ) ;
268272 resolve ( ) ; // Resolve the promise, and allow the next Load to run
269- } ) ;
273+ } ) ;
270274 } ) ;
271275 }
272276
@@ -418,7 +422,7 @@ export class CircularHeatmapComponent implements OnInit {
418422 . append ( 'svg' )
419423 . attr ( 'width' , '60%' ) // 70% forces the heatmap down
420424 . attr ( 'height' , 'auto' )
421- . attr ( 'viewBox' , '0 0 1150 1150' )
425+ . attr ( 'viewBox' , '0 0 1150 1150' )
422426 . append ( 'g' )
423427 . attr (
424428 'transform' ,
@@ -838,4 +842,8 @@ export class CircularHeatmapComponent implements OnInit {
838842 return JSON . parse ( content ) ;
839843 }
840844 }
845+
846+ perfNow ( ) : string {
847+ return ( performance . now ( ) / 1000 ) . toFixed ( 3 ) ;
848+ }
841849}
0 commit comments