Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make app look more unique #29

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions flowapp/static/mystyle.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-family: "Nunito Sans", "DM Sans", sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
background-color: #fafafa;
padding-top: 70px;
padding-bottom: 30px;
}
Expand Down Expand Up @@ -189,3 +189,14 @@ tbody .bi {
.alert {
border-radius: 10px;
}

.bg-exafs {
background-color: #065895 !important;
}

.content {
padding: 20px;
background-color: #fff;
border-radius: 20px;
box-shadow: 0 .125rem .25rem rgba(0,0,0,.175);
}
11 changes: 7 additions & 4 deletions flowapp/templates/errors/404.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% extends 'layouts/default.j2' %}
{% block content %}
<h1>Sorry ...</h1>
<p>There's nothing here!</p>
<p><a href="{{url_for('index')}}">Back</a></p>
{% endblock %}
<div class="content border border-4 border-warning text-center">
<p class="fs-1">&#129300;</p>
<h1>There is nothing here!</h1>
<p class="form-text">404 Not Found</p>
<p><a href="{{ url_for('index') }}" class="btn btn-link">Go back</a></p>
</div>
{% endblock %}
12 changes: 8 additions & 4 deletions flowapp/templates/errors/500.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{% extends 'layouts/default.j2' %}
{% block content %}
<h1>Error ...</h1>
<p>Sorry ;-)</p>
<p><a href="{{url_for('index')}}">Back</a></p>
{% endblock %}
<div class="content border border-4 border-danger text-center">
<p class="fs-1">&#128547;</p>
<h1>There was an error on our side</h1>
<p>Sorry... Please try again later.</p>
<p class="form-text">500 Internal Server Error</p>
<p><a href="{{ url_for('index') }}" class="btn btn-link">Go back</a></p>
</div>
{% endblock %}
42 changes: 22 additions & 20 deletions flowapp/templates/forms/api_key.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@
{% from 'forms/macros.j2' import render_field %}
{% block title %}Add New Machine with ApiKey{% endblock %}
{% block content %}
<h2>Add new ApiKey for your machine</h2>
<form action="{{ action_url }}" method="POST">
{{ form.hidden_tag() if form.hidden_tag }}
<div class="row">
<div class="col-sm-12">
<div class="content">
<h2>Add new ApiKey for your machine</h2>
<form action="{{ action_url }}" method="POST">
{{ form.hidden_tag() if form.hidden_tag }}
<div class="row">
<div class="col-sm-12">
{{ render_field(form.machine) }}
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-4">
ApiKey for this machine:
</div>
<div class="col-sm-8">
{{ generated_key }}
</div>
</div>
<div class="row">
<div class="col-sm-4">
ApiKey for this machine:
</div>
<div class="col-sm-8">
{{ generated_key }}
</div>
</div>


<div class="row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">Save</button>
</div>
<div class="row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">Save</button>
</div>
</div>
</form>
</div>

{% endblock %}
138 changes: 70 additions & 68 deletions flowapp/templates/forms/ipv4_rule.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,92 +2,94 @@
{% from 'forms/macros.j2' import render_field %}
{% block title %}Add IPv4 rule{% endblock %}
{% block content %}
<h2>{{ title or 'New'}} IPv4 rule</h2>
<form action="{{ action_url }}" method="POST">
{{ form.hidden_tag() if form.hidden_tag }}
<div class="row">
<div class="col-sm-8">
<div class="row">
<div class="col-sm-8">
{{ render_field(form.source) }}
<div class="content">
<h2>{{ title or 'New'}} IPv4 rule</h2>
<form action="{{ action_url }}" method="POST">
{{ form.hidden_tag() if form.hidden_tag }}
<div class="row">
<div class="col-sm-8">
<div class="row">
<div class="col-sm-8">
{{ render_field(form.source) }}
</div>
<div class="col-sm-4">
{{ render_field(form.source_mask) }}
</div>
</div>
<div class="col-sm-4">
{{ render_field(form.source_mask) }}
<div class="row">
<div class="col-sm-8">
{{ render_field(form.dest) }}
</div>
<div class="col-sm-4">
{{ render_field(form.dest_mask) }}
</div>
</div>
</div>
<div class="row">
<div class="col-sm-8">
{{ render_field(form.dest) }}
</div>
<div class="col-sm-4">
{{ render_field(form.dest_mask) }}
<div class="col-sm-2">
<div class="row">
{{ render_field(form.protocol) }}
</div>
<div class="row">
{{ render_field(form.fragment, size=4) }}
</div>
</div>
</div>
<div class="col-sm-2">
<div class="row">
{{ render_field(form.protocol) }}
<div class="col-sm-2">
{{ render_field(form.flags, size=9) }}
</div>
<div class="row">
{{ render_field(form.fragment, size=4) }}
</div>
</div>
<div class="col-sm-2">
{{ render_field(form.flags, size=9) }}
</div>

</div>

<div class="row">
<div class="col-sm-4">
{{ render_field(form.source_port, tooltip="Possible values: x;>x;x-y;<x;<=x;>=x") }}
</div>
<div class="col-sm-4">
{{ render_field(form.dest_port, tooltip="Possible values: x;>x;x-y;<x;<=x;>=x") }}
</div>
<div class="col-sm-4">
{{ render_field(form.packet_len, tooltip="Possible values: x;>x;x-y;<x;<=x;>=x") }}

<div class="row">
<div class="col-sm-4">
{{ render_field(form.source_port, tooltip="Possible values: x;>x;x-y;<x;<=x;>=x") }}
</div>
<div class="col-sm-4">
{{ render_field(form.dest_port, tooltip="Possible values: x;>x;x-y;<x;<=x;>=x") }}
</div>
<div class="col-sm-4">
{{ render_field(form.packet_len, tooltip="Possible values: x;>x;x-y;<x;<=x;>=x") }}
</div>
</div>
</div>


<div class="row">
<div class="col-sm-6">
{{ render_field(form.action) }}
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="inputExpiration" class="control-label">Expiration date</label>
<div class='input-group date' id='dateTimeExpires'>
<!--
<input type='text' name="expires" class="form-control" />
<div class="row">
<div class="col-sm-6">
{{ render_field(form.action) }}
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="inputExpiration" class="control-label">Expiration date</label>
<div class='input-group date' id='dateTimeExpires'>
<!--
<input type='text' name="expires" class="form-control" />

-->
{{ form.expires(class_='form-control') }}
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
-->
{{ form.expires(class_='form-control') }}
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>

{% if form.expires.errors %}
{% for e in form.expires.errors %}
<p class="help-block">{{ e }}</p>
{% endfor %}
{% endif %}
{% if form.expires.errors %}
{% for e in form.expires.errors %}
<p class="help-block">{{ e }}</p>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-12">
{{ render_field(form.comment) }}
<div class="row">
<div class="col-sm-12">
{{ render_field(form.comment) }}
</div>
</div>
</div>

<div class="row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">Save</button>
<div class="row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">Save</button>
</div>
</div>
</form>
</div>
</form>
{% endblock %}
Loading