class Jobs
- Jobs
- Application
- ActionController::Base
- Reference
- Object
Defined in:
controllers/jobs.crConstant Summary
-
AFTER =
{} of Nil => Nil
-
AROUND =
{} of Nil => Nil
-
BEFORE =
{set_request_id => {nil, nil}, set_date_header => {nil, nil}, require_login => {nil, nil}, require_read => {[index, show], nil}, require_write => {nil, [index, show]}} of Nil => Nil
-
FORCE =
{:force => {nil, nil}} of Nil => Nil
-
LOCAL_AFTER =
{} of Nil => Nil
-
function => options
-
LOCAL_AROUND =
{} of Nil => Nil
-
function => options
-
LOCAL_BEFORE =
{} of Nil => Nil
-
function => options
-
LOCAL_FORCE =
{} of Nil => Nil
-
function => options
-
LOCAL_RESCUE =
{} of Nil => Nil
-
function => options
-
LOCAL_ROUTES =
{bkp_info => {"get", "/bkp-info", nil, do @title = "Backup Data" @description = "Embedded SQLite Backup" db_files = (App::ROOT + "/db") + "/*" du_output = (`du -sh #{db_files}`).chomp respond_with do html(template("backup.cr")) end end, false}, bkp_db => {"post", "/bkp-db", nil, do conn = Granite::Connections["embedded"] conn.not_nil!.open do |main| DB.open("sqlite3:#{App::ROOT + "/db/backup.db"}") do |bak| begin backup(main, bak) notice("SQLite Backup finished.") rescue notice("SQLite Backup failed. Please try again later") end end end redirect_to(Jobs.index) end, false}} of Nil => Nil
-
function => options
-
LOCAL_SKIP =
{} of Nil => Nil
-
function => options
-
NAMESPACE =
["/jobs"]
-
default namespace based on class
-
RESCUE =
{} of Nil => Nil
-
ROUTES =
{bkp_info => {"get", "/bkp-info", nil, do @title = "Backup Data" @description = "Embedded SQLite Backup" db_files = (App::ROOT + "/db") + "/*" du_output = (`du -sh #{db_files}`).chomp respond_with do html(template("backup.cr")) end end, false}, bkp_db => {"post", "/bkp-db", nil, do conn = Granite::Connections["embedded"] conn.not_nil!.open do |main| DB.open("sqlite3:#{App::ROOT + "/db/backup.db"}") do |bak| begin backup(main, bak) notice("SQLite Backup finished.") rescue notice("SQLite Backup failed. Please try again later") end end end redirect_to(Jobs.index) end, false}, index => {"get", "/", nil, nil, false}, show => {"get", "/:id", nil, nil, false}, replace => {"put", "/:id", nil, nil, false}} of Nil => Nil
-
SKIP =
{} of Nil => Nil
Class Method Summary
-
.__init_routes__(router)
Routes call the functions generated above
-
.__route_list__
Create draw_routes function
-
.base_route
Helper for obtaining base route
-
.bkp_db(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.bkp_info(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Helper methods for performing redirect_to calls
- .context(method : String, route : String, route_params : Hash(String, String) | Nil = nil, headers : Hash(String, String) | Nil = nil, body : String | Bytes | IO | Nil = nil, &)
-
.get__jobs_(context, head_request)
Create draw_routes function
-
.get__jobs__id(context, head_request)
Create draw_routes function
-
.get__jobs_bkp_info(context, head_request)
Generate functions for each route
-
.index(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.post__jobs_bkp_db(context, head_request)
Create draw_routes function
-
.put__jobs__id(context, head_request)
Create draw_routes function
-
.replace(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
-
.show(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Create draw_routes function
Instance Method Summary
-
#base_route(*args, **options)
Helper for obtaining base route
-
#base_route(*args, **options, &)
Helper for obtaining base route
- #bkp_db
- #bkp_info
- #index
- #replace
- #show
Macro Summary
- __inherit_after_filters__
- __inherit_around_filters__
- __inherit_before_filters__
- __inherit_force_filters__
- __inherit_rescue_filters__
- __inherit_routes_filters__
- __inherit_skip_filters__
Instance methods inherited from class Application
authorize_groups(group_names : String)
authorize_groups,
require_read
require_read,
require_write
require_write,
set_date_header
set_date_header,
set_request_id
set_request_id
Class methods inherited from class Application
context(method : String, route : String, route_params : Hash(String, String) | Nil = nil, headers : Hash(String, String) | Nil = nil, body : String | Bytes | IO | Nil = nil, &)
context
Instance methods inherited from module SessionUtils
current_user(username : String)current_user current_user, end_session end_session, notice(message : String)
notice notice, notice? notice?, pack_string(txt : String) pack_string, require_login require_login, unpack_string(txt : String) unpack_string
Class Method Detail
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Helper methods for performing redirect_to calls
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers
Create draw_routes function
Create instance of controller class init with context, params and logger protocol checks (https etc) controller instance created begin exception helpers inline the around filters inline the before filters inline the action inline the after filters rescue exception handlers