Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
082ac7d4
authored
Jul 11, 2019
by
Bálint Máhonfai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add import and export to ui
parent
fc5f8d6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
circle/dashboard/templates/dashboard/_disk-list-element.html
+19
-5
circle/dashboard/templates/dashboard/vm-detail/_disk-operations.html
+6
-6
No files found.
circle/dashboard/templates/dashboard/_disk-list-element.html
View file @
082ac7d4
...
...
@@ -6,15 +6,29 @@
<span
class=
"operation-wrapper pull-right"
>
{% if d.is_exportable %}
{% if op.export_disk %}
<a
href=
"{{ op.export_disk.get_url }}?disk={{ d.pk }}"
class=
"btn btn-xs btn-{{ op.export_disk.effect }} operation disk-export-btn
{% if op.export_disk.disabled %}disabled{% endif %}"
>
<i
class=
"fa fa-{{ op.export_disk.icon }} fa-fw-12"
></i>
{% trans "Export" %}
</a>
{% endif %}
{% else %}
<small
class=
"btn-xs"
>
{% trans "Not exportable" %}
</small>
{% endif %}
{% if d.is_resizable %}
{% if op.resize_disk %}
<a
href=
"{{ op.resize_disk.get_url }}?disk={{
d.pk
}}"
class=
"btn btn-xs btn-{{ op.resize_disk.effect }} operation disk-resize-btn
<a
href=
"{{ op.resize_disk.get_url }}?disk={{
d.pk
}}"
class=
"btn btn-xs btn-{{ op.resize_disk.effect }} operation disk-resize-btn
{% if op.resize_disk.disabled %}disabled{% endif %}"
>
<i
class=
"fa fa-{{ op.resize_disk.icon }} fa-fw-12"
></i>
{% trans "Resize" %}
</a>
{% else %}
<a
href=
"{% url "
request
.
views
.
request-resize
"
vm_pk=
instance.pk
disk_pk=
d.pk
%}"
class=
"btn btn-xs btn-primary operation"
>
<a
href=
"{% url "
request
.
views
.
request-resize
"
vm_pk=
instance.pk
disk_pk=
d.pk
%}"
class=
"btn btn-xs btn-primary operation"
>
<i
class=
"fa fa-arrows-alt fa-fw-12"
></i>
{% trans "Request resize" %}
</a>
{% endif %}
...
...
@@ -24,8 +38,8 @@
</small>
{% endif %}
{% if op.remove_disk %}
<a
href=
"{{ op.remove_disk.get_url }}?disk={{
d.pk
}}"
class=
"btn btn-xs btn-{{ op.remove_disk.effect
}} operation disk-remove-btn
<a
href=
"{{ op.remove_disk.get_url }}?disk={{
d.pk
}}"
class=
"btn btn-xs btn-{{ op.remove_disk.effect
}} operation disk-remove-btn
{% if op.remove_disk.disabled %}disabled{% endif %}"
>
<i
class=
"fa fa-{{ op.remove_disk.icon }} fa-fw-12"
></i>
{% trans "Remove" %}
</a>
...
...
circle/dashboard/templates/dashboard/vm-detail/_disk-operations.html
View file @
082ac7d4
{% load i18n %}
{% for op in ops %}
{% if op.is_disk_operation %}
<a
href=
"{{
op.get_url
}}"
class=
"btn btn-success btn-xs
operation operation-{{
op.op
}}"
>
<i
class=
"fa fa-{{
op.icon
}} fa-fw-12"
></i>
{{op.name
}}
</a>
{% endif %}
{% if op.is_disk_operation %}
<a
href=
"{{
op.get_url
}}"
class=
"btn btn-success btn-xs
operation operation-{{
op.op
}}"
>
<i
class=
"fa fa-{{
op.icon
}} fa-fw-12"
></i>
{{ op.name
}}
</a>
{% endif %}
{% endfor %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment