From 4c50b82768c1546eb7fa4e570f5f620936874189 Mon Sep 17 00:00:00 2001 From: Anna Janackova Date: Fri, 25 Apr 2014 16:25:42 +0200 Subject: [PATCH 1/7] adds pending nodes counter to the main dashboard * nodes with state noop are counted towards the "pending" column in the main dashboard * changes top layout to four-column --- puppetboard/app.py | 3 +++ puppetboard/templates/index.html | 17 +++++++++++++++-- puppetboard/templates/nodes.html | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/puppetboard/app.py b/puppetboard/app.py index ed1a52f..c203b6f 100644 --- a/puppetboard/app.py +++ b/puppetboard/app.py @@ -116,6 +116,7 @@ def index(): 'unchanged': 0, 'failed': 0, 'unreported': 0, + 'noop': 0 } for node in nodes: @@ -125,6 +126,8 @@ def index(): stats['changed'] += 1 elif node.status == 'failed': stats['failed'] += 1 + elif node.status == 'noop': + stats['noop'] += 1 else: stats['unchanged'] += 1 diff --git a/puppetboard/templates/index.html b/puppetboard/templates/index.html index 2aac1fd..a7dec4e 100644 --- a/puppetboard/templates/index.html +++ b/puppetboard/templates/index.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block content %}
-
+ -
+
+
+

{{metrics['num_nodes']}}

