diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 46081b5..19387aa 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -87,6 +87,15 @@ class SessionForm(FlaskForm): ips = HiddenField() os = RadioField(label=_l('Session'), choices=[]) +class CacheImage(FlaskForm): + selected = BooleanField() + image_name = HiddenField() + clients = HiddenField() + +class CacheForm(FlaskForm): + ips = HiddenField() + images = FieldList(FormField(CacheImage)) + class ImageRestoreForm(FlaskForm): ips = HiddenField() partition = SelectField(label=_l('Partition'), choices=[]) diff --git a/ogcp/templates/actions/cache.html b/ogcp/templates/actions/cache.html new file mode 100644 index 0000000..07f5b16 --- /dev/null +++ b/ogcp/templates/actions/cache.html @@ -0,0 +1,192 @@ +{% extends 'commands.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% set sidebar_state = 'disabled' %} +{% set btn_back = true %} + +{% block nav_client %} active{% endblock %} +{% block nav_client_cache %} active{% endblock %} +{% block content %} + +{% set ip_list = form.ips.data.split(' ') %} +{% set ip_count = ip_list | length %} +
{{ _('Check free cache space in the client\'s bubbles:') }}
+ +{{ macros.cmd_selected_clients(selected_clients) }} + +{{ _('Select the images to be deleted:') }}
+ + + +{{ _('Images in cache:') }}
+ +