diff options
Diffstat (limited to 'ogcp/templates')
-rw-r--r-- | ogcp/templates/actions/client_details.html | 5 | ||||
-rw-r--r-- | ogcp/templates/actions/hardware.html | 4 | ||||
-rw-r--r-- | ogcp/templates/actions/image_create.html | 13 | ||||
-rw-r--r-- | ogcp/templates/actions/image_restore.html | 10 | ||||
-rw-r--r-- | ogcp/templates/actions/mode.html | 10 | ||||
-rw-r--r-- | ogcp/templates/actions/session.html | 5 | ||||
-rw-r--r-- | ogcp/templates/actions/setup.html | 6 | ||||
-rw-r--r-- | ogcp/templates/actions/software.html | 5 | ||||
-rw-r--r-- | ogcp/templates/actions/wol.html | 10 | ||||
-rw-r--r-- | ogcp/templates/base.html | 3 | ||||
-rw-r--r-- | ogcp/templates/dashboard.html | 12 | ||||
-rw-r--r-- | ogcp/templates/nav.html | 4 | ||||
-rw-r--r-- | ogcp/templates/scopes.html | 13 |
13 files changed, 85 insertions, 15 deletions
diff --git a/ogcp/templates/actions/client_details.html b/ogcp/templates/actions/client_details.html index 3ef13a6..39963bd 100644 --- a/ogcp/templates/actions/client_details.html +++ b/ogcp/templates/actions/client_details.html @@ -3,8 +3,11 @@ {% block content %} +<h1 class="m-5">{{_('Client details')}}</h1> + {{ wtf.quick_form(form, method='post', - button_map={'create': 'primary'}) }} + button_map={'create': 'primary'}, + extra_classes="mx-5") }} {% endblock %} diff --git a/ogcp/templates/actions/hardware.html b/ogcp/templates/actions/hardware.html index 31f4d81..c447c57 100644 --- a/ogcp/templates/actions/hardware.html +++ b/ogcp/templates/actions/hardware.html @@ -3,6 +3,10 @@ {% block content %} +<h1 class="m-5">{{_('Hardware inventory')}}</h1> + +<h2 class="mb-3 mx-5">Selected client: {{ form.ips.data }}</h1> + <table class="table table-striped"> <thead class="thead-dark"> <tr> diff --git a/ogcp/templates/actions/image_create.html b/ogcp/templates/actions/image_create.html index 2e2b4f9..3542cd2 100644 --- a/ogcp/templates/actions/image_create.html +++ b/ogcp/templates/actions/image_create.html @@ -3,9 +3,20 @@ {% block content %} +<h1 class="m-5">{{_('Create a partition image')}}</h1> + +<h2 class="mx-5">Selected client: {{ form.ip.data }}</h1> + +<ul class="list-group mx-5 list-group-horizontal-sm"> +{% for ip in ip_list %} + <li class="list-group-item flex-fill list-group-item-info">{{ ip }}</li> +{% endfor %} +</ul> + {{ wtf.quick_form(form, action=url_for('action_image_create'), method='post', - button_map={'create': 'primary'}) }} + button_map={'create': 'primary'}, + extra_classes='mx-5') }} {% endblock %} diff --git a/ogcp/templates/actions/image_restore.html b/ogcp/templates/actions/image_restore.html index cf50b43..9742bbd 100644 --- a/ogcp/templates/actions/image_restore.html +++ b/ogcp/templates/actions/image_restore.html @@ -3,6 +3,16 @@ {% block content %} +{% set ip_list = form.ips.data.split(' ') %} +{% set ip_count = ip_list | length %} +<h1 class="m-5">Restore partition image to {{ip_count}} {%if ip_count > 1%}computers{% else %}computer{% endif %}</h1> + +<ul class="list-group mx-5 list-group-horizontal-sm"> +{% for ip in ip_list %} + <li class="list-group-item flex-fill list-group-item-info">{{ ip }}</li> +{% endfor %} +</ul> + {{ wtf.quick_form(form, action=url_for('action_image_restore'), method='post', diff --git a/ogcp/templates/actions/mode.html b/ogcp/templates/actions/mode.html index d93e8a7..0fd3266 100644 --- a/ogcp/templates/actions/mode.html +++ b/ogcp/templates/actions/mode.html @@ -3,6 +3,16 @@ {% block content %} +{% set ip_list = form.ips.data.split(' ') %} +{% set ip_count = ip_list | length %} +<h1 class="m-5">Changing boot mode of {{ip_count}} {%if ip_count > 1%}computers{% else %}computer{% endif %}</h1> + +<ul class="list-group mx-5 list-group-horizontal-sm"> +{% for ip in ip_list %} + <li class="list-group-item flex-fill list-group-item-info">{{ ip }}</li> +{% endfor %} +</ul> + {{ wtf.quick_form(form, action=url_for('action_mode'), method='post', diff --git a/ogcp/templates/actions/session.html b/ogcp/templates/actions/session.html index 3023a57..528c928 100644 --- a/ogcp/templates/actions/session.html +++ b/ogcp/templates/actions/session.html @@ -3,9 +3,12 @@ {% block content %} +<h1 class="m-5">{{_('Start session')}}</h1> + {{ wtf.quick_form(form, action=url_for('action_session'), method='post', - button_map={'run': 'primary'}) }} + button_map={'run': 'primary'}, + extra_classes='mx-5') }} {% endblock %} diff --git a/ogcp/templates/actions/setup.html b/ogcp/templates/actions/setup.html index cc26804..f105dd2 100644 --- a/ogcp/templates/actions/setup.html +++ b/ogcp/templates/actions/setup.html @@ -3,12 +3,14 @@ {% block content %} +<h1 class="m-5">{{_('Partition and Format')}}</h1> + {% for form in forms %} {{ wtf.quick_form(form, method='post', - form_type='inline', - extra_classes='m-2 p-2', + form_type='inline', + extra_classes='mx-5 pb-3', button_map={'modify': 'primary', 'delete': 'danger'}) }} diff --git a/ogcp/templates/actions/software.html b/ogcp/templates/actions/software.html index 713f89b..71dc0ae 100644 --- a/ogcp/templates/actions/software.html +++ b/ogcp/templates/actions/software.html @@ -3,9 +3,12 @@ {% block content %} +<h1 class="m-5">{{_('Software Inventory')}}</h1> + {{ wtf.quick_form(form, action=url_for('action_software'), method='post', - button_map={'view': 'primary', 'update': 'primary'}) }} + button_map={'view': 'primary', 'update': 'primary'}, + extra_classes="mx-5")}} {% endblock %} diff --git a/ogcp/templates/actions/wol.html b/ogcp/templates/actions/wol.html index 61494f9..0692589 100644 --- a/ogcp/templates/actions/wol.html +++ b/ogcp/templates/actions/wol.html @@ -3,6 +3,16 @@ {% block content %} +{% set ip_list = form.ips.data.split(' ') %} +{% set ip_count = ip_list | length %} +<h1 class="m-5">Powering on {{ip_count}} {%if ip_count > 1%}computers{% else %}computer{% endif %}</h1> + +<ul class="list-group mx-5 list-group-horizontal-sm"> +{% for ip in ip_list %} + <li class="list-group-item flex-fill list-group-item-info">{{ ip }}</li> +{% endfor %} +</ul> + {{ wtf.quick_form(form, action=url_for('action_wol'), method='post', diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html index 3f55555..e70e3fd 100644 --- a/ogcp/templates/base.html +++ b/ogcp/templates/base.html @@ -4,6 +4,7 @@ {% block head %} <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script> <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" /> + <link rel="stylesheet" href="{{ url_for('static', filename='css/soleta.css') }}" /> <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script> <title>{% block title %}{% endblock %} - OpenGnsys</title> {% endblock %} @@ -32,7 +33,7 @@ {% block footer %} <footer class="footer navbar-inverse bg-dark" role="contentinfo"> - <div class="text-center text-secondary my-2 p-3"> + <div class="text-center text-secondary mt-1 p-3"> Powered by <a class="text-light" href="https://opengnsys.soleta.eu/">Soleta Networks</a> </div> diff --git a/ogcp/templates/dashboard.html b/ogcp/templates/dashboard.html new file mode 100644 index 0000000..a9cea41 --- /dev/null +++ b/ogcp/templates/dashboard.html @@ -0,0 +1,12 @@ +{% extends 'base.html' %} + +{% block content %} +<div class="m-4 w-25 card text-center"> + <div class="card-header"> + Connected clients (ogClient) + </div> + <div class="card-body"> + <p class="card-text">{{ clients['clients'] | length }}</p> + </div> +</div> +{% endblock %} diff --git a/ogcp/templates/nav.html b/ogcp/templates/nav.html index d7741ca..39b0ac2 100644 --- a/ogcp/templates/nav.html +++ b/ogcp/templates/nav.html @@ -6,11 +6,11 @@ <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> + <li class="nav-item {% if request.endpoint == "index" %}active{% endif %}"> <a class="nav-link" href="{{ url_for('index') }}">{{ _('Home') }}<span class="sr-only">(current)</span></a> </li> {% if current_user.is_authenticated %} - <li class="nav-item"> + <li class="nav-item {% if request.endpoint == "scopes" %}active{% endif %}"> <a class="nav-link" href="{{ url_for('scopes') }}">{{ _('Scopes') }}</a> </li> {% endif %} diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html index 879f5f0..0adeca4 100644 --- a/ogcp/templates/scopes.html +++ b/ogcp/templates/scopes.html @@ -1,10 +1,11 @@ {% extends 'base.html' %} +{% block nav_scopes %}active{% endblock %} {% macro print_scopes_tree(scopes) -%} <ul class="list-group list-group-flush mx-5"> {% for scope in scopes %} - <li class="list-group-item"> + <li class="list-group-item state--{{ scope['state'] | lower }}"> <input class="form-check-input" type="checkbox" value="{{ " ".join(scope["ip"]) }}" name="{{ scope["name"] }}_{{ scope["id"] }}"> @@ -32,9 +33,9 @@ {{ _('Actions') }} </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> - <input class="dropdown-item" type="submit" value="{{ _('Run') }}" + <input class="dropdown-item" type="submit" value="{{ _('Power on (WoL)') }}" formaction="{{ url_for('action_wol') }}" formmethod="get"> - <input class="dropdown-item" type="submit" value="{{ _('Poweroff') }}" + <input class="dropdown-item" type="submit" value="{{ _('Power off') }}" formaction="{{ url_for('action_poweroff') }}" formmethod="post"> <input class="dropdown-item" type="submit" value="{{ _('Reboot') }}" formaction="{{ url_for('action_reboot') }}" formmethod="post"> @@ -44,13 +45,13 @@ formaction="{{ url_for('action_hardware') }}" formmethod="get"> <input class="dropdown-item" type="submit" value="{{ _('Software') }}" formaction="{{ url_for('action_software') }}" formmethod="get"> - <input class="dropdown-item" type="submit" value="{{ _('Sessions') }}" + <input class="dropdown-item" type="submit" value="{{ _('Start session') }}" formaction="{{ url_for('action_session') }}" formmethod="get"> <input class="dropdown-item" type="submit" value="{{ _('Restore Image') }}" formaction="{{ url_for('action_image_restore') }}" formmethod="get"> - <input class="dropdown-item" type="submit" value="{{ _('Setup') }}" + <input class="dropdown-item" type="submit" value="{{ _('Partition & Format') }}" formaction="{{ url_for('action_setup_show') }}" formmethod="get"> - <input class="dropdown-item" type="submit" value="{{ _('Details') }}" + <input class="dropdown-item" type="submit" value="{{ _('Client details') }}" formaction="{{ url_for('action_client_info') }}" formmethod="get"> <input class="dropdown-item" type="submit" value="{{ _('Add client') }}" formaction="{{ url_for('action_client_add') }}" formmethod="get"> |