Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
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
8380e20d
authored
Jan 02, 2023
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
b15a5b61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletions
+18
-1
circle/dashboard/templates/dashboard/datastore-create.html
+13
-0
circle/dashboard/templates/dashboard/storage/detail.html
+1
-0
circle/storage/models.py
+3
-1
circle/vm/operations.py
+1
-0
No files found.
circle/dashboard/templates/dashboard/datastore-create.html
0 → 100644
View file @
8380e20d
{% load crispy_forms_tags %}
{% load i18n %}
<p
class=
"text-muted"
>
{% trans "Create datastore" %}
</p>
<form
method=
"POST"
action=
"{% url "
dashboard
.
views
.
group-create
"
%}"
>
{% csrf_token %}
{% crispy form %}
</form>
\ No newline at end of file
circle/dashboard/templates/dashboard/storage/detail.html
View file @
8380e20d
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
{% empty %}
{% empty %}
{% trans "None" %}
{% trans "None" %}
{% endfor %}
{% endfor %}
<a
href=
""
class=
"badge badge-primary"
><i
class=
"fa fa-plus"
></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
circle/storage/models.py
View file @
8380e20d
...
@@ -430,7 +430,9 @@ class Disk(TimeStampedModel):
...
@@ -430,7 +430,9 @@ class Disk(TimeStampedModel):
@classmethod
@classmethod
def
__create
(
cls
,
user
,
datastore
,
params
):
def
__create
(
cls
,
user
,
datastore
,
params
):
datastore
=
params
.
pop
(
'datastore'
,
DataStore
.
objects
.
filter
(
name
=
datastore
)
.
get
())
if
isinstance
(
datastore
,
str
):
datastore
=
DataStore
.
objects
.
filter
(
name
=
datastore
)
.
get
()
datastore
=
params
.
pop
(
'datastore'
,
datastore
)
filename
=
params
.
pop
(
'filename'
,
str
(
uuid
.
uuid4
()))
filename
=
params
.
pop
(
'filename'
,
str
(
uuid
.
uuid4
()))
disk
=
cls
(
filename
=
filename
,
datastore
=
datastore
,
**
params
)
disk
=
cls
(
filename
=
filename
,
datastore
=
datastore
,
**
params
)
return
disk
return
disk
...
...
circle/vm/operations.py
View file @
8380e20d
...
@@ -880,6 +880,7 @@ class SaveAsTemplateOperation(InstanceOperation):
...
@@ -880,6 +880,7 @@ class SaveAsTemplateOperation(InstanceOperation):
'max_ram_size'
:
self
.
instance
.
max_ram_size
,
'max_ram_size'
:
self
.
instance
.
max_ram_size
,
'name'
:
name
or
self
.
_rename
(
self
.
instance
.
name
),
'name'
:
name
or
self
.
_rename
(
self
.
instance
.
name
),
'num_cores'
:
self
.
instance
.
num_cores
,
'num_cores'
:
self
.
instance
.
num_cores
,
'num_cores_max'
:
self
.
instance
.
num_cores_max
,
'owner'
:
user
,
'owner'
:
user
,
'parent'
:
self
.
instance
.
template
or
None
,
# Can be problem
'parent'
:
self
.
instance
.
template
or
None
,
# Can be problem
'priority'
:
self
.
instance
.
priority
,
'priority'
:
self
.
instance
.
priority
,
...
...
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