Class: InsightsClientReportStatus
- Inherits:
-
HostStatus::Status
- Object
- HostStatus::Status
- InsightsClientReportStatus
- Defined in:
- app/models/insights_client_report_status.rb
Constant Summary collapse
- REPORT_INTERVAL =
48.hours
- REPORTING =
0
- NO_REPORT =
1
Class Method Summary collapse
Instance Method Summary collapse
-
#relevant?(_options = {}) ⇒ Boolean
prevent creation of the status on global refresh, but show it if the record already exists.
- #to_global(_options = {}) ⇒ Object
- #to_label(_options = {}) ⇒ Object
- #to_status ⇒ Object
Class Method Details
.status_name ⇒ Object
10 11 12 |
# File 'app/models/insights_client_report_status.rb', line 10 def self.status_name N_('Insights') end |
Instance Method Details
#relevant?(_options = {}) ⇒ Boolean
prevent creation of the status on global refresh, but show it if the record already exists
37 38 39 |
# File 'app/models/insights_client_report_status.rb', line 37 def relevant?( = {}) persisted? end |
#to_global(_options = {}) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'app/models/insights_client_report_status.rb', line 23 def to_global( = {}) case status when REPORTING ::HostStatus::Global::OK when NO_REPORT ::HostStatus::Global::ERROR end end |