Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Hide 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 @@
</h3>
</div>
<div
class=
"panel-body"
>
{% blocktrans with owner=instance.owner fqdn=instance.primary_host %}
{{ owner }} offered to take the ownership of virtual machine {{fqdn}}.
{% blocktrans with owner=instance.owner name=instance.name id=instance.id%}
<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?
{% endblocktrans %}
<div
class=
"pull-right"
>
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
1d2550c7
...
...
@@ -25,7 +25,7 @@
<i
class=
"fa {{ i.get_status_icon }}"
title=
"{{ i.get_status_display }}"
></i>
{{ i.name }}
</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 }}"
>
{% if i.fav %}
<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):
'pk'
:
i
.
pk
,
'name'
:
i
.
name
,
'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
(),
'fav'
:
i
.
pk
in
favs
,
}
for
i
in
instances
]
...
...
circle/locale/hu/LC_MESSAGES/django.po
View file @
1d2550c7
...
...
@@ -2114,13 +2114,14 @@ msgstr "Átruházás"
#, python-format
msgid ""
"\n"
"
%(owner)s offered to take the ownership of virtual machine
"
"
%(fqdn)s
.\n"
"
<strong>%(owner)s</strong> offered to take the ownership of\n
"
"
virtual machine <strong>%(name)s (%(id)s)</strong>
.\n"
" Do you accept the responsility of being the host's owner?\n"
" "
msgstr ""
"\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"
" "
...
...
circle/vm/models/instance.py
View file @
1d2550c7
...
...
@@ -613,6 +613,13 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
except
:
return
@property
def
short_hostname
(
self
):
try
:
return
self
.
primary_host
.
hostname
except
AttributeError
:
return
self
.
vm_name
def
get_vm_desc
(
self
):
"""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):
with
act
.
sub_activity
(
'set_hostname'
,
readable_name
=
ugettext_noop
(
'set hostname'
)):
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
):
...
...
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