Skip to content

Commit

Permalink
Merge pull request #131 from james-powis/add_offline
Browse files Browse the repository at this point in the history
added offline mode
  • Loading branch information
jyaworski committed May 25, 2016
2 parents 5cca736 + 6d7c920 commit 62886c3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ class { 'puppetboard':
reports_count => 40
}
```
Offline Mode
-----

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,
}
```

### Apache
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 62886c3

Please sign in to comment.