urls.py 5.56 KB
Newer Older
Kálmán Viktor committed
1
from django.conf.urls import patterns, url
2

3
from .views import (
4 5 6 7 8 9 10 11 12
    AclUpdateView, DiskAddView, FavouriteView, GroupAclUpdateView, GroupDelete,
    GroupDetailView, GroupList, GroupUserDelete, IndexView, LeaseCreate,
    LeaseDelete, LeaseDetail, MyPreferencesView, NodeAddTraitView, NodeCreate,
    NodeDelete, NodeDetailView, NodeFlushView, NodeGraphView, NodeList,
    NodeStatus, NotificationView, PortDelete, TemplateAclUpdateView,
    TemplateCreate, TemplateDelete, TemplateDetail, TemplateList,
    TransferOwnershipConfirmView, TransferOwnershipView, vm_activity, VmCreate,
    VmDelete, VmDetailView, VmDetailVncTokenView, VmGraphView, VmList,
    VmMassDelete, VmMigrateView, VmRenewView, GroupRemoveAclUserView,
13
    GroupRemoveAclGroupView, GroupRemoveUserView, GroupCreate,
14
)
15

16 17
from vm.models import Instance

18

Kálmán Viktor committed
19 20
urlpatterns = patterns(
    '',
Kálmán Viktor committed
21
    url(r'^$', IndexView.as_view(), name="dashboard.index"),
22 23
    url(r'^lease/(?P<pk>\d+)/$', LeaseDetail.as_view(),
        name="dashboard.views.lease-detail"),
24 25
    url(r'^lease/create/$', LeaseCreate.as_view(),
        name="dashboard.views.lease-create"),
26 27
    url(r'^lease/delete/(?P<pk>\d+)/$', LeaseDelete.as_view(),
        name="dashboard.views.lease-delete"),
28

29 30
    url(r'^template/create/$', TemplateCreate.as_view(),
        name="dashboard.views.template-create"),
31 32
    url(r'template/(?P<pk>\d+)/acl/$', TemplateAclUpdateView.as_view(),
        name='dashboard.views.template-acl'),
33 34
    url(r'^template/(?P<pk>\d+)/$', TemplateDetail.as_view(),
        name='dashboard.views.template-detail'),
35 36
    url(r"^template/list/$", TemplateList.as_view(),
        name="dashboard.views.template-list"),
37 38
    url(r"^template/delete/(?P<pk>\d+)/$", TemplateDelete.as_view(),
        name="dashboard.views.template-delete"),
39

40 41
    url(r'^vm/(?P<pk>\d+)/remove_port/(?P<rule>\d+)/$', PortDelete.as_view(),
        name='dashboard.views.remove-port'),
Kálmán Viktor committed
42 43
    url(r'^vm/(?P<pk>\d+)/$', VmDetailView.as_view(),
        name='dashboard.views.detail'),
44 45
    url(r'^vm/(?P<pk>\d+)/vnctoken/$', VmDetailVncTokenView.as_view(),
        name='dashboard.views.detail-vnc'),
46 47
    url(r'^vm/(?P<pk>\d+)/acl/$', AclUpdateView.as_view(model=Instance),
        name='dashboard.views.vm-acl'),
48 49
    url(r'^vm/(?P<pk>\d+)/tx/$', TransferOwnershipView.as_view(),
        name='dashboard.views.vm-transfer-ownership'),
Kálmán Viktor committed
50
    url(r'^vm/list/$', VmList.as_view(), name='dashboard.views.vm-list'),
51 52
    url(r'^vm/create/$', VmCreate.as_view(),
        name='dashboard.views.vm-create'),
53
    url(r'^vm/delete/(?P<pk>\d+)/$', VmDelete.as_view(),
Kálmán Viktor committed
54
        name="dashboard.views.delete-vm"),
55
    url(r'^vm/mass-delete/', VmMassDelete.as_view(),
56
        name='dashboard.view.mass-delete-vm'),
57
    url(r'^vm/(?P<pk>\d+)/activity/$', vm_activity),
58 59
    url(r'^vm/(?P<pk>\d+)/migrate/$', VmMigrateView.as_view(),
        name='dashboard.views.vm-migrate'),
Őry Máté committed
60 61
    url(r'^vm/(?P<pk>\d+)/renew/((?P<key>.*)/?)$', VmRenewView.as_view(),
        name='dashboard.views.vm-renew'),
62

63 64 65
    url(r'^node/list/$', NodeList.as_view(), name='dashboard.views.node-list'),
    url(r'^node/(?P<pk>\d+)/$', NodeDetailView.as_view(),
        name='dashboard.views.node-detail'),
66 67
    url(r'^node/(?P<pk>\d+)/add-trait/$', NodeAddTraitView.as_view(),
        name='dashboard.views.node-addtrait'),
68
    url(r'^tx/(?P<key>.*)/?$', TransferOwnershipConfirmView.as_view(),
69
        name='dashboard.views.vm-transfer-ownership-confirm'),
70 71
    url(r'^node/delete/(?P<pk>\d+)/$', NodeDelete.as_view(),
        name="dashboard.views.delete-node"),
72 73
    url(r'^node/status/(?P<pk>\d+)/$', NodeStatus.as_view(),
        name="dashboard.views.status-node"),
74 75
    url(r'^node/flush/(?P<pk>\d+)/$', NodeFlushView.as_view(),
        name="dashboard.views.flush-node"),
76 77
    url(r'^node/create/$', NodeCreate.as_view(),
        name='dashboard.views.node-create'),
78

79 80
    url(r'^favourite/$', FavouriteView.as_view(),
        name='dashboard.views.favourite'),
81 82
    url(r'^group/delete/(?P<pk>\d+)/$', GroupDelete.as_view(),
        name="dashboard.views.delete-group"),
83 84
    url(r'^group/list/$', GroupList.as_view(),
        name='dashboard.views.group-list'),
85
    url((r'^vm/(?P<pk>\d+)/graph/(?P<metric>cpu|memory|network)/'
86
         r'(?P<time>[0-9]{1,2}[hdwy])$'),
87 88
        VmGraphView.as_view(),
        name='dashboard.views.vm-graph'),
89 90 91 92
    url((r'^node/(?P<pk>\d+)/graph/(?P<metric>cpu|memory|network)/'
         r'(?P<time>[0-9]{1,2}[hdwy])$'),
        NodeGraphView.as_view(),
        name='dashboard.views.node-graph'),
93 94
    url(r'^group/(?P<pk>\d+)/$', GroupDetailView.as_view(),
        name='dashboard.views.group-detail'),
95 96 97 98
    url(r'^group/(?P<pk>\d+)/acl/$', GroupAclUpdateView.as_view(),
        name='dashboard.views.group-acl'),
    url(r'^groupuser/delete/(?P<pk>\d+)/$', GroupUserDelete.as_view(),
        name="dashboard.views.delete-groupuser"),
99 100
    url(r'^notifications/$', NotificationView.as_view(),
        name="dashboard.views.notifications"),
101

102
    url(r'^disk/add/$', DiskAddView.as_view(),
103
        name="dashboard.views.disk-add"),
104 105
    url(r'^profile/$', MyPreferencesView.as_view(),
        name="dashboard.views.profile"),
106 107 108 109 110 111 112 113 114
    url(r'^group/(?P<group_pk>\d+)/remove/acl/user/(?P<user_pk>\d+)/$',
        GroupRemoveAclUserView.as_view(),
        name="dashboard.views.remove-acluser"),
    url(r'^group/(?P<group_pk>\d+)/remove/acl/group/(?P<user_pk>\d+)/$',
        GroupRemoveAclGroupView.as_view(),
        name="dashboard.views.remove-aclgroup"),
    url(r'^group/(?P<group_pk>\d+)/remove/user/(?P<user_pk>\d+)/$',
        GroupRemoveUserView.as_view(),
        name="dashboard.views.remove-user"),
115 116
    url(r'^group/create/$', GroupCreate.as_view(),
        name='dashboard.views.group-create'),
Kálmán Viktor committed
117
)