diff --git a/dps.rb b/dps.rb index 569b1b3..3be5699 100755 --- a/dps.rb +++ b/dps.rb @@ -9,7 +9,7 @@ COLOR_GRAY = "" COLOR_RESET = "" 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