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
|
@ -17,6 +17,7 @@
|
|||
class abusesa::live(
|
||||
$authurl='/collab/?action=authcredentials',
|
||||
$boshurl='/bosh/',
|
||||
$mapurl=undef,
|
||||
$config=undef,
|
||||
$webhosts=undef,
|
||||
) {
|
||||
|
@ -106,7 +107,7 @@ define abusesa::live::configwebhost($htdocs) {
|
|||
mode => '0644',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
content => "RedirectMatch permanent /vsroom/overview/(index\.html)? /abusesa/live/\n",
|
||||
content => "RedirectMatch permanent /vsroom/overview/(index\\.html)? /abusesa/live/\n",
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
Reference in a new issue