Revision cc6cc460 src/cli/one_helper/onezone_helper.rb

View differences:

src/cli/one_helper/onezone_helper.rb
147 147
                     when "3" then "leader"
148 148
                     else "-"
149 149
                 end
150
                s["TERM"]     = xml_doc.root.at_xpath("TERM").text
150
                s["TERM"]      = xml_doc.root.at_xpath("TERM").text
151 151
                s["VOTEDFOR"]  = xml_doc.root.at_xpath("VOTEDFOR").text
152 152
                s["COMMIT"]    = xml_doc.root.at_xpath("COMMIT").text
153
                s["LOG_INDEX"] = xml_doc.root.at_xpath("LOG_INDEX").text
153

  
154
                s["LOG_INDEX"]    = xml_doc.root.at_xpath("LOG_INDEX").text
155
                s["FEDLOG_INDEX"] = xml_doc.root.at_xpath("FEDLOG_INDEX").text
154 156
            }
155 157

  
156 158
            puts
157
            CLIHelper.print_header(str_h1 % "SERVERS",false)
159
            CLIHelper.print_header(str_h1 % "ZONE SERVERS",false)
160

  
161
            CLIHelper::ShowTable.new(nil, self) do
162

  
163
                column :"ID", "", :size=>2 do |d|
164
                    d["ID"] if !d.nil?
165
                end
166

  
167
                column :"NAME", "", :left, :size=>15 do |d|
168
                    d["NAME"] if !d.nil?
169
                end
170

  
171
                column :"ENDPOINT", "", :left, :size=>63 do |d|
172
                    d["ENDPOINT"] if !d.nil?
173
                end
174
            end.show([zone_hash['ZONE']['SERVER_POOL']['SERVER']].flatten, {})
175

  
176
            puts
177
            CLIHelper.print_header(str_h1 % "RAFT & FEDERATION SYNC STATUS",false)
158 178

  
159 179
            CLIHelper::ShowTable.new(nil, self) do
160 180

  
......
186 206
                    d["VOTEDFOR"] if !d.nil?
187 207
                end
188 208

  
189
                column :"ENDPOINT", "", :left, :size=>18 do |d|
190
                    d["ENDPOINT"] if !d.nil?
209
                column :"FED_INDEX", "", :left, :size=>10 do |d|
210
                    d["FEDLOG_INDEX"] if !d.nil?
191 211
                end
212

  
192 213
            end.show([zone_hash['ZONE']['SERVER_POOL']['SERVER']].flatten, {})
193 214
        end
194 215

  

Also available in: Unified diff