Population @@ -70,6 +81,8 @@ green {% elif node.status == 'unreported' %} black + {% elif node.status == 'noop' %} + blue {% endif %} " href="{{url_for('report_latest', node_name=node.name)}}"> {{node.status}} diff --git a/puppetboard/templates/nodes.html b/puppetboard/templates/nodes.html index 2b317e3..4bc2b68 100644 --- a/puppetboard/templates/nodes.html +++ b/puppetboard/templates/nodes.html @@ -24,6 +24,8 @@ green {% elif node.status == 'unreported' %} black + {% elif node.status == 'noop' %} + blue {% endif %} " href="{{url_for('report_latest', node_name=node.name)}}"> {{node.status}} From 381cad51e50dc5d1e7b3047021de16f9c85c67d4 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Thu, 29 May 2014 11:36:11 +0200 Subject: [PATCH 2/7] Allow disabling timestamp localisation. Fixes #63. --- puppetboard/default_settings.py | 1 + puppetboard/templates/layout.html | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/puppetboard/default_settings.py b/puppetboard/default_settings.py index 12f9e20..a48bfc7 100644 --- a/puppetboard/default_settings.py +++ b/puppetboard/default_settings.py @@ -8,4 +8,5 @@ DEV_LISTEN_HOST = '127.0.0.1' DEV_LISTEN_PORT = 5000 UNRESPONSIVE_HOURS = 2 ENABLE_QUERY = True +LOCALISE_TIMESTAMP = True LOGLEVEL = 'info' diff --git a/puppetboard/templates/layout.html b/puppetboard/templates/layout.html index b7697d4..37d0a04 100644 --- a/puppetboard/templates/layout.html +++ b/puppetboard/templates/layout.html @@ -42,9 +42,11 @@ - + {% if config.LOCALISE_TIMESTAMP %} + + + {% endif %} - From d776e871861b6ac2b94526d37352a22c1f9e94dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Ari=C3=B1o=20de=20la=20Rubia?= Date: Tue, 3 Jun 2014 12:46:19 -0700 Subject: [PATCH 3/7] Fixed a simple spelling error That being said a lot of the code is very exeprimental => That being said a lot of the code is very experimental --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 4458d23..4455def 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ Word of caution Puppetboard is very, very young but it works fairly well. -That being said a lot of the code is very exeprimental, just trying +That being said a lot of the code is very experimental, just trying to figure out what works and what not, what we need to do different and what features we need on the PuppetDB side of things. From b74fbf5199eff232a342b14d90e466b56d30cc76 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 00:32:23 +0200 Subject: [PATCH 4/7] README: uwsgi needs --socket, not --http. Fixes #76 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 4455def..1819207 100644 --- a/README.rst +++ b/README.rst @@ -393,7 +393,7 @@ Now we need to start uwsgi: .. code-block:: bash - $ uwsgi --http :9090 --wsgi-file /var/www/puppetboard/wsgi.py + $ uwsgi --socket :9090 --wsgi-file /var/www/puppetboard/wsgi.py Feel free to change the port to something other than ``9090``. From 1cd43e984cb9e37466ce6cbbf29ac0a94f45e0af Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 23:41:27 +0200 Subject: [PATCH 5/7] README: Add (Open)SuSE builds to the list. Mentions #52. --- README.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 1819207..823cc9d 100644 --- a/README.rst +++ b/README.rst @@ -81,6 +81,10 @@ Native packages for your operating system will be provided in the near future. +------------------+-----------+--------------------------------------------+ | CentOS/RHEL 6 | planned | | +------------------+-----------+--------------------------------------------+ +| OpenSuSE 12/13 | available | Maintained on `OpenSuSE Build Service`_ | ++------------------+-----------+--------------------------------------------+ +| SuSE LE 11 SP3 | available | Maintained on `OpenSuSE Build Service`_ | ++------------------+-----------+--------------------------------------------+ | `ArchLinux`_ | available | Maintained by `Niels Abspoel`_ | +------------------+-----------+--------------------------------------------+ | `OpenBSD`_ | available | Maintained by `Jasper Lievisse Adriaanse`_ | @@ -90,6 +94,7 @@ Native packages for your operating system will be provided in the near future. .. _Niels Abspoel: https://github.com/aboe76 .. _Jasper Lievisse Adriaanse: https://github.com/jasperla .. _OpenBSD: http://www.openbsd.org/cgi-bin/cvsweb/ports/www/puppetboard/ +.. _OpenSUSE Build Service: https://build.opensuse.org/package/show/systemsmanagement:puppet/python-puppetboard Development @@ -273,7 +278,7 @@ Here is a sample configuration for Fedora: Note the directory path, it's the path to where pip installed Puppetboard; X.Y -must be replaced with your python version. We also alias the ``/static`` path +must be replaced with your python version. We also alias the ``/static`` path so that Apache will serve the static files like the included CSS and Javascript. Apache + mod_passenger @@ -429,7 +434,7 @@ instead of the traditional ``proxy_pass``. nginx + gunicorn ^^^^^^^^^^^^^ -You can use gunicorn instead of uwsgi if you prefer, the process doesn't +You can use gunicorn instead of uwsgi if you prefer, the process doesn't differ too much. As we can't use ``uwsgi_pass`` with gunicorn, the nginx configuration file is going to differ a bit: .. code-block:: nginx @@ -442,11 +447,11 @@ differ too much. As we can't use ``uwsgi_pass`` with gunicorn, the nginx configu listen 80; server_name puppetboard.example.tld; charset utf-8; - + location /static { alias /usr/local/lib/pythonX.Y/dist-packages/puppetboard/static; } - + location / { add_header Access-Control-Allow-Origin *; proxy_pass_header Server; From 2c274f05dd1c8de3fd63482321117d7ff76710ba Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 23:44:01 +0200 Subject: [PATCH 6/7] README: Link the SuSE OS names to OBS too. Mentions #52 --- README.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 823cc9d..a39ef3f 100644 --- a/README.rst +++ b/README.rst @@ -81,9 +81,9 @@ Native packages for your operating system will be provided in the near future. +------------------+-----------+--------------------------------------------+ | CentOS/RHEL 6 | planned | | +------------------+-----------+--------------------------------------------+ -| OpenSuSE 12/13 | available | Maintained on `OpenSuSE Build Service`_ | +| `OpenSuSE 12/13` | available | Maintained on `OpenSuSE Build Service`_ | +------------------+-----------+--------------------------------------------+ -| SuSE LE 11 SP3 | available | Maintained on `OpenSuSE Build Service`_ | +| `SuSE LE 11 SP3` | available | Maintained on `OpenSuSE Build Service`_ | +------------------+-----------+--------------------------------------------+ | `ArchLinux`_ | available | Maintained by `Niels Abspoel`_ | +------------------+-----------+--------------------------------------------+ @@ -94,7 +94,9 @@ Native packages for your operating system will be provided in the near future. .. _Niels Abspoel: https://github.com/aboe76 .. _Jasper Lievisse Adriaanse: https://github.com/jasperla .. _OpenBSD: http://www.openbsd.org/cgi-bin/cvsweb/ports/www/puppetboard/ -.. _OpenSUSE Build Service: https://build.opensuse.org/package/show/systemsmanagement:puppet/python-puppetboard +.. _OpenSuSE Build Service: https://build.opensuse.org/package/show/systemsmanagement:puppet/python-puppetboard +.. _OpenSuSE 12/13: https://build.opensuse.org/package/show/systemsmanagement:puppet/python-puppetboard +.. _SuSE LE 11 SP3: https://build.opensuse.org/package/show/systemsmanagement:puppet/python-puppetboard Development From 2cc57f10fc5e2ac9b44ede4349e6b1658c6a2831 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 6 Jun 2014 23:45:33 +0200 Subject: [PATCH 7/7] README: Forgot the _ to make it a link. Mentions #52 --- README.rst | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.rst b/README.rst index a39ef3f..2007917 100644 --- a/README.rst +++ b/README.rst @@ -66,29 +66,29 @@ Packages ^^^^^^^^ Native packages for your operating system will be provided in the near future. -+------------------+-----------+--------------------------------------------+ -| OS | Status | | -+==================+===========+============================================+ -| Debian 6/Squeeze | planned | Requires Backports | -+------------------+-----------+--------------------------------------------+ -| Debian 7/Wheezy | planned | | -+------------------+-----------+--------------------------------------------+ -| Ubuntu 13.04 | planned | | -+------------------+-----------+--------------------------------------------+ -| Ubuntu 13.10 | planned | | -+------------------+-----------+--------------------------------------------+ -| CentOS/RHEL 5 | n/a | Python 2.4 | -+------------------+-----------+--------------------------------------------+ -| CentOS/RHEL 6 | planned | | -+------------------+-----------+--------------------------------------------+ -| `OpenSuSE 12/13` | available | Maintained on `OpenSuSE Build Service`_ | -+------------------+-----------+--------------------------------------------+ -| `SuSE LE 11 SP3` | available | Maintained on `OpenSuSE Build Service`_ | -+------------------+-----------+--------------------------------------------+ -| `ArchLinux`_ | available | Maintained by `Niels Abspoel`_ | -+------------------+-----------+--------------------------------------------+ -| `OpenBSD`_ | available | Maintained by `Jasper Lievisse Adriaanse`_ | -+------------------+-----------+--------------------------------------------+ ++-------------------+-----------+--------------------------------------------+ +| OS | Status | | ++===================+===========+============================================+ +| Debian 6/Squeeze | planned | Requires Backports | ++-------------------+-----------+--------------------------------------------+ +| Debian 7/Wheezy | planned | | ++-------------------+-----------+--------------------------------------------+ +| Ubuntu 13.04 | planned | | ++-------------------+-----------+--------------------------------------------+ +| Ubuntu 13.10 | planned | | ++-------------------+-----------+--------------------------------------------+ +| CentOS/RHEL 5 | n/a | Python 2.4 | ++-------------------+-----------+--------------------------------------------+ +| CentOS/RHEL 6 | planned | | ++-------------------+-----------+--------------------------------------------+ +| `OpenSuSE 12/13`_ | available | Maintained on `OpenSuSE Build Service`_ | ++-------------------+-----------+--------------------------------------------+ +| `SuSE LE 11 SP3`_ | available | Maintained on `OpenSuSE Build Service`_ | ++-------------------+-----------+--------------------------------------------+ +| `ArchLinux`_ | available | Maintained by `Niels Abspoel`_ | ++-------------------+-----------+--------------------------------------------+ +| `OpenBSD`_ | available | Maintained by `Jasper Lievisse Adriaanse`_ | ++-------------------+-----------+--------------------------------------------+ .. _ArchLinux: https://aur.archlinux.org/packages/python2-puppetboard/ .. _Niels Abspoel: https://github.com/aboe76