Skip to content

Commit

Permalink
Display pficon-asleep icon in bottom-right quad for disabled providers
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Jun 1, 2018
1 parent 5ca19a1 commit 104f44e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/decorators/ext_management_system_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def quadicon
},
:bottom_right => {
:tooltip => authentication_status
}.merge(QuadiconHelper.provider_status(authentication_status))
}.merge(QuadiconHelper.provider_status(authentication_status, enabled?))
}
icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def quadicon
},
:bottom_right => {
:tooltip => authentication_status
}.merge(QuadiconHelper.provider_status(authentication_status))
}.merge(QuadiconHelper.provider_status(authentication_status, enabled?))
}
icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def quadicon
},
:bottom_right => {
:tooltip => authentication_status
}.merge(QuadiconHelper.provider_status(authentication_status))
}.merge(QuadiconHelper.provider_status(authentication_status, enabled?))
}
icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def quadicon
},
:bottom_right => {
:tooltip => authentication_status
}.merge(QuadiconHelper.provider_status(authentication_status))
}.merge(QuadiconHelper.provider_status(authentication_status, enabled?))
}
icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def quadicon
},
:bottom_right => {
:tooltip => authentication_status
}.merge(QuadiconHelper.provider_status(authentication_status))
}.merge(QuadiconHelper.provider_status(authentication_status, enabled?))
}
icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def quadicon
},
:bottom_right => {
:tooltip => authentication_status
}.merge(QuadiconHelper.provider_status(authentication_status))
}.merge(QuadiconHelper.provider_status(authentication_status, enabled?))
}
icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
icon
Expand Down
3 changes: 3 additions & 0 deletions app/helpers/quadicon_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ module QuadiconHelper
}.freeze

def self.provider_status(status, enabled = true)
# If the provider is suspended, we don't care about the status itself
return { :fonticon => 'pficon pficon-asleep' } unless enabled

case status
when "Invalid"
{:fileicon => '100/x.png'}
Expand Down

0 comments on commit 104f44e

Please sign in to comment.