Rename instances panel to servers
instances is duplicate with nova instances Change-Id: I44ffcb64d5830e60dd66b07c9c7e97e08d5c46aa
This commit is contained in:
parent
13c9446633
commit
78a9fac756
|
@ -1,11 +0,0 @@
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% load i18n %}
|
|
||||||
{% block title %}{% trans "Bare Metal Servers" %}{% endblock %}
|
|
||||||
|
|
||||||
{% block page_header %}
|
|
||||||
<hz-page-header header="{% trans "Bare Metal Servers" %}"></hz-page-header>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
|
||||||
<ng-include src="'{{ STATIC_URL }}dashboard/project/baremetals/server-list/server-list.html'"></ng-include>
|
|
||||||
{% endblock %}
|
|
|
@ -1,20 +0,0 @@
|
||||||
# Copyright 2017 Huawei Technologies Co.,LTD.
|
|
||||||
# All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
from django.views import generic
|
|
||||||
|
|
||||||
|
|
||||||
class IndexView(generic.TemplateView):
|
|
||||||
template_name = 'project/baremetals/index.html'
|
|
|
@ -21,16 +21,16 @@ from openstack_dashboard.api import base
|
||||||
from openstack_dashboard.dashboards.project import dashboard
|
from openstack_dashboard.dashboards.project import dashboard
|
||||||
|
|
||||||
|
|
||||||
class Instances(horizon.Panel):
|
class Servers(horizon.Panel):
|
||||||
name = _("Instances")
|
name = _("Servers")
|
||||||
slug = 'instances'
|
slug = 'servers'
|
||||||
|
|
||||||
def allowed(self, context):
|
def allowed(self, context):
|
||||||
request = context['request']
|
request = context['request']
|
||||||
if not base.is_service_enabled(request, 'baremetal_compute'):
|
if not base.is_service_enabled(request, 'baremetal_compute'):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return super(Instances, self).allowed(context)
|
return super(Servers, self).allowed(context)
|
||||||
|
|
||||||
def nav(self, context):
|
def nav(self, context):
|
||||||
request = context['request']
|
request = context['request']
|
||||||
|
@ -39,4 +39,4 @@ class Instances(horizon.Panel):
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
dashboard.Project.register(Instances)
|
dashboard.Project.register(Servers)
|
|
@ -14,10 +14,10 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from horizon.browsers import views
|
||||||
|
|
||||||
import mogan_ui.api.rest_api # noqa
|
title = _("Servers")
|
||||||
from mogan_ui.content.baremetals import views
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
url('', views.AngularIndexView.as_view(title=title), name='index'),
|
||||||
]
|
]
|
|
@ -11,11 +11,11 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||||
PANEL = 'baremetal_compute.instances'
|
PANEL = 'servers'
|
||||||
# The slug of the panel group the PANEL is associated with.
|
# The slug of the panel group the PANEL is associated with.
|
||||||
PANEL_GROUP = 'baremetal_compute'
|
PANEL_GROUP = 'baremetal_compute'
|
||||||
# The slug of the dashboard the PANEL associated with. Required.
|
# The slug of the dashboard the PANEL associated with. Required.
|
||||||
PANEL_DASHBOARD = 'project'
|
PANEL_DASHBOARD = 'project'
|
||||||
|
|
||||||
# Python panel class of the PANEL to be added.
|
# Python panel class of the PANEL to be added.
|
||||||
ADD_PANEL = 'mogan_ui.content.baremetals.panel.Baremetals'
|
ADD_PANEL = 'mogan_ui.content.baremetals.panel.Servers'
|
Loading…
Reference in New Issue