@@ -191,7 +191,7 @@ const renderLineCharts = (grid: any, screen: any, title: string, coords: number[
191191 screen . append ( line )
192192
193193 const lineData = {
194- x : formattedDates . reverse ( ) ,
194+ x : formattedDates ,
195195 y : alertsCounts
196196 }
197197
@@ -250,16 +250,18 @@ const formatData = (data: AnalyticsData[]) => {
250250const displayAnalyticsScreen = ( data : FormattedAnalyticsData ) => {
251251 const screen = blessed . screen ( )
252252 // eslint-disable-next-line
253- const grid = new contrib . grid ( { rows : 4 , cols : 4 , screen} )
253+ const grid = new contrib . grid ( { rows : 5 , cols : 4 , screen} )
254254
255255 renderLineCharts ( grid , screen , 'Total critical alerts' , [ 0 , 0 , 1 , 2 ] , data , 'total_critical_alerts' )
256256 renderLineCharts ( grid , screen , 'Total high alerts' , [ 0 , 2 , 1 , 2 ] , data , 'total_high_alerts' )
257- renderLineCharts ( grid , screen , 'Total critical alerts added to main' , [ 1 , 0 , 1 , 2 ] , data , 'total_critical_added' )
258- renderLineCharts ( grid , screen , 'Total high alerts added to main' , [ 1 , 2 , 1 , 2 ] , data , 'total_high_added' )
259- renderLineCharts ( grid , screen , 'Total critical alerts prevented from main' , [ 2 , 0 , 1 , 2 ] , data , 'total_critical_prevented' )
260- renderLineCharts ( grid , screen , 'Total high alerts prevented from main' , [ 2 , 2 , 1 , 2 ] , data , 'total_high_prevented' )
261-
262- const bar = grid . set ( 3 , 0 , 1 , 2 , contrib . bar ,
257+ renderLineCharts ( grid , screen , 'Total critical alerts added to the main branch' , [ 1 , 0 , 1 , 2 ] , data , 'total_critical_added' )
258+ renderLineCharts ( grid , screen , 'Total high alerts added to the main branch' , [ 1 , 2 , 1 , 2 ] , data , 'total_high_added' )
259+ renderLineCharts ( grid , screen , 'Total critical alerts prevented from the main branch' , [ 2 , 0 , 1 , 2 ] , data , 'total_critical_prevented' )
260+ renderLineCharts ( grid , screen , 'Total high alerts prevented from the main branch' , [ 2 , 2 , 1 , 2 ] , data , 'total_high_prevented' )
261+ renderLineCharts ( grid , screen , 'Total medium alerts prevented from the main branch' , [ 3 , 0 , 1 , 2 ] , data , 'total_medium_prevented' )
262+ renderLineCharts ( grid , screen , 'Total low alerts prevented from the main branch' , [ 3 , 2 , 1 , 2 ] , data , 'total_low_prevented' )
263+
264+ const bar = grid . set ( 4 , 0 , 1 , 2 , contrib . bar ,
263265 { label : 'Top 5 alert types'
264266 , barWidth : 10
265267 , barSpacing : 17
0 commit comments