summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html
diff options
context:
space:
mode:
authorBradley Jones <jones.bradley@me.com>2014-09-10 16:48:03 +0100
committerBradley Jones <jones.bradley@me.com>2014-10-20 12:08:41 +0100
commit7081e14fbbf6e8c7efae061329105a3d063a3c67 (patch)
treeba6b42538b923ce15cc86965769ec9e73a78a02c /openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html
parentcdb54f3b4523134170083a607ad09d5967917302 (diff)
downloadhorizon-7081e14fbbf6e8c7efae061329105a3d063a3c67.tar.gz
Create buttons in network topology respect quotas
Network topology create (networks, routers, instances) buttons should respect quotas and the buttons should show feedback if the quota is exceeded. Change-Id: Ide0e461d598b0d623192a5b2455a0ad3340c5683 Closes-bug: 1367678
Diffstat (limited to 'openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html')
-rw-r--r--openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html6
1 files changed, 3 insertions, 3 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 bdb4d5ea4..21b69d041 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
@@ -25,13 +25,13 @@
<div class="launchButtons">
{% if launch_instance_allowed %}
- <a href="{% url 'horizon:project:network_topology:launchinstance' %}" id="instances__action_launch" class="btn btn-default btn-sm btn-launch ajax-modal"><span class="glyphicon glyphicon-cloud-upload"></span> {%trans "Launch Instance" %}</a>
+ <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="glyphicon glyphicon-cloud-upload"></span> {% if instance_quota_exceeded %}{% trans "Launch Instance (Quota exceeded)"%}{% else %}{% trans "Launch Instance"%}{% endif %}</a>
{% 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"><span class="glyphicon glyphicon-plus"></span> {%trans "Create Network" %}</a>
+ <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="glyphicon glyphicon-plus"></span> {% if network_quota_exceeded %}{% trans "Create Network (Quota exceeded)"%}{% else %}{% trans "Create Network"%}{% endif %}</a>
{% endif %}
{% if create_router_allowed %}
- <a href="{% url 'horizon:project:network_topology:createrouter' %}" id="Routers__action_create" class="btn btn-default btn-sm ajax-modal"><span class="glyphicon glyphicon-plus"></span> {%trans "Create Router" %}</a>
+ <a href="{% url 'horizon:project:network_topology:createrouter' %}" id="Routers__action_create" class="btn btn-default btn-sm ajax-modal {% if router_quota_exceeded %}disabled{% endif %}"><span class="glyphicon glyphicon-plus"></span> {% if router_quota_exceeded %}{% trans "Create Router (Quota exceeded)"%}{% else %}{% trans "Create Router"%}{% endif %}</a>
{% endif %}
</div>
</div>