Show authelia status.
This commit is contained in:
parent
3af1ffa11a
commit
e2bd375198
16
dps.rb
16
dps.rb
@ -9,7 +9,7 @@ COLOR_GRAY = "[1;30m"
|
||||
COLOR_RESET = "[0m"
|
||||
|
||||
class Container
|
||||
FIELDS = [:state, :dup, :ouroboros, :name, :vhosts, :nginx_allow, :status, :image, :ports]
|
||||
FIELDS = [:state, :dup, :ouroboros, :name, :vhosts, :authelia, :status, :image, :ports]
|
||||
@@lengths = Hash.new(0)
|
||||
|
||||
def initialize(data)
|
||||
@ -47,7 +47,19 @@ class Container
|
||||
end
|
||||
end.uniq.join(" ")
|
||||
|
||||
set :nginx_allow, @data[:Labels][:"nginx_allow"]
|
||||
#set :nginx_allow, @data[:Labels][:"nginx_allow"]
|
||||
if vh==""
|
||||
set :authelia, ""
|
||||
elsif @data[:Labels][:"authelia_policy"]=="one_factor"
|
||||
set :authelia, "1#{COLOR_GRAY}FA#{COLOR_RESET}"
|
||||
elsif @data[:Labels][:"authelia_policy"]=="two_factor"
|
||||
set :authelia, "2#{COLOR_GRAY}FA#{COLOR_RESET}"
|
||||
elsif @data[:Labels][:"authelia_policy"]=="bypass"
|
||||
set :authelia, "#{COLOR_GREEN}BYP#{COLOR_RESET}"
|
||||
else
|
||||
set :authelia, "#{COLOR_RED}?#{COLOR_RESET}"
|
||||
end
|
||||
|
||||
st = @data[:Status]
|
||||
if st.end_with?("(healthy)")
|
||||
st = COLOR_GREEN + st.gsub("(healthy)", "(v)") + COLOR_RESET
|
||||
|
Loading…
Reference in New Issue
Block a user