Commit d148b808 by Kálmán Viktor

dashboard: mount button

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