Commit d148b808 by Kálmán Viktor

dashboard: mount button

parent 03a510d1
......@@ -3,7 +3,7 @@
$(function() {
/* vm operations */
$('#ops, #vm-details-resources-disk, #vm-details-renew-op, #vm-details-pw-reset, #vm-details-add-interface').on('click', '.operation', function(e) {
$('#ops, #vm-details-resources-disk, #vm-details-renew-op, #vm-details-pw-reset, #vm-details-add-interface, .operation-wrapper').on('click', '.operation', function(e) {
var icon = $(this).children("i").addClass('fa-spinner fa-spin');
$.ajax({
......
......@@ -90,6 +90,20 @@
</div>
</form>
</div><!-- id:vm-details-tags -->
{% if op.mount_store %}
<strong>{% trans "Store" %}</strong>
<p>
{{ op.mount_store.description }}
</p>
<div class="operation-wrapper">
<a href="{{ op.mount_store.get_url }}" class="btn btn-info btn-xs operation"
{% if op.mount_store.disabled %}disabled{% endif %}>
<i class="fa fa-{{op.mount_store.icon}}"></i>
{{ op.mount_store.name }}
</a>
</div>
{% endif %}
</div>
<div class="col-md-8">
{% if graphite_enabled %}
......
......@@ -938,8 +938,6 @@ vm_ops = OrderedDict([
op='sleep', icon='moon-o', effect='info')),
('migrate', VmMigrateView),
('save_as_template', VmSaveView),
('mount_store', VmOperationView.factory(
op='mount_store', icon='briefcase', effect='info')),
('reboot', VmOperationView.factory(
op='reboot', icon='refresh', effect='warning')),
('reset', VmOperationView.factory(
......@@ -963,6 +961,10 @@ vm_ops = OrderedDict([
('password_reset', VmOperationView.factory(
op='password_reset', icon='unlock', effect='warning',
show_in_toolbar=False, wait_for_result=0.5, with_reload=True)),
('mount_store', VmOperationView.factory(
op='mount_store', icon='briefcase', effect='info',
show_in_toolbar=False,
)),
])
......
......@@ -928,8 +928,9 @@ class MountStoreOperation(InstanceOperation):
id = 'mount_store'
name = _("mount store")
description = _(
"This operation exposes your personal files and your store"
"credentials to other users of this virtual machine (if any).")
"This operation attaches your personal file store. Other users who "
"has acces to this machine can see these files as well."
)
acl_level = "owner"
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