@@ -191,7 +191,7 @@ const renderLineCharts = (grid: any, screen: any, title: string, coords: number[
191
191
screen . append ( line )
192
192
193
193
const lineData = {
194
- x : formattedDates . reverse ( ) ,
194
+ x : formattedDates ,
195
195
y : alertsCounts
196
196
}
197
197
@@ -250,16 +250,18 @@ const formatData = (data: AnalyticsData[]) => {
250
250
const displayAnalyticsScreen = ( data : FormattedAnalyticsData ) => {
251
251
const screen = blessed . screen ( )
252
252
// 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} )
254
254
255
255
renderLineCharts ( grid , screen , 'Total critical alerts' , [ 0 , 0 , 1 , 2 ] , data , 'total_critical_alerts' )
256
256
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 ,
263
265
{ label : 'Top 5 alert types'
264
266
, barWidth : 10
265
267
, barSpacing : 17
0 commit comments