Remove serial console hardcode url

Change-Id: I32aa1cfcfeb504d3c7fc47d244314b2ff11f3031
This commit is contained in:
jingliuqing 2015-06-26 17:14:05 +08:00
parent 3917d8e196
commit 8bf9025cda
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@
# under the License.
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
@ -74,7 +75,8 @@ class ConsoleTab(tabs.Tab):
# For serial console, the url is different from VNC, etc.
# because it does not include parms for title and token
if console_type == "SERIAL":
console_url = "/project/instances/%s/serial" % (instance.id)
console_url = reverse('horizon:project:instances:serial',
args=[instance.id])
except exceptions.NotAvailable:
exceptions.handle(request, ignore=True, force_log=True)