aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking
diff options
context:
space:
mode:
Diffstat (limited to 'src/booking')
-rw-r--r--src/booking/forms.py8
-rw-r--r--src/booking/quick_deployer.py3
2 files changed, 10 insertions, 1 deletions
diff --git a/src/booking/forms.py b/src/booking/forms.py
index 2a8784f..19c0c85 100644
--- a/src/booking/forms.py
+++ b/src/booking/forms.py
@@ -59,6 +59,14 @@ class QuickBookingForm(forms.Form):
self.fields['filter_field'] = MultipleSelectFilterField(widget=MultipleSelectFilterWidget(**lab_data))
+ help_text = 'Hostname can be set only for single-node bookings. For multi-node bookings set hostname through Design a POD.'
+ self.fields['hostname'].widget.attrs.update({
+ 'class': 'has-popover',
+ 'data-content': help_text,
+ 'data-placement': 'top',
+ 'data-container': 'body'
+ })
+
def build_user_list(self):
"""
Build list of UserProfiles.
diff --git a/src/booking/quick_deployer.py b/src/booking/quick_deployer.py
index 8b3af6c..7865ee4 100644
--- a/src/booking/quick_deployer.py
+++ b/src/booking/quick_deployer.py
@@ -111,7 +111,8 @@ def update_template(old_template, image, hostname, user):
profile=old_config.profile,
image=image_to_set,
template=template,
- is_head_node=old_config.is_head_node
+ is_head_node=old_config.is_head_node,
+ name=hostname if len(old_template.getConfigs()) == 1 else old_config.name
)
for old_iface_config in old_config.interface_configs.all():