diff --git a/horizon/dashboards/nova/__init__.py b/horizon/dashboards/admin/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/__init__.py
rename to horizon/dashboards/admin/__init__.py
diff --git a/horizon/dashboards/syspanel/dashboard.py b/horizon/dashboards/admin/dashboard.py
similarity index 90%
rename from horizon/dashboards/syspanel/dashboard.py
rename to horizon/dashboards/admin/dashboard.py
index a25c9fca4..5eaf66f8c 100644
--- a/horizon/dashboards/syspanel/dashboard.py
+++ b/horizon/dashboards/admin/dashboard.py
@@ -20,18 +20,18 @@ import horizon
class SystemPanels(horizon.PanelGroup):
- slug = "syspanel"
+ slug = "admin"
name = _("System Panel")
panels = ('overview', 'instances', 'volumes', 'services', 'flavors',
'images', 'projects', 'users', 'quotas', 'networks',)
-class Syspanel(horizon.Dashboard):
+class Admin(horizon.Dashboard):
name = _("Admin")
- slug = "syspanel"
+ slug = "admin"
panels = (SystemPanels,)
default_panel = 'overview'
permissions = ('openstack.roles.admin',)
-horizon.register(Syspanel)
+horizon.register(Admin)
diff --git a/horizon/dashboards/nova/access_and_security/__init__.py b/horizon/dashboards/admin/flavors/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/access_and_security/__init__.py
rename to horizon/dashboards/admin/flavors/__init__.py
diff --git a/horizon/dashboards/syspanel/flavors/forms.py b/horizon/dashboards/admin/flavors/forms.py
similarity index 100%
rename from horizon/dashboards/syspanel/flavors/forms.py
rename to horizon/dashboards/admin/flavors/forms.py
diff --git a/horizon/dashboards/syspanel/flavors/panel.py b/horizon/dashboards/admin/flavors/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/flavors/panel.py
rename to horizon/dashboards/admin/flavors/panel.py
index 843e6bff5..b09a1457b 100644
--- a/horizon/dashboards/syspanel/flavors/panel.py
+++ b/horizon/dashboards/admin/flavors/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Flavors(horizon.Panel):
@@ -29,4 +29,4 @@ class Flavors(horizon.Panel):
slug = 'flavors'
-dashboard.Syspanel.register(Flavors)
+dashboard.Admin.register(Flavors)
diff --git a/horizon/dashboards/syspanel/flavors/tables.py b/horizon/dashboards/admin/flavors/tables.py
similarity index 94%
rename from horizon/dashboards/syspanel/flavors/tables.py
rename to horizon/dashboards/admin/flavors/tables.py
index efa9b5f6d..5084c6c4b 100644
--- a/horizon/dashboards/syspanel/flavors/tables.py
+++ b/horizon/dashboards/admin/flavors/tables.py
@@ -20,14 +20,14 @@ class DeleteFlavor(tables.DeleteAction):
class CreateFlavor(tables.LinkAction):
name = "create"
verbose_name = _("Create Flavor")
- url = "horizon:syspanel:flavors:create"
+ url = "horizon:admin:flavors:create"
classes = ("ajax-modal", "btn-create")
class EditFlavor(tables.LinkAction):
name = "edit"
verbose_name = _("Edit Flavor")
- url = "horizon:syspanel:flavors:edit"
+ url = "horizon:admin:flavors:edit"
classes = ("ajax-modal", "btn-edit")
diff --git a/horizon/dashboards/syspanel/flavors/templates/flavors/_create.html b/horizon/dashboards/admin/flavors/templates/flavors/_create.html
similarity index 77%
rename from horizon/dashboards/syspanel/flavors/templates/flavors/_create.html
rename to horizon/dashboards/admin/flavors/templates/flavors/_create.html
index 7dead7928..da6777bbe 100644
--- a/horizon/dashboards/syspanel/flavors/templates/flavors/_create.html
+++ b/horizon/dashboards/admin/flavors/templates/flavors/_create.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_flavor_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:flavors:create %}{% endblock %}
+{% block form_action %}{% url horizon:admin:flavors:create %}{% endblock %}
{% block modal_id %}create_flavor_modal{% endblock %}
{% block modal-header %}{% trans "Create Flavor" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/flavors/templates/flavors/_edit.html b/horizon/dashboards/admin/flavors/templates/flavors/_edit.html
similarity index 79%
rename from horizon/dashboards/syspanel/flavors/templates/flavors/_edit.html
rename to horizon/dashboards/admin/flavors/templates/flavors/_edit.html
index fc31b69af..b249ff027 100644
--- a/horizon/dashboards/syspanel/flavors/templates/flavors/_edit.html
+++ b/horizon/dashboards/admin/flavors/templates/flavors/_edit.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}edit_flavor_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:flavors:edit flavor_id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:flavors:edit flavor_id %}{% endblock %}
{% block modal_id %}edit_flavor_modal{% endblock %}
{% block modal-header %}{% trans "Edit Flavor" %}{% endblock %}
@@ -22,5 +22,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/flavors/templates/flavors/create.html b/horizon/dashboards/admin/flavors/templates/flavors/create.html
similarity index 84%
rename from horizon/dashboards/syspanel/flavors/templates/flavors/create.html
rename to horizon/dashboards/admin/flavors/templates/flavors/create.html
index d8c6b0364..377ed0e67 100644
--- a/horizon/dashboards/syspanel/flavors/templates/flavors/create.html
+++ b/horizon/dashboards/admin/flavors/templates/flavors/create.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include "syspanel/flavors/_create.html" %}
+ {% include "admin/flavors/_create.html" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/flavors/templates/flavors/edit.html b/horizon/dashboards/admin/flavors/templates/flavors/edit.html
similarity index 84%
rename from horizon/dashboards/syspanel/flavors/templates/flavors/edit.html
rename to horizon/dashboards/admin/flavors/templates/flavors/edit.html
index 3076a5902..8a634b44b 100644
--- a/horizon/dashboards/syspanel/flavors/templates/flavors/edit.html
+++ b/horizon/dashboards/admin/flavors/templates/flavors/edit.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include "syspanel/flavors/_edit.html" %}
+ {% include "admin/flavors/_edit.html" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/flavors/templates/flavors/index.html b/horizon/dashboards/admin/flavors/templates/flavors/index.html
similarity index 100%
rename from horizon/dashboards/syspanel/flavors/templates/flavors/index.html
rename to horizon/dashboards/admin/flavors/templates/flavors/index.html
diff --git a/horizon/dashboards/syspanel/flavors/tests.py b/horizon/dashboards/admin/flavors/tests.py
similarity index 87%
rename from horizon/dashboards/syspanel/flavors/tests.py
rename to horizon/dashboards/admin/flavors/tests.py
index a9cd605d3..c91054764 100644
--- a/horizon/dashboards/syspanel/flavors/tests.py
+++ b/horizon/dashboards/admin/flavors/tests.py
@@ -24,10 +24,10 @@ class FlavorsTests(test.BaseAdminViewTests):
ephemeral=eph).AndReturn(flavor)
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:flavors:create')
+ url = reverse('horizon:admin:flavors:create')
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
- self.assertTemplateUsed(resp, "syspanel/flavors/create.html")
+ self.assertTemplateUsed(resp, "admin/flavors/create.html")
data = {'name': flavor.name,
'vcpus': flavor.vcpus,
@@ -36,7 +36,7 @@ class FlavorsTests(test.BaseAdminViewTests):
'eph_gb': eph}
resp = self.client.post(url, data)
self.assertRedirectsNoFollow(resp,
- reverse("horizon:syspanel:flavors:index"))
+ reverse("horizon:admin:flavors:index"))
def test_edit_flavor(self):
flavors = self.flavors.list()
@@ -65,10 +65,10 @@ class FlavorsTests(test.BaseAdminViewTests):
ephemeral=eph).AndReturn(flavor)
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:flavors:edit', args=[flavor.id])
+ url = reverse('horizon:admin:flavors:edit', args=[flavor.id])
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
- self.assertTemplateUsed(resp, "syspanel/flavors/edit.html")
+ self.assertTemplateUsed(resp, "admin/flavors/edit.html")
data = {'flavor_id': flavor.id,
'name': flavor.name,
@@ -78,4 +78,4 @@ class FlavorsTests(test.BaseAdminViewTests):
'eph_gb': eph}
resp = self.client.post(url, data)
self.assertRedirectsNoFollow(resp,
- reverse("horizon:syspanel:flavors:index"))
+ reverse("horizon:admin:flavors:index"))
diff --git a/horizon/dashboards/syspanel/flavors/urls.py b/horizon/dashboards/admin/flavors/urls.py
similarity index 94%
rename from horizon/dashboards/syspanel/flavors/urls.py
rename to horizon/dashboards/admin/flavors/urls.py
index 5d80fa7dd..6ce1df556 100644
--- a/horizon/dashboards/syspanel/flavors/urls.py
+++ b/horizon/dashboards/admin/flavors/urls.py
@@ -21,7 +21,7 @@
from django.conf.urls.defaults import patterns, url
from .views import IndexView, CreateView, EditView
-urlpatterns = patterns('horizon.dashboards.syspanel.flavors.views',
+urlpatterns = patterns('horizon.dashboards.admin.flavors.views',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^create/$', CreateView.as_view(), name='create'),
url(r'^(?P[^/]+)/edit/$', EditView.as_view(), name='edit')
diff --git a/horizon/dashboards/syspanel/flavors/views.py b/horizon/dashboards/admin/flavors/views.py
similarity index 89%
rename from horizon/dashboards/syspanel/flavors/views.py
rename to horizon/dashboards/admin/flavors/views.py
index c54c5ddaf..4a43fa6d9 100644
--- a/horizon/dashboards/syspanel/flavors/views.py
+++ b/horizon/dashboards/admin/flavors/views.py
@@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__)
class IndexView(tables.DataTableView):
table_class = FlavorsTable
- template_name = 'syspanel/flavors/index.html'
+ template_name = 'admin/flavors/index.html'
def get_data(self):
request = self.request
@@ -53,14 +53,14 @@ class IndexView(tables.DataTableView):
class CreateView(forms.ModalFormView):
form_class = CreateFlavor
- template_name = 'syspanel/flavors/create.html'
- success_url = reverse_lazy('horizon:syspanel:flavors:index')
+ template_name = 'admin/flavors/create.html'
+ success_url = reverse_lazy('horizon:admin:flavors:index')
class EditView(forms.ModalFormView):
form_class = EditFlavor
- template_name = 'syspanel/flavors/edit.html'
- success_url = reverse_lazy('horizon:syspanel:flavors:index')
+ template_name = 'admin/flavors/edit.html'
+ success_url = reverse_lazy('horizon:admin:flavors:index')
def get_context_data(self, **kwargs):
context = super(EditView, self).get_context_data(**kwargs)
diff --git a/horizon/dashboards/nova/access_and_security/floating_ips/__init__.py b/horizon/dashboards/admin/images/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/access_and_security/floating_ips/__init__.py
rename to horizon/dashboards/admin/images/__init__.py
diff --git a/horizon/dashboards/syspanel/images/forms.py b/horizon/dashboards/admin/images/forms.py
similarity index 92%
rename from horizon/dashboards/syspanel/images/forms.py
rename to horizon/dashboards/admin/images/forms.py
index a9ce1eda8..d983db7a8 100644
--- a/horizon/dashboards/syspanel/images/forms.py
+++ b/horizon/dashboards/admin/images/forms.py
@@ -18,7 +18,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from horizon.dashboards.nova.images_and_snapshots.images import forms
+from horizon.dashboards.project.images_and_snapshots.images import forms
class AdminUpdateImageForm(forms.UpdateImageForm):
diff --git a/horizon/dashboards/syspanel/images/panel.py b/horizon/dashboards/admin/images/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/images/panel.py
rename to horizon/dashboards/admin/images/panel.py
index 55ff0add0..6aefe8ddb 100644
--- a/horizon/dashboards/syspanel/images/panel.py
+++ b/horizon/dashboards/admin/images/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Images(horizon.Panel):
@@ -29,4 +29,4 @@ class Images(horizon.Panel):
slug = 'images'
-dashboard.Syspanel.register(Images)
+dashboard.Admin.register(Images)
diff --git a/horizon/dashboards/syspanel/images/tables.py b/horizon/dashboards/admin/images/tables.py
similarity index 87%
rename from horizon/dashboards/syspanel/images/tables.py
rename to horizon/dashboards/admin/images/tables.py
index d827105d1..ac7c619cf 100644
--- a/horizon/dashboards/syspanel/images/tables.py
+++ b/horizon/dashboards/admin/images/tables.py
@@ -17,7 +17,7 @@
from django.utils.translation import ugettext_lazy as _
from horizon import tables
-from horizon.dashboards.nova.images_and_snapshots.images.tables import (
+from horizon.dashboards.project.images_and_snapshots.images.tables import (
ImagesTable, EditImage, DeleteImage)
@@ -27,7 +27,7 @@ class AdminDeleteImage(DeleteImage):
class AdminEditImage(EditImage):
- url = "horizon:syspanel:images:update"
+ url = "horizon:admin:images:update"
def allowed(self, request, image=None):
return True
@@ -35,7 +35,7 @@ class AdminEditImage(EditImage):
class AdminImagesTable(ImagesTable):
name = tables.Column("name",
- link="horizon:syspanel:images:detail",
+ link="horizon:admin:images:detail",
verbose_name=_("Image Name"))
class Meta:
diff --git a/horizon/dashboards/syspanel/images/templates/images/_update.html b/horizon/dashboards/admin/images/templates/images/_update.html
similarity index 77%
rename from horizon/dashboards/syspanel/images/templates/images/_update.html
rename to horizon/dashboards/admin/images/templates/images/_update.html
index 80e661c29..764f6088b 100644
--- a/horizon/dashboards/syspanel/images/templates/images/_update.html
+++ b/horizon/dashboards/admin/images/templates/images/_update.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}update_image_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:images:update image.id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:images:update image.id %}{% endblock %}
{% block modal_id %}update_image_modal{% endblock %}
{% block modal-header %}{% trans "Update Image" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/images/templates/images/index.html b/horizon/dashboards/admin/images/templates/images/index.html
similarity index 100%
rename from horizon/dashboards/syspanel/images/templates/images/index.html
rename to horizon/dashboards/admin/images/templates/images/index.html
diff --git a/horizon/dashboards/syspanel/images/templates/images/update.html b/horizon/dashboards/admin/images/templates/images/update.html
similarity index 84%
rename from horizon/dashboards/syspanel/images/templates/images/update.html
rename to horizon/dashboards/admin/images/templates/images/update.html
index a1512e0c4..e81c679bf 100644
--- a/horizon/dashboards/syspanel/images/templates/images/update.html
+++ b/horizon/dashboards/admin/images/templates/images/update.html
@@ -8,5 +8,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'syspanel/images/_update.html' %}
+ {% include 'admin/images/_update.html' %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/images/tests.py b/horizon/dashboards/admin/images/tests.py
similarity index 90%
rename from horizon/dashboards/syspanel/images/tests.py
rename to horizon/dashboards/admin/images/tests.py
index 22aaad370..6d158065e 100644
--- a/horizon/dashboards/syspanel/images/tests.py
+++ b/horizon/dashboards/admin/images/tests.py
@@ -34,8 +34,8 @@ class ImagesViewTest(test.BaseAdminViewTests):
self.mox.ReplayAll()
res = self.client.get(
- reverse('horizon:syspanel:images:index'))
- self.assertTemplateUsed(res, 'syspanel/images/index.html')
+ reverse('horizon:admin:images:index'))
+ self.assertTemplateUsed(res, 'admin/images/index.html')
self.assertEqual(len(res.context['images_table'].data),
len(self.images.list()))
@@ -59,12 +59,12 @@ class ImagesViewTest(test.BaseAdminViewTests):
True])
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:images:index')
+ url = reverse('horizon:admin:images:index')
res = self.client.get(url)
# get all
self.assertEqual(len(res.context['images_table'].data),
len(self.images.list()))
- self.assertTemplateUsed(res, 'syspanel/images/index.html')
+ self.assertTemplateUsed(res, 'admin/images/index.html')
page_size = getattr(settings, "API_RESULT_PAGE_SIZE", None)
settings.API_RESULT_PAGE_SIZE = 2
@@ -74,7 +74,7 @@ class ImagesViewTest(test.BaseAdminViewTests):
self.assertEqual(len(res.context['images_table'].data),
settings.API_RESULT_PAGE_SIZE)
- url = "?".join([reverse('horizon:syspanel:images:index'),
+ url = "?".join([reverse('horizon:admin:images:index'),
"=".join([AdminImagesTable._meta.pagination_param,
self.images.list()[2].id])])
res = self.client.get(url)
@@ -82,7 +82,7 @@ class ImagesViewTest(test.BaseAdminViewTests):
self.assertEqual(len(res.context['images_table'].data),
settings.API_RESULT_PAGE_SIZE)
- url = "?".join([reverse('horizon:syspanel:images:index'),
+ url = "?".join([reverse('horizon:admin:images:index'),
"=".join([AdminImagesTable._meta.pagination_param,
self.images.list()[4].id])])
res = self.client.get(url)
diff --git a/horizon/dashboards/syspanel/images/urls.py b/horizon/dashboards/admin/images/urls.py
similarity index 94%
rename from horizon/dashboards/syspanel/images/urls.py
rename to horizon/dashboards/admin/images/urls.py
index 9e04e13d4..ec07ac1b9 100644
--- a/horizon/dashboards/syspanel/images/urls.py
+++ b/horizon/dashboards/admin/images/urls.py
@@ -23,7 +23,7 @@ from django.conf.urls.defaults import patterns, url
from .views import IndexView, UpdateView, DetailView
-urlpatterns = patterns('horizon.dashboards.syspanel.images.views',
+urlpatterns = patterns('horizon.dashboards.admin.images.views',
url(r'^images/$', IndexView.as_view(), name='index'),
url(r'^(?P[^/]+)/update/$', UpdateView.as_view(), name='update'),
url(r'^(?P[^/]+)/detail/$', DetailView.as_view(), name='detail')
diff --git a/horizon/dashboards/syspanel/images/views.py b/horizon/dashboards/admin/images/views.py
similarity index 89%
rename from horizon/dashboards/syspanel/images/views.py
rename to horizon/dashboards/admin/images/views.py
index 036707748..84186696a 100644
--- a/horizon/dashboards/syspanel/images/views.py
+++ b/horizon/dashboards/admin/images/views.py
@@ -26,7 +26,7 @@ from django.utils.translation import ugettext_lazy as _
from horizon import api
from horizon import exceptions
from horizon import tables
-from horizon.dashboards.nova.images_and_snapshots.images import views
+from horizon.dashboards.project.images_and_snapshots.images import views
from .tables import AdminImagesTable
from .forms import AdminUpdateImageForm
@@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__)
class IndexView(tables.DataTableView):
table_class = AdminImagesTable
- template_name = 'syspanel/images/index.html'
+ template_name = 'admin/images/index.html'
def has_more_data(self, table):
return self._more
@@ -56,9 +56,9 @@ class IndexView(tables.DataTableView):
class UpdateView(views.UpdateView):
- template_name = 'syspanel/images/update.html'
+ template_name = 'admin/images/update.html'
form_class = AdminUpdateImageForm
- success_url = reverse_lazy('horizon:syspanel:images:index')
+ success_url = reverse_lazy('horizon:admin:images:index')
class DetailView(views.DetailView):
diff --git a/horizon/dashboards/nova/access_and_security/keypairs/__init__.py b/horizon/dashboards/admin/instances/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/access_and_security/keypairs/__init__.py
rename to horizon/dashboards/admin/instances/__init__.py
diff --git a/horizon/dashboards/syspanel/instances/panel.py b/horizon/dashboards/admin/instances/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/instances/panel.py
rename to horizon/dashboards/admin/instances/panel.py
index a9f6cce9b..bbc101a39 100644
--- a/horizon/dashboards/syspanel/instances/panel.py
+++ b/horizon/dashboards/admin/instances/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Instances(horizon.Panel):
@@ -30,4 +30,4 @@ class Instances(horizon.Panel):
permissions = ('openstack.roles.admin',)
-dashboard.Syspanel.register(Instances)
+dashboard.Admin.register(Instances)
diff --git a/horizon/dashboards/syspanel/instances/tables.py b/horizon/dashboards/admin/instances/tables.py
similarity index 95%
rename from horizon/dashboards/syspanel/instances/tables.py
rename to horizon/dashboards/admin/instances/tables.py
index d5b7e6279..7f2c6a577 100644
--- a/horizon/dashboards/syspanel/instances/tables.py
+++ b/horizon/dashboards/admin/instances/tables.py
@@ -22,7 +22,7 @@ from django.utils.translation import ugettext_lazy as _
from horizon import api
from horizon import tables
-from horizon.dashboards.nova.instances.tables import (TerminateInstance,
+from horizon.dashboards.project.instances.tables import (TerminateInstance,
EditInstance, ConsoleLink, LogLink, CreateSnapshot,
TogglePause, ToggleSuspend, RebootInstance, get_size, UpdateRow,
get_ips, get_power_state)
@@ -41,7 +41,7 @@ class AdminUpdateRow(UpdateRow):
return instance
-class SyspanelInstancesTable(tables.DataTable):
+class AdminInstancesTable(tables.DataTable):
TASK_STATUS_CHOICES = (
(None, True),
("none", True)
@@ -66,7 +66,7 @@ class SyspanelInstancesTable(tables.DataTable):
verbose_name=_("Host"),
classes=('nowrap-col',))
name = tables.Column("name",
- link=("horizon:nova:instances:detail"),
+ link=("horizon:project:instances:detail"),
verbose_name=_("Instance Name"))
ip = tables.Column(get_ips, verbose_name=_("IP Address"))
size = tables.Column(get_size,
diff --git a/horizon/dashboards/syspanel/instances/templates/instances/index.html b/horizon/dashboards/admin/instances/templates/instances/index.html
similarity index 100%
rename from horizon/dashboards/syspanel/instances/templates/instances/index.html
rename to horizon/dashboards/admin/instances/templates/instances/index.html
diff --git a/horizon/dashboards/syspanel/instances/tests.py b/horizon/dashboards/admin/instances/tests.py
similarity index 89%
rename from horizon/dashboards/syspanel/instances/tests.py
rename to horizon/dashboards/admin/instances/tests.py
index bbfd93c88..64cbee673 100644
--- a/horizon/dashboards/syspanel/instances/tests.py
+++ b/horizon/dashboards/admin/instances/tests.py
@@ -40,8 +40,8 @@ class InstanceViewTest(test.BaseAdminViewTests):
api.nova.flavor_list(IsA(http.HttpRequest)).AndReturn(flavors)
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:instances:index'))
- self.assertTemplateUsed(res, 'syspanel/instances/index.html')
+ res = self.client.get(reverse('horizon:admin:instances:index'))
+ self.assertTemplateUsed(res, 'admin/instances/index.html')
instances = res.context['table'].data
self.assertItemsEqual(instances, servers)
@@ -66,8 +66,8 @@ class InstanceViewTest(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:instances:index'))
- self.assertTemplateUsed(res, 'syspanel/instances/index.html')
+ res = self.client.get(reverse('horizon:admin:instances:index'))
+ self.assertTemplateUsed(res, 'admin/instances/index.html')
instances = res.context['table'].data
self.assertItemsEqual(instances, servers)
@@ -94,9 +94,9 @@ class InstanceViewTest(test.BaseAdminViewTests):
AndRaise(self.exceptions.nova)
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:instances:index'))
+ res = self.client.get(reverse('horizon:admin:instances:index'))
instances = res.context['table'].data
- self.assertTemplateUsed(res, 'syspanel/instances/index.html')
+ self.assertTemplateUsed(res, 'admin/instances/index.html')
self.assertMessageCount(res, error=len(servers))
self.assertItemsEqual(instances, servers)
@@ -107,8 +107,8 @@ class InstanceViewTest(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:instances:index'))
- self.assertTemplateUsed(res, 'syspanel/instances/index.html')
+ res = self.client.get(reverse('horizon:admin:instances:index'))
+ self.assertTemplateUsed(res, 'admin/instances/index.html')
self.assertEqual(len(res.context['instances_table'].data), 0)
@test.create_stubs({api: ('server_get', 'flavor_get',),
@@ -126,7 +126,7 @@ class InstanceViewTest(test.BaseAdminViewTests):
admin=True).AndReturn(tenant)
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:instances:index') + \
+ url = reverse('horizon:admin:instances:index') + \
"?action=row_update&table=instances&obj_id=" + server.id
res = self.client.get(url, {},
diff --git a/horizon/dashboards/syspanel/instances/urls.py b/horizon/dashboards/admin/instances/urls.py
similarity index 94%
rename from horizon/dashboards/syspanel/instances/urls.py
rename to horizon/dashboards/admin/instances/urls.py
index d87cd66b0..b7c9a9061 100644
--- a/horizon/dashboards/syspanel/instances/urls.py
+++ b/horizon/dashboards/admin/instances/urls.py
@@ -26,7 +26,7 @@ from .views import DetailView, AdminIndexView
INSTANCES = r'^(?P[^/]+)/%s$'
-urlpatterns = patterns('horizon.dashboards.syspanel.instances.views',
+urlpatterns = patterns('horizon.dashboards.admin.instances.views',
url(r'^$', AdminIndexView.as_view(), name='index'),
url(INSTANCES % 'detail', DetailView.as_view(), name='detail'),
url(INSTANCES % 'console', 'console', name='console'),
diff --git a/horizon/dashboards/syspanel/instances/views.py b/horizon/dashboards/admin/instances/views.py
similarity index 92%
rename from horizon/dashboards/syspanel/instances/views.py
rename to horizon/dashboards/admin/instances/views.py
index fbbde0da7..500b0c51a 100644
--- a/horizon/dashboards/syspanel/instances/views.py
+++ b/horizon/dashboards/admin/instances/views.py
@@ -27,15 +27,15 @@ from django.utils.translation import ugettext_lazy as _
from horizon import api
from horizon import exceptions
from horizon import tables
-from horizon.dashboards.syspanel.instances.tables import SyspanelInstancesTable
-from horizon.dashboards.nova.instances.views import console, DetailView, vnc
+from horizon.dashboards.admin.instances.tables import AdminInstancesTable
+from horizon.dashboards.project.instances.views import console, DetailView, vnc
LOG = logging.getLogger(__name__)
class AdminIndexView(tables.DataTableView):
- table_class = SyspanelInstancesTable
- template_name = 'syspanel/instances/index.html'
+ table_class = AdminInstancesTable
+ template_name = 'admin/instances/index.html'
def get_data(self):
instances = []
diff --git a/horizon/dashboards/nova/models.py b/horizon/dashboards/admin/models.py
similarity index 100%
rename from horizon/dashboards/nova/models.py
rename to horizon/dashboards/admin/models.py
diff --git a/horizon/dashboards/nova/access_and_security/security_groups/__init__.py b/horizon/dashboards/admin/networks/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/access_and_security/security_groups/__init__.py
rename to horizon/dashboards/admin/networks/__init__.py
diff --git a/horizon/dashboards/syspanel/networks/forms.py b/horizon/dashboards/admin/networks/forms.py
similarity index 96%
rename from horizon/dashboards/syspanel/networks/forms.py
rename to horizon/dashboards/admin/networks/forms.py
index f6ed33687..c67843333 100644
--- a/horizon/dashboards/syspanel/networks/forms.py
+++ b/horizon/dashboards/admin/networks/forms.py
@@ -59,7 +59,7 @@ class CreateNetwork(forms.SelfHandlingForm):
messages.success(request, msg)
return network
except:
- redirect = reverse('horizon:syspanel:networks:index')
+ redirect = reverse('horizon:admin:networks:index')
msg = _('Failed to create network %s') % data['name']
exceptions.handle(request, msg, redirect=redirect)
@@ -71,7 +71,7 @@ class UpdateNetwork(forms.SelfHandlingForm):
widget=forms.TextInput(
attrs={'readonly': 'readonly'}))
shared = forms.BooleanField(label=_("Shared"), required=False)
- failure_url = 'horizon:syspanel:networks:index'
+ failure_url = 'horizon:admin:networks:index'
def handle(self, request, data):
try:
diff --git a/horizon/dashboards/nova/networks/panel.py b/horizon/dashboards/admin/networks/panel.py
similarity index 91%
rename from horizon/dashboards/nova/networks/panel.py
rename to horizon/dashboards/admin/networks/panel.py
index e4270bec4..ccf751e49 100644
--- a/horizon/dashboards/nova/networks/panel.py
+++ b/horizon/dashboards/admin/networks/panel.py
@@ -17,7 +17,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.nova import dashboard
+from horizon.dashboards.admin import dashboard
class Networks(horizon.Panel):
@@ -25,4 +25,4 @@ class Networks(horizon.Panel):
slug = 'networks'
permissions = ('openstack.services.network',)
-dashboard.Nova.register(Networks)
+dashboard.Admin.register(Networks)
diff --git a/horizon/dashboards/nova/containers/__init__.py b/horizon/dashboards/admin/networks/ports/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/containers/__init__.py
rename to horizon/dashboards/admin/networks/ports/__init__.py
diff --git a/horizon/dashboards/syspanel/networks/ports/forms.py b/horizon/dashboards/admin/networks/ports/forms.py
similarity index 96%
rename from horizon/dashboards/syspanel/networks/ports/forms.py
rename to horizon/dashboards/admin/networks/ports/forms.py
index 2e86ed137..203ae2c4d 100644
--- a/horizon/dashboards/syspanel/networks/ports/forms.py
+++ b/horizon/dashboards/admin/networks/ports/forms.py
@@ -58,7 +58,7 @@ class CreatePort(forms.SelfHandlingForm):
msg = _('Failed to create a port for network %s') \
% data['network_id']
LOG.info(msg)
- redirect = reverse('horizon:syspanel:networks:detail',
+ redirect = reverse('horizon:admin:networks:detail',
args=(data['network_id'],))
exceptions.handle(request, msg, redirect=redirect)
@@ -87,6 +87,6 @@ class UpdatePort(forms.SelfHandlingForm):
except Exception:
msg = _('Failed to update port %s') % data['port_id']
LOG.info(msg)
- redirect = reverse('horizon:syspanel:networks:detail',
+ redirect = reverse('horizon:admin:networks:detail',
args=[data['network_id']])
exceptions.handle(request, msg, redirect=redirect)
diff --git a/horizon/dashboards/syspanel/networks/ports/tables.py b/horizon/dashboards/admin/networks/ports/tables.py
similarity index 89%
rename from horizon/dashboards/syspanel/networks/ports/tables.py
rename to horizon/dashboards/admin/networks/ports/tables.py
index 824d6703c..aa7aa7464 100644
--- a/horizon/dashboards/syspanel/networks/ports/tables.py
+++ b/horizon/dashboards/admin/networks/ports/tables.py
@@ -23,7 +23,7 @@ from horizon import api
from horizon import exceptions
from horizon import tables
-from horizon.dashboards.nova.networks.ports.tables import (get_fixed_ips,
+from horizon.dashboards.project.networks.ports.tables import (get_fixed_ips,
get_attached)
@@ -41,7 +41,7 @@ class DeletePort(tables.DeleteAction):
msg = _('Failed to delete subnet %s') % obj_id
LOG.info(msg)
network_id = self.table.kwargs['network_id']
- redirect = reverse('horizon:syspanel:networks:detail',
+ redirect = reverse('horizon:admin:networks:detail',
args=[network_id])
exceptions.handle(request, msg, redirect=redirect)
@@ -49,7 +49,7 @@ class DeletePort(tables.DeleteAction):
class CreatePort(tables.LinkAction):
name = "create"
verbose_name = _("Create Port")
- url = "horizon:syspanel:networks:addport"
+ url = "horizon:admin:networks:addport"
classes = ("ajax-modal", "btn-create")
def get_link_url(self, datum=None):
@@ -60,7 +60,7 @@ class CreatePort(tables.LinkAction):
class UpdatePort(tables.LinkAction):
name = "update"
verbose_name = _("Edit Port")
- url = "horizon:syspanel:networks:editport"
+ url = "horizon:admin:networks:editport"
classes = ("ajax-modal", "btn-edit")
def get_link_url(self, port):
@@ -71,7 +71,7 @@ class UpdatePort(tables.LinkAction):
class PortsTable(tables.DataTable):
name = tables.Column("name",
verbose_name=_("Name"),
- link="horizon:syspanel:networks:ports:detail")
+ link="horizon:admin:networks:ports:detail")
fixed_ips = tables.Column(get_fixed_ips, verbose_name=_("Fixed IPs"))
device_id = tables.Column(get_attached, verbose_name=_("Device Attached"))
status = tables.Column("status", verbose_name=_("Status"))
diff --git a/horizon/dashboards/syspanel/networks/ports/tabs.py b/horizon/dashboards/admin/networks/ports/tabs.py
similarity index 91%
rename from horizon/dashboards/syspanel/networks/ports/tabs.py
rename to horizon/dashboards/admin/networks/ports/tabs.py
index a1f723e09..f3b15d2ea 100644
--- a/horizon/dashboards/syspanel/networks/ports/tabs.py
+++ b/horizon/dashboards/admin/networks/ports/tabs.py
@@ -28,14 +28,14 @@ LOG = logging.getLogger(__name__)
class OverviewTab(tabs.Tab):
name = _("Overview")
slug = "overview"
- template_name = "nova/networks/ports/_detail_overview.html"
+ template_name = "project/networks/ports/_detail_overview.html"
def get_context_data(self, request):
port_id = self.tab_group.kwargs['port_id']
try:
port = api.quantum.port_get(self.request, port_id)
except:
- redirect = reverse('horizon:syspanel:networks:index')
+ redirect = reverse('horizon:admin:networks:index')
msg = _('Unable to retrieve port details.')
exceptions.handle(request, msg, redirect=redirect)
return {'port': port}
diff --git a/horizon/dashboards/syspanel/networks/ports/urls.py b/horizon/dashboards/admin/networks/ports/urls.py
similarity index 84%
rename from horizon/dashboards/syspanel/networks/ports/urls.py
rename to horizon/dashboards/admin/networks/ports/urls.py
index 5bac3a03d..eb6d5c9b9 100644
--- a/horizon/dashboards/syspanel/networks/ports/urls.py
+++ b/horizon/dashboards/admin/networks/ports/urls.py
@@ -16,9 +16,9 @@
from django.conf.urls.defaults import patterns, url
-from horizon.dashboards.nova.networks.ports.views import DetailView
+from horizon.dashboards.project.networks.ports.views import DetailView
PORTS = r'^(?P[^/]+)/%s$'
-urlpatterns = patterns('horizon.dashboards.syspanel.networks.ports.views',
+urlpatterns = patterns('horizon.dashboards.admin.networks.ports.views',
url(PORTS % 'detail', DetailView.as_view(), name='detail'))
diff --git a/horizon/dashboards/syspanel/networks/ports/views.py b/horizon/dashboards/admin/networks/ports/views.py
similarity index 89%
rename from horizon/dashboards/syspanel/networks/ports/views.py
rename to horizon/dashboards/admin/networks/ports/views.py
index 9ac57de61..9ccfb708e 100644
--- a/horizon/dashboards/syspanel/networks/ports/views.py
+++ b/horizon/dashboards/admin/networks/ports/views.py
@@ -29,8 +29,8 @@ LOG = logging.getLogger(__name__)
class CreateView(forms.ModalFormView):
form_class = CreatePort
- template_name = 'syspanel/networks/ports/create.html'
- success_url = 'horizon:syspanel:networks:detail'
+ template_name = 'admin/networks/ports/create.html'
+ success_url = 'horizon:admin:networks:detail'
def get_success_url(self):
return reverse(self.success_url,
@@ -43,7 +43,7 @@ class CreateView(forms.ModalFormView):
self._object = api.quantum.network_get(self.request,
network_id)
except:
- redirect = reverse("horizon:syspanel:networks:detail",
+ redirect = reverse("horizon:admin:networks:detail",
args=(self.kwargs['network_id'],))
msg = _("Unable to retrieve network.")
exceptions.handle(self.request, msg, redirect=redirect)
@@ -62,9 +62,9 @@ class CreateView(forms.ModalFormView):
class UpdateView(forms.ModalFormView):
form_class = UpdatePort
- template_name = 'syspanel/networks/ports/update.html'
+ template_name = 'admin/networks/ports/update.html'
context_object_name = 'port'
- success_url = 'horizon:syspanel:networks:detail'
+ success_url = 'horizon:admin:networks:detail'
def get_success_url(self):
return reverse(self.success_url,
@@ -76,7 +76,7 @@ class UpdateView(forms.ModalFormView):
try:
self._object = api.quantum.port_get(self.request, port_id)
except:
- redirect = reverse("horizon:syspanel:networks:detail",
+ redirect = reverse("horizon:admin:networks:detail",
args=(self.kwargs['network_id'],))
msg = _('Unable to retrieve port details')
exceptions.handle(self.request, msg, redirect=redirect)
diff --git a/horizon/dashboards/nova/images_and_snapshots/__init__.py b/horizon/dashboards/admin/networks/subnets/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/images_and_snapshots/__init__.py
rename to horizon/dashboards/admin/networks/subnets/__init__.py
diff --git a/horizon/dashboards/syspanel/networks/subnets/forms.py b/horizon/dashboards/admin/networks/subnets/forms.py
similarity index 90%
rename from horizon/dashboards/syspanel/networks/subnets/forms.py
rename to horizon/dashboards/admin/networks/subnets/forms.py
index 9727831e9..97fe83290 100644
--- a/horizon/dashboards/syspanel/networks/subnets/forms.py
+++ b/horizon/dashboards/admin/networks/subnets/forms.py
@@ -23,14 +23,14 @@ from horizon import api
from horizon import forms
from horizon import exceptions
-from horizon.dashboards.nova.networks.subnets import forms as user_forms
+from horizon.dashboards.project.networks.subnets import forms as user_forms
LOG = logging.getLogger(__name__)
class CreateSubnet(user_forms.CreateSubnet):
- failure_url = 'horizon:syspanel:networks:detail'
+ failure_url = 'horizon:admin:networks:detail'
def handle(self, request, data):
try:
@@ -49,4 +49,4 @@ class CreateSubnet(user_forms.CreateSubnet):
class UpdateSubnet(user_forms.UpdateSubnet):
tenant_id = forms.CharField(widget=forms.HiddenInput())
- failure_url = 'horizon:syspanel:networks:detail'
+ failure_url = 'horizon:admin:networks:detail'
diff --git a/horizon/dashboards/syspanel/networks/subnets/tables.py b/horizon/dashboards/admin/networks/subnets/tables.py
similarity index 91%
rename from horizon/dashboards/syspanel/networks/subnets/tables.py
rename to horizon/dashboards/admin/networks/subnets/tables.py
index 20c740141..aeeedd397 100644
--- a/horizon/dashboards/syspanel/networks/subnets/tables.py
+++ b/horizon/dashboards/admin/networks/subnets/tables.py
@@ -38,7 +38,7 @@ class DeleteSubnet(tables.DeleteAction):
msg = _('Failed to delete subnet %s') % obj_id
LOG.info(msg)
network_id = self.table.kwargs['network_id']
- redirect = reverse('horizon:syspanel:networks:detail',
+ redirect = reverse('horizon:admin:networks:detail',
args=[network_id])
exceptions.handle(request, msg, redirect=redirect)
@@ -46,7 +46,7 @@ class DeleteSubnet(tables.DeleteAction):
class CreateSubnet(tables.LinkAction):
name = "create"
verbose_name = _("Create Subnet")
- url = "horizon:syspanel:networks:addsubnet"
+ url = "horizon:admin:networks:addsubnet"
classes = ("ajax-modal", "btn-create")
def get_link_url(self, datum=None):
@@ -57,7 +57,7 @@ class CreateSubnet(tables.LinkAction):
class UpdateSubnet(tables.LinkAction):
name = "update"
verbose_name = _("Edit Subnet")
- url = "horizon:syspanel:networks:editsubnet"
+ url = "horizon:admin:networks:editsubnet"
classes = ("ajax-modal", "btn-edit")
def get_link_url(self, subnet):
@@ -67,7 +67,7 @@ class UpdateSubnet(tables.LinkAction):
class SubnetsTable(tables.DataTable):
name = tables.Column("name", verbose_name=_("Name"),
- link='horizon:syspanel:networks:subnets:detail')
+ link='horizon:admin:networks:subnets:detail')
cidr = tables.Column("cidr", verbose_name=_("CIDR"))
ip_version = tables.Column("ipver_str", verbose_name=_("IP Version"))
gateway_ip = tables.Column("gateway_ip", verbose_name=_("Gateway IP"))
diff --git a/horizon/dashboards/syspanel/networks/subnets/urls.py b/horizon/dashboards/admin/networks/subnets/urls.py
similarity index 84%
rename from horizon/dashboards/syspanel/networks/subnets/urls.py
rename to horizon/dashboards/admin/networks/subnets/urls.py
index 7017e8f1b..c46df39c0 100644
--- a/horizon/dashboards/syspanel/networks/subnets/urls.py
+++ b/horizon/dashboards/admin/networks/subnets/urls.py
@@ -16,9 +16,9 @@
from django.conf.urls.defaults import patterns, url
-from horizon.dashboards.nova.networks.subnets.views import DetailView
+from horizon.dashboards.project.networks.subnets.views import DetailView
SUBNETS = r'^(?P[^/]+)/%s$'
-urlpatterns = patterns('horizon.dashboards.syspanel.networks.subnets.views',
+urlpatterns = patterns('horizon.dashboards.admin.networks.subnets.views',
url(SUBNETS % 'detail', DetailView.as_view(), name='detail'))
diff --git a/horizon/dashboards/syspanel/networks/subnets/views.py b/horizon/dashboards/admin/networks/subnets/views.py
similarity index 90%
rename from horizon/dashboards/syspanel/networks/subnets/views.py
rename to horizon/dashboards/admin/networks/subnets/views.py
index 0c5a0c1ed..6066ba482 100644
--- a/horizon/dashboards/syspanel/networks/subnets/views.py
+++ b/horizon/dashboards/admin/networks/subnets/views.py
@@ -29,8 +29,8 @@ LOG = logging.getLogger(__name__)
class CreateView(forms.ModalFormView):
form_class = CreateSubnet
- template_name = 'syspanel/networks/subnets/create.html'
- success_url = 'horizon:syspanel:networks:detail'
+ template_name = 'admin/networks/subnets/create.html'
+ success_url = 'horizon:admin:networks:detail'
def get_success_url(self):
return reverse(self.success_url,
@@ -43,7 +43,7 @@ class CreateView(forms.ModalFormView):
self._object = api.quantum.network_get(self.request,
network_id)
except:
- redirect = reverse('horizon:nova:networks:index')
+ redirect = reverse('horizon:project:networks:index')
msg = _("Unable to retrieve network.")
exceptions.handle(self.request, msg, redirect=redirect)
return self._object
@@ -61,9 +61,9 @@ class CreateView(forms.ModalFormView):
class UpdateView(forms.ModalFormView):
form_class = UpdateSubnet
- template_name = 'syspanel/networks/subnets/update.html'
+ template_name = 'admin/networks/subnets/update.html'
context_object_name = 'subnet'
- success_url = 'horizon:syspanel:networks:detail'
+ success_url = 'horizon:admin:networks:detail'
def get_success_url(self):
return reverse(self.success_url,
@@ -75,7 +75,7 @@ class UpdateView(forms.ModalFormView):
try:
self._object = api.quantum.subnet_get(self.request, subnet_id)
except:
- redirect = reverse("horizon:syspanel:networks:detail",
+ redirect = reverse("horizon:admin:networks:detail",
args=(self.kwargs['network_id'],))
msg = _('Unable to retrieve subnet details')
exceptions.handle(self.request, msg, redirect=redirect)
diff --git a/horizon/dashboards/syspanel/networks/tables.py b/horizon/dashboards/admin/networks/tables.py
similarity index 89%
rename from horizon/dashboards/syspanel/networks/tables.py
rename to horizon/dashboards/admin/networks/tables.py
index 6d1ae5f80..e57603b2a 100644
--- a/horizon/dashboards/syspanel/networks/tables.py
+++ b/horizon/dashboards/admin/networks/tables.py
@@ -24,7 +24,7 @@ from horizon import api
from horizon import exceptions
from horizon import tables
-from horizon.dashboards.nova.networks.tables import get_subnets
+from horizon.dashboards.project.networks.tables import get_subnets
LOG = logging.getLogger(__name__)
@@ -40,21 +40,21 @@ class DeleteNetwork(tables.DeleteAction):
except:
msg = _('Failed to delete network %s') % obj_id
LOG.info(msg)
- redirect = reverse('horizon:syspanel:networks:index')
+ redirect = reverse('horizon:admin:networks:index')
exceptions.handle(request, msg, redirect=redirect)
class CreateNetwork(tables.LinkAction):
name = "create"
verbose_name = _("Create Network")
- url = "horizon:syspanel:networks:create"
+ url = "horizon:admin:networks:create"
classes = ("ajax-modal", "btn-create")
class EditNetwork(tables.LinkAction):
name = "update"
verbose_name = _("Edit Network")
- url = "horizon:syspanel:networks:update"
+ url = "horizon:admin:networks:update"
classes = ("ajax-modal", "btn-edit")
@@ -66,7 +66,7 @@ class EditNetwork(tables.LinkAction):
class NetworksTable(tables.DataTable):
tenant = tables.Column("tenant_name", verbose_name=_("Project"))
name = tables.Column("name", verbose_name=_("Network Name"),
- link='horizon:syspanel:networks:detail')
+ link='horizon:admin:networks:detail')
subnets = tables.Column(get_subnets,
verbose_name=_("Subnets Associated"),)
shared = tables.Column("shared", verbose_name=_("Shared"),
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/_create.html b/horizon/dashboards/admin/networks/templates/networks/_create.html
similarity index 77%
rename from horizon/dashboards/syspanel/networks/templates/networks/_create.html
rename to horizon/dashboards/admin/networks/templates/networks/_create.html
index 7b35a3213..6fda0ca63 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/_create.html
+++ b/horizon/dashboards/admin/networks/templates/networks/_create.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_network_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:networks:create %}{% endblock %}
+{% block form_action %}{% url horizon:admin:networks:create %}{% endblock %}
{% block modal_id %}create_network_modal{% endblock %}
{% block modal-header %}{% trans "Create Network" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/nova/networks/templates/networks/_update.html b/horizon/dashboards/admin/networks/templates/networks/_update.html
similarity index 75%
rename from horizon/dashboards/nova/networks/templates/networks/_update.html
rename to horizon/dashboards/admin/networks/templates/networks/_update.html
index 50413cfe0..7ad0c69c3 100644
--- a/horizon/dashboards/nova/networks/templates/networks/_update.html
+++ b/horizon/dashboards/admin/networks/templates/networks/_update.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}update_network_form{% endblock %}
-{% block form_action %}{% url horizon:nova:networks:update network_id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:networks:update network_id %}{% endblock %}
{% block modal-header %}{% trans "Edit Network" %}{% endblock %}
@@ -20,5 +20,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/create.html b/horizon/dashboards/admin/networks/templates/networks/create.html
similarity index 84%
rename from horizon/dashboards/syspanel/networks/templates/networks/create.html
rename to horizon/dashboards/admin/networks/templates/networks/create.html
index c39cc0859..975227f4e 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/create.html
+++ b/horizon/dashboards/admin/networks/templates/networks/create.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include "syspanel/networks/_create.html" %}
+ {% include "admin/networks/_create.html" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/index.html b/horizon/dashboards/admin/networks/templates/networks/index.html
similarity index 100%
rename from horizon/dashboards/syspanel/networks/templates/networks/index.html
rename to horizon/dashboards/admin/networks/templates/networks/index.html
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/ports/_create.html b/horizon/dashboards/admin/networks/templates/networks/ports/_create.html
similarity index 77%
rename from horizon/dashboards/syspanel/networks/templates/networks/ports/_create.html
rename to horizon/dashboards/admin/networks/templates/networks/ports/_create.html
index ff6549363..a35266149 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/ports/_create.html
+++ b/horizon/dashboards/admin/networks/templates/networks/ports/_create.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_port_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:networks:addport network.id %}
+{% block form_action %}{% url horizon:admin:networks:addport network.id %}
{% endblock %}
{% block modal-header %}{% trans "Create Port" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/ports/_update.html b/horizon/dashboards/admin/networks/templates/networks/ports/_update.html
similarity index 75%
rename from horizon/dashboards/syspanel/networks/templates/networks/ports/_update.html
rename to horizon/dashboards/admin/networks/templates/networks/ports/_update.html
index 6481c2a69..bb3162817 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/ports/_update.html
+++ b/horizon/dashboards/admin/networks/templates/networks/ports/_update.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}update_port_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:networks:editport network_id port_id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:networks:editport network_id port_id %}{% endblock %}
{% block modal-header %}{% trans "Edit Port" %}{% endblock %}
@@ -25,5 +25,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/ports/create.html b/horizon/dashboards/admin/networks/templates/networks/ports/create.html
similarity index 82%
rename from horizon/dashboards/syspanel/networks/templates/networks/ports/create.html
rename to horizon/dashboards/admin/networks/templates/networks/ports/create.html
index 76f1019c5..e99551300 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/ports/create.html
+++ b/horizon/dashboards/admin/networks/templates/networks/ports/create.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include "syspanel/networks/ports/_create.html" %}
+ {% include "admin/networks/ports/_create.html" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/ports/update.html b/horizon/dashboards/admin/networks/templates/networks/ports/update.html
similarity index 82%
rename from horizon/dashboards/syspanel/networks/templates/networks/ports/update.html
rename to horizon/dashboards/admin/networks/templates/networks/ports/update.html
index 33b64d89a..ae0f91cfa 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/ports/update.html
+++ b/horizon/dashboards/admin/networks/templates/networks/ports/update.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'syspanel/networks/ports/_update.html' %}
+ {% include 'admin/networks/ports/_update.html' %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/subnets/_create.html b/horizon/dashboards/admin/networks/templates/networks/subnets/_create.html
similarity index 78%
rename from horizon/dashboards/syspanel/networks/templates/networks/subnets/_create.html
rename to horizon/dashboards/admin/networks/templates/networks/subnets/_create.html
index 1e16b900f..c7367b4c8 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/subnets/_create.html
+++ b/horizon/dashboards/admin/networks/templates/networks/subnets/_create.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_subnet_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:networks:addsubnet network.id %}
+{% block form_action %}{% url horizon:admin:networks:addsubnet network.id %}
{% endblock %}
{% block modal-header %}{% trans "Create Subnet" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/subnets/_update.html b/horizon/dashboards/admin/networks/templates/networks/subnets/_update.html
similarity index 78%
rename from horizon/dashboards/syspanel/networks/templates/networks/subnets/_update.html
rename to horizon/dashboards/admin/networks/templates/networks/subnets/_update.html
index e7a41af7f..45a125ea6 100644
--- a/horizon/dashboards/syspanel/networks/templates/networks/subnets/_update.html
+++ b/horizon/dashboards/admin/networks/templates/networks/subnets/_update.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}update_subnet_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:networks:editsubnet network_id subnet_id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:networks:editsubnet network_id subnet_id %}{% endblock %}
{% block modal-header %}{% trans "Edit Subnet" %}{% endblock %}
@@ -29,5 +29,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/nova/networks/templates/networks/subnets/create.html b/horizon/dashboards/admin/networks/templates/networks/subnets/create.html
similarity index 83%
rename from horizon/dashboards/nova/networks/templates/networks/subnets/create.html
rename to horizon/dashboards/admin/networks/templates/networks/subnets/create.html
index 01e052c2e..84624cc13 100644
--- a/horizon/dashboards/nova/networks/templates/networks/subnets/create.html
+++ b/horizon/dashboards/admin/networks/templates/networks/subnets/create.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include "nova/networks/subnets/_create.html" %}
+ {% include "admin/networks/subnets/_create.html" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/templates/networks/subnets/index.html b/horizon/dashboards/admin/networks/templates/networks/subnets/index.html
similarity index 100%
rename from horizon/dashboards/syspanel/networks/templates/networks/subnets/index.html
rename to horizon/dashboards/admin/networks/templates/networks/subnets/index.html
diff --git a/horizon/dashboards/nova/networks/templates/networks/subnets/update.html b/horizon/dashboards/admin/networks/templates/networks/subnets/update.html
similarity index 83%
rename from horizon/dashboards/nova/networks/templates/networks/subnets/update.html
rename to horizon/dashboards/admin/networks/templates/networks/subnets/update.html
index d5b813728..b152cdf4e 100644
--- a/horizon/dashboards/nova/networks/templates/networks/subnets/update.html
+++ b/horizon/dashboards/admin/networks/templates/networks/subnets/update.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'nova/networks/subnets/_update.html' %}
+ {% include 'admin/networks/subnets/_update.html' %}
{% endblock %}
diff --git a/horizon/dashboards/nova/networks/templates/networks/update.html b/horizon/dashboards/admin/networks/templates/networks/update.html
similarity index 85%
rename from horizon/dashboards/nova/networks/templates/networks/update.html
rename to horizon/dashboards/admin/networks/templates/networks/update.html
index 599de61ac..a70a0b1a7 100644
--- a/horizon/dashboards/nova/networks/templates/networks/update.html
+++ b/horizon/dashboards/admin/networks/templates/networks/update.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'nova/networks/_update.html' %}
+ {% include 'admin/networks/_update.html' %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/networks/tests.py b/horizon/dashboards/admin/networks/tests.py
similarity index 88%
rename from horizon/dashboards/syspanel/networks/tests.py
rename to horizon/dashboards/admin/networks/tests.py
index ecc845af6..e62d735d2 100644
--- a/horizon/dashboards/syspanel/networks/tests.py
+++ b/horizon/dashboards/admin/networks/tests.py
@@ -23,7 +23,7 @@ from horizon import api
from horizon import test
-INDEX_URL = reverse('horizon:syspanel:networks:index')
+INDEX_URL = reverse('horizon:admin:networks:index')
class NetworkTests(test.BaseAdminViewTests):
@@ -40,7 +40,7 @@ class NetworkTests(test.BaseAdminViewTests):
res = self.client.get(INDEX_URL)
- self.assertTemplateUsed(res, 'syspanel/networks/index.html')
+ self.assertTemplateUsed(res, 'admin/networks/index.html')
networks = res.context['networks_table'].data
self.assertItemsEqual(networks, self.networks.list())
@@ -53,7 +53,7 @@ class NetworkTests(test.BaseAdminViewTests):
res = self.client.get(INDEX_URL)
- self.assertTemplateUsed(res, 'syspanel/networks/index.html')
+ self.assertTemplateUsed(res, 'admin/networks/index.html')
self.assertEqual(len(res.context['networks_table'].data), 0)
self.assertMessageCount(res, error=1)
@@ -71,10 +71,10 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:networks:detail',
+ res = self.client.get(reverse('horizon:admin:networks:detail',
args=[network_id]))
- self.assertTemplateUsed(res, 'nova/networks/detail.html')
+ self.assertTemplateUsed(res, 'project/networks/detail.html')
subnets = res.context['subnets_table'].data
ports = res.context['ports_table'].data
self.assertItemsEqual(subnets, [self.subnets.first()])
@@ -94,7 +94,7 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:detail', args=[network_id])
+ url = reverse('horizon:admin:networks:detail', args=[network_id])
res = self.client.get(url)
redir_url = INDEX_URL
@@ -114,10 +114,10 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:networks:detail',
+ res = self.client.get(reverse('horizon:admin:networks:detail',
args=[network_id]))
- self.assertTemplateUsed(res, 'nova/networks/detail.html')
+ self.assertTemplateUsed(res, 'project/networks/detail.html')
subnets = res.context['subnets_table'].data
ports = res.context['ports_table'].data
self.assertEqual(len(subnets), 0)
@@ -137,10 +137,10 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:networks:detail',
+ res = self.client.get(reverse('horizon:admin:networks:detail',
args=[network_id]))
- self.assertTemplateUsed(res, 'nova/networks/detail.html')
+ self.assertTemplateUsed(res, 'project/networks/detail.html')
subnets = res.context['subnets_table'].data
ports = res.context['ports_table'].data
self.assertItemsEqual(subnets, [self.subnets.first()])
@@ -153,10 +153,10 @@ class NetworkTests(test.BaseAdminViewTests):
.AndReturn(tenants)
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:create')
+ url = reverse('horizon:admin:networks:create')
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/networks/create.html')
+ self.assertTemplateUsed(res, 'admin/networks/create.html')
@test.create_stubs({api.quantum: ('network_create',),
api.keystone: ('tenant_list',)})
@@ -174,7 +174,7 @@ class NetworkTests(test.BaseAdminViewTests):
form_data = {'tenant_id': tenant_id,
'name': network.name,
'shared': True}
- url = reverse('horizon:syspanel:networks:create')
+ url = reverse('horizon:admin:networks:create')
res = self.client.post(url, form_data)
self.assertNoFormErrors(res)
@@ -196,7 +196,7 @@ class NetworkTests(test.BaseAdminViewTests):
form_data = {'tenant_id': tenant_id,
'name': network.name,
'shared': False}
- url = reverse('horizon:syspanel:networks:create')
+ url = reverse('horizon:admin:networks:create')
res = self.client.post(url, form_data)
self.assertNoFormErrors(res)
@@ -210,10 +210,10 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:update', args=[network.id])
+ url = reverse('horizon:admin:networks:update', args=[network.id])
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/networks/update.html')
+ self.assertTemplateUsed(res, 'admin/networks/update.html')
@test.create_stubs({api.quantum: ('network_get',)})
def test_network_update_get_exception(self):
@@ -223,7 +223,7 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:update', args=[network.id])
+ url = reverse('horizon:admin:networks:update', args=[network.id])
res = self.client.get(url)
redir_url = INDEX_URL
@@ -244,7 +244,7 @@ class NetworkTests(test.BaseAdminViewTests):
'name': network.name,
'tenant_id': network.tenant_id,
'shared': True}
- url = reverse('horizon:syspanel:networks:update', args=[network.id])
+ url = reverse('horizon:admin:networks:update', args=[network.id])
res = self.client.post(url, formData)
self.assertRedirectsNoFollow(res, INDEX_URL)
@@ -264,7 +264,7 @@ class NetworkTests(test.BaseAdminViewTests):
'name': network.name,
'tenant_id': network.tenant_id,
'shared': False}
- url = reverse('horizon:syspanel:networks:update', args=[network.id])
+ url = reverse('horizon:admin:networks:update', args=[network.id])
res = self.client.post(url, form_data)
self.assertRedirectsNoFollow(res, INDEX_URL)
@@ -316,11 +316,11 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:subnets:detail',
+ url = reverse('horizon:admin:networks:subnets:detail',
args=[subnet.id])
res = self.client.get(url)
- self.assertTemplateUsed(res, 'nova/networks/subnets/detail.html')
+ self.assertTemplateUsed(res, 'project/networks/subnets/detail.html')
self.assertEqual(res.context['subnet'].id, subnet.id)
@test.create_stubs({api.quantum: ('subnet_get',)})
@@ -331,13 +331,13 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:subnets:detail',
+ url = reverse('horizon:admin:networks:subnets:detail',
args=[subnet.id])
res = self.client.get(url)
- # syspanel DetailView is shared with userpanel one, so
+ # admin DetailView is shared with userpanel one, so
# redirection URL on error is userpanel index.
- redir_url = reverse('horizon:nova:networks:index')
+ redir_url = reverse('horizon:project:networks:index')
self.assertRedirectsNoFollow(res, redir_url)
@test.create_stubs({api.quantum: ('network_get',)})
@@ -348,11 +348,11 @@ class NetworkTests(test.BaseAdminViewTests):
.AndReturn(self.networks.first())
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:addsubnet',
+ url = reverse('horizon:admin:networks:addsubnet',
args=[network.id])
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/networks/subnets/create.html')
+ self.assertTemplateUsed(res, 'admin/networks/subnets/create.html')
@test.create_stubs({api.quantum: ('network_get',
'subnet_create',)})
@@ -382,12 +382,12 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': subnet.cidr,
'ip_version': subnet.ip_version,
'gateway_ip': subnet.gateway_ip}
- url = reverse('horizon:syspanel:networks:addsubnet',
+ url = reverse('horizon:admin:networks:addsubnet',
args=[subnet.network_id])
res = self.client.post(url, form_data)
self.assertNoFormErrors(res)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[subnet.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -407,14 +407,14 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': subnet.cidr,
'ip_version': subnet.ip_version,
'gateway_ip': subnet.gateway_ip}
- url = reverse('horizon:syspanel:networks:addsubnet',
+ url = reverse('horizon:admin:networks:addsubnet',
args=[subnet.network_id])
res = self.client.post(url, form_data)
self.assertNoFormErrors(res)
- # syspanel DetailView is shared with userpanel one, so
+ # admin DetailView is shared with userpanel one, so
# redirection URL on error is userpanel index.
- redir_url = reverse('horizon:nova:networks:index')
+ redir_url = reverse('horizon:project:networks:index')
self.assertRedirectsNoFollow(res, redir_url)
@test.create_stubs({api.quantum: ('network_get',
@@ -445,11 +445,11 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': subnet.cidr,
'ip_version': subnet.ip_version,
'gateway_ip': subnet.gateway_ip}
- url = reverse('horizon:syspanel:networks:addsubnet',
+ url = reverse('horizon:admin:networks:addsubnet',
args=[subnet.network_id])
res = self.client.post(url, form_data)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[subnet.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -470,7 +470,7 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': cidr,
'ip_version': subnet.ip_version,
'gateway_ip': subnet.gateway_ip}
- url = reverse('horizon:syspanel:networks:addsubnet',
+ url = reverse('horizon:admin:networks:addsubnet',
args=[subnet.network_id])
res = self.client.post(url, form_data)
@@ -494,7 +494,7 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': subnet.cidr,
'ip_version': subnet.ip_version,
'gateway_ip': gateway_ip}
- url = reverse('horizon:syspanel:networks:addsubnet',
+ url = reverse('horizon:admin:networks:addsubnet',
args=[subnet.network_id])
res = self.client.post(url, form_data)
@@ -519,11 +519,11 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': subnet.cidr,
'ip_version': subnet.ip_version,
'gateway_ip': subnet.gateway_ip}
- url = reverse('horizon:syspanel:networks:editsubnet',
+ url = reverse('horizon:admin:networks:editsubnet',
args=[subnet.network_id, subnet.id])
res = self.client.post(url, formData)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[subnet.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -544,7 +544,7 @@ class NetworkTests(test.BaseAdminViewTests):
'cidr': subnet.cidr,
'ip_version': subnet.ip_version,
'gateway_ip': gateway_ip}
- url = reverse('horizon:syspanel:networks:editsubnet',
+ url = reverse('horizon:admin:networks:editsubnet',
args=[subnet.network_id, subnet.id])
res = self.client.post(url, formData)
@@ -564,7 +564,7 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
formData = {'action': 'subnets__delete__%s' % subnet.id}
- url = reverse('horizon:syspanel:networks:detail',
+ url = reverse('horizon:admin:networks:detail',
args=[network_id])
res = self.client.post(url, formData)
@@ -585,7 +585,7 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
formData = {'action': 'subnets__delete__%s' % subnet.id}
- url = reverse('horizon:syspanel:networks:detail',
+ url = reverse('horizon:admin:networks:detail',
args=[network_id])
res = self.client.post(url, formData)
@@ -599,10 +599,10 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:networks:ports:detail',
+ res = self.client.get(reverse('horizon:admin:networks:ports:detail',
args=[port.id]))
- self.assertTemplateUsed(res, 'nova/networks/ports/detail.html')
+ self.assertTemplateUsed(res, 'project/networks/ports/detail.html')
self.assertEqual(res.context['port'].id, port.id)
@test.create_stubs({api.quantum: ('port_get',)})
@@ -613,12 +613,12 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:networks:ports:detail',
+ res = self.client.get(reverse('horizon:admin:networks:ports:detail',
args=[port.id]))
- # syspanel DetailView is shared with userpanel one, so
+ # admin DetailView is shared with userpanel one, so
# redirection URL on error is userpanel index.
- redir_url = reverse('horizon:nova:networks:index')
+ redir_url = reverse('horizon:project:networks:index')
self.assertRedirectsNoFollow(res, redir_url)
@test.create_stubs({api.quantum: ('network_get',)})
@@ -629,11 +629,11 @@ class NetworkTests(test.BaseAdminViewTests):
.AndReturn(self.networks.first())
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:addport',
+ url = reverse('horizon:admin:networks:addport',
args=[network.id])
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/networks/ports/create.html')
+ self.assertTemplateUsed(res, 'admin/networks/ports/create.html')
@test.create_stubs({api.quantum: ('network_get',
'port_create')})
@@ -659,12 +659,12 @@ class NetworkTests(test.BaseAdminViewTests):
'network_name': network.name,
'name': port.name,
'device_id': port.device_id}
- url = reverse('horizon:syspanel:networks:addport',
+ url = reverse('horizon:admin:networks:addport',
args=[port.network_id])
res = self.client.post(url, form_data)
self.assertNoFormErrors(res)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[port.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -692,12 +692,12 @@ class NetworkTests(test.BaseAdminViewTests):
'network_name': network.name,
'name': port.name,
'device_id': port.device_id}
- url = reverse('horizon:syspanel:networks:addport',
+ url = reverse('horizon:admin:networks:addport',
args=[port.network_id])
res = self.client.post(url, form_data)
self.assertNoFormErrors(res)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[port.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -709,11 +709,11 @@ class NetworkTests(test.BaseAdminViewTests):
.AndReturn(port)
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:networks:editport',
+ url = reverse('horizon:admin:networks:editport',
args=[port.network_id, port.id])
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/networks/ports/update.html')
+ self.assertTemplateUsed(res, 'admin/networks/ports/update.html')
@test.create_stubs({api.quantum: ('port_get',
'port_modify')})
@@ -731,11 +731,11 @@ class NetworkTests(test.BaseAdminViewTests):
'port_id': port.id,
'name': port.name,
'device_id': port.device_id}
- url = reverse('horizon:syspanel:networks:editport',
+ url = reverse('horizon:admin:networks:editport',
args=[port.network_id, port.id])
res = self.client.post(url, formData)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[port.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -755,11 +755,11 @@ class NetworkTests(test.BaseAdminViewTests):
'port_id': port.id,
'name': port.name,
'device_id': port.device_id}
- url = reverse('horizon:syspanel:networks:editport',
+ url = reverse('horizon:admin:networks:editport',
args=[port.network_id, port.id])
res = self.client.post(url, formData)
- redir_url = reverse('horizon:syspanel:networks:detail',
+ redir_url = reverse('horizon:admin:networks:detail',
args=[port.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@@ -777,7 +777,7 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
formData = {'action': 'ports__delete__%s' % port.id}
- url = reverse('horizon:syspanel:networks:detail',
+ url = reverse('horizon:admin:networks:detail',
args=[network_id])
res = self.client.post(url, formData)
@@ -798,7 +798,7 @@ class NetworkTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
formData = {'action': 'ports__delete__%s' % port.id}
- url = reverse('horizon:syspanel:networks:detail',
+ url = reverse('horizon:admin:networks:detail',
args=[network_id])
res = self.client.post(url, formData)
diff --git a/horizon/dashboards/syspanel/networks/urls.py b/horizon/dashboards/admin/networks/urls.py
similarity index 100%
rename from horizon/dashboards/syspanel/networks/urls.py
rename to horizon/dashboards/admin/networks/urls.py
diff --git a/horizon/dashboards/syspanel/networks/views.py b/horizon/dashboards/admin/networks/views.py
similarity index 90%
rename from horizon/dashboards/syspanel/networks/views.py
rename to horizon/dashboards/admin/networks/views.py
index b9cb335b1..3a5863472 100644
--- a/horizon/dashboards/syspanel/networks/views.py
+++ b/horizon/dashboards/admin/networks/views.py
@@ -30,14 +30,14 @@ from .subnets.tables import SubnetsTable
from .ports.tables import PortsTable
from .forms import CreateNetwork, UpdateNetwork
-from horizon.dashboards.nova.networks import views as user_views
+from horizon.dashboards.project.networks import views as user_views
LOG = logging.getLogger(__name__)
class IndexView(tables.DataTableView):
table_class = NetworksTable
- template_name = 'syspanel/networks/index.html'
+ template_name = 'admin/networks/index.html'
def _get_tenant_list(self):
if not hasattr(self, "_tenants"):
@@ -72,14 +72,14 @@ class IndexView(tables.DataTableView):
class CreateView(forms.ModalFormView):
form_class = CreateNetwork
- template_name = 'syspanel/networks/create.html'
- success_url = reverse_lazy('horizon:syspanel:networks:index')
+ template_name = 'admin/networks/create.html'
+ success_url = reverse_lazy('horizon:admin:networks:index')
class DetailView(tables.MultiTableView):
table_classes = (SubnetsTable, PortsTable)
- template_name = 'nova/networks/detail.html'
- failure_url = reverse_lazy('horizon:syspanel:networks:index')
+ template_name = 'project/networks/detail.html'
+ failure_url = reverse_lazy('horizon:admin:networks:index')
def get_subnets_data(self):
try:
@@ -129,8 +129,8 @@ class DetailView(tables.MultiTableView):
class UpdateView(user_views.UpdateView):
form_class = UpdateNetwork
- template_name = 'syspanel/networks/update.html'
- success_url = reverse_lazy('horizon:syspanel:networks:index')
+ template_name = 'admin/networks/update.html'
+ success_url = reverse_lazy('horizon:admin:networks:index')
def get_initial(self):
network = self._get_object()
diff --git a/horizon/dashboards/nova/images_and_snapshots/images/__init__.py b/horizon/dashboards/admin/overview/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/images_and_snapshots/images/__init__.py
rename to horizon/dashboards/admin/overview/__init__.py
diff --git a/horizon/dashboards/syspanel/overview/panel.py b/horizon/dashboards/admin/overview/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/overview/panel.py
rename to horizon/dashboards/admin/overview/panel.py
index 027841278..8ec061c63 100644
--- a/horizon/dashboards/syspanel/overview/panel.py
+++ b/horizon/dashboards/admin/overview/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Overview(horizon.Panel):
@@ -30,4 +30,4 @@ class Overview(horizon.Panel):
permissions = ('openstack.roles.admin',)
-dashboard.Syspanel.register(Overview)
+dashboard.Admin.register(Overview)
diff --git a/horizon/dashboards/syspanel/overview/templates/overview/usage.csv b/horizon/dashboards/admin/overview/templates/overview/usage.csv
similarity index 100%
rename from horizon/dashboards/syspanel/overview/templates/overview/usage.csv
rename to horizon/dashboards/admin/overview/templates/overview/usage.csv
diff --git a/horizon/dashboards/syspanel/overview/templates/overview/usage.html b/horizon/dashboards/admin/overview/templates/overview/usage.html
similarity index 100%
rename from horizon/dashboards/syspanel/overview/templates/overview/usage.html
rename to horizon/dashboards/admin/overview/templates/overview/usage.html
diff --git a/horizon/dashboards/syspanel/overview/tests.py b/horizon/dashboards/admin/overview/tests.py
similarity index 92%
rename from horizon/dashboards/syspanel/overview/tests.py
rename to horizon/dashboards/admin/overview/tests.py
index d41b729e3..2b112f2da 100644
--- a/horizon/dashboards/syspanel/overview/tests.py
+++ b/horizon/dashboards/admin/overview/tests.py
@@ -31,7 +31,7 @@ from horizon import usage
from horizon.templatetags.sizeformat import mbformat
-INDEX_URL = reverse('horizon:nova:overview:index')
+INDEX_URL = reverse('horizon:project:overview:index')
class UsageViewTests(test.BaseAdminViewTests):
@@ -50,8 +50,8 @@ class UsageViewTests(test.BaseAdminViewTests):
.AndReturn([usage_obj])
api.nova.tenant_quota_usages(IsA(http.HttpRequest)).AndReturn(quotas)
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:overview:index'))
- self.assertTemplateUsed(res, 'syspanel/overview/usage.html')
+ res = self.client.get(reverse('horizon:admin:overview:index'))
+ self.assertTemplateUsed(res, 'admin/overview/usage.html')
self.assertTrue(isinstance(res.context['usage'], usage.GlobalUsage))
self.assertContains(res,
'
test_tenant'
@@ -82,9 +82,9 @@ class UsageViewTests(test.BaseAdminViewTests):
.AndReturn([usage_obj])
api.nova.tenant_quota_usages(IsA(http.HttpRequest)).AndReturn(quotas)
self.mox.ReplayAll()
- csv_url = reverse('horizon:syspanel:overview:index') + "?format=csv"
+ csv_url = reverse('horizon:admin:overview:index') + "?format=csv"
res = self.client.get(csv_url)
- self.assertTemplateUsed(res, 'syspanel/overview/usage.csv')
+ self.assertTemplateUsed(res, 'admin/overview/usage.csv')
self.assertTrue(isinstance(res.context['usage'], usage.GlobalUsage))
self.assertContains(res, 'Tenant,VCPUs,RamMB,DiskGB,Usage(Hours)\n'
'%s,%s,%s,%s,%f' %
diff --git a/horizon/dashboards/syspanel/overview/urls.py b/horizon/dashboards/admin/overview/urls.py
similarity index 100%
rename from horizon/dashboards/syspanel/overview/urls.py
rename to horizon/dashboards/admin/overview/urls.py
diff --git a/horizon/dashboards/syspanel/overview/views.py b/horizon/dashboards/admin/overview/views.py
similarity index 97%
rename from horizon/dashboards/syspanel/overview/views.py
rename to horizon/dashboards/admin/overview/views.py
index 0d25578eb..dd2e8393d 100644
--- a/horizon/dashboards/syspanel/overview/views.py
+++ b/horizon/dashboards/admin/overview/views.py
@@ -27,7 +27,7 @@ from horizon import usage
class GlobalOverview(usage.UsageView):
table_class = usage.GlobalUsageTable
usage_class = usage.GlobalUsage
- template_name = 'syspanel/overview/usage.html'
+ template_name = 'admin/overview/usage.html'
def get_context_data(self, **kwargs):
context = super(GlobalOverview, self).get_context_data(**kwargs)
diff --git a/horizon/dashboards/nova/images_and_snapshots/snapshots/__init__.py b/horizon/dashboards/admin/projects/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/images_and_snapshots/snapshots/__init__.py
rename to horizon/dashboards/admin/projects/__init__.py
diff --git a/horizon/dashboards/syspanel/projects/forms.py b/horizon/dashboards/admin/projects/forms.py
similarity index 94%
rename from horizon/dashboards/syspanel/projects/forms.py
rename to horizon/dashboards/admin/projects/forms.py
index ebccf2416..54ec8d8ca 100644
--- a/horizon/dashboards/syspanel/projects/forms.py
+++ b/horizon/dashboards/admin/projects/forms.py
@@ -20,7 +20,7 @@
from horizon import api
from horizon import forms
-from horizon.dashboards.syspanel.users.forms import CreateUserForm
+from horizon.dashboards.admin.users.forms import CreateUserForm
class CreateUser(CreateUserForm):
diff --git a/horizon/dashboards/syspanel/projects/panel.py b/horizon/dashboards/admin/projects/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/projects/panel.py
rename to horizon/dashboards/admin/projects/panel.py
index 7bafadfce..6e0fc0305 100644
--- a/horizon/dashboards/syspanel/projects/panel.py
+++ b/horizon/dashboards/admin/projects/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Tenants(horizon.Panel):
@@ -29,4 +29,4 @@ class Tenants(horizon.Panel):
slug = 'projects'
-dashboard.Syspanel.register(Tenants)
+dashboard.Admin.register(Tenants)
diff --git a/horizon/dashboards/syspanel/projects/tables.py b/horizon/dashboards/admin/projects/tables.py
similarity index 94%
rename from horizon/dashboards/syspanel/projects/tables.py
rename to horizon/dashboards/admin/projects/tables.py
index a5f5ba431..9bc147c77 100644
--- a/horizon/dashboards/syspanel/projects/tables.py
+++ b/horizon/dashboards/admin/projects/tables.py
@@ -17,7 +17,7 @@ LOG = logging.getLogger(__name__)
class ViewMembersLink(tables.LinkAction):
name = "users"
verbose_name = _("Modify Users")
- url = "horizon:syspanel:projects:update"
+ url = "horizon:admin:projects:update"
classes = ("ajax-modal", "btn-edit")
def get_link_url(self, project):
@@ -30,28 +30,28 @@ class ViewMembersLink(tables.LinkAction):
class UsageLink(tables.LinkAction):
name = "usage"
verbose_name = _("View Usage")
- url = "horizon:syspanel:projects:usage"
+ url = "horizon:admin:projects:usage"
classes = ("btn-stats",)
class CreateProject(tables.LinkAction):
name = "create"
verbose_name = _("Create Project")
- url = "horizon:syspanel:projects:create"
+ url = "horizon:admin:projects:create"
classes = ("btn-launch", "ajax-modal",)
class UpdateProject(tables.LinkAction):
name = "update"
verbose_name = _("Edit Project")
- url = "horizon:syspanel:projects:update"
+ url = "horizon:admin:projects:update"
classes = ("ajax-modal", "btn-edit")
class ModifyQuotas(tables.LinkAction):
name = "quotas"
verbose_name = "Modify Quotas"
- url = "horizon:syspanel:projects:update"
+ url = "horizon:admin:projects:update"
classes = ("ajax-modal", "btn-edit")
def get_link_url(self, project):
@@ -140,7 +140,7 @@ class TenantUsersTable(UsersTable):
class AddUserAction(tables.LinkAction):
name = "add_user"
verbose_name = _("Add To Project")
- url = "horizon:syspanel:projects:add_user"
+ url = "horizon:admin:projects:add_user"
classes = ('ajax-modal',)
def get_link_url(self, user):
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/_add_user.html b/horizon/dashboards/admin/projects/templates/projects/_add_user.html
similarity index 73%
rename from horizon/dashboards/syspanel/projects/templates/projects/_add_user.html
rename to horizon/dashboards/admin/projects/templates/projects/_add_user.html
index 413fffdf6..3b365cebd 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/_add_user.html
+++ b/horizon/dashboards/admin/projects/templates/projects/_add_user.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}add_user_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:projects:add_user tenant_id user_id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:projects:add_user tenant_id user_id %}{% endblock %}
{% block modal_id %}add_user_modal{% endblock %}
{% block modal-header %}{% trans "Add User To Project" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/_create.html b/horizon/dashboards/admin/projects/templates/projects/_create.html
similarity index 77%
rename from horizon/dashboards/syspanel/projects/templates/projects/_create.html
rename to horizon/dashboards/admin/projects/templates/projects/_create.html
index c923764ac..372878e7e 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/_create.html
+++ b/horizon/dashboards/admin/projects/templates/projects/_create.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_tenant_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:projects:create %}{% endblock %}
+{% block form_action %}{% url horizon:admin:projects:create %}{% endblock %}
{% block modal_id %}create_tenant_modal{% endblock %}
{% block modal-header %}{% trans "Create Project" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/_create_user.html b/horizon/dashboards/admin/projects/templates/projects/_create_user.html
similarity index 76%
rename from horizon/dashboards/syspanel/projects/templates/projects/_create_user.html
rename to horizon/dashboards/admin/projects/templates/projects/_create_user.html
index bf2005f60..18fcdcad9 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/_create_user.html
+++ b/horizon/dashboards/admin/projects/templates/projects/_create_user.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_user_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:projects:create_user tenant_id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:projects:create_user tenant_id %}{% endblock %}
{% block modal-header %}{% blocktrans %}Create User for project '{{ tenant_name }}'.{% endblocktrans %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/_quotas.html b/horizon/dashboards/admin/projects/templates/projects/_quotas.html
similarity index 77%
rename from horizon/dashboards/syspanel/projects/templates/projects/_quotas.html
rename to horizon/dashboards/admin/projects/templates/projects/_quotas.html
index f92748476..9bbae7b73 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/_quotas.html
+++ b/horizon/dashboards/admin/projects/templates/projects/_quotas.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}quota_update_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:projects:quotas tenant.id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:projects:quotas tenant.id %}{% endblock %}
{% block modal-header %}{% trans "Update Quota" %}{% endblock %}
@@ -20,5 +20,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/_update.html b/horizon/dashboards/admin/projects/templates/projects/_update.html
similarity index 75%
rename from horizon/dashboards/syspanel/projects/templates/projects/_update.html
rename to horizon/dashboards/admin/projects/templates/projects/_update.html
index 6098dc370..a463e20da 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/_update.html
+++ b/horizon/dashboards/admin/projects/templates/projects/_update.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}{% endblock %}
-{% block form_action %}{% url horizon:syspanel:projects:update tenant.id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:projects:update tenant.id %}{% endblock %}
{% block modal_id %}update_tenant_modal{% endblock %}
{% block modal-header %}{% trans "Update Project" %}{% endblock %}
@@ -21,5 +21,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/_update_members.html b/horizon/dashboards/admin/projects/templates/projects/_update_members.html
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/_update_members.html
rename to horizon/dashboards/admin/projects/templates/projects/_update_members.html
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/add_user.html b/horizon/dashboards/admin/projects/templates/projects/add_user.html
similarity index 84%
rename from horizon/dashboards/syspanel/projects/templates/projects/add_user.html
rename to horizon/dashboards/admin/projects/templates/projects/add_user.html
index 4766bd585..536181203 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/add_user.html
+++ b/horizon/dashboards/admin/projects/templates/projects/add_user.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'syspanel/projects/_add_user.html' %}
+ {% include 'admin/projects/_add_user.html' %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/create.html b/horizon/dashboards/admin/projects/templates/projects/create.html
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/create.html
rename to horizon/dashboards/admin/projects/templates/projects/create.html
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/create_user.html b/horizon/dashboards/admin/projects/templates/projects/create_user.html
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/create_user.html
rename to horizon/dashboards/admin/projects/templates/projects/create_user.html
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/index.html b/horizon/dashboards/admin/projects/templates/projects/index.html
similarity index 86%
rename from horizon/dashboards/syspanel/projects/templates/projects/index.html
rename to horizon/dashboards/admin/projects/templates/projects/index.html
index dcd9e3142..7bb3429ad 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/index.html
+++ b/horizon/dashboards/admin/projects/templates/projects/index.html
@@ -3,7 +3,7 @@
{% block title %}Projects{% endblock %}
{% block page_header %}
- {% url horizon:syspanel:projects:index as refresh_link %}
+ {% url horizon:admin:projects:index as refresh_link %}
{# to make searchable false, just remove it from the include statement #}
{% include "horizon/common/_page_header.html" with title=_("Projects") refresh_link=refresh_link searchable="true" %}
{% endblock page_header %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/quotas.html b/horizon/dashboards/admin/projects/templates/projects/quotas.html
similarity index 79%
rename from horizon/dashboards/syspanel/projects/templates/projects/quotas.html
rename to horizon/dashboards/admin/projects/templates/projects/quotas.html
index 4f4374ad3..99a143f7c 100644
--- a/horizon/dashboards/syspanel/projects/templates/projects/quotas.html
+++ b/horizon/dashboards/admin/projects/templates/projects/quotas.html
@@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'syspanel/projects/_quotas.html' with form=form %}
+ {% include 'admin/projects/_quotas.html' with form=form %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/update.html b/horizon/dashboards/admin/projects/templates/projects/update.html
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/update.html
rename to horizon/dashboards/admin/projects/templates/projects/update.html
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/usage.csv b/horizon/dashboards/admin/projects/templates/projects/usage.csv
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/usage.csv
rename to horizon/dashboards/admin/projects/templates/projects/usage.csv
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/usage.html b/horizon/dashboards/admin/projects/templates/projects/usage.html
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/usage.html
rename to horizon/dashboards/admin/projects/templates/projects/usage.html
diff --git a/horizon/dashboards/syspanel/projects/templates/projects/users.html b/horizon/dashboards/admin/projects/templates/projects/users.html
similarity index 100%
rename from horizon/dashboards/syspanel/projects/templates/projects/users.html
rename to horizon/dashboards/admin/projects/templates/projects/users.html
diff --git a/horizon/dashboards/syspanel/projects/tests.py b/horizon/dashboards/admin/projects/tests.py
similarity index 96%
rename from horizon/dashboards/syspanel/projects/tests.py
rename to horizon/dashboards/admin/projects/tests.py
index 94243c457..f6a973195 100644
--- a/horizon/dashboards/syspanel/projects/tests.py
+++ b/horizon/dashboards/admin/projects/tests.py
@@ -24,7 +24,7 @@ from horizon import test
from .workflows import CreateProject, UpdateProject
from .views import QUOTA_FIELDS
-INDEX_URL = reverse('horizon:syspanel:projects:index')
+INDEX_URL = reverse('horizon:admin:projects:index')
class TenantsViewTests(test.BaseAdminViewTests):
@@ -35,7 +35,7 @@ class TenantsViewTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
res = self.client.get(INDEX_URL)
- self.assertTemplateUsed(res, 'syspanel/projects/index.html')
+ self.assertTemplateUsed(res, 'admin/projects/index.html')
self.assertItemsEqual(res.context['table'].data, self.tenants.list())
@@ -84,10 +84,10 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/projects/create.html')
+ self.assertTemplateUsed(res, 'admin/projects/create.html')
workflow = res.context['workflow']
self.assertEqual(res.context['workflow'].name, CreateProject.name)
@@ -153,7 +153,7 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
workflow_data.update(self._get_workflow_data(project, quota))
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.post(url, workflow_data)
self.assertNoFormErrors(res)
@@ -178,10 +178,10 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/projects/create.html')
+ self.assertTemplateUsed(res, 'admin/projects/create.html')
self.assertContains(res, "Unable to retrieve default quota values")
@test.create_stubs({api: ('get_default_role',
@@ -217,7 +217,7 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
workflow_data = self._get_workflow_data(project, quota)
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.post(url, workflow_data)
self.assertNoFormErrors(res)
@@ -276,7 +276,7 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
workflow_data.update(self._get_workflow_data(project, quota))
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.post(url, workflow_data)
self.assertNoFormErrors(res)
@@ -337,7 +337,7 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
workflow_data.update(self._get_workflow_data(project, quota))
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.post(url, workflow_data)
self.assertNoFormErrors(res)
@@ -370,7 +370,7 @@ class CreateProjectWorkflowTests(test.BaseAdminViewTests):
workflow_data = self._get_workflow_data(project, quota)
workflow_data["name"] = ""
- url = reverse('horizon:syspanel:projects:create')
+ url = reverse('horizon:admin:projects:create')
res = self.client.post(url, workflow_data)
self.assertContains(res, "field is required")
@@ -412,11 +412,11 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:projects:update',
+ url = reverse('horizon:admin:projects:update',
args=[self.tenant.id])
res = self.client.get(url)
- self.assertTemplateUsed(res, 'syspanel/projects/update.html')
+ self.assertTemplateUsed(res, 'admin/projects/update.html')
workflow = res.context['workflow']
self.assertEqual(res.context['workflow'].name, UpdateProject.name)
@@ -537,7 +537,7 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
"enabled": project.enabled}
workflow_data.update(project_data)
workflow_data.update(updated_quota)
- url = reverse('horizon:syspanel:projects:update',
+ url = reverse('horizon:admin:projects:update',
args=[self.tenant.id])
res = self.client.post(url, workflow_data)
@@ -552,7 +552,7 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- url = reverse('horizon:syspanel:projects:update',
+ url = reverse('horizon:admin:projects:update',
args=[self.tenant.id])
res = self.client.get(url)
@@ -623,7 +623,7 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
"enabled": project.enabled}
workflow_data.update(project_data)
workflow_data.update(updated_quota)
- url = reverse('horizon:syspanel:projects:update',
+ url = reverse('horizon:admin:projects:update',
args=[self.tenant.id])
res = self.client.post(url, workflow_data)
@@ -735,7 +735,7 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
"enabled": project.enabled}
workflow_data.update(project_data)
workflow_data.update(updated_quota)
- url = reverse('horizon:syspanel:projects:update',
+ url = reverse('horizon:admin:projects:update',
args=[self.tenant.id])
res = self.client.post(url, workflow_data)
@@ -834,7 +834,7 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
"enabled": project.enabled}
workflow_data.update(project_data)
workflow_data.update(updated_quota)
- url = reverse('horizon:syspanel:projects:update',
+ url = reverse('horizon:admin:projects:update',
args=[self.tenant.id])
res = self.client.post(url, workflow_data)
diff --git a/horizon/dashboards/syspanel/projects/urls.py b/horizon/dashboards/admin/projects/urls.py
similarity index 100%
rename from horizon/dashboards/syspanel/projects/urls.py
rename to horizon/dashboards/admin/projects/urls.py
diff --git a/horizon/dashboards/syspanel/projects/views.py b/horizon/dashboards/admin/projects/views.py
similarity index 93%
rename from horizon/dashboards/syspanel/projects/views.py
rename to horizon/dashboards/admin/projects/views.py
index a46ba4e45..8a34caa5a 100644
--- a/horizon/dashboards/syspanel/projects/views.py
+++ b/horizon/dashboards/admin/projects/views.py
@@ -28,7 +28,7 @@ from horizon import exceptions
from horizon import tables
from horizon import usage
from horizon import workflows
-from horizon.dashboards.syspanel.users.views import CreateView
+from horizon.dashboards.admin.users.views import CreateView
from .forms import CreateUser
from .tables import TenantsTable, TenantUsersTable, AddUsersTable
@@ -51,7 +51,7 @@ PROJECT_INFO_FIELDS = ("name",
"description",
"enabled")
-INDEX_URL = "horizon:syspanel:projects:index"
+INDEX_URL = "horizon:admin:projects:index"
class TenantContextMixin(object):
@@ -76,7 +76,7 @@ class TenantContextMixin(object):
class IndexView(tables.DataTableView):
table_class = TenantsTable
- template_name = 'syspanel/projects/index.html'
+ template_name = 'admin/projects/index.html'
def get_data(self):
tenants = []
@@ -91,7 +91,7 @@ class IndexView(tables.DataTableView):
class UsersView(tables.MultiTableView):
table_classes = (TenantUsersTable, AddUsersTable)
- template_name = 'syspanel/projects/users.html'
+ template_name = 'admin/projects/users.html'
def _get_shared_data(self, *args, **kwargs):
tenant_id = self.kwargs["tenant_id"]
@@ -129,7 +129,7 @@ class UsersView(tables.MultiTableView):
class TenantUsageView(usage.UsageView):
table_class = usage.TenantUsageTable
usage_class = usage.TenantUsage
- template_name = 'syspanel/projects/usage.html'
+ template_name = 'admin/projects/usage.html'
def get_data(self):
super(TenantUsageView, self).get_data()
@@ -138,7 +138,7 @@ class TenantUsageView(usage.UsageView):
class CreateProjectView(workflows.WorkflowView):
workflow_class = CreateProject
- template_name = "syspanel/projects/create.html"
+ template_name = "admin/projects/create.html"
def get_initial(self):
initial = super(CreateProjectView, self).get_initial()
@@ -159,7 +159,7 @@ class CreateProjectView(workflows.WorkflowView):
class UpdateProjectView(workflows.WorkflowView):
workflow_class = UpdateProject
- template_name = "syspanel/projects/update.html"
+ template_name = "admin/projects/update.html"
def get_initial(self):
initial = super(UpdateProjectView, self).get_initial()
@@ -186,8 +186,8 @@ class UpdateProjectView(workflows.WorkflowView):
class CreateUserView(CreateView):
form_class = CreateUser
- template_name = "syspanel/projects/create_user.html"
- success_url = reverse_lazy('horizon:syspanel:projects:index')
+ template_name = "admin/projects/create_user.html"
+ success_url = reverse_lazy('horizon:admin:projects:index')
def get_initial(self):
default_role = api.keystone.get_default_role(self.request)
diff --git a/horizon/dashboards/syspanel/projects/workflows.py b/horizon/dashboards/admin/projects/workflows.py
similarity index 98%
rename from horizon/dashboards/syspanel/projects/workflows.py
rename to horizon/dashboards/admin/projects/workflows.py
index 6d6e81af6..b4fae679a 100644
--- a/horizon/dashboards/syspanel/projects/workflows.py
+++ b/horizon/dashboards/admin/projects/workflows.py
@@ -27,8 +27,8 @@ from horizon import exceptions
from horizon import workflows
from horizon import forms
-INDEX_URL = "horizon:syspanel:projects:index"
-ADD_USER_URL = "horizon:syspanel:projects:create_user"
+INDEX_URL = "horizon:admin:projects:index"
+ADD_USER_URL = "horizon:admin:projects:create_user"
class UpdateProjectQuotaAction(workflows.Action):
@@ -156,7 +156,7 @@ class UpdateProjectMembersAction(workflows.Action):
class UpdateProjectMembers(workflows.Step):
action_class = UpdateProjectMembersAction
- template_name = "syspanel/projects/_update_members.html"
+ template_name = "admin/projects/_update_members.html"
def contribute(self, data, context):
if data:
@@ -179,7 +179,7 @@ class CreateProject(workflows.Workflow):
finalize_button_name = _("Finish")
success_message = _('Created new project "%s".')
failure_message = _('Unable to create project "%s".')
- success_url = "horizon:syspanel:projects:index"
+ success_url = "horizon:admin:projects:index"
default_steps = (CreateProjectInfo,
UpdateProjectMembers,
UpdateProjectQuota)
@@ -268,7 +268,7 @@ class UpdateProject(workflows.Workflow):
finalize_button_name = _("Save")
success_message = _('Modified project "%s".')
failure_message = _('Unable to modify project "%s".')
- success_url = "horizon:syspanel:projects:index"
+ success_url = "horizon:admin:projects:index"
default_steps = (UpdateProjectInfo,
UpdateProjectMembers,
UpdateProjectQuota)
diff --git a/horizon/dashboards/nova/images_and_snapshots/volume_snapshots/__init__.py b/horizon/dashboards/admin/quotas/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/images_and_snapshots/volume_snapshots/__init__.py
rename to horizon/dashboards/admin/quotas/__init__.py
diff --git a/horizon/dashboards/syspanel/quotas/panel.py b/horizon/dashboards/admin/quotas/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/quotas/panel.py
rename to horizon/dashboards/admin/quotas/panel.py
index 25bf17821..c7f1c4bf4 100644
--- a/horizon/dashboards/syspanel/quotas/panel.py
+++ b/horizon/dashboards/admin/quotas/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Quotas(horizon.Panel):
@@ -29,4 +29,4 @@ class Quotas(horizon.Panel):
slug = 'quotas'
-dashboard.Syspanel.register(Quotas)
+dashboard.Admin.register(Quotas)
diff --git a/horizon/dashboards/syspanel/quotas/tables.py b/horizon/dashboards/admin/quotas/tables.py
similarity index 100%
rename from horizon/dashboards/syspanel/quotas/tables.py
rename to horizon/dashboards/admin/quotas/tables.py
diff --git a/horizon/dashboards/syspanel/quotas/templates/quotas/index.html b/horizon/dashboards/admin/quotas/templates/quotas/index.html
similarity index 86%
rename from horizon/dashboards/syspanel/quotas/templates/quotas/index.html
rename to horizon/dashboards/admin/quotas/templates/quotas/index.html
index 86a3827be..0650cf021 100644
--- a/horizon/dashboards/syspanel/quotas/templates/quotas/index.html
+++ b/horizon/dashboards/admin/quotas/templates/quotas/index.html
@@ -3,7 +3,7 @@
{% block title %}Quotas{% endblock %}
{% block page_header %}
- {% url horizon:syspanel:quotas:index as refresh_link %}
+ {% url horizon:admin:quotas:index as refresh_link %}
{# to make searchable false, just remove it from the include statement #}
{% include "horizon/common/_page_header.html" with title=_("Default Quotas") refresh_link=refresh_link searchable="true" %}
{% endblock page_header %}
diff --git a/horizon/dashboards/syspanel/quotas/tests.py b/horizon/dashboards/admin/quotas/tests.py
similarity index 100%
rename from horizon/dashboards/syspanel/quotas/tests.py
rename to horizon/dashboards/admin/quotas/tests.py
diff --git a/horizon/dashboards/syspanel/quotas/urls.py b/horizon/dashboards/admin/quotas/urls.py
similarity index 93%
rename from horizon/dashboards/syspanel/quotas/urls.py
rename to horizon/dashboards/admin/quotas/urls.py
index 48c47f1c4..45e1fd7f0 100644
--- a/horizon/dashboards/syspanel/quotas/urls.py
+++ b/horizon/dashboards/admin/quotas/urls.py
@@ -23,5 +23,5 @@ from django.conf.urls.defaults import patterns, url
from .views import IndexView
-urlpatterns = patterns('horizon.dashboards.syspanel.quotas.views',
+urlpatterns = patterns('horizon.dashboards.admin.quotas.views',
url(r'^$', IndexView.as_view(), name='index'))
diff --git a/horizon/dashboards/syspanel/quotas/views.py b/horizon/dashboards/admin/quotas/views.py
similarity index 96%
rename from horizon/dashboards/syspanel/quotas/views.py
rename to horizon/dashboards/admin/quotas/views.py
index 3691d3748..d8e548041 100644
--- a/horizon/dashboards/syspanel/quotas/views.py
+++ b/horizon/dashboards/admin/quotas/views.py
@@ -33,7 +33,7 @@ LOG = logging.getLogger(__name__)
class IndexView(tables.DataTableView):
table_class = QuotasTable
- template_name = 'syspanel/quotas/index.html'
+ template_name = 'admin/quotas/index.html'
def get_data(self):
try:
diff --git a/horizon/dashboards/nova/instances/__init__.py b/horizon/dashboards/admin/services/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/instances/__init__.py
rename to horizon/dashboards/admin/services/__init__.py
diff --git a/horizon/dashboards/syspanel/services/panel.py b/horizon/dashboards/admin/services/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/services/panel.py
rename to horizon/dashboards/admin/services/panel.py
index 170fa4f49..19541e9fb 100644
--- a/horizon/dashboards/syspanel/services/panel.py
+++ b/horizon/dashboards/admin/services/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Services(horizon.Panel):
@@ -29,4 +29,4 @@ class Services(horizon.Panel):
slug = 'services'
-dashboard.Syspanel.register(Services)
+dashboard.Admin.register(Services)
diff --git a/horizon/dashboards/syspanel/services/tables.py b/horizon/dashboards/admin/services/tables.py
similarity index 94%
rename from horizon/dashboards/syspanel/services/tables.py
rename to horizon/dashboards/admin/services/tables.py
index 71f61be66..fd9aa8cad 100644
--- a/horizon/dashboards/syspanel/services/tables.py
+++ b/horizon/dashboards/admin/services/tables.py
@@ -22,7 +22,7 @@ class ServiceFilterAction(tables.FilterAction):
def get_stats(service):
- return template.loader.render_to_string('syspanel/services/_stats.html',
+ return template.loader.render_to_string('admin/services/_stats.html',
{'service': service})
diff --git a/horizon/dashboards/syspanel/services/templates/services/index.html b/horizon/dashboards/admin/services/templates/services/index.html
similarity index 86%
rename from horizon/dashboards/syspanel/services/templates/services/index.html
rename to horizon/dashboards/admin/services/templates/services/index.html
index b38d8d68c..abfba78dd 100644
--- a/horizon/dashboards/syspanel/services/templates/services/index.html
+++ b/horizon/dashboards/admin/services/templates/services/index.html
@@ -3,7 +3,7 @@
{% block title %}Services{% endblock %}
{% block page_header %}
- {% url horizon:syspanel:services:index as refresh_link %}
+ {% url horizon:admin:services:index as refresh_link %}
{# to make searchable false, just remove it from the include statement #}
{% include "horizon/common/_page_header.html" with title=_("Services") refresh_link=refresh_link searchable="true" %}
{% endblock page_header %}
diff --git a/horizon/dashboards/syspanel/services/tests.py b/horizon/dashboards/admin/services/tests.py
similarity index 91%
rename from horizon/dashboards/syspanel/services/tests.py
rename to horizon/dashboards/admin/services/tests.py
index dbbedce9a..055c9a7fd 100644
--- a/horizon/dashboards/syspanel/services/tests.py
+++ b/horizon/dashboards/admin/services/tests.py
@@ -19,13 +19,13 @@ from django.core.urlresolvers import reverse
from horizon import test
-INDEX_URL = reverse('horizon:syspanel:services:index')
+INDEX_URL = reverse('horizon:admin:services:index')
class ServicessViewTests(test.BaseAdminViewTests):
def test_index(self):
res = self.client.get(INDEX_URL)
- self.assertTemplateUsed(res, 'syspanel/services/index.html')
+ self.assertTemplateUsed(res, 'admin/services/index.html')
self.assertQuerysetEqual(res.context['table'].data,
['',
'',
diff --git a/horizon/dashboards/syspanel/services/urls.py b/horizon/dashboards/admin/services/urls.py
similarity index 93%
rename from horizon/dashboards/syspanel/services/urls.py
rename to horizon/dashboards/admin/services/urls.py
index 556ee9179..11a771017 100644
--- a/horizon/dashboards/syspanel/services/urls.py
+++ b/horizon/dashboards/admin/services/urls.py
@@ -23,5 +23,5 @@ from django.conf.urls.defaults import patterns, url
from .views import IndexView
-urlpatterns = patterns('horizon.dashboards.syspanel.services.views',
+urlpatterns = patterns('horizon.dashboards.admin.services.views',
url(r'^$', IndexView.as_view(), name='index'))
diff --git a/horizon/dashboards/syspanel/services/views.py b/horizon/dashboards/admin/services/views.py
similarity index 96%
rename from horizon/dashboards/syspanel/services/views.py
rename to horizon/dashboards/admin/services/views.py
index 480c865ec..af449f388 100644
--- a/horizon/dashboards/syspanel/services/views.py
+++ b/horizon/dashboards/admin/services/views.py
@@ -30,7 +30,7 @@ LOG = logging.getLogger(__name__)
class IndexView(tables.DataTableView):
table_class = ServicesTable
- template_name = 'syspanel/services/index.html'
+ template_name = 'admin/services/index.html'
def get_data(self):
services = []
diff --git a/horizon/dashboards/nova/networks/__init__.py b/horizon/dashboards/admin/users/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/networks/__init__.py
rename to horizon/dashboards/admin/users/__init__.py
diff --git a/horizon/dashboards/syspanel/users/forms.py b/horizon/dashboards/admin/users/forms.py
similarity index 99%
rename from horizon/dashboards/syspanel/users/forms.py
rename to horizon/dashboards/admin/users/forms.py
index c12ac9ec9..3ba7cdb2b 100644
--- a/horizon/dashboards/syspanel/users/forms.py
+++ b/horizon/dashboards/admin/users/forms.py
@@ -54,7 +54,7 @@ class BaseUserForm(forms.SelfHandlingForm):
return data
-ADD_PROJECT_URL = "horizon:syspanel:projects:create"
+ADD_PROJECT_URL = "horizon:admin:projects:create"
class CreateUserForm(BaseUserForm):
diff --git a/horizon/dashboards/syspanel/users/panel.py b/horizon/dashboards/admin/users/panel.py
similarity index 91%
rename from horizon/dashboards/syspanel/users/panel.py
rename to horizon/dashboards/admin/users/panel.py
index 8e9536b41..d59a9f9d3 100644
--- a/horizon/dashboards/syspanel/users/panel.py
+++ b/horizon/dashboards/admin/users/panel.py
@@ -21,7 +21,7 @@
from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Users(horizon.Panel):
@@ -29,4 +29,4 @@ class Users(horizon.Panel):
slug = 'users'
-dashboard.Syspanel.register(Users)
+dashboard.Admin.register(Users)
diff --git a/horizon/dashboards/syspanel/users/tables.py b/horizon/dashboards/admin/users/tables.py
similarity index 97%
rename from horizon/dashboards/syspanel/users/tables.py
rename to horizon/dashboards/admin/users/tables.py
index bc405175d..9c1aec1ae 100644
--- a/horizon/dashboards/syspanel/users/tables.py
+++ b/horizon/dashboards/admin/users/tables.py
@@ -17,7 +17,7 @@ DISABLE = 1
class CreateUserLink(tables.LinkAction):
name = "create"
verbose_name = _("Create User")
- url = "horizon:syspanel:users:create"
+ url = "horizon:admin:users:create"
classes = ("ajax-modal", "btn-create")
def allowed(self, request, user):
@@ -29,7 +29,7 @@ class CreateUserLink(tables.LinkAction):
class EditUserLink(tables.LinkAction):
name = "edit"
verbose_name = _("Edit")
- url = "horizon:syspanel:users:update"
+ url = "horizon:admin:users:update"
classes = ("ajax-modal", "btn-edit")
diff --git a/horizon/dashboards/syspanel/users/templates/users/_create.html b/horizon/dashboards/admin/users/templates/users/_create.html
similarity index 76%
rename from horizon/dashboards/syspanel/users/templates/users/_create.html
rename to horizon/dashboards/admin/users/templates/users/_create.html
index f72c166b8..ddcdc6d56 100644
--- a/horizon/dashboards/syspanel/users/templates/users/_create.html
+++ b/horizon/dashboards/admin/users/templates/users/_create.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}create_user_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:users:create %}{% endblock %}
+{% block form_action %}{% url horizon:admin:users:create %}{% endblock %}
{% block modal-header %}{% trans "Create User" %}{% endblock %}
@@ -20,5 +20,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/users/templates/users/_update.html b/horizon/dashboards/admin/users/templates/users/_update.html
similarity index 76%
rename from horizon/dashboards/syspanel/users/templates/users/_update.html
rename to horizon/dashboards/admin/users/templates/users/_update.html
index b324345f0..9e662e6cf 100644
--- a/horizon/dashboards/syspanel/users/templates/users/_update.html
+++ b/horizon/dashboards/admin/users/templates/users/_update.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}update_user_form{% endblock %}
-{% block form_action %}{% url horizon:syspanel:users:update user.id %}{% endblock %}
+{% block form_action %}{% url horizon:admin:users:update user.id %}{% endblock %}
{% block modal-header %}{% trans "Update User" %}{% endblock %}
@@ -20,5 +20,5 @@
{% block modal-footer %}
- {% trans "Cancel" %}
+ {% trans "Cancel" %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/users/templates/users/create.html b/horizon/dashboards/admin/users/templates/users/create.html
similarity index 87%
rename from horizon/dashboards/syspanel/users/templates/users/create.html
rename to horizon/dashboards/admin/users/templates/users/create.html
index f44e77d6c..6315a7546 100644
--- a/horizon/dashboards/syspanel/users/templates/users/create.html
+++ b/horizon/dashboards/admin/users/templates/users/create.html
@@ -8,5 +8,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'syspanel/users/_create.html' %}
+ {% include 'admin/users/_create.html' %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/users/templates/users/index.html b/horizon/dashboards/admin/users/templates/users/index.html
similarity index 86%
rename from horizon/dashboards/syspanel/users/templates/users/index.html
rename to horizon/dashboards/admin/users/templates/users/index.html
index 657bff648..e48701aeb 100644
--- a/horizon/dashboards/syspanel/users/templates/users/index.html
+++ b/horizon/dashboards/admin/users/templates/users/index.html
@@ -3,7 +3,7 @@
{% block title %}Users{% endblock %}
{% block page_header %}
- {% url horizon:syspanel:users:index as refresh_link %}
+ {% url horizon:admin:users:index as refresh_link %}
{# to make searchable false, just remove it from the include statement #}
{% include "horizon/common/_page_header.html" with title=_("Users") refresh_link=refresh_link searchable="true" %}
{% endblock page_header %}
diff --git a/horizon/dashboards/syspanel/users/templates/users/update.html b/horizon/dashboards/admin/users/templates/users/update.html
similarity index 87%
rename from horizon/dashboards/syspanel/users/templates/users/update.html
rename to horizon/dashboards/admin/users/templates/users/update.html
index d0f000fab..b28017560 100644
--- a/horizon/dashboards/syspanel/users/templates/users/update.html
+++ b/horizon/dashboards/admin/users/templates/users/update.html
@@ -8,5 +8,5 @@
{% endblock page_header %}
{% block main %}
- {% include 'syspanel/users/_update.html' %}
+ {% include 'admin/users/_update.html' %}
{% endblock %}
diff --git a/horizon/dashboards/syspanel/users/tests.py b/horizon/dashboards/admin/users/tests.py
similarity index 98%
rename from horizon/dashboards/syspanel/users/tests.py
rename to horizon/dashboards/admin/users/tests.py
index b2cd75b28..e99566fad 100644
--- a/horizon/dashboards/syspanel/users/tests.py
+++ b/horizon/dashboards/admin/users/tests.py
@@ -26,9 +26,9 @@ from horizon import api
from horizon import test
-USERS_INDEX_URL = reverse('horizon:syspanel:users:index')
-USER_CREATE_URL = reverse('horizon:syspanel:users:create')
-USER_UPDATE_URL = reverse('horizon:syspanel:users:update', args=[1])
+USERS_INDEX_URL = reverse('horizon:admin:users:index')
+USER_CREATE_URL = reverse('horizon:admin:users:create')
+USER_UPDATE_URL = reverse('horizon:admin:users:update', args=[1])
class UsersViewTests(test.BaseAdminViewTests):
@@ -40,7 +40,7 @@ class UsersViewTests(test.BaseAdminViewTests):
res = self.client.get(USERS_INDEX_URL)
- self.assertTemplateUsed(res, 'syspanel/users/index.html')
+ self.assertTemplateUsed(res, 'admin/users/index.html')
self.assertItemsEqual(res.context['table'].data, self.users.list())
@test.create_stubs({api: ('user_create',
diff --git a/horizon/dashboards/syspanel/users/urls.py b/horizon/dashboards/admin/users/urls.py
similarity index 94%
rename from horizon/dashboards/syspanel/users/urls.py
rename to horizon/dashboards/admin/users/urls.py
index ea796d13e..ee2b4a2f6 100644
--- a/horizon/dashboards/syspanel/users/urls.py
+++ b/horizon/dashboards/admin/users/urls.py
@@ -22,7 +22,7 @@ from django.conf.urls.defaults import patterns, url
from .views import IndexView, CreateView, UpdateView
-urlpatterns = patterns('horizon.dashboards.syspanel.users.views',
+urlpatterns = patterns('horizon.dashboards.admin.users.views',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^(?P[^/]+)/update/$', UpdateView.as_view(), name='update'),
url(r'^create/$', CreateView.as_view(), name='create'))
diff --git a/horizon/dashboards/syspanel/users/views.py b/horizon/dashboards/admin/users/views.py
similarity index 90%
rename from horizon/dashboards/syspanel/users/views.py
rename to horizon/dashboards/admin/users/views.py
index de7d1c91a..23a972b3b 100644
--- a/horizon/dashboards/syspanel/users/views.py
+++ b/horizon/dashboards/admin/users/views.py
@@ -35,7 +35,7 @@ from .tables import UsersTable
class IndexView(tables.DataTableView):
table_class = UsersTable
- template_name = 'syspanel/users/index.html'
+ template_name = 'admin/users/index.html'
def get_data(self):
users = []
@@ -49,8 +49,8 @@ class IndexView(tables.DataTableView):
class UpdateView(forms.ModalFormView):
form_class = UpdateUserForm
- template_name = 'syspanel/users/update.html'
- success_url = reverse_lazy('horizon:syspanel:users:index')
+ template_name = 'admin/users/update.html'
+ success_url = reverse_lazy('horizon:admin:users:index')
@method_decorator(sensitive_post_parameters('password',
'confirm_password'))
@@ -64,7 +64,7 @@ class UpdateView(forms.ModalFormView):
self.kwargs['user_id'],
admin=True)
except:
- redirect = reverse("horizon:syspanel:users:index")
+ redirect = reverse("horizon:admin:users:index")
exceptions.handle(self.request,
_('Unable to update user.'),
redirect=redirect)
@@ -85,8 +85,8 @@ class UpdateView(forms.ModalFormView):
class CreateView(forms.ModalFormView):
form_class = CreateUserForm
- template_name = 'syspanel/users/create.html'
- success_url = reverse_lazy('horizon:syspanel:users:index')
+ template_name = 'admin/users/create.html'
+ success_url = reverse_lazy('horizon:admin:users:index')
@method_decorator(sensitive_post_parameters('password',
'confirm_password'))
@@ -98,7 +98,7 @@ class CreateView(forms.ModalFormView):
try:
roles = api.keystone.role_list(self.request)
except:
- redirect = reverse("horizon:syspanel:users:index")
+ redirect = reverse("horizon:admin:users:index")
exceptions.handle(self.request,
_("Unable to retrieve user roles."),
redirect=redirect)
diff --git a/horizon/dashboards/nova/networks/ports/__init__.py b/horizon/dashboards/admin/volumes/__init__.py
similarity index 100%
rename from horizon/dashboards/nova/networks/ports/__init__.py
rename to horizon/dashboards/admin/volumes/__init__.py
diff --git a/horizon/dashboards/syspanel/volumes/panel.py b/horizon/dashboards/admin/volumes/panel.py
similarity index 69%
rename from horizon/dashboards/syspanel/volumes/panel.py
rename to horizon/dashboards/admin/volumes/panel.py
index 4c3159398..5ee2502b0 100644
--- a/horizon/dashboards/syspanel/volumes/panel.py
+++ b/horizon/dashboards/admin/volumes/panel.py
@@ -2,7 +2,7 @@ from django.utils.translation import ugettext_lazy as _
import horizon
-from horizon.dashboards.syspanel import dashboard
+from horizon.dashboards.admin import dashboard
class Volumes(horizon.Panel):
@@ -11,4 +11,4 @@ class Volumes(horizon.Panel):
permissions = ('openstack.services.volume',)
-dashboard.Syspanel.register(Volumes)
+dashboard.Admin.register(Volumes)
diff --git a/horizon/dashboards/syspanel/volumes/tables.py b/horizon/dashboards/admin/volumes/tables.py
similarity index 79%
rename from horizon/dashboards/syspanel/volumes/tables.py
rename to horizon/dashboards/admin/volumes/tables.py
index 91f11909f..de3563ffe 100644
--- a/horizon/dashboards/syspanel/volumes/tables.py
+++ b/horizon/dashboards/admin/volumes/tables.py
@@ -1,14 +1,14 @@
from django.utils.translation import ugettext_lazy as _
from horizon import tables
-from horizon.dashboards.nova.volumes.tables import (UpdateRow,
+from horizon.dashboards.project.volumes.tables import (UpdateRow,
VolumesTable as _VolumesTable, DeleteVolume)
class VolumesTable(_VolumesTable):
name = tables.Column("display_name",
verbose_name=_("Name"),
- link="horizon:syspanel:volumes:detail")
+ link="horizon:admin:volumes:detail")
class Meta:
name = "volumes"
diff --git a/horizon/dashboards/nova/volumes/templates/volumes/detail.html b/horizon/dashboards/admin/volumes/templates/volumes/detail.html
similarity index 100%
rename from horizon/dashboards/nova/volumes/templates/volumes/detail.html
rename to horizon/dashboards/admin/volumes/templates/volumes/detail.html
diff --git a/horizon/dashboards/syspanel/volumes/templates/volumes/index.html b/horizon/dashboards/admin/volumes/templates/volumes/index.html
similarity index 100%
rename from horizon/dashboards/syspanel/volumes/templates/volumes/index.html
rename to horizon/dashboards/admin/volumes/templates/volumes/index.html
diff --git a/horizon/dashboards/syspanel/volumes/tests.py b/horizon/dashboards/admin/volumes/tests.py
similarity index 90%
rename from horizon/dashboards/syspanel/volumes/tests.py
rename to horizon/dashboards/admin/volumes/tests.py
index 22acdadec..b35763ce2 100644
--- a/horizon/dashboards/syspanel/volumes/tests.py
+++ b/horizon/dashboards/admin/volumes/tests.py
@@ -31,9 +31,9 @@ class VolumeTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
- res = self.client.get(reverse('horizon:syspanel:volumes:index'))
+ res = self.client.get(reverse('horizon:admin:volumes:index'))
- self.assertTemplateUsed(res, 'syspanel/volumes/index.html')
+ self.assertTemplateUsed(res, 'admin/volumes/index.html')
volumes = res.context['volumes_table'].data
self.assertItemsEqual(volumes, self.volumes.list())
diff --git a/horizon/dashboards/syspanel/volumes/urls.py b/horizon/dashboards/admin/volumes/urls.py
similarity index 100%
rename from horizon/dashboards/syspanel/volumes/urls.py
rename to horizon/dashboards/admin/volumes/urls.py
diff --git a/horizon/dashboards/syspanel/volumes/views.py b/horizon/dashboards/admin/volumes/views.py
similarity index 83%
rename from horizon/dashboards/syspanel/volumes/views.py
rename to horizon/dashboards/admin/volumes/views.py
index 1406cbd25..240deddb3 100644
--- a/horizon/dashboards/syspanel/volumes/views.py
+++ b/horizon/dashboards/admin/volumes/views.py
@@ -15,17 +15,17 @@
# under the License.
"""
-Admin views for managing Nova volumes.
+Admin views for managing volumes.
"""
-from horizon.dashboards.nova.volumes.views import (IndexView as _IndexView,
+from horizon.dashboards.project.volumes.views import (IndexView as _IndexView,
DetailView as _DetailView)
from .tables import VolumesTable
class IndexView(_IndexView):
table_class = VolumesTable
- template_name = "syspanel/volumes/index.html"
+ template_name = "admin/volumes/index.html"
def get_data(self):
volumes = self._get_volumes(search_opts={'all_tenants': 1})
@@ -36,4 +36,4 @@ class IndexView(_IndexView):
class DetailView(_DetailView):
- template_name = "syspanel/volumes/detail.html"
+ template_name = "admin/volumes/detail.html"
diff --git a/horizon/dashboards/nova/templates/nova/_warning.html b/horizon/dashboards/nova/templates/nova/_warning.html
deleted file mode 100644
index 58171fe69..000000000
--- a/horizon/dashboards/nova/templates/nova/_warning.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{% load i18n %}
-
-
-
-
-
{% trans "You currently have the power to damage your OpenStack cloud..." %}
-
-
-
{% blocktrans %}Due to inconsistencies in the way Nova interacts with Keystone, a user with an admin role has access to all resources in the system (volumes, snapshots, keypairs, etc.), even in the Project dashboard where they should only see a properly-scoped subset of those resources.{% endblocktrans %}
-
{% blocktrans %}This means that Nova allows an admin user in the Project Dashboard to successfully take actions which otherwise should not be permitted, causing irresolvable conflicts in Nova.{% endblocktrans %}
-
{% blocktrans %}A list of the known problems are as follows:{% endblocktrans %}
-
-
{% blocktrans %}Attaching a volume owned by project A to an instance in project B can completely hang Nova.{% endblocktrans %}
-
{% blocktrans %}Assigning keypairs owned by project A to an instance in project B can result in failed instances, problems in retrieving instance details for non-admin users, and/or security holes should the instance succeed in spawning.{% endblocktrans %}
-
{% blocktrans %}Attempting to launch an instance in project A from a snapshot or volume snapshot owned by project B can hang Nova.{% endblocktrans %}
-
{% blocktrans %}Attempting to boot from a volume owned by project A in project B can hang Nova.{% endblocktrans %}
-
-
{% blocktrans %}This is only a list of the reported inconsistencies. There may be others.{% endblocktrans %}
-
{% blocktrans %}The recommended practice until this problem is resolved is to keep your admin users and regular users separate. Create an "admin" project that admin users have access to, and do not grant your admin users the admin role on any other projects.{% endblocktrans %}
-
{% blocktrans %}To follow the status of this bug, take a look at the following items on launchpad:{% endblocktrans %}
-