Commit 5dc8d211 by Kálmán Viktor

Merge branch 'issue-408' into 'master'

SSH key and messages fixes

Closes #408

See merge request !338
parents 8f05251d 154307c4
...@@ -1630,6 +1630,20 @@ class MessageForm(ModelForm): ...@@ -1630,6 +1630,20 @@ class MessageForm(ModelForm):
class Meta: class Meta:
model = Message model = Message
fields = ("message", "enabled", "effect", "start", "end") fields = ("message", "enabled", "effect", "start", "end")
help_texts = {
'start': _("Start time of the message in "
"YYYY.DD.MM. hh.mm.ss format."),
'end': _("End time of the message in "
"YYYY.DD.MM. hh.mm.ss format."),
'effect': _('The color of the message box defined by the '
'respective '
'<a href="http://getbootstrap.com/components/#alerts">'
'Bootstrap class</a>.')
}
labels = {
'start': _("Start time"),
'end': _("End time")
}
@property @property
def helper(self): def helper(self):
......
...@@ -370,3 +370,4 @@ class MessageListTable(Table): ...@@ -370,3 +370,4 @@ class MessageListTable(Table):
'id': "disk-list-table"} 'id': "disk-list-table"}
order_by = ("-pk", ) order_by = ("-pk", )
fields = ('pk', 'message', 'enabled', 'effect') fields = ('pk', 'message', 'enabled', 'effect')
empty_text = _("No messages.")
...@@ -145,27 +145,34 @@ ...@@ -145,27 +145,34 @@
</dl> </dl>
{% if op.mount_store %} {% if op.mount_store %}
<strong>{% trans "Store" %}</strong> <dl>
<p> <dt>{% trans "Store" %}</dt>
{{ op.mount_store.description }} <dd>{{ op.mount_store.description }}</dd>
</p> <dd>
<div class="operation-wrapper"> <div class="operation-wrapper">
<a href="{{ op.mount_store.get_url }}" class="btn btn-info btn-xs operation" <a href="{{ op.mount_store.get_url }}" class="btn btn-info btn-xs operation"
{% if op.mount_store.disabled %}disabled{% endif %}> {% if op.mount_store.disabled %}disabled{% endif %}>
<i class="fa fa-{{op.mount_store.icon}}"></i> <i class="fa fa-{{op.mount_store.icon}}"></i>
{{ op.mount_store.name }} {{ op.mount_store.name }}
</a> </a>
</div> </div>
</dd>
</dl>
{% endif %} {% endif %}
{% if op.install_keys %} {% if op.install_keys %}
<strong>{% trans "SSH keys" %}</strong> <dl>
<div class="operation-wrapper"> <dt>{% trans "SSH keys" %}</dt>
<a href="{{ op.install_keys.get_url }}" class="btn btn-info btn-xs operation" <dd>{{ op.install_keys.description }}</dd>
{% if op.install_keys.disabled %}disabled{% endif %}> <dd>
<i class="fa fa-{{op.install_keys.icon}}"></i> <div class="operation-wrapper">
{{ op.install_keys.name }} <a href="{{ op.install_keys.get_url }}" class="btn btn-info btn-xs operation"
</a> {% if op.install_keys.disabled %}disabled{% endif %}>
</div> <i class="fa fa-{{op.install_keys.icon}}"></i>
{{ op.install_keys.name }}
</a>
</div>
</dd>
</dl>
{% endif %} {% endif %}
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1423,6 +1423,8 @@ class PasswordResetOperation(RemoteAgentOperation): ...@@ -1423,6 +1423,8 @@ class PasswordResetOperation(RemoteAgentOperation):
class InstallKeysOperation(RemoteAgentOperation): class InstallKeysOperation(RemoteAgentOperation):
id = 'install_keys' id = 'install_keys'
name = _("install SSH keys") name = _("install SSH keys")
description = _("Copy your public keys to the virtual machines. "
"Only works on UNIX-like operating systems.")
acl_level = "user" acl_level = "user"
task = agent_tasks.add_keys task = agent_tasks.add_keys
required_perms = () required_perms = ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment