Class: Dbwatcher::Dashboard::SystemInfoController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Dbwatcher::Dashboard::SystemInfoController
- Defined in:
- app/controllers/dbwatcher/dashboard/system_info_controller.rb
Instance Method Summary collapse
Instance Method Details
#clear_cache ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/dbwatcher/dashboard/system_info_controller.rb', line 22 def clear_cache system_info_storage.clear_cache respond_to do |format| format.json do render json: clear_cache_success_response end end rescue StandardError => e respond_to do |format| format.json do render json: { success: false, error: e. }, status: :internal_server_error end end end |
#refresh ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/dbwatcher/dashboard/system_info_controller.rb', line 6 def refresh system_info_storage.refresh_info respond_to do |format| format.json do render json: refresh_success_response end end rescue StandardError => e respond_to do |format| format.json do render json: { success: false, error: e. }, status: :internal_server_error end end end |