abusesa: Generate Live config with JSON.generate, add mapurl parameter
This commit is contained in:
parent
a0453bfd16
commit
9d75a9a706
2 changed files with 19 additions and 4 deletions
|
@ -1,4 +1,18 @@
|
|||
{
|
||||
"authUrl": "<%= @authurl %>",
|
||||
"boshUrl": "<%= @boshurl %>"
|
||||
<%
|
||||
require 'json'
|
||||
|
||||
config = {
|
||||
'authUrl' => @authurl,
|
||||
'boshUrl' => @boshurl,
|
||||
}
|
||||
|
||||
if @mapurl
|
||||
config['viewPlugins'] = [{
|
||||
'id' => 'map',
|
||||
'name' => 'Map',
|
||||
'type' => 'PolymapsView',
|
||||
'settings' => { 'mapUrl' => @mapurl },
|
||||
}]
|
||||
end
|
||||
-%>
|
||||
<%= JSON.generate(config) %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue