Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/gtl_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class GtlFormatter
COLUMN_WITH_ICON = {
'authentication_status' => 'authentication_status_image',
'last_compliance_status' => 'last_compliance_status_image',
'payload_valid' => 'payload_valid_image',
}.freeze

COLUMN_WITH_BACKGROUND_ICON = {
Expand Down Expand Up @@ -218,6 +219,15 @@ def self.authentication_status_image(item)
end
end

def self.payload_valid_image(item)
case item.payload_valid
when true
"pficon pficon-ok"
else
"pficon pficon-error-circle-o"
end
end

def self.normalized_state_image(item)
NORMALIZED_STATE_ICON[item.normalized_state]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cols:
- name
- description
- repository
- payload_valid
- created_at
- updated_at

Expand All @@ -37,6 +38,7 @@ col_order:
- name
- description
- configuration_script_source.name
- payload_valid
- created_at
- updated_at

Expand All @@ -45,6 +47,7 @@ headers:
- Name
- Description
- Repository
- Valid
- Created On
- Updated On

Expand All @@ -55,6 +58,7 @@ col_formats:
-
-
-
-

# Condition(s) string for the SQL query
conditions:
Expand Down