class Engine2::InfraAction

def invoke handler
    file = handler.params[:file]
    temp = file[:tempfile]
    temp.close
    rackname = File.basename(temp.path)
    File.rename(temp.path, "#{UPLOAD_DIR}/#{rackname}")
    {rackname: rackname}
end

end

Public Instance Methods

invoke(handler) click to toggle source
# File lib/engine2/action/infra.rb, line 232
def invoke handler
    user = handler.user
    {user: user ? user.to_hash : nil}
end
login_meta(menu_properties = {show: 'false'}) click to toggle source
# File lib/engine2/action/infra.rb, line 237
def login_meta menu_properties = {show: 'false'}, &blk
    node.login_form.* &blk
    menu(:menu).modify_option :login_form, menu_properties
    node.parent.login_form.* &blk
end
pre_run() click to toggle source
Calls superclass method Engine2::Action#pre_run
# File lib/engine2/action/infra.rb, line 221
def pre_run
    super
    panel_panel_template false
    panel_template 'infra/index'
    loc! logged_on: LOCS[:logged_on]
    menu :menu do
        properties group_class: "btn-group-sm"
        option :inspect_modal, icon: :wrench, button_loc: false # , show: "action.logged_on"
    end
end