1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #687: filter by hidden columns

This commit is contained in:
Ruben S. Montero 2020-05-20 12:08:25 +02:00 committed by GitHub
commit 759a54cf3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -580,6 +580,10 @@ module CLIHelper
filter_data!(res_data, options) if options[:filter]
end
return res_data unless options[:list]
@default_columns = options[:list].collect {|o| o.upcase.to_sym }
res_data
end
@ -797,10 +801,6 @@ module CLIHelper
rescue StandardError => e
CLIHelper.fail(e.message)
end
return unless options[:list]
@default_columns = options[:list].collect {|o| o.upcase.to_sym }
end
# Filter data
@ -821,7 +821,7 @@ module CLIHelper
m = s.match(/^(.*?)#{operators}(.*?)$/)
if m
index = @default_columns.index(m[1].to_sym)
index = @columns.keys.index(m[1].to_sym)
if index
{