diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2021-06-16 10:30:39 +0000 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-06-17 09:58:11 +0200 |
commit | 3667db8662c1ee2ae058627447c4eda1898621ab (patch) | |
tree | 337bfc1c453db27b780a4c352898bd5763b7c06b /ogcp/templates/commands.html | |
parent | 514fb84a565e8bc9eb550164d545fa72d77c2b38 (diff) |
Add commands view and macros.html
Commands view has a scope sidebar with the content block filled with
command buttons (poweroff, wol, etc.)
This commit leaves scope create/delete/update buttons in the /scopes
view, which serves that purpose.
To avoid duplicating scope tree creation macro, an external macros.html
is created, this template can be imported. Future macros needed can be
written in there.
Diffstat (limited to 'ogcp/templates/commands.html')
-rw-r--r-- | ogcp/templates/commands.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ogcp/templates/commands.html b/ogcp/templates/commands.html new file mode 100644 index 0000000..27af1b1 --- /dev/null +++ b/ogcp/templates/commands.html @@ -0,0 +1,44 @@ +{% extends 'base.html' %} +{% import "macros.html" as macros %} + +{% block nav_scopes %}active{% endblock %} + +{% block container %} + <form id="scopesForm"> + <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> + </form> + {{ super() }} +</form> +{% endblock %} + +{% block sidebar %} + {{ macros.print_scopes_tree(scopes["scope"]) }} +{% endblock %} + +{% block commands %} + <input class="btn btn-light" type="submit" value="{{ _('Power on (WoL)') }}" + form="scopesForm" formaction="{{ url_for('action_wol') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Power off') }}" + form="scopesForm" formaction="{{ url_for('action_poweroff') }}" formmethod="post"> + <input class="btn btn-light" type="submit" value="{{ _('Reboot') }}" + form="scopesForm" formaction="{{ url_for('action_reboot') }}" formmethod="post"> + <input class="btn btn-light" type="submit" value="{{ _('Refresh') }}" + form="scopesForm" formaction="{{ url_for('action_refresh') }}" formmethod="post"> + <input class="btn btn-light" type="submit" value="{{ _('Hardware') }}" + form="scopesForm" formaction="{{ url_for('action_hardware') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Software') }}" + form="scopesForm" formaction="{{ url_for('action_software') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Start session') }}" + form="scopesForm" formaction="{{ url_for('action_session') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Restore Image') }}" + form="scopesForm" formaction="{{ url_for('action_image_restore') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Partition & Format') }}" + form="scopesForm" formaction="{{ url_for('action_setup_show') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Client details') }}" + form="scopesForm" formaction="{{ url_for('action_client_info') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Create image') }}" + form="scopesForm" formaction="{{ url_for('action_image_create') }}" formmethod="get"> + <input class="btn btn-light" type="submit" value="{{ _('Set boot mode') }}" + form="scopesForm" formaction="{{ url_for('action_mode') }}" formmethod="get"> +{% endblock %} + |