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):
|
||||
"""The form used to compare the catalogs of different nodes."""
|
||||
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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class='searchable'>
|
||||
{% for edge in catalog.get_edges() %}
|
||||
<tr>
|
||||
<td>{{edge.source}}</td>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% 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">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -16,7 +19,7 @@
|
||||
<thead>
|
||||
<tr><th>Resources</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class='searchable'>
|
||||
{% for resource in compare.get_resources() %}
|
||||
<tr>
|
||||
<td>{{resource.type_}}[{{resource.name}}]</td>
|
||||
@@ -30,7 +33,7 @@
|
||||
<thead>
|
||||
<tr><th>Resources</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class='searchable'>
|
||||
{% for resource in against.get_resources() %}
|
||||
<tr>
|
||||
<td>{{resource.type_}}[{{resource.name}}]</td>
|
||||
@@ -50,7 +53,7 @@
|
||||
<th>Target</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class='searchable'>
|
||||
{% for edge in compare.get_edges() %}
|
||||
<tr>
|
||||
<td>{{edge.source}}</td>
|
||||
@@ -70,7 +73,7 @@
|
||||
<th>Target</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class='searchable'>
|
||||
{% for edge in against.get_edges() %}
|
||||
<tr>
|
||||
<td>{{edge.source}}</td>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="ui fixed darkblue inverted menu">
|
||||
<div class="ui fixed darkblue inverted menu">
|
||||
<div class="title item">
|
||||
Puppetboard
|
||||
</div>
|
||||
@@ -41,16 +41,18 @@
|
||||
href="{{ url_for(endpoint, env=current_env) }}">{{ caption }}</a>
|
||||
{%- endfor %}
|
||||
{% if envs|length > 0 %}
|
||||
<div class="item">
|
||||
<select id="switch_env" name="switch_env">
|
||||
<div class="ui item dropdown">
|
||||
Environments
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{% 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 %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="item" style="float:right"><a href="https://github.com/puppet-community/puppetboard" target="_blank">v0.1.0</a></div>
|
||||
</nav>
|
||||
<div class="item right"><a href="https://github.com/puppet-community/puppetboard" target="_blank">v0.1.0</a></div>
|
||||
</div>
|
||||
<div class="ui grid padding-bottom">
|
||||
<div class="one wide column"></div>
|
||||
<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/tables.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 %}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user