Skip to content

Commit

Permalink
Remove usage of coffeescript
Browse files Browse the repository at this point in the history
  • Loading branch information
melck authored and gdubicki committed Sep 27, 2022
1 parent 8824ff1 commit 870a9f2
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 116 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ omit =

# no point in checking these
setup.py
dev.py
wsgi.py
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ event if there are catalog compilation failures f.e. because of a syntax error i
cases with this setting Puppet will just use a cached working catalog and report the run to PuppetDB as successful.
(Although with an error visible in the Puppet run log.)

Therefore, to show the nodes with a catalog compilation as failed in Puppetboard you need to set
Therefore, to show the nodes with a catalog compilation as failed in Puppetboard you need to set
`usecacheonfailure = false` in your nodes' `puppet.conf`.

### PuppetDB
Expand Down Expand Up @@ -217,8 +217,6 @@ Other settings that might be interesting, in no particular order:
in the last report. Otherwise shows only 'some' string if there are resources with given status. Setting this
to `False` gives performance benefits, especially in big Puppet environments (more than few hundreds of nodes).
Defaults to `True`.
- `DEV_LISTEN_HOST`: For use with dev.py for development. Default is localhost
- `DEV_LISTEN_PORT`: For use with dev.py for development. Default is 5555

## Getting Help<a id="getting-help"></a>

Expand Down Expand Up @@ -250,9 +248,25 @@ pytest --cov=. --cov-report=xml --flake8 --strict-markers --mypy puppetboard tes
You can run the app it in development mode by simply executing:

```bash
./dev.py
flask run
```

You can specify listening host and port with environment variables or command line otions:

```bash
export FLASK_RUN_HOST=0.0.0.0
export FLASK_RUN_PORT=8000

flask run
```

or

```bash
flask run --host '0.0.0.0' --port '8000'
```


Use `PUPPETBOARD_SETTINGS` to change the different settings or patch `default_settings.py` directly.
Take care not to include your local changes on that file when submitting patches for Puppetboard.
Place a `settings.py` file inside the base directory of the git repository that will be used, if the environment
Expand Down
30 changes: 0 additions & 30 deletions dev.py

This file was deleted.

3 changes: 0 additions & 3 deletions puppetboard/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
PUPPETDB_TIMEOUT = 20
DEFAULT_ENVIRONMENT = 'production'
SECRET_KEY = os.urandom(24)
DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5555
DEV_COFFEE_LOCATION = 'coffee'
UNRESPONSIVE_HOURS = 2
ENABLE_QUERY = True
# Uncomment to restrict the enabled PuppetDB endpoints in the query page.
Expand Down
3 changes: 0 additions & 3 deletions puppetboard/docker_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def coerce_bool(v, default):
PUPPETDB_TIMEOUT = int(os.getenv('PUPPETDB_TIMEOUT', '20'))
DEFAULT_ENVIRONMENT = os.getenv('DEFAULT_ENVIRONMENT', 'production')
SECRET_KEY = os.getenv('SECRET_KEY', os.urandom(24))
DEV_LISTEN_HOST = os.getenv('DEV_LISTEN_HOST', '127.0.0.1')
DEV_LISTEN_PORT = int(os.getenv('DEV_LISTEN_PORT', '5555'))
DEV_COFFEE_LOCATION = os.getenv('DEV_COFFEE_LOCATION', 'coffee')
UNRESPONSIVE_HOURS = int(os.getenv('UNRESPONSIVE_HOURS', '2'))
ENABLE_QUERY = coerce_bool(os.getenv('ENABLE_QUERY'), True)
# Uncomment to restrict the enabled PuppetDB endpoints in the query page.
Expand Down
29 changes: 0 additions & 29 deletions puppetboard/static/coffeescript/lists.coffee

This file was deleted.

44 changes: 0 additions & 44 deletions puppetboard/static/js/lists.js

This file was deleted.

2 changes: 0 additions & 2 deletions puppetboard/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<link href="{{ url_for('static', filename='css/puppetboard.css') }}" rel="stylesheet" />

{#- JS LOCAL #}
<script src="{{ url_for('static', filename='js/lists.js') }}"></script>
<script src="{{ url_for('static', filename='js/utils.js') }}"></script>
<script src="{{ url_for('static', filename='js/scroll.top.js') }}"></script>
<script src="{{ url_for('static', filename='js/pretty.js') }}"></script>
Expand All @@ -38,7 +37,6 @@
}
});
$(".ui.dropdown:not(.ui.select-environment)").dropdown();
$.getScript('{{url_for('static', filename='js/lists.js')}}')
{% block onload_script %} {% endblock onload_script %}
})
</script>
Expand Down

0 comments on commit 870a9f2

Please sign in to comment.