@@ -6,12 +6,12 @@ class StatusController < ActionController::API
66 skip_before_action :verify_authenticity_token , raise : false
77
88 COMPONENT_META = {
9- 'api' => { name : 'API' , description : 'Core REST API services' } ,
10- 'database' => { name : 'Database' , description : 'PostgreSQL primary database' } ,
11- 'redis' => { name : 'Cache & Background Jobs' , description : 'Redis cache and Sidekiq queue processor' } ,
12- 'websocket' => { name : 'Real-time (WebSocket)' , description : 'ActionCable WebSocket connections' } ,
13- 'sidekiq' => { name : 'Background Jobs (Sidekiq)' , description : 'Async job processing' } ,
14- 'riot_api' => { name : 'Riot API Integration' , description : 'Riot Games data synchronization' }
9+ 'api' => { name : 'API' , description : 'Core REST API services' } ,
10+ 'database' => { name : 'Database' , description : 'PostgreSQL primary database' } ,
11+ 'redis' => { name : 'Cache & Background Jobs' , description : 'Redis cache and Sidekiq queue processor' } ,
12+ 'websocket' => { name : 'Real-time (WebSocket)' , description : 'ActionCable WebSocket connections' } ,
13+ 'sidekiq' => { name : 'Background Jobs (Sidekiq)' , description : 'Async job processing' } ,
14+ 'riot_api' => { name : 'Riot API Integration' , description : 'Riot Games data synchronization' }
1515 } . freeze
1616
1717 def index
@@ -22,19 +22,19 @@ def index
2222 indicator , description = overall_status ( components )
2323
2424 {
25- status : { indicator : indicator , description : description } ,
26- components : components ,
27- incidents : incidents ,
25+ status : { indicator : indicator , description : description } ,
26+ components : components ,
27+ incidents : incidents ,
2828 uptime_history : uptime
2929 }
3030 end
3131
3232 render json : cached . merge (
3333 page : {
34- id : 'prostaff' ,
35- name : 'ProStaff' ,
36- url : 'https://status.prostaff.gg' ,
37- time_zone : 'UTC' ,
34+ id : 'prostaff' ,
35+ name : 'ProStaff' ,
36+ url : 'https://status.prostaff.gg' ,
37+ time_zone : 'UTC' ,
3838 updated_at : Time . current . iso8601
3939 }
4040 ) , status : :ok
@@ -57,13 +57,13 @@ def build_component_statuses
5757 def build_component_from_snapshot ( component , snapshot )
5858 meta = COMPONENT_META [ component ]
5959 {
60- id : component ,
61- name : meta [ :name ] ,
62- status : snapshot . status ,
63- description : meta [ :description ] ,
60+ id : component ,
61+ name : meta [ :name ] ,
62+ status : snapshot . status ,
63+ description : meta [ :description ] ,
6464 response_time_ms : snapshot . response_time_ms ,
65- last_checked_at : snapshot . checked_at . iso8601 ,
66- updated_at : snapshot . updated_at . iso8601
65+ last_checked_at : snapshot . checked_at . iso8601 ,
66+ updated_at : snapshot . updated_at . iso8601
6767 }
6868 end
6969
@@ -72,13 +72,13 @@ def build_component_live(component)
7272 result = live_check ( component )
7373
7474 {
75- id : component ,
76- name : meta [ :name ] ,
77- status : result [ :status ] ,
78- description : meta [ :description ] ,
75+ id : component ,
76+ name : meta [ :name ] ,
77+ status : result [ :status ] ,
78+ description : meta [ :description ] ,
7979 response_time_ms : result [ :response_time_ms ] ,
80- last_checked_at : Time . current . iso8601 ,
81- updated_at : Time . current . iso8601
80+ last_checked_at : Time . current . iso8601 ,
81+ updated_at : Time . current . iso8601
8282 }
8383 end
8484
@@ -122,16 +122,16 @@ def build_incidents
122122
123123 def serialize_incident ( incident )
124124 {
125- id : incident . id ,
126- title : incident . title ,
127- body : incident . body ,
128- severity : incident . severity ,
129- status : incident . status ,
125+ id : incident . id ,
126+ title : incident . title ,
127+ body : incident . body ,
128+ severity : incident . severity ,
129+ status : incident . status ,
130130 affected_components : incident . affected_components ,
131- started_at : incident . started_at . iso8601 ,
132- resolved_at : incident . resolved_at &.iso8601 ,
133- postmortem : incident . postmortem ,
134- updates : incident . updates . order ( created_at : :desc ) . map do |u |
131+ started_at : incident . started_at . iso8601 ,
132+ resolved_at : incident . resolved_at &.iso8601 ,
133+ postmortem : incident . postmortem ,
134+ updates : incident . updates . order ( created_at : :desc ) . map do |u |
135135 { id : u . id , status : u . status , body : u . body , created_at : u . created_at . iso8601 }
136136 end
137137 }
0 commit comments