diff options
author | liyingjun <yingjun.li@kylin-cloud.com> | 2015-07-29 11:24:30 +0800 |
---|---|---|
committer | liyingjun <yingjun.li@kylin-cloud.com> | 2015-07-29 11:24:30 +0800 |
commit | 488e5eb2908472c2f61319fcb031120037851ccc (patch) | |
tree | 6a06016639de7b3a19b662f992546ae23e1f0b1b /openstack_dashboard/dashboards/project/network_topology | |
parent | 55d88786fdd50e180ebe5a8d3d6f77bf4027ef63 (diff) | |
download | horizon-488e5eb2908472c2f61319fcb031120037851ccc.tar.gz |
Disable lagency launch when LAUNCH_INSTANCE_LEGACY_ENABLED is False
The network topology page doesn't honor LAUNCH_INSTANCE_LEGACY_ENABLED,
even when LAUNCH_INSTANCE_LEGACY_ENABLED is set to false, the lagency
launch wizard is still shown.
Change-Id: I30167e28cee174da5b2cdfe41edff4e3f375d88e
Closes-bug: #1478710
Diffstat (limited to 'openstack_dashboard/dashboards/project/network_topology')
-rw-r--r-- | openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html | 2 | ||||
-rw-r--r-- | openstack_dashboard/dashboards/project/network_topology/views.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html index 29e97fa36..1762914d0 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html @@ -32,8 +32,10 @@ {% url 'horizon:project:network_topology:index' as networkUrl %} <a ng-controller="LaunchInstanceModalController" ng-click="openLaunchInstanceWizard({successUrl: '{{networkUrl}}', dismissUrl: '{{networkUrl}}'})" id="instances__action_launch" class="btn btn-default btn-sm btn-launch ajax-modal {% if instance_quota_exceeded %}disabled{% endif %}"><span class="fa fa-cloud-upload"></span> {% if instance_quota_exceeded %}{% trans "Launch Instance (Quota exceeded)"%}{% else %}{% trans "Launch Instance"%}{% endif %}</a> {% endif %} + {% if show_legacy_launch %} <a href="{% url 'horizon:project:network_topology:launchinstance' %}" id="instances__action_launch" class="btn btn-default btn-sm btn-launch ajax-modal {% if instance_quota_exceeded %}disabled{% endif %}"><span class="fa fa-cloud-upload"></span> {% if instance_quota_exceeded %}{% trans "Launch Instance (Quota exceeded)"%}{% else %}{% trans "Launch Instance"%}{% endif %}</a> {% endif %} + {% endif %} {% if create_network_allowed %} <a href="{% url 'horizon:project:network_topology:createnetwork' %}" id="networks__action_create" class="btn btn-default btn-sm ajax-modal {% if network_quota_exceeded %}disabled{% endif %}"><span class="fa fa-plus"></span> {% if network_quota_exceeded %}{% trans "Create Network (Quota exceeded)"%}{% else %}{% trans "Create Network"%}{% endif %}</a> {% endif %} diff --git a/openstack_dashboard/dashboards/project/network_topology/views.py b/openstack_dashboard/dashboards/project/network_topology/views.py index 23b50b8c5..d8d294130 100644 --- a/openstack_dashboard/dashboards/project/network_topology/views.py +++ b/openstack_dashboard/dashboards/project/network_topology/views.py @@ -132,6 +132,8 @@ class NetworkTopologyView(views.HorizonTemplateView): settings, 'CONSOLE_TYPE', 'AUTO') context['show_ng_launch'] = getattr( settings, 'LAUNCH_INSTANCE_NG_ENABLED', False) + context['show_legacy_launch'] = getattr( + settings, 'LAUNCH_INSTANCE_LEGACY_ENABLED', True) return context |