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
|
||||
|
||||
|
||||
class Instances(horizon.Panel):
|
||||
name = _("Instances")
|
||||
slug = 'instances'
|
||||
class Servers(horizon.Panel):
|
||||
name = _("Servers")
|
||||
slug = 'servers'
|
||||
|
||||
def allowed(self, context):
|
||||
request = context['request']
|
||||
if not base.is_service_enabled(request, 'baremetal_compute'):
|
||||
return False
|
||||
else:
|
||||
return super(Instances, self).allowed(context)
|
||||
return super(Servers, self).allowed(context)
|
||||
|
||||
def nav(self, context):
|
||||
request = context['request']
|
||||
@ -39,4 +39,4 @@ class Instances(horizon.Panel):
|
||||
else:
|
||||
return True
|
||||
|
||||
dashboard.Project.register(Instances)
|
||||
dashboard.Project.register(Servers)
|
@ -14,10 +14,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
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
|
||||
from mogan_ui.content.baremetals import views
|
||||
|
||||
title = _("Servers")
|
||||
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.
|
||||
|
||||
# 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.
|
||||
PANEL_GROUP = 'baremetal_compute'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
|
||||
# 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…
x
Reference in New Issue
Block a user