Sha256: 2bd59f61ef26271aba01fe376f038e070f257ec89d92d4bf42412f2c79275af3
Contents?: true
Size: 693 Bytes
Versions: 33
Compression:
Stored size: 693 Bytes
Contents
module Kontena::Cli::Volumes class ListCommand < Kontena::Command include Kontena::Util include Kontena::Cli::Common include Kontena::Cli::GridOptions include Kontena::Cli::TableGenerator::Helper option ['--[no-]long', '-l'], :flag, "Show full dates", default: !$stdout.tty? requires_current_master requires_current_master_token def volumes client.get("volumes/#{current_grid}")['volumes'] end def fields quiet? ? ['id'] : %w(name scope driver created_at) end def execute print_table(volumes) do |row| next if long? || quiet? row['created_at'] = time_ago(row['created_at']) end end end end
Version data entries
33 entries across 33 versions & 1 rubygems