puppetboard: Squashed commit of the following:
b4f74e240dMaking catalog tables searchable7a8ddde6caNavbar style/naming simplificationse8fea997fdCreating Semantic UI Menu for environment switching instead of select menu
This commit is contained in:
@@ -30,4 +30,4 @@ class QueryForm(Form):
|
|||||||
class CatalogForm(Form):
|
class CatalogForm(Form):
|
||||||
"""The form used to compare the catalogs of different nodes."""
|
"""The form used to compare the catalogs of different nodes."""
|
||||||
compare = HiddenField('compare')
|
compare = HiddenField('compare')
|
||||||
against = SelectField(u'against')
|
against = SelectField('against')
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
(function () {
|
|
||||||
var $;
|
|
||||||
|
|
||||||
$ = jQuery;
|
|
||||||
|
|
||||||
$('#switch_env').change(function() {
|
|
||||||
path = location.pathname.split('/');
|
|
||||||
path[1] = $(this).find(':selected').text();
|
|
||||||
location.assign(path.join('/'))
|
|
||||||
});
|
|
||||||
}).call(this)
|
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<th>Target</th>
|
<th>Target</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class='searchable'>
|
||||||
{% for edge in catalog.get_edges() %}
|
{% for edge in catalog.get_edges() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{edge.source}}</td>
|
<td>{{edge.source}}</td>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="ui fluid icon input hide" style="margin-bottom:20px">
|
||||||
|
<input autofocus="autofocus" class="filter-table" placeholder="Type here to filter...">
|
||||||
|
</div>
|
||||||
<table class="ui basic table">
|
<table class="ui basic table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -16,7 +19,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr><th>Resources</th></tr>
|
<tr><th>Resources</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class='searchable'>
|
||||||
{% for resource in compare.get_resources() %}
|
{% for resource in compare.get_resources() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{resource.type_}}[{{resource.name}}]</td>
|
<td>{{resource.type_}}[{{resource.name}}]</td>
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr><th>Resources</th></tr>
|
<tr><th>Resources</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class='searchable'>
|
||||||
{% for resource in against.get_resources() %}
|
{% for resource in against.get_resources() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{resource.type_}}[{{resource.name}}]</td>
|
<td>{{resource.type_}}[{{resource.name}}]</td>
|
||||||
@@ -50,7 +53,7 @@
|
|||||||
<th>Target</th>
|
<th>Target</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class='searchable'>
|
||||||
{% for edge in compare.get_edges() %}
|
{% for edge in compare.get_edges() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{edge.source}}</td>
|
<td>{{edge.source}}</td>
|
||||||
@@ -70,7 +73,7 @@
|
|||||||
<th>Target</th>
|
<th>Target</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class='searchable'>
|
||||||
{% for edge in against.get_edges() %}
|
{% for edge in against.get_edges() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{edge.source}}</td>
|
<td>{{edge.source}}</td>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav class="ui fixed darkblue inverted menu">
|
<div class="ui fixed darkblue inverted menu">
|
||||||
<div class="title item">
|
<div class="title item">
|
||||||
Puppetboard
|
Puppetboard
|
||||||
</div>
|
</div>
|
||||||
@@ -41,16 +41,18 @@
|
|||||||
href="{{ url_for(endpoint, env=current_env) }}">{{ caption }}</a>
|
href="{{ url_for(endpoint, env=current_env) }}">{{ caption }}</a>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% if envs|length > 0 %}
|
{% if envs|length > 0 %}
|
||||||
<div class="item">
|
<div class="ui item dropdown">
|
||||||
<select id="switch_env" name="switch_env">
|
Environments
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="menu">
|
||||||
{% for env in envs %}
|
{% for env in envs %}
|
||||||
<option value="{{env}}" {% if current_env == env %}selected="selected" {% endif %}>{{env}}</option>
|
<a class="item {% if env == current_env %}active{% endif %}" href="{{url_for_environments(env)}}">{{env}}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="item" style="float:right"><a href="https://github.com/puppet-community/puppetboard" target="_blank">v0.1.0</a></div>
|
<div class="item right"><a href="https://github.com/puppet-community/puppetboard" target="_blank">v0.1.0</a></div>
|
||||||
</nav>
|
</div>
|
||||||
<div class="ui grid padding-bottom">
|
<div class="ui grid padding-bottom">
|
||||||
<div class="one wide column"></div>
|
<div class="one wide column"></div>
|
||||||
<div class="fourteen wide column">
|
<div class="fourteen wide column">
|
||||||
@@ -90,7 +92,9 @@
|
|||||||
<script src="{{ url_for('static', filename='js/lists.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/tables.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/scroll.top.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/scroll.top.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/environments.js') }}"></script>
|
<script type="text/javascript">
|
||||||
|
$(".ui.dropdown").dropdown();
|
||||||
|
</script>
|
||||||
|
|
||||||
{% block script %} {% endblock script %}
|
{% block script %} {% endblock script %}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user