Skip to content

Commit

Permalink
added offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
James Powis committed May 24, 2016
1 parent 5cca736 commit 391d25f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ class { 'puppetboard':
puppetdb_cert => "${ssl_dir}/certs/${puppetboard_certname}.pem",
}
```
If you are running puppetboard in an environment which does not have network access to public CDNs, puppet board can load static assets (jquery, semantic-ui, tablesorter, etc) from the local web server instead of a CDN:

```puppet
class { 'puppetboard':
offline_mode => true,
}
```


License
Expand Down
7 changes: 7 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
# (bool) Whether to allow the user to run raw queries against PuppetDB.
# Defaults to 'True' ($::puppetboard::params::enable_query)
#
# [*offline_mode*]
# (bool) Weather to load static assents (jquery, semantic-ui, tablesorter, etc)
# Defaults to 'False' ($::puppetboard::params::offline_mode
#
# [*localise_timestamp*]
# (bool) Whether to localise the timestamps in the UI.
# Defaults to 'True' ($::puppetboard::params::localise_timestamp)
Expand Down Expand Up @@ -169,12 +173,14 @@
$manage_virtualenv = false,
$reports_count = $::puppetboard::params::reports_count,
$listen = $::puppetboard::params::listen,
$offline_mode = $::puppetboard::params::offline_mode,
$extra_settings = $::puppetboard::params::extra_settings,
) inherits ::puppetboard::params {
validate_bool($enable_catalog)
validate_bool($enable_query)
validate_bool($experimental)
validate_bool($localise_timestamp)
validate_bool($offline_mode)
validate_hash($extra_settings)
if $puppetdb_ssl_verify {
unless is_string($puppetdb_ssl_verify) {
Expand Down Expand Up @@ -237,6 +243,7 @@
#$puppetdb_ssl_verify
#$puppetdb_timeout
#$unresponsive
#$offline_mode
#$extra_settings
file {"${basedir}/puppetboard/settings.py":
ensure => 'file',
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
$enable_catalog = false
$enable_query = true
$localise_timestamp = true
$offline_mode = false
$python_loglevel = 'info'
$python_proxy = false
$reports_count = '10'
Expand Down
5 changes: 5 additions & 0 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ LOCALISE_TIMESTAMP = True
<% else -%>
LOCALISE_TIMESTAMP = False
<% end -%>
<% if @offline_mode -%>
OFFLINE_MODE = True
<% else -%>
OFFLINE_MODE = False
<% end -%>
<% if @experimental -%>
PUPPETDB_EXPERIMENTAL = True
<% else -%>
Expand Down

0 comments on commit 391d25f

Please sign in to comment.