diff --git a/mogan_ui/content/baremetals/templates/baremetals/index.html b/mogan_ui/content/baremetals/templates/baremetals/index.html
deleted file mode 100644
index b926735..0000000
--- a/mogan_ui/content/baremetals/templates/baremetals/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Bare Metal Servers" %}{% endblock %}
-
-{% block page_header %}
-
-{% endblock %}
-
-{% block main %}
-
-{% endblock %}
diff --git a/mogan_ui/content/baremetals/views.py b/mogan_ui/content/baremetals/views.py
deleted file mode 100644
index b56ceee..0000000
--- a/mogan_ui/content/baremetals/views.py
+++ /dev/null
@@ -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'
diff --git a/mogan_ui/content/baremetals/__init__.py b/mogan_ui/content/servers/__init__.py
similarity index 100%
rename from mogan_ui/content/baremetals/__init__.py
rename to mogan_ui/content/servers/__init__.py
diff --git a/mogan_ui/content/baremetals/panel.py b/mogan_ui/content/servers/panel.py
similarity index 87%
rename from mogan_ui/content/baremetals/panel.py
rename to mogan_ui/content/servers/panel.py
index b11473d..93c90e3 100644
--- a/mogan_ui/content/baremetals/panel.py
+++ b/mogan_ui/content/servers/panel.py
@@ -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)
diff --git a/mogan_ui/content/baremetals/urls.py b/mogan_ui/content/servers/urls.py
similarity index 78%
rename from mogan_ui/content/baremetals/urls.py
rename to mogan_ui/content/servers/urls.py
index f0d34a2..30792d1 100644
--- a/mogan_ui/content/baremetals/urls.py
+++ b/mogan_ui/content/servers/urls.py
@@ -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'),
]
diff --git a/mogan_ui/enabled/_1820_project_baremetal_instances_panel.py b/mogan_ui/enabled/_1820_project_baremetal_servers_panel.py
similarity index 90%
rename from mogan_ui/enabled/_1820_project_baremetal_instances_panel.py
rename to mogan_ui/enabled/_1820_project_baremetal_servers_panel.py
index cb5b1ba..2f40004 100644
--- a/mogan_ui/enabled/_1820_project_baremetal_instances_panel.py
+++ b/mogan_ui/enabled/_1820_project_baremetal_servers_panel.py
@@ -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'