diff --git a/.flask_cache/1842a0ff0c5b4bdbdca506a3489cceed b/.flask_cache/1842a0ff0c5b4bdbdca506a3489cceed deleted file mode 100644 index e1078ec..0000000 Binary files a/.flask_cache/1842a0ff0c5b4bdbdca506a3489cceed and /dev/null differ diff --git a/.flask_cache/2029240f6d1128be89ddc32729463129 b/.flask_cache/2029240f6d1128be89ddc32729463129 deleted file mode 100644 index 61c5ec0..0000000 Binary files a/.flask_cache/2029240f6d1128be89ddc32729463129 and /dev/null differ diff --git a/.flask_cache/2a6f99d4936620a3f0bd95fedf526b2f b/.flask_cache/2a6f99d4936620a3f0bd95fedf526b2f deleted file mode 100644 index ccb499d..0000000 Binary files a/.flask_cache/2a6f99d4936620a3f0bd95fedf526b2f and /dev/null differ diff --git a/.flask_cache/4d39e19ce3b3acf5580716fe63ee17a6 b/.flask_cache/4d39e19ce3b3acf5580716fe63ee17a6 deleted file mode 100644 index 912d89a..0000000 Binary files a/.flask_cache/4d39e19ce3b3acf5580716fe63ee17a6 and /dev/null differ diff --git a/.flask_cache/74bc75c0764cbc805c70645cef1f026b b/.flask_cache/74bc75c0764cbc805c70645cef1f026b deleted file mode 100644 index e58b6a8..0000000 Binary files a/.flask_cache/74bc75c0764cbc805c70645cef1f026b and /dev/null differ diff --git a/.flask_cache/7ccf01c622d424f11a8e98761770e19a b/.flask_cache/7ccf01c622d424f11a8e98761770e19a deleted file mode 100644 index b3b7d35..0000000 Binary files a/.flask_cache/7ccf01c622d424f11a8e98761770e19a and /dev/null differ diff --git a/.flask_cache/8e5cc37f0d5eb521574b7675b78fbb7a b/.flask_cache/8e5cc37f0d5eb521574b7675b78fbb7a deleted file mode 100644 index 807e1c1..0000000 Binary files a/.flask_cache/8e5cc37f0d5eb521574b7675b78fbb7a and /dev/null differ diff --git a/.flask_cache/95b12f8cd6b93bf78161ab0764ef7d66 b/.flask_cache/95b12f8cd6b93bf78161ab0764ef7d66 deleted file mode 100644 index 64f06ed..0000000 Binary files a/.flask_cache/95b12f8cd6b93bf78161ab0764ef7d66 and /dev/null differ diff --git a/.flask_cache/aabe6e7d021b7037492975340fe21c03 b/.flask_cache/aabe6e7d021b7037492975340fe21c03 deleted file mode 100644 index 8243355..0000000 Binary files a/.flask_cache/aabe6e7d021b7037492975340fe21c03 and /dev/null differ diff --git a/.flask_cache/bfec0932dad185d106f4b86af0f7c734 b/.flask_cache/bfec0932dad185d106f4b86af0f7c734 deleted file mode 100644 index 65d071d..0000000 Binary files a/.flask_cache/bfec0932dad185d106f4b86af0f7c734 and /dev/null differ diff --git a/.flask_cache/c59a0149864f3a0ccffa8e150c81bc43 b/.flask_cache/c59a0149864f3a0ccffa8e150c81bc43 deleted file mode 100644 index 8d39188..0000000 Binary files a/.flask_cache/c59a0149864f3a0ccffa8e150c81bc43 and /dev/null differ diff --git a/.flask_cache/d277c4e120e0e4b7fa8f80455a32af2e b/.flask_cache/d277c4e120e0e4b7fa8f80455a32af2e deleted file mode 100644 index 30c8d04..0000000 Binary files a/.flask_cache/d277c4e120e0e4b7fa8f80455a32af2e and /dev/null differ diff --git a/.flask_cache/dd6eca7ee6b5f09a8f1821c6c4a5510b b/.flask_cache/dd6eca7ee6b5f09a8f1821c6c4a5510b deleted file mode 100644 index 5cb2d5e..0000000 Binary files a/.flask_cache/dd6eca7ee6b5f09a8f1821c6c4a5510b and /dev/null differ diff --git a/.flask_cache/e6ed342200608fc2907bdfc4b3dfe59d b/.flask_cache/e6ed342200608fc2907bdfc4b3dfe59d deleted file mode 100644 index 56babdf..0000000 Binary files a/.flask_cache/e6ed342200608fc2907bdfc4b3dfe59d and /dev/null differ diff --git a/.flask_cache/f9a2505762c137a92600cf2ad6c0527d b/.flask_cache/f9a2505762c137a92600cf2ad6c0527d deleted file mode 100644 index 9a5ce0a..0000000 Binary files a/.flask_cache/f9a2505762c137a92600cf2ad6c0527d and /dev/null differ diff --git a/docs/installation/wsgi.md b/docs/installation/wsgi.md index c4264b1..890b763 100644 --- a/docs/installation/wsgi.md +++ b/docs/installation/wsgi.md @@ -12,3 +12,39 @@ Gunicorn is a WSGI server written in Python. ## Configure Locate your `gunicorn` executable with `which gunicorn`. + +### Permissions + +Gunicorn requires read/write/executable access to the entire `hyperglass/hyperglass` directory in order to read its configuration and execute the python code. If running gunicorn as www-data, fix permissions with: + +```console +# chown -R www-data:www-data /opt/hyperglass/hyperglass +# chmod -R 744 /opt/hyperglass/hyperglass +``` + + diff --git a/hyperglass/hyperglass.py b/hyperglass/hyperglass.py index 9734e00..ce5caf9 100644 --- a/hyperglass/hyperglass.py +++ b/hyperglass/hyperglass.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # Module Imports +import os import sys import json import toml diff --git a/hyperglass/static/js/hyperglass.js b/hyperglass/static/js/hyperglass.js index d390c8b..cb5efdf 100644 --- a/hyperglass/static/js/hyperglass.js +++ b/hyperglass/static/js/hyperglass.js @@ -189,27 +189,24 @@ var submitForm = function() { type: 'POST', data: JSON.stringify({router: router, cmd: cmd, ipprefix: ipprefix}), contentType: "application/json; charset=utf-8", + context: document.body, readyState: resultsbox.show() && progress.show(), statusCode: { 200: function(response, code) { - console.log(code, response); progress.hide(); $('#output').html(`

${response}

`); }, 405: function(response, code) { - console.log(code, response); progress.hide(); $('#ipprefix').addClass('is-warning'); $('#output').html(`
${response.responseText}
`); }, 415: function(response, code) { - console.log(code, response); progress.hide(); $('#ipprefix').addClass('is-danger'); $('#output').html(`
${response.responseText}
`); }, 429: function(response, code) { - console.log(code, response); progress.hide(); $("#ratelimit").addClass("is-active"); }