Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
g5k-api
Commits
c8a94590
Commit
c8a94590
authored
Sep 01, 2020
by
Samir Noir
🧀
Browse files
Fix missing param in Grid5000::Router.call method and simplify redirect
parent
ac08e72d
Pipeline
#165462
waiting for manual action with stages
in 21 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
config/routes.rb
View file @
c8a94590
...
...
@@ -48,13 +48,12 @@ Api::Application.routes.draw do
get
'/ui/events'
=>
redirect
(
'https://www.grid5000.fr/status/'
)
# Could be simplified once we use Rails >= 3.1 (remove the proc)
get
'/ui'
=>
redirect
(
proc
{
|
params
,
request
|
get
'/ui'
=>
redirect
{
|
params
,
request
|
Grid5000
::
Router
.
new
(
'/ui/dashboard'
).
call
(
params
,
request
)
}
)
get
'/ui/index'
=>
redirect
(
proc
{
|
params
,
request
|
}
get
'/ui/index'
=>
redirect
{
|
params
,
request
|
Grid5000
::
Router
.
new
(
'/ui/dashboard'
).
call
(
params
,
request
)
}
)
}
get
'/ui/:page'
=>
'ui#show'
get
'/ui/visualizations/:page'
=>
'ui#visualization'
...
...
lib/grid5000/router.rb
View file @
c8a94590
...
...
@@ -29,7 +29,7 @@ module Grid5000
@where
=
where
end
def
call
(
request
)
def
call
(
_params
,
request
)
self
.
class
.
uri_to
(
request
,
@where
,
:in
,
:absolute
)
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment