Renames legacy dashboards.

The "Nova" dashboard is now "Project" and the "Syspanel" dashboard
is now "Admin" to match the current real names of the dashboards
which better match their purposes.

Implements blueprint fix-legacy-dashboard-names

Change-Id: I702aa0d54c4e3b0ac10db46e6d6ed32803919b7b
This commit is contained in:
Gabriel Hurley 2012-10-03 14:29:24 -07:00
parent b8c2634f65
commit a058bfc1d6
307 changed files with 766 additions and 811 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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")

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Create Flavor" %}" />
<a href="{% url horizon:syspanel:flavors:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:flavors:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Save" %}" />
<a href="{% url horizon:syspanel:flavors:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:flavors:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include "syspanel/flavors/_create.html" %}
{% include "admin/flavors/_create.html" %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include "syspanel/flavors/_edit.html" %}
{% include "admin/flavors/_edit.html" %}
{% endblock %}

View File

@ -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"))

View File

@ -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<id>[^/]+)/edit/$', EditView.as_view(), name='edit')

View File

@ -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)

View File

@ -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):

View File

@ -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)

View File

@ -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:

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Update Image" %}" />
<a href="{% url horizon:syspanel:images:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:images:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -8,5 +8,5 @@
{% endblock page_header %}
{% block main %}
{% include 'syspanel/images/_update.html' %}
{% include 'admin/images/_update.html' %}
{% endblock %}

View File

@ -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)

View File

@ -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<image_id>[^/]+)/update/$', UpdateView.as_view(), name='update'),
url(r'^(?P<image_id>[^/]+)/detail/$', DetailView.as_view(), name='detail')

View File

@ -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):

View File

@ -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)

View File

@ -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,

View File

@ -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, {},

View File

@ -26,7 +26,7 @@ from .views import DetailView, AdminIndexView
INSTANCES = r'^(?P<instance_id>[^/]+)/%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'),

View File

@ -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 = []

View File

@ -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:

View File

@ -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)

View File

@ -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)

View File

@ -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"))

View File

@ -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}

View File

@ -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<port_id>[^/]+)/%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'))

View File

@ -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)

View File

@ -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'

View File

@ -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"))

View File

@ -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<subnet_id>[^/]+)/%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'))

View File

@ -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)

View File

@ -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"),

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Create Network" %}" />
<a href="{% url horizon:syspanel:networks:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:networks:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Save Changes" %}" />
<a href="{% url horizon:nova:networks:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:networks:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include "syspanel/networks/_create.html" %}
{% include "admin/networks/_create.html" %}
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Create Port" %}" />
<a href="{% url horizon:syspanel:networks:detail network.id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:networks:detail network.id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Save Changes" %}" />
<a href="{% url horizon:syspanel:networks:detail network_id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:networks:detail network_id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include "syspanel/networks/ports/_create.html" %}
{% include "admin/networks/ports/_create.html" %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'syspanel/networks/ports/_update.html' %}
{% include 'admin/networks/ports/_update.html' %}
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Create Subnet" %}" />
<a href="{% url horizon:syspanel:networks:detail network.id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:networks:detail network.id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Save Changes" %}" />
<a href="{% url horizon:syspanel:networks:detail network_id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:networks:detail network_id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include "nova/networks/subnets/_create.html" %}
{% include "admin/networks/subnets/_create.html" %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'nova/networks/subnets/_update.html' %}
{% include 'admin/networks/subnets/_update.html' %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'nova/networks/_update.html' %}
{% include 'admin/networks/_update.html' %}
{% endblock %}

View File

@ -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)

View File

@ -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()

View File

@ -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)

View File

Can't render this file because it contains an unexpected character in line 1 and column 46.

View File

@ -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,
'<td class="sortable normal_column">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' %

View File

@ -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)

View File

@ -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):

View File

@ -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)

View File

@ -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):

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Add" %}" />
<a href="{% url horizon:syspanel:projects:users tenant_id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:projects:users tenant_id %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Create Project" %}" />
<a href="{% url horizon:syspanel:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Create User" %}" />
<a href="{% url horizon:syspanel:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Update Quota" %}" />
<a href="{% url horizon:syspanel:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -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 %}
<input class="btn btn-primary pull-right" type="submit" value="{% trans "Update Project" %}" />
<a href="{% url horizon:syspanel:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
<a href="{% url horizon:admin:projects:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'syspanel/projects/_add_user.html' %}
{% include 'admin/projects/_add_user.html' %}
{% endblock %}

View File

@ -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 %}

View File

@ -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 %}

View File

Can't render this file because it contains an unexpected character in line 1 and column 46.

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 %}

View File

@ -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'))

Some files were not shown because too many files have changed in this diff Show More