Sha256: a64ca4faf7dbd26826b82a7505098fb6ede4f69db667817dfce27f27b07391a6
Contents?: true
Size: 694 Bytes
Versions: 44
Compression:
Stored size: 694 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? ? ['name'] : %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
44 entries across 44 versions & 2 rubygems