Sha256: 3db77d236340adad0875cbdda6a98fb052a7d170cfc7473489e84e2b3763fbd5
Contents?: true
Size: 950 Bytes
Versions: 10
Compression:
Stored size: 950 Bytes
Contents
module FogExtensions module Fogdocker module Server extend ActiveSupport::Concern include ActionView::Helpers::NumberHelper def state state_running ? 'Running' : 'Stopped' end # Last time a container was started # WARNING: this doesn't mean the container has been running since then. def started_at attributes['state_started_at'] end def image_friendly_name attributes['config_image'] end def command c = [] c += entrypoint if entrypoint.present? c += cmd if cmd.present? c.join(' ') end def poweroff service.vm_action(:id => id, :action => :kill) end def reset poweroff start end def vm_description _('%{cores} cores and %{memory} memory') % { :cores => cpus, :memory => number_to_human_size(memory.to_i) } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems