* puppetboard/app.py: Adding Radiator view Part 2 of https://github.com/voxpupuli/puppetboard/issues/70 This is a refactoring of the changes in https://github.com/voxpupuli/puppetboard/pull/100. Adds a simple Heads-Up Display of the last run statuses of managed nodes, either environment filtered or not. * puppetboard/app.py: Fixing environment filters and metric strings. * The names of the population metrics have changes in PuppetDB 4.0, the initial commit used the metric names from PuppetDB 2.x. * The main nodes query did not include a query string to filter on environments.
98 lines
3.8 KiB
HTML
98 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Puppetboard</title>
|
|
{% if config.OFFLINE_MODE %}
|
|
<style>
|
|
@font-face {
|
|
font-family: 'Open Sans';
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
src: local('Open Sans'), local('OpenSans'), url({{ url_for('static', filename='fonts/Open_Sans.woff') }}) format('woff');
|
|
}
|
|
</style>
|
|
{% else %}
|
|
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
|
{% endif %}
|
|
<link href="{{ url_for('static', filename='Semantic-UI-2.1.8/semantic.min.css') }}" rel="stylesheet">
|
|
<link href="{{ url_for('static', filename='css/puppetboard.css') }}" rel="stylesheet">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="ui darkblue doubling stackable inverted large menu">
|
|
<div class="title item">
|
|
Puppetboard
|
|
</div>
|
|
{%- for endpoint, caption in [
|
|
('index', 'Overview'),
|
|
('nodes', 'Nodes'),
|
|
('facts', 'Facts'),
|
|
('reports', 'Reports'),
|
|
('metrics', 'Metrics'),
|
|
('inventory', 'Inventory'),
|
|
('catalogs', 'Catalogs'),
|
|
('radiator', 'Radiator'),
|
|
('query', 'Query'),
|
|
] %}
|
|
<a {% if endpoint == request.endpoint %} class="active item" {% else %} class="item" {% endif %}
|
|
href="{{ url_for(endpoint, env=current_env) }}">{{ caption }}</a>
|
|
{%- endfor %}
|
|
<div class="ui dropdown item">
|
|
Environments
|
|
<i class="dropdown icon"></i>
|
|
<div class="menu">
|
|
<a class="{% if '*' == current_env %}active {% endif %}item" href="{{url_for_environments('*')}}">All environments</a>
|
|
{% for env in envs %}
|
|
<a class="{% if env == current_env %}active {% endif %}item" href="{{url_for_environments(env)}}">{{env}}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="item right"><a href="https://github.com/puppet-community/puppetboard" target="_blank">v0.1.3</a></div>
|
|
</div>
|
|
<div class="ui grid padding-bottom">
|
|
<div class="one wide column"></div>
|
|
<div class="fourteen wide column">
|
|
{% block content %} {% endblock content %}
|
|
</div>
|
|
<div class="one wide column"></div>
|
|
</div>
|
|
|
|
<div id="scroll-btn-top">
|
|
<i class="large arrow up icon"></i>
|
|
</div>
|
|
|
|
<footer class="ui absolute fixed bottom">
|
|
<div>
|
|
Copyright © 2013-{{ now('%Y') }} <a href="https://github.com/puppet-community" target="_blank">Puppet Community</a>. <span style="float:right">Live from PuppetDB.</span>
|
|
</div>
|
|
</footer>
|
|
|
|
{% if config.OFFLINE_MODE %}
|
|
<script src="{{ url_for('static', filename='jquery-2.1.1/jquery.min.js') }}"></script>
|
|
{% if config.LOCALISE_TIMESTAMP %}
|
|
<script src="{{ url_for('static', filename='moment.js-2.7.0/moment.min.js') }}"></script>
|
|
{% endif %}
|
|
{% else %}
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
|
{% if config.LOCALISE_TIMESTAMP %}
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js"></script>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if config.LOCALISE_TIMESTAMP %}
|
|
<script src="{{ url_for('static', filename='js/timestamps.js')}}"></script>
|
|
{% endif %}
|
|
<script src="{{ url_for('static', filename='Semantic-UI-2.1.8/semantic.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='jquery-tablesort-v.0.0.7/jquery.tablesort.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/lists.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/tables.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/scroll.top.js') }}"></script>
|
|
<script type="text/javascript">
|
|
$(".ui.dropdown").dropdown();
|
|
$('table').tablesort();
|
|
</script>
|
|
|
|
{% block script %} {% endblock script %}
|
|
</body>
|
|
</html>
|