diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-04-06 17:29:44 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-04-08 08:03:32 +0200 |
commit | fcbaf7d66d5e344b12b57d8d8c4c182c7497e764 (patch) | |
tree | f3a30c47d0ae91838495485e3a1c45c39e6c54d9 /ogcp/templates | |
parent | d2fef8e85dcd348201631911711cbb9b5db30ec3 (diff) |
Add Update image to commands
Allows updating the image file for an existing image.
This action is related to /image/create in ogServer API. If ogServer
receives an POST /image/create without the parameter "description", it
does not create a new image and only updates.
Diffstat (limited to 'ogcp/templates')
-rw-r--r-- | ogcp/templates/actions/image_update.html | 22 | ||||
-rw-r--r-- | ogcp/templates/commands.html | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/ogcp/templates/actions/image_update.html b/ogcp/templates/actions/image_update.html new file mode 100644 index 0000000..c008aa8 --- /dev/null +++ b/ogcp/templates/actions/image_update.html @@ -0,0 +1,22 @@ +{% extends 'commands.html' %} +{% import 'bootstrap/wtf.html' as wtf %} +{% import 'macros.html' as macros %} + +{% set sidebar_state = 'disabled' %} +{% set btn_back = true %} + +{% block nav_image %} active{% endblock %} +{% block nav_image_update %}active{% endblock %} +{% block content %} + +<h1 class="m-5">{{_('Update partition image')}}</h1> + +{{ macros.cmd_selected_clients(selected_clients) }} + +{{ wtf.quick_form(form, + action=url_for('action_image_update'), + method='post', + button_map={'update': 'primary'}, + extra_classes='mx-5') }} + +{% endblock %} diff --git a/ogcp/templates/commands.html b/ogcp/templates/commands.html index 65ab840..a819267 100644 --- a/ogcp/templates/commands.html +++ b/ogcp/templates/commands.html @@ -66,6 +66,8 @@ <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <input class="btn btn-light dropdown-item{% block nav_image_restore %}{% endblock %}" type="submit" value="{{ _('Restore Image') }}" form="scopesForm" formaction="{{ url_for('action_image_restore') }}" formmethod="get"> + <input class="btn btn-light dropdown-item {% block nav_image_update %}{% endblock %}" type="submit" value="{{ _('Update image') }}" + form="scopesForm" formaction="{{ url_for('action_image_update') }}" formmethod="get"> <input class="btn btn-light dropdown-item{% block nav_image_create %}{% endblock %}" type="submit" value="{{ _('Create image') }}" form="scopesForm" formaction="{{ url_for('action_image_create') }}" formmethod="get"> </div> |