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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
1d2550c7
authored
Sep 08, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-set_hostname' into 'master'
Fix Set Hostname
parents
2b450c1f
99602bbd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
8 deletions
+17
-8
circle/dashboard/templates/dashboard/confirm/base-transfer-ownership.html
+3
-2
circle/dashboard/templates/dashboard/index-vm.html
+1
-1
circle/dashboard/views.py
+1
-1
circle/locale/hu/LC_MESSAGES/django.po
+4
-3
circle/vm/models/instance.py
+7
-0
circle/vm/tasks/local_agent_tasks.py
+1
-1
No files found.
circle/dashboard/templates/dashboard/confirm/base-transfer-ownership.html
View file @
1d2550c7
...
@@ -10,8 +10,9 @@
...
@@ -10,8 +10,9 @@
</h3>
</h3>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
{% blocktrans with owner=instance.owner fqdn=instance.primary_host %}
{% blocktrans with owner=instance.owner name=instance.name id=instance.id%}
{{ owner }} offered to take the ownership of virtual machine {{fqdn}}.
<strong>
{{ owner }}
</strong>
offered to take the ownership of
virtual machine
<strong>
{{name}} ({{id}})
</strong>
.
Do you accept the responsility of being the host's owner?
Do you accept the responsility of being the host's owner?
{% endblocktrans %}
{% endblocktrans %}
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
1d2550c7
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<i
class=
"fa {{ i.get_status_icon }}"
title=
"{{ i.get_status_display }}"
></i>
<i
class=
"fa {{ i.get_status_icon }}"
title=
"{{ i.get_status_display }}"
></i>
{{ i.name }}
{{ i.name }}
</span>
</span>
<small
class=
"text-muted"
>
{{ i.
primary_host.
hostname }}
</small>
<small
class=
"text-muted"
>
{{ i.
short_
hostname }}
</small>
<div
class=
"pull-right dashboard-vm-favourite"
data-vm=
"{{ i.pk }}"
>
<div
class=
"pull-right dashboard-vm-favourite"
data-vm=
"{{ i.pk }}"
>
{% if i.fav %}
{% if i.fav %}
<i
class=
"fa fa-star text-primary title-favourite"
title=
"{% trans "
Unfavourite
"
%}"
></i>
<i
class=
"fa fa-star text-primary title-favourite"
title=
"{% trans "
Unfavourite
"
%}"
></i>
...
...
circle/dashboard/views.py
View file @
1d2550c7
...
@@ -1883,7 +1883,7 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
...
@@ -1883,7 +1883,7 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
'pk'
:
i
.
pk
,
'pk'
:
i
.
pk
,
'name'
:
i
.
name
,
'name'
:
i
.
name
,
'icon'
:
i
.
get_status_icon
(),
'icon'
:
i
.
get_status_icon
(),
'host'
:
""
if
not
i
.
primary_host
else
i
.
primary_host
.
hostname
,
'host'
:
i
.
short_
hostname
,
'status'
:
i
.
get_status_display
(),
'status'
:
i
.
get_status_display
(),
'fav'
:
i
.
pk
in
favs
,
'fav'
:
i
.
pk
in
favs
,
}
for
i
in
instances
]
}
for
i
in
instances
]
...
...
circle/locale/hu/LC_MESSAGES/django.po
View file @
1d2550c7
...
@@ -2114,13 +2114,14 @@ msgstr "Átruházás"
...
@@ -2114,13 +2114,14 @@ msgstr "Átruházás"
#, python-format
#, python-format
msgid ""
msgid ""
"\n"
"\n"
"
%(owner)s offered to take the ownership of virtual machine
"
"
<strong>%(owner)s</strong> offered to take the ownership of\n
"
"
%(fqdn)s
.\n"
"
virtual machine <strong>%(name)s (%(id)s)</strong>
.\n"
" Do you accept the responsility of being the host's owner?\n"
" Do you accept the responsility of being the host's owner?\n"
" "
" "
msgstr ""
msgstr ""
"\n"
"\n"
" %(owner)s kezdeményezte a(z) %(fqdn)s virtuális gép átruházását.\n"
" <strong>%(owner)s</strong> kezdeményezte a(z) <strong>%(name)s\n"
" (%(id)s)</strong> virtuális gép átruházását.\n"
" Elfogadja a gép birtoklásával járó felelősséget?\n"
" Elfogadja a gép birtoklásával járó felelősséget?\n"
" "
" "
...
...
circle/vm/models/instance.py
View file @
1d2550c7
...
@@ -613,6 +613,13 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -613,6 +613,13 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
except
:
except
:
return
return
@property
def
short_hostname
(
self
):
try
:
return
self
.
primary_host
.
hostname
except
AttributeError
:
return
self
.
vm_name
def
get_vm_desc
(
self
):
def
get_vm_desc
(
self
):
"""Serialize Instance object to vmdriver.
"""Serialize Instance object to vmdriver.
"""
"""
...
...
circle/vm/tasks/local_agent_tasks.py
View file @
1d2550c7
...
@@ -46,7 +46,7 @@ def send_init_commands(instance, act):
...
@@ -46,7 +46,7 @@ def send_init_commands(instance, act):
with
act
.
sub_activity
(
'set_hostname'
,
with
act
.
sub_activity
(
'set_hostname'
,
readable_name
=
ugettext_noop
(
'set hostname'
)):
readable_name
=
ugettext_noop
(
'set hostname'
)):
set_hostname
.
apply_async
(
set_hostname
.
apply_async
(
queue
=
queue
,
args
=
(
vm
,
instance
.
primary_host
.
hostname
))
queue
=
queue
,
args
=
(
vm
,
instance
.
short_
hostname
))
def
send_networking_commands
(
instance
,
act
):
def
send_networking_commands
(
instance
,
act
):
...
...
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