Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6ab6dba2
authored
Feb 09, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: extend Template model
parent
bc204dd0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
one/migrations/0008_auto__add_field_template_description__add_field_template_system.py
+0
-0
one/models.py
+10
-0
one/templates/box-vmlist.html
+2
-1
No files found.
one/migrations/0008_auto__add_field_template_description__add_field_template_system.py
0 → 100644
View file @
6ab6dba2
This diff is collapsed.
Click to expand it.
one/models.py
View file @
6ab6dba2
...
@@ -244,6 +244,16 @@ class Template(models.Model):
...
@@ -244,6 +244,16 @@ class Template(models.Model):
state
=
models
.
CharField
(
max_length
=
10
,
choices
=
TEMPLATE_STATES
,
default
=
'NEW'
)
state
=
models
.
CharField
(
max_length
=
10
,
choices
=
TEMPLATE_STATES
,
default
=
'NEW'
)
public
=
models
.
BooleanField
(
verbose_name
=
_
(
'public'
),
default
=
False
,
public
=
models
.
BooleanField
(
verbose_name
=
_
(
'public'
),
default
=
False
,
help_text
=
_
(
'If other users can derive templates of this one.'
))
help_text
=
_
(
'If other users can derive templates of this one.'
))
description
=
models
.
TextField
(
verbose_name
=
_
(
'description'
),
blank
=
True
)
system
=
models
.
TextField
(
verbose_name
=
_
(
'operating system'
),
blank
=
True
,
help_text
=
(
_
(
'Name of operating system in format like "
%
s".'
)
%
"Ubuntu 12.04 LTS Desktop amd64"
))
def
os_type
(
self
):
if
self
.
access_type
==
'rdp'
:
return
"win"
else
:
return
"linux"
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
self
.
name
return
self
.
name
...
...
one/templates/box-vmlist.html
View file @
6ab6dba2
...
@@ -49,7 +49,8 @@
...
@@ -49,7 +49,8 @@
<div
class=
"details-container"
>
<div
class=
"details-container"
>
<ul>
<ul>
<li
class=
"name"
>
{% trans "Hostname" %}:
<span
class=
"value"
>
{{i.name}}
</span></li>
<li
class=
"name"
>
{% trans "Hostname" %}:
<span
class=
"value"
>
{{i.name}}
</span></li>
<li
class=
"os-linux"
>
{% trans "System" %}:
<span
class=
"value"
>
{{i.template.disk.name}}
</span></li>
<li
class=
"os-{{i.template.os_type}}"
>
{% trans "System" %}:
<span
class=
"value"
>
{{i.template.system}}
</span></li>
<li
class=
"tpl"
>
{% trans "Template" %}:
<span
class=
"value"
>
{{i.template.name}}
</span></li>
<li
class=
"type"
>
{% trans "Size" %}:
<span
class=
"value"
>
{{i.template.instance_type.name}}
</span></li>
<li
class=
"type"
>
{% trans "Size" %}:
<span
class=
"value"
>
{{i.template.instance_type.name}}
</span></li>
<li
class=
"date"
>
{% trans "Created at" %}:
<span
class=
"value"
>
{{i.created_at}}
</span></li>
<li
class=
"date"
>
{% trans "Created at" %}:
<span
class=
"value"
>
{{i.created_at}}
</span></li>
<li
class=
"date"
>
{% trans "Expiration" %}:
<span
class=
"value"
><abbr
title=
"1 nap, 5 óra, 34 perc"
>
1 nap
</abbr></span></li>
<li
class=
"date"
>
{% trans "Expiration" %}:
<span
class=
"value"
><abbr
title=
"1 nap, 5 óra, 34 perc"
>
1 nap
</abbr></span></li>
...
...
